Эх сурвалжийг харах

qcacld-3.0: Use self cb mode check to change HT bandwidth

Currently, the driver uses the current capability to check
if it supports 40 MHz instead of self-cap, so once it
switches to 20 MHz it cannot switch back to 40 MHz again.

To fix check self capability to determine if the bandwidth
switch can be allowed in HT-only mode.

Change-Id: I4bfe893d1c745c82d96d763f92a635d1f6d7d8ce
CRs-Fixed: 3341954
abhinav kumar 2 жил өмнө
parent
commit
a9a821db64

+ 8 - 2
core/mac/src/pe/lim/lim_utils.c

@@ -3831,11 +3831,17 @@ void lim_update_sta_run_time_ht_switch_chnl_params(struct mac_context *mac,
 						   struct pe_session *pe_session)
 {
 	qdf_freq_t chan_freq;
+	uint32_t self_cb_mode = mac->roam.configParam.channelBondingMode5GHz;
+
+	if (WLAN_REG_IS_24GHZ_CH_FREQ(pe_session->curr_op_freq))
+		self_cb_mode = mac->roam.configParam.channelBondingMode24GHz;
 
 	/* If self capability is set to '20Mhz only', then do not change the CB mode. */
-	if (!lim_get_ht_capability
-		    (mac, eHT_SUPPORTED_CHANNEL_WIDTH_SET, pe_session))
+	if (self_cb_mode == WNI_CFG_CHANNEL_BONDING_MODE_DISABLE) {
+		pe_debug("self_cb_mode 0 for freq %d",
+			 pe_session->curr_op_freq);
 		return;
+	}
 
 	if (wlan_reg_is_24ghz_ch_freq(pe_session->curr_op_freq) &&
 	    pe_session->force_24ghz_in_ht20) {