From d04af1ff76fa12a652adc9c21107393ffc93204e Mon Sep 17 00:00:00 2001 From: gaolez Date: Fri, 30 Dec 2016 19:57:16 +0800 Subject: qcacld-2.0: Fix channel switch fail in static 5/10M mode Currently, driver will only fill 5/10M IE info in beacon when detecting dynamic sub-band flag set, during channel switch process. For static 5/10M mode, such IE will miss in beacon, which cause STA unable to connect to SAP in new sub-band channel. This fix is to fill 5/10M IE info in beacon for both dynamic and static 5/10 mode. Change-Id: I57367ca859c10fdfb0d63460fa347649e95f1df7 CRs-Fixed: 1106756 --- CORE/SYS/legacy/src/utils/src/parserApi.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/CORE/SYS/legacy/src/utils/src/parserApi.c b/CORE/SYS/legacy/src/utils/src/parserApi.c index 9006771635ee..0da9a22ae37e 100644 --- a/CORE/SYS/legacy/src/utils/src/parserApi.c +++ b/CORE/SYS/legacy/src/utils/src/parserApi.c @@ -376,15 +376,27 @@ populate_dot11f_sub_20_channel_width_ie( tDot11fIEQComVendorIE *dot11f_ptr, tpPESession pe_session) { - if (mac_ctx_ptr->sub20_dynamic_channelwidth == 0) + uint8_t sub20_static_channelwidth; + uint8_t sub20_dynamic_channelwidth; + uint8_t sub20_capability; + + sub20_static_channelwidth = mac_ctx_ptr->sub20_channelwidth; + sub20_dynamic_channelwidth = mac_ctx_ptr->sub20_dynamic_channelwidth; + + if (sub20_static_channelwidth == 0 && + sub20_dynamic_channelwidth == 0) return; + if (sub20_dynamic_channelwidth != 0) + sub20_capability = sub20_dynamic_channelwidth; + else + sub20_capability = sub20_static_channelwidth; + if (LIM_IS_AP_ROLE(pe_session) || LIM_IS_STA_ROLE(pe_session)) { dot11f_ptr->present = true; dot11f_ptr->Sub20Info.present = true; - dot11f_ptr->Sub20Info.capability = - mac_ctx_ptr->sub20_dynamic_channelwidth; + dot11f_ptr->Sub20Info.capability = sub20_capability; } if (LIM_IS_AP_ROLE(pe_session) && -- cgit v1.2.3