qcacmn: Count MLO vdevs in a pdev
Count the MLO vdevs in a pdev. WLAN_VDEV_FEXT2_MLO feature flag in vdev object is set for all MLO vdevs. Simple solution is to increment/decrement the count on every set/clear of WLAN_VDEV_FEXT2_MLO feature flag. Since this feature flag will be set/clear at multiple places for a given vdev, this approach will lead to wrong MLO vdev count. To fix this we need to increment/decrement the count on first set/first clear of WLAN_VDEV_FEXT2_MLO flag. Add a lock also to prevent the race conditions. CRs-Fixed: 3106235 Change-Id: Ice7edde04553088fbb7c9b769508d441ccd6e4bf
Цей коміт міститься в:

зафіксовано
Madan Koyyalamudi

джерело
70a8e8a708
коміт
40dacfa471
@@ -48,7 +48,7 @@ bool mlo_ap_vdev_attach(struct wlan_objmgr_vdev *vdev,
|
||||
|
||||
dev_ctx = vdev->mlo_dev_ctx;
|
||||
wlan_vdev_set_link_id(vdev, link_id);
|
||||
wlan_vdev_mlme_feat_ext2_cap_set(vdev, WLAN_VDEV_FEXT2_MLO);
|
||||
wlan_vdev_mlme_set_mlo_vdev(vdev);
|
||||
|
||||
/**
|
||||
* every link will trigger mlo_ap_vdev_attach,
|
||||
@@ -86,7 +86,7 @@ bool mlo_ap_vdev_attach(struct wlan_objmgr_vdev *vdev,
|
||||
|
||||
dev_ctx = vdev->mlo_dev_ctx;
|
||||
wlan_vdev_set_link_id(vdev, link_id);
|
||||
wlan_vdev_mlme_feat_ext2_cap_set(vdev, WLAN_VDEV_FEXT2_MLO);
|
||||
wlan_vdev_mlme_set_mlo_vdev(vdev);
|
||||
|
||||
/**
|
||||
* every link will trigger mlo_ap_vdev_attach,
|
||||
@@ -277,7 +277,7 @@ void mlo_ap_vdev_detach(struct wlan_objmgr_vdev *vdev)
|
||||
mlo_err("Invalid input");
|
||||
return;
|
||||
}
|
||||
wlan_vdev_mlme_feat_ext2_cap_clear(vdev, WLAN_VDEV_FEXT2_MLO);
|
||||
wlan_vdev_mlme_clear_mlo_vdev(vdev);
|
||||
}
|
||||
|
||||
void mlo_ap_link_down_cmpl_notify(struct wlan_objmgr_vdev *vdev)
|
||||
|
@@ -254,9 +254,7 @@ void mlo_mld_clear_mlo_cap(struct wlan_objmgr_vdev *vdev)
|
||||
for (i = 0; i < WLAN_UMAC_MLO_MAX_VDEVS; i++) {
|
||||
if (!mlo_dev_ctx->wlan_vdev_list[i])
|
||||
continue;
|
||||
wlan_vdev_mlme_feat_ext2_cap_clear(
|
||||
mlo_dev_ctx->wlan_vdev_list[i],
|
||||
WLAN_VDEV_FEXT2_MLO);
|
||||
wlan_vdev_mlme_clear_mlo_vdev(mlo_dev_ctx->wlan_vdev_list[i]);
|
||||
wlan_vdev_mlme_feat_ext2_cap_clear(
|
||||
mlo_dev_ctx->wlan_vdev_list[i],
|
||||
WLAN_VDEV_FEXT2_MLO_STA_LINK);
|
||||
@@ -592,8 +590,7 @@ mlo_send_link_connect(struct wlan_objmgr_vdev *vdev,
|
||||
if (!mlo_dev_ctx->wlan_vdev_list[i] ||
|
||||
(mlo_dev_ctx->wlan_vdev_list[i] == vdev))
|
||||
continue;
|
||||
wlan_vdev_mlme_feat_ext2_cap_set(mlo_dev_ctx->wlan_vdev_list[i],
|
||||
WLAN_VDEV_FEXT2_MLO);
|
||||
wlan_vdev_mlme_set_mlo_vdev(mlo_dev_ctx->wlan_vdev_list[i]);
|
||||
wlan_vdev_mlme_feat_ext2_cap_set(mlo_dev_ctx->wlan_vdev_list[i],
|
||||
WLAN_VDEV_FEXT2_MLO_STA_LINK);
|
||||
wlan_vdev_set_link_id(
|
||||
@@ -1193,7 +1190,7 @@ void mlo_sta_link_handle_pending_connect(struct wlan_objmgr_vdev *vdev)
|
||||
|
||||
if (sta_ctx->connect_req->ml_parnter_info.num_partner_links) {
|
||||
partner_info = sta_ctx->connect_req->ml_parnter_info;
|
||||
wlan_vdev_mlme_feat_ext2_cap_set(vdev, WLAN_VDEV_FEXT2_MLO);
|
||||
wlan_vdev_mlme_set_mlo_vdev(vdev);
|
||||
wlan_vdev_mlme_feat_ext2_cap_clear(
|
||||
vdev, WLAN_VDEV_FEXT2_MLO_STA_LINK);
|
||||
mlo_clear_connect_req_links_bmap(vdev);
|
||||
@@ -1205,8 +1202,7 @@ void mlo_sta_link_handle_pending_connect(struct wlan_objmgr_vdev *vdev)
|
||||
&partner_link_info.link_addr);
|
||||
if (tmp_vdev) {
|
||||
mlo_update_connect_req_links(tmp_vdev, 1);
|
||||
wlan_vdev_mlme_feat_ext2_cap_set(
|
||||
tmp_vdev, WLAN_VDEV_FEXT2_MLO);
|
||||
wlan_vdev_mlme_set_mlo_vdev(tmp_vdev);
|
||||
wlan_vdev_mlme_feat_ext2_cap_set(
|
||||
tmp_vdev,
|
||||
WLAN_VDEV_FEXT2_MLO_STA_LINK);
|
||||
|
Посилання в новій задачі
Заблокувати користувача