Forráskód Böngészése

qcacld-3.0: Fix 2.4G assoc request bandwidth info wrong

With the commit I630423de03636e6c4ca07638dce6966c3ca381f9,
driver will enable HT40 capability field in assoc request
frame to 2.4G AP. In some countries, the 40Mhz is disallowed
in 2.4G.
Fix by disable HT40 if regulatory disallow

Change-Id: I8a1e6b2c59c486373c49cba0e3c635b34f443e1c
CRs-Fixed: 3012747
Liangwei Dong 3 éve
szülő
commit
66ab5fbe0d
1 módosított fájl, 14 hozzáadás és 2 törlés
  1. 14 2
      core/mac/src/sys/legacy/src/utils/src/parser_api.c

+ 14 - 2
core/mac/src/sys/legacy/src/utils/src/parser_api.c

@@ -938,6 +938,7 @@ populate_dot11f_ht_caps(struct mac_context *mac,
 	qdf_size_t ncfglen;
 	QDF_STATUS nSirStatus;
 	uint8_t disable_high_ht_mcs_2x2 = 0;
+	struct ch_params ch_params = {0};
 
 	tSirMacTxBFCapabilityInfo *pTxBFCapabilityInfo;
 	tSirMacASCapabilityInfo *pASCapabilityInfo;
@@ -969,11 +970,22 @@ populate_dot11f_ht_caps(struct mac_context *mac,
 		if (WLAN_REG_IS_24GHZ_CH_FREQ(pe_session->curr_op_freq) &&
 		    LIM_IS_STA_ROLE(pe_session) &&
 		    WNI_CFG_CHANNEL_BONDING_MODE_DISABLE !=
-		    mac->roam.configParam.channelBondingMode24GHz)
+		    mac->roam.configParam.channelBondingMode24GHz) {
 			pDot11f->supportedChannelWidthSet = 1;
-		else
+			ch_params.ch_width = CH_WIDTH_40MHZ;
+			wlan_reg_set_channel_params_for_freq(
+				mac->pdev, pe_session->curr_op_freq, 0,
+				&ch_params);
+			if (ch_params.ch_width != CH_WIDTH_40MHZ)
+				pDot11f->supportedChannelWidthSet = 0;
+			pe_debug("pe ch offset %d ch_width %d htcap ch width set %d",
+				 pe_session->htSecondaryChannelOffset,
+				 ch_params.ch_width,
+				 pDot11f->supportedChannelWidthSet);
+		} else {
 			pDot11f->supportedChannelWidthSet =
 				pe_session->htSupportedChannelWidthSet;
+		}
 
 		pDot11f->advCodingCap = pe_session->ht_config.adv_coding_cap;
 		pDot11f->txSTBC = pe_session->ht_config.tx_stbc;