Browse Source

qcacmn: First set CM state before handling event action

VDEV repurpose is in progress when NB disconnect is received.
Driver will change the state of CM to IDLE_DUE_TO_LINK_SWITCH
on disconnect complete due to VDEV repurpose. When the NB disconnect
gets active, instead of dropping the disconnect, queues a new
disconnect to do necessary cleanup and notify kernel if it is on
assoc VDEV. Here before VDEV repurpose disconnect moves the CM-SM
to IDLE_DUE_TO_LINK_SWITCH, the NB disconnect command gets active
and drops the disconnect request and finally the CM-SM moves to
IDLE_DUE_TO_LINK_SWITCH.

Supplicant sends new connect request and driver while handling this
sees the CM state as IDLE_DUE_TO_LINK_SWITCH and moves the SM to
connected to force trigger disconnect and later handle the connect.
This forced disconnect has cleared the VDEV-MLO flag on disconnect
complete but by the time peer create request is filled, this MLO-VDEV
flag is set so ML peer is created but during VDEV start MLO flag is not
set, so FW assertion failed while sending peer assoc indication with
MLO flag set.

Issue gets unflods when handling NB disconnect where the state of
CM is not set to IDLE_DUE_TO_LINK_SWITCH. So first set the CM-SM
before calling the disconnect complete handler.

Change-Id: Ieed1a1ace8ca18670c51d177d172243fc754b617
CRs-Fixed: 3784659
Vinod Kumar Pirla 1 năm trước cách đây
mục cha
commit
054c286289
1 tập tin đã thay đổi với 3 bổ sung5 xóa
  1. 3 5
      umac/mlme/connection_mgr/core/src/wlan_cm_sm.c

+ 3 - 5
umac/mlme/connection_mgr/core/src/wlan_cm_sm.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2012-2015,2020-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -110,8 +110,6 @@ static bool cm_state_init_event(void *ctx, uint16_t event,
 					 data_len, data);
 		break;
 	case WLAN_CM_SM_EV_CONNECT_FAILURE:
-		cm_connect_complete(cm_ctx, data);
-
 		if (cm_is_link_switch_connect_resp(data)) {
 			/*
 			 * If non-link switch connect fails, kernel will be
@@ -130,10 +128,9 @@ static bool cm_state_init_event(void *ctx, uint16_t event,
 			cm_sm_transition_to(cm_ctx,
 					    WLAN_CM_SS_IDLE_DUE_TO_LINK_SWITCH);
 		}
+		cm_connect_complete(cm_ctx, data);
 		break;
 	case WLAN_CM_SM_EV_DISCONNECT_DONE:
-		cm_disconnect_complete(cm_ctx, data);
-
 		if (cm_is_link_switch_disconnect_resp(data)) {
 			/*
 			 * Change the substate of CM incase the disconnect
@@ -144,6 +141,7 @@ static bool cm_state_init_event(void *ctx, uint16_t event,
 			cm_sm_transition_to(cm_ctx,
 					    WLAN_CM_SS_IDLE_DUE_TO_LINK_SWITCH);
 		}
+		cm_disconnect_complete(cm_ctx, data);
 		break;
 	case WLAN_CM_SM_EV_DISCONNECT_REQ:
 		status = cm_handle_discon_req_in_non_connected_state(cm_ctx, data,