فهرست منبع

qcacld-3.0: Fix channel width issue in SAP for OBSS scan

If 11ac override and 2.4ghz channel bonding is enabled in INI, for
2.4 ghz channel the channel width is always set to HT40 even if
hostapd indicate channel width as HT20 due to OBSS scan.
Thus the channel width indicated by OBSS scan is ignored.

As a fix, even if 11ac override and 2.4ghz channel bonding is enabled
for 2.4 Ghz channel give preference to the width indicated by
hostapd.

Change-Id: I091c8672b664a4f24c976ef33816ab10f32a052e
CRs-Fixed: 2032597
Abhishek Singh 8 سال پیش
والد
کامیت
26a7b9f9d5
1فایلهای تغییر یافته به همراه15 افزوده شده و 6 حذف شده
  1. 15 6
      core/hdd/src/wlan_hdd_hostapd.c

+ 15 - 6
core/hdd/src/wlan_hdd_hostapd.c

@@ -7287,14 +7287,23 @@ static int wlan_hdd_setup_driver_overrides(hdd_adapter_t *ap_adapter)
 		if (sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11n)
 			sap_cfg->SapHw_mode = eCSR_DOT11_MODE_11ac;
 
-		if (sap_cfg->channel >= 36)
+		if (sap_cfg->channel >= 36) {
 			sap_cfg->ch_width_orig =
 					hdd_ctx->config->vhtChannelWidth;
-		else
-			sap_cfg->ch_width_orig =
-				hdd_ctx->config->nChannelBondingMode24GHz ?
-				eHT_CHANNEL_WIDTH_40MHZ :
-				eHT_CHANNEL_WIDTH_20MHZ;
+		} else {
+			/*
+			 * Allow 40 Mhz in 2.4 Ghz only if indicated by
+			 * supplicant after OBSS scan and if 2.4 Ghz channel
+			 * bonding is set in INI
+			 */
+			if (sap_cfg->ch_width_orig >= eHT_CHANNEL_WIDTH_40MHZ &&
+			   hdd_ctx->config->nChannelBondingMode24GHz)
+				sap_cfg->ch_width_orig =
+					eHT_CHANNEL_WIDTH_40MHZ;
+			else
+				sap_cfg->ch_width_orig =
+					eHT_CHANNEL_WIDTH_20MHZ;
+		}
 	}
 	sap_cfg->ch_params.ch_width = sap_cfg->ch_width_orig;
 	wlan_reg_set_channel_params(hdd_ctx->hdd_pdev, sap_cfg->channel,