summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasti, Narayanraddi <nmasti@codeaurora.org>2016-09-06 16:07:33 +0530
committerqcabuildsw <qcabuildsw@localhost>2016-09-06 18:23:51 -0700
commitd8a56fbc4ad7a83ddb6e16e59ee9658d84a91eb5 (patch)
tree933f529d8b80408171775badf54c32956d91470d
parent53e873e85fdc5819c5431b384bb353bfe92038ff (diff)
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
-rw-r--r--core/mac/src/include/parser_api.h3
-rw-r--r--core/mac/src/pe/lim/lim_process_tdls.c15
-rw-r--r--core/mac/src/sys/legacy/src/utils/src/parser_api.c20
3 files changed, 26 insertions, 12 deletions
diff --git a/core/mac/src/include/parser_api.h b/core/mac/src/include/parser_api.h
index 495e86a38872..1b1486ebdec0 100644
--- a/core/mac/src/include/parser_api.h
+++ b/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,
diff --git a/core/mac/src/pe/lim/lim_process_tdls.c b/core/mac/src/pe/lim/lim_process_tdls.c
index f4ab93e6c6d3..58a0addfb16e 100644
--- a/core/mac/src/pe/lim/lim_process_tdls.c
+++ b/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"));
diff --git a/core/mac/src/sys/legacy/src/utils/src/parser_api.c b/core/mac/src/sys/legacy/src/utils/src/parser_api.c
index 4339fec20a32..a2133316ec3e 100644
--- a/core/mac/src/sys/legacy/src/utils/src/parser_api.c
+++ b/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);