summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbhishek Singh <absingh@codeaurora.org>2017-11-08 13:57:46 +0530
committersnandini <snandini@codeaurora.org>2017-11-08 22:04:57 -0800
commitd44ce4ceca1c5d7bcd4cca5cbe8d307f323f60fe (patch)
tree7548367a0e2e177290a681a410fe8879eb0b9699
parentdcadb6a9a3d37322e51087c1bb4ba53f4ce074d1 (diff)
qcacld-3.0: Fix logic to get nw type for BSS in roam sync indication
In lim_roam_fill_bss_descr the nw type for 11b AP is not filled and thus network type remain 11a for 11b AP. Now this entry is added in scan cache and when driver try to connect to this AP as the network type is 11a, the preferred dot11mode is set to 11a for an 11g channel in csr_get_phy_mode_from_bss. Now while calculating phymode, as channel is 11g and dot11mode is 11a, the phymode is not calculated properly, leading to firmware crash. Fix the logic to calculate nw type properly in lim_roam_fill_bss_descr. Change-Id: Ie076d0315a7ee5ec123a3cb9dbd22668648e7af4 CRs-Fixed: 2138824
-rw-r--r--core/mac/src/pe/lim/lim_api.c24
1 files changed, 3 insertions, 21 deletions
diff --git a/core/mac/src/pe/lim/lim_api.c b/core/mac/src/pe/lim/lim_api.c
index dfe87be16c15..8238659d6874 100644
--- a/core/mac/src/pe/lim/lim_api.c
+++ b/core/mac/src/pe/lim/lim_api.c
@@ -1914,27 +1914,9 @@ lim_roam_fill_bss_descr(tpAniSirGlobal pMac,
}
bss_desc_ptr->channelIdSelf = bss_desc_ptr->channelId;
- if ((bss_desc_ptr->channelId > 0) && (bss_desc_ptr->channelId < 15)) {
- int i;
- /* *
- * 11b or 11g packet
- * 11g if extended Rate IE is present or
- * if there is an A rate in suppRate IE
- * */
- for (i = 0; i < parsed_frm_ptr->supportedRates.numRates; i++) {
- if (sirIsArate(parsed_frm_ptr->supportedRates.rate[i] &
- 0x7f)) {
- bss_desc_ptr->nwType = eSIR_11G_NW_TYPE;
- break;
- }
- }
- if (parsed_frm_ptr->extendedRatesPresent) {
- bss_desc_ptr->nwType = eSIR_11G_NW_TYPE;
- }
- } else {
- /* 11a packet */
- bss_desc_ptr->nwType = eSIR_11A_NW_TYPE;
- }
+ bss_desc_ptr->nwType = lim_get_nw_type(pMac, bss_desc_ptr->channelId,
+ SIR_MAC_MGMT_FRAME,
+ parsed_frm_ptr);
bss_desc_ptr->sinr = 0;
bss_desc_ptr->beaconInterval = parsed_frm_ptr->beaconInterval;