qcacmn: Add an API to get number of station mld device contexts
Add an API to get number of station mld device contexts Change-Id: I91bdbfda36e596b7456482f5f0480a341d4e6ed5 CRs-Fixed: 3361088
This commit is contained in:

committed by
Madan Koyyalamudi

parent
c811b9d544
commit
f27e31059b
@@ -784,6 +784,15 @@ QDF_STATUS wlan_mlo_mgr_update_mld_addr(struct qdf_mac_addr *old_mac,
|
|||||||
*/
|
*/
|
||||||
bool wlan_mlo_is_mld_ctx_exist(struct qdf_mac_addr *mldaddr);
|
bool wlan_mlo_is_mld_ctx_exist(struct qdf_mac_addr *mldaddr);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wlan_mlo_get_sta_mld_ctx_count() - Get number of sta mld device context
|
||||||
|
*
|
||||||
|
* API to get number of sta mld device context
|
||||||
|
*
|
||||||
|
* Return: number of sta mld device context
|
||||||
|
*/
|
||||||
|
uint8_t wlan_mlo_get_sta_mld_ctx_count(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wlan_mlo_get_mld_ctx_by_mldaddr() - Get mld device context using mld
|
* wlan_mlo_get_mld_ctx_by_mldaddr() - Get mld device context using mld
|
||||||
* MAC address
|
* MAC address
|
||||||
@@ -846,5 +855,11 @@ bool mlo_mgr_ml_peer_exist(uint8_t *peer_addr)
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline
|
||||||
|
uint8_t wlan_mlo_get_sta_mld_ctx_count(void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@@ -216,6 +216,34 @@ struct wlan_mlo_dev_context *mlo_get_next_mld_ctx(qdf_list_t *ml_list,
|
|||||||
return mld_next;
|
return mld_next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint8_t wlan_mlo_get_sta_mld_ctx_count(void)
|
||||||
|
{
|
||||||
|
struct wlan_mlo_dev_context *mld_cur;
|
||||||
|
struct wlan_mlo_dev_context *mld_next;
|
||||||
|
qdf_list_t *ml_list;
|
||||||
|
struct mlo_mgr_context *mlo_mgr_ctx = wlan_objmgr_get_mlo_ctx();
|
||||||
|
uint8_t count = 0;
|
||||||
|
|
||||||
|
if (!mlo_mgr_ctx)
|
||||||
|
return count;
|
||||||
|
|
||||||
|
ml_link_lock_acquire(mlo_mgr_ctx);
|
||||||
|
ml_list = &mlo_mgr_ctx->ml_dev_list;
|
||||||
|
/* Get first mld context */
|
||||||
|
mld_cur = mlo_list_peek_head(ml_list);
|
||||||
|
|
||||||
|
while (mld_cur) {
|
||||||
|
/* get next mld node */
|
||||||
|
if (mld_cur->sta_ctx)
|
||||||
|
count++;
|
||||||
|
mld_next = mlo_get_next_mld_ctx(ml_list, mld_cur);
|
||||||
|
mld_cur = mld_next;
|
||||||
|
}
|
||||||
|
ml_link_lock_release(mlo_mgr_ctx);
|
||||||
|
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
struct wlan_mlo_dev_context
|
struct wlan_mlo_dev_context
|
||||||
*wlan_mlo_get_mld_ctx_by_mldaddr(struct qdf_mac_addr *mldaddr)
|
*wlan_mlo_get_mld_ctx_by_mldaddr(struct qdf_mac_addr *mldaddr)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user