Skip to content

Commit a44f77b

Browse files
Jianmin ZhuRavindra Konda
authored andcommitted
qcacmn: Fix bss peer leak for link switch when LL-SAP existed
Hit following issue of link switch when LL-SAP existed. 1. Link switch was received on VDEV-1 (partner link). a. Link switch cmd was added to serial active queue, existing peer was deleted as part of link switch disconnect. b. Link switch connect started but got deferred due to LL-SAP Bearer switch transition, when WLAN_CM_SM_EV_BEARER_SWITCH_COMPLETE received, a new connect cmd was added to serial pending queue, link switch was blocked here. 2. Disconnect from userspace was received a. The disconnect on VDEV-1 here notified MLO-manager to terminate ongoing link switch. b. Link switch confirmation was sent to F/W as failure. c. link switch cmd was removed from serial active queue. 3. Connect cmd queued in #1.b was activated and moved VDEV-1 state to connecting. a. New peer got created but PE session wasn't yet created. b. Disconnect from #2.a changed the VDEV-1 state from connecting to disconnecting. c. While processing the disconnect in #3.b, peer delete for the peer created in #3.a didn’t happen as disconnect didn’t proceed when pe session not found. To fix it, for link switch, don't add new connect cmd to serial queue after LL-SAP Bearer switch since link switch cmd is queued already. 1. Link switch is received on VDEV-1 (partner link). a. links witch cmd was added serial active queue, existing peer gets deleted as part of link switch disconnect. b. Link switch connect starts but gets deferred due to LL-SAP Bearer switch transition, WLAN_CM_SM_EV_CONNECT_ACTIVE is sent after WLAN_CM_SM_EV_BEARER_SWITCH_COMPLETE received, bss peer creat cmd is sent to F/W. 2. Disconnect from userspace is received when link switch unfinished. a. The disconnect on VDEV-1 here notified MLO-manager to terminate ongoing link switch. b. If BSS peer created, mlme_cm_bss_peer_delete_req will be called to delete it. c. Link switch confirmation is sent to F/W as failure. d. link switch cmd is removed from serial active queue. Change-Id: I13ba820bd0240d062c7cd47ec0e53ae1a27d5b58 CRs-Fixed: 3752437
1 parent 893fad4 commit a44f77b

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

umac/mlme/connection_mgr/core/src/wlan_cm_connect.c

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,17 @@ static QDF_STATUS cm_ser_connect_req(struct wlan_objmgr_pdev *pdev,
249249
QDF_STATUS status;
250250
uint8_t vdev_id = wlan_vdev_get_id(cm_ctx->vdev);
251251

252+
if (cm_is_link_switch_connect_req(cm_req)) {
253+
/*
254+
* For link switch, connect serialization is not required as
255+
* link switch is already serialized.
256+
*/
257+
return cm_sm_deliver_event_sync(cm_ctx,
258+
WLAN_CM_SM_EV_CONNECT_ACTIVE,
259+
sizeof(wlan_cm_id),
260+
&cm_req->cm_id);
261+
}
262+
252263
status = wlan_objmgr_vdev_try_get_ref(cm_ctx->vdev, WLAN_MLME_CM_ID);
253264
if (QDF_IS_STATUS_ERROR(status)) {
254265
mlme_err(CM_PREFIX_FMT "unable to get reference",
@@ -1866,17 +1877,7 @@ QDF_STATUS cm_connect_start(struct cnx_mgr *cm_ctx,
18661877
return QDF_STATUS_SUCCESS;
18671878
}
18681879

1869-
if (cm_is_link_switch_connect_req(cm_req)) {
1870-
/* The error handling has to be different here.not corresponds
1871-
* to connect req serialization now.
1872-
*/
1873-
status = cm_sm_deliver_event_sync(cm_ctx,
1874-
WLAN_CM_SM_EV_CONNECT_ACTIVE,
1875-
sizeof(wlan_cm_id),
1876-
&cm_req->cm_id);
1877-
} else {
1878-
status = cm_ser_connect_req(pdev, cm_ctx, cm_req);
1879-
}
1880+
status = cm_ser_connect_req(pdev, cm_ctx, cm_req);
18801881

18811882
if (QDF_IS_STATUS_ERROR(status)) {
18821883
reason = CM_SER_FAILURE;

0 commit comments

Comments
 (0)