Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ef4bac4c authored by Liangwei Dong's avatar Liangwei Dong Committed by Gerrit - the friendly Code Review server
Browse files

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
parent abfe455c
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -912,6 +912,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;
@@ -943,11 +944,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.ht_rx_ldpc;
		pDot11f->txSTBC = pe_session->ht_config.ht_tx_stbc;