From 952d6a207262da270cfe69277879b6edfa9890fa Mon Sep 17 00:00:00 2001 From: Jayachandran Sreekumaran Date: Tue, 29 Oct 2019 11:28:35 +0530 Subject: [PATCH] qcacld-3.0: Provide same vdev id for nss and hw mode update While operating in SCC mode for AP+STA, STA receives CSA and switches to a channel in the other band. After channel switch trigger the NSS update for AP mode. HW mode switch to DBS1/DBS2 gets triggered after nss update completion. POLICY_MGR_UPDATE_REASON_CHANNEL_SWITCH is set as the reason for hw mode update. For NSS update AP vdev id is used but for HW mode switch STA vdev id is getting used. This leads to assert in vdev SM while handling the event WLAN_VDEV_SM_EV_CSA_RESTART in vdev up state. For NSS mode update followed by HW mode switch cases, Policy manager need to use the same vdev id for both operations. Change-Id: I986fa971c0c525ecada4805c70dd629ef8a1cac7 CRs-fixed: 2547119 --- .../policy_mgr/src/wlan_policy_mgr_core.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c index b22f581b1a13..bd4922e2d27c 100644 --- a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c +++ b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c @@ -2737,10 +2737,14 @@ static void policy_mgr_nss_update_cb(struct wlan_objmgr_psoc *psoc, policy_mgr_debug("nss update successful for vdev:%d ori %d reason %d", vdev_id, original_vdev_id, reason); - if (PM_NOP != next_action) - policy_mgr_next_actions(psoc, original_vdev_id, next_action, - reason); - else { + if (PM_NOP != next_action) { + if (reason == POLICY_MGR_UPDATE_REASON_CHANNEL_SWITCH) + policy_mgr_next_actions(psoc, vdev_id, next_action, + reason); + else + policy_mgr_next_actions(psoc, original_vdev_id, + next_action, reason); + } else { policy_mgr_debug("No action needed right now"); ret = policy_mgr_set_opportunistic_update(psoc); if (!QDF_IS_STATUS_SUCCESS(ret))