qcacmn: Cleanup duplicate STA inactivity detection
Move the station inactivity detection code from datapath to SON layer. Change-Id: Ia071a19ce2fd36b46a8b0bf4362077609e8b98f9 CRs-Fixed: 2326638
This commit is contained in:

committed by
nshrivas

parent
3871ce8c90
commit
9e0e1667d4
@@ -346,128 +346,6 @@ cdp_peer_authorize(ol_txrx_soc_handle soc,
|
||||
(peer, authorize);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
cdp_set_inact_params(ol_txrx_soc_handle soc, struct cdp_pdev *pdev,
|
||||
u_int16_t inact_check_interval,
|
||||
u_int16_t inact_normal,
|
||||
u_int16_t inact_overload)
|
||||
{
|
||||
if (!soc || !pdev || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance:", __func__);
|
||||
QDF_BUG(0);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!soc->ops->ctrl_ops ||
|
||||
!soc->ops->ctrl_ops->txrx_set_inact_params)
|
||||
return false;
|
||||
|
||||
return soc->ops->ctrl_ops->txrx_set_inact_params
|
||||
(pdev, inact_check_interval, inact_normal,
|
||||
inact_overload);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
cdp_start_inact_timer(ol_txrx_soc_handle soc,
|
||||
struct cdp_pdev *pdev,
|
||||
bool enable)
|
||||
{
|
||||
if (!soc || !pdev || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance:", __func__);
|
||||
QDF_BUG(0);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!soc->ops->ctrl_ops ||
|
||||
!soc->ops->ctrl_ops->txrx_start_inact_timer)
|
||||
return false;
|
||||
|
||||
return soc->ops->ctrl_ops->txrx_start_inact_timer
|
||||
(pdev, enable);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the overload status of the radio
|
||||
* @details
|
||||
* Set the overload status of the radio, updating the inactivity
|
||||
* threshold and inactivity count for each node.
|
||||
*
|
||||
* @param pdev - the data physical device object
|
||||
* @param overload - whether the radio is overloaded or not
|
||||
*/
|
||||
static inline void
|
||||
cdp_set_overload(ol_txrx_soc_handle soc, struct cdp_pdev *pdev,
|
||||
bool overload)
|
||||
{
|
||||
if (!soc || !pdev || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance:", __func__);
|
||||
QDF_BUG(0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!soc->ops->ctrl_ops ||
|
||||
!soc->ops->ctrl_ops->txrx_set_overload)
|
||||
return;
|
||||
|
||||
soc->ops->ctrl_ops->txrx_set_overload(pdev, overload);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Check the inactivity status of the peer/node
|
||||
*
|
||||
* @param peer - pointer to the node's object
|
||||
* @return true if the node is inactive; otherwise return false
|
||||
*/
|
||||
static inline bool
|
||||
cdp_peer_is_inact(ol_txrx_soc_handle soc, void *peer)
|
||||
{
|
||||
if (!soc || !peer || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance:", __func__);
|
||||
QDF_BUG(0);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!soc->ops->ctrl_ops ||
|
||||
!soc->ops->ctrl_ops->txrx_peer_is_inact)
|
||||
return false;
|
||||
|
||||
return soc->ops->ctrl_ops->txrx_peer_is_inact(peer);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Mark inactivity status of the peer/node
|
||||
* @details
|
||||
* If it becomes active, reset inactivity count to reload value;
|
||||
* if the inactivity status changed, notify umac band steering.
|
||||
*
|
||||
* @param peer - pointer to the node's object
|
||||
* @param inactive - whether the node is inactive or not
|
||||
*/
|
||||
static inline void
|
||||
cdp_mark_peer_inact(ol_txrx_soc_handle soc,
|
||||
void *peer,
|
||||
bool inactive)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance:", __func__);
|
||||
QDF_BUG(0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!soc->ops->ctrl_ops ||
|
||||
!soc->ops->ctrl_ops->txrx_mark_peer_inact)
|
||||
return;
|
||||
|
||||
soc->ops->ctrl_ops->txrx_mark_peer_inact
|
||||
(peer, inactive);
|
||||
}
|
||||
|
||||
|
||||
/* Should be ol_txrx_ctrl_api.h */
|
||||
static inline void cdp_set_mesh_mode
|
||||
(ol_txrx_soc_handle soc, struct cdp_vdev *vdev, u_int32_t val)
|
||||
|
Reference in New Issue
Block a user