Преглед на файлове

qcacld-3.0: Do not include 11b rates in TDLS setup request

qcacld-2.0 to qcacld-3.0 propagation

If base channel is 5 GHz and when we support all 11a and 11g
rates, then there is no need to advertise 11b rates in TDLS setup
request/response frames.
Advertising 11b rates also leading to IOT issues with few third
party devices.
Fix is to ensure that 11b rates are not included if base channel is
5ghz.

Change-Id: I45590a4067194e8929bac225b1a82ec510903539
CRs-Fixed: 955788
Masti, Narayanraddi преди 8 години
родител
ревизия
d8a56fbc4a
променени са 3 файла, в които са добавени 26 реда и са изтрити 12 реда
  1. 2 1
      core/mac/src/include/parser_api.h
  2. 9 6
      core/mac/src/pe/lim/lim_process_tdls.c
  3. 15 5
      core/mac/src/sys/legacy/src/utils/src/parser_api.c

+ 2 - 1
core/mac/src/include/parser_api.h

@@ -757,7 +757,8 @@ populate_dot11f_supp_rates(tpAniSirGlobal pMac,
 tSirRetStatus
 populate_dot11f_rates_tdls(tpAniSirGlobal p_mac,
 			tDot11fIESuppRates *p_supp_rates,
-			tDot11fIEExtSuppRates *p_ext_supp_rates);
+			tDot11fIEExtSuppRates *p_ext_supp_rates,
+			uint8_t curr_oper_channel);
 
 tSirRetStatus populate_dot11f_tpc_report(tpAniSirGlobal pMac,
 					tDot11fIETPCReport *pDot11f,

+ 9 - 6
core/mac/src/pe/lim/lim_process_tdls.c

@@ -707,8 +707,9 @@ static tSirRetStatus lim_send_tdls_dis_rsp_frame(tpAniSirGlobal pMac,
 
 	/* populate supported rate and ext supported rate IE */
 	if (eSIR_FAILURE == populate_dot11f_rates_tdls(pMac,
-						&tdlsDisRsp.SuppRates,
-						&tdlsDisRsp.ExtSuppRates))
+					&tdlsDisRsp.SuppRates,
+					&tdlsDisRsp.ExtSuppRates,
+					psessionEntry->currentOperChannel))
 		lim_log(pMac, LOGE,
 			FL("could not populate supported data rates"));
 
@@ -1013,8 +1014,9 @@ tSirRetStatus lim_send_tdls_link_setup_req_frame(tpAniSirGlobal pMac,
 
 	/* populate supported rate and ext supported rate IE */
 	if (eSIR_FAILURE == populate_dot11f_rates_tdls(pMac,
-						&tdlsSetupReq.SuppRates,
-						&tdlsSetupReq.ExtSuppRates))
+					&tdlsSetupReq.SuppRates,
+					&tdlsSetupReq.ExtSuppRates,
+					psessionEntry->currentOperChannel))
 		lim_log(pMac, LOGE,
 			FL("could not populate supported data rates"));
 
@@ -1500,8 +1502,9 @@ static tSirRetStatus lim_send_tdls_setup_rsp_frame(tpAniSirGlobal pMac,
 
 	/* populate supported rate and ext supported rate IE */
 	if (eSIR_FAILURE == populate_dot11f_rates_tdls(pMac,
-						&tdlsSetupRsp.SuppRates,
-						&tdlsSetupRsp.ExtSuppRates))
+					&tdlsSetupRsp.SuppRates,
+					&tdlsSetupRsp.ExtSuppRates,
+					psessionEntry->currentOperChannel))
 		lim_log(pMac, LOGE,
 			FL("could not populate supported data rates"));
 

+ 15 - 5
core/mac/src/sys/legacy/src/utils/src/parser_api.c

@@ -1770,6 +1770,7 @@ populate_dot11f_supp_rates(tpAniSirGlobal pMac,
  * @p_mac gloabl - header.
  * @p_supp_rates - pointer to supported rates IE
  * @p_ext_supp_rates - pointer to extended supported rates IE
+ * @curr_oper_channel - current operating channel
  *
  * This function populates the supported rates and extended supported
  * rates IE based in the STA capability. If the number of rates
@@ -1783,7 +1784,8 @@ populate_dot11f_supp_rates(tpAniSirGlobal pMac,
 tSirRetStatus
 populate_dot11f_rates_tdls(tpAniSirGlobal p_mac,
 			   tDot11fIESuppRates *p_supp_rates,
-			   tDot11fIEExtSuppRates *p_ext_supp_rates)
+			   tDot11fIEExtSuppRates *p_ext_supp_rates,
+			   uint8_t curr_oper_channel)
 {
 	tSirMacRateSet temp_rateset;
 	tSirMacRateSet temp_rateset2;
@@ -1793,15 +1795,23 @@ populate_dot11f_rates_tdls(tpAniSirGlobal p_mac,
 	wlan_cfg_get_int(p_mac, WNI_CFG_DOT11_MODE, &self_dot11mode);
 
 	/**
-	* Include 11b rates only when the device configured in
-	 * auto, 11a/b/g or 11b_only
+	 * Include 11b rates only when the device configured in
+	 * auto, 11a/b/g or 11b_only and also if current base
+	 * channel is 5 GHz then no need to advertise the 11b rates.
+	 * If devices move to 2.4GHz off-channel then they can communicate
+	 * in 11g rates i.e. (6, 9, 12, 18, 24, 36 and 54).
 	 */
-	if ((self_dot11mode == WNI_CFG_DOT11_MODE_ALL) ||
+	lim_log(p_mac, LOG1,
+		FL("Current operating channel %d self_dot11mode = %d"),
+		curr_oper_channel, self_dot11mode);
+
+	if ((curr_oper_channel <= SIR_11B_CHANNEL_END) &&
+	    ((self_dot11mode == WNI_CFG_DOT11_MODE_ALL) ||
 	    (self_dot11mode == WNI_CFG_DOT11_MODE_11A) ||
 	    (self_dot11mode == WNI_CFG_DOT11_MODE_11AC) ||
 	    (self_dot11mode == WNI_CFG_DOT11_MODE_11N) ||
 	    (self_dot11mode == WNI_CFG_DOT11_MODE_11G) ||
-	    (self_dot11mode == WNI_CFG_DOT11_MODE_11B)) {
+	    (self_dot11mode == WNI_CFG_DOT11_MODE_11B))) {
 		val = WNI_CFG_SUPPORTED_RATES_11B_LEN;
 		wlan_cfg_get_str(p_mac, WNI_CFG_SUPPORTED_RATES_11B,
 				(uint8_t *)&temp_rateset.rate, &val);