diff options
| author | gaurank kathpalia <gkathpal@codeaurora.org> | 2020-04-17 16:58:36 +0530 |
|---|---|---|
| committer | gaurank kathpalia <gkathpal@codeaurora.org> | 2020-04-17 17:10:07 +0530 |
| commit | e498bfd81ff2b8a41100b6f94cc081fca297032f (patch) | |
| tree | 2adc6e6d73047afa268876742019d0b82d10c8fa | |
| parent | 47cb2fb671aac86b6ade0177e00bd7106e1a1a5d (diff) | |
qcacld-3.0: Fill proper seg0 and seg1 values
In the API lim_extract_ap_capability the driver
depends on the value of seg0 and seg1 values
from the AP and blindly fills that and sends
that as part of vdev start params.
There can be some APs which do not fill the
seg0 and seg1 APs correctly and blindly
depending upon those values can lead to
wrong seg0 and seg1 thus leading to FW assert.
Fix is to fill the seg0 value as centre channel
of 80Mhz and seg1 as 0 in case of 80Mhz BW.
Since these are unique values and dependent
on channel number (primary) driver can fill
that directly rather than depending on the
AP for them.
Change-Id: I46f2a81b443e1d0d62eb039878add15310595c8c
CRs-Fixed: 2664405
| -rw-r--r-- | core/mac/src/pe/lim/lim_prop_exts_utils.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/core/mac/src/pe/lim/lim_prop_exts_utils.c b/core/mac/src/pe/lim/lim_prop_exts_utils.c index 01dd4d88298a..e4b82a1bf8bf 100644 --- a/core/mac/src/pe/lim/lim_prop_exts_utils.c +++ b/core/mac/src/pe/lim/lim_prop_exts_utils.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2018, 2020 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -215,6 +215,9 @@ lim_extract_ap_capability(tpAniSirGlobal mac_ctx, uint8_t *p_ie, else if (center_freq_diff > 16) ap_bcon_ch_width = WNI_CFG_VHT_CHANNEL_WIDTH_80_PLUS_80MHZ; + else + ap_bcon_ch_width = + WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ; } fw_vht_ch_wd = wma_get_vht_ch_width(); @@ -267,18 +270,15 @@ lim_extract_ap_capability(tpAniSirGlobal mac_ctx, uint8_t *p_ie, */ vht_ch_wd = WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ; session->ch_center_freq_seg1 = 0; + session->ch_center_freq_seg0 = + lim_get_80Mhz_center_channel( + beacon_struct->channelNumber); } } else if (vht_ch_wd == WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ) { - /* DUT or AP supports only 80MHz */ - if (ap_bcon_ch_width == - WNI_CFG_VHT_CHANNEL_WIDTH_160MHZ && - !new_ch_width_dfn) - /* AP is in 160MHz mode */ - session->ch_center_freq_seg0 = + session->ch_center_freq_seg0 = lim_get_80Mhz_center_channel( beacon_struct->channelNumber); - else - session->ch_center_freq_seg1 = 0; + session->ch_center_freq_seg1 = 0; } session->ch_width = vht_ch_wd + 1; pe_debug("cntr_freq0: %d cntr_freq1: %d width: %d", |
