Browse Source

qcacld-3.0: Signal chan change event before cac start in chan switch

When detect radar in the process of SAP cac, SAP may choose another
DFS channel to switch and will do cac again, but still indicate
WLAN_SVC_DFS_CAC_START_IND with old DFS channel info to hostapd, it's
wrong. Issue is introduced by
'Change-Id: I0915ee78a97e5f27ce83c31cc673cb8820ae535b', due to this
change it will drop one time eSAP_CHANNEL_CHANGE_EVENT signal before
do cac start on new DFS channel, then operating_chan_freq for
hdd_ap_ctx can't be updated to new DFS channel timely.

Fix is to add one time eSAP_CHANNEL_CHANGE_EVENT signal before do cac
start in the process of channel switch.

Change-Id: I441e32e4ecd356834e66f97f2e2334966f48ec5d
CRs-Fixed: 2663539
hqu 5 years ago
parent
commit
365520551b
1 changed files with 7 additions and 0 deletions
  1. 7 0
      core/sap/src/sap_fsm.c

+ 7 - 0
core/sap/src/sap_fsm.c

@@ -2338,6 +2338,13 @@ static QDF_STATUS sap_fsm_state_init(struct sap_context *sap_ctx,
 		if (!QDF_IS_STATUS_ERROR(qdf_status))
 			sap_err("sap_goto_starting failed");
 	} else if (msg == eSAP_DFS_CHANNEL_CAC_START) {
+		if (sap_ctx->is_chan_change_inprogress) {
+			sap_ctx->is_chan_change_inprogress = false;
+			sap_signal_hdd_event(sap_ctx,
+					     NULL,
+					     eSAP_CHANNEL_CHANGE_EVENT,
+					     (void *)eSAP_STATUS_SUCCESS);
+		}
 		qdf_status = sap_fsm_cac_start(sap_ctx, mac_ctx, mac_handle);
 	} else {
 		sap_err("in state %s, event msg %d", "SAP_INIT", msg);