Browse Source

qcacld-3.0: Do not assign ht_sec_ch with sec_ch_offset

Supplicant reports ACS failed, if driver indicates invalid ht_sec_ch.
Do not assign ht_sec_ch with sec_ch_offset, because they are not the
same thing.

Change-Id: I8fb2a42973b67bb045d385b1fd90ee32917450ea
CRs-Fixed: 2067092
bings 7 years ago
parent
commit
61d5bec36f
2 changed files with 13 additions and 3 deletions
  1. 12 1
      core/hdd/src/wlan_hdd_hostapd.c
  2. 1 2
      core/sap/src/sap_fsm.c

+ 12 - 1
core/hdd/src/wlan_hdd_hostapd.c

@@ -1074,6 +1074,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	struct hdd_chan_change_params chan_change;
 	int ret = 0;
+	struct ch_params sap_ch_param = {0};
 
 	dev = (struct net_device *)usrDataForCallback;
 	if (!dev) {
@@ -1984,13 +1985,23 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
 		if (pHostapdAdapter->device_mode == QDF_SAP_MODE &&
 		    pHddCtx->config->force_sap_acs)
 			return QDF_STATUS_SUCCESS;
+		sap_ch_param.ch_width =
+			pSapEvent->sapevt.sap_ch_selected.ch_width;
+		sap_ch_param.center_freq_seg0 =
+			pSapEvent->sapevt.sap_ch_selected.vht_seg0_center_ch;
+		sap_ch_param.center_freq_seg1 =
+			pSapEvent->sapevt.sap_ch_selected.vht_seg1_center_ch;
+		wlan_reg_set_channel_params(pHddCtx->hdd_pdev,
+			pSapEvent->sapevt.sap_ch_selected.pri_ch,
+			pSapEvent->sapevt.sap_ch_selected.ht_sec_ch,
+			&sap_ch_param);
 
 		chan_change.chan =
 			pSapEvent->sapevt.sap_ch_selected.pri_ch;
 		chan_change.chan_params.ch_width =
 			pSapEvent->sapevt.sap_ch_selected.ch_width;
 		chan_change.chan_params.sec_ch_offset =
-			pSapEvent->sapevt.sap_ch_selected.ht_sec_ch;
+			sap_ch_param.sec_ch_offset;
 		chan_change.chan_params.center_freq_seg0 =
 			pSapEvent->sapevt.sap_ch_selected.vht_seg0_center_ch;
 		chan_change.chan_params.center_freq_seg1 =

+ 1 - 2
core/sap/src/sap_fsm.c

@@ -2600,8 +2600,7 @@ QDF_STATUS sap_signal_hdd_event(ptSapContext sap_ctx,
 
 		acs_selected = &sap_ap_event.sapevt.sap_ch_selected;
 		acs_selected->pri_ch = sap_ctx->acs_cfg->pri_ch;
-		acs_selected->ht_sec_ch =
-			sap_ctx->csr_roamProfile.ch_params.sec_ch_offset;
+		acs_selected->ht_sec_ch = sap_ctx->acs_cfg->ht_sec_ch;
 		acs_selected->ch_width =
 			sap_ctx->csr_roamProfile.ch_params.ch_width;
 		acs_selected->vht_seg0_center_ch =