From b04f7f89f71a30a94a45f0ee774080e07e2d8fd3 Mon Sep 17 00:00:00 2001 From: Kiran Kumar Lokere Date: Wed, 21 Mar 2018 18:54:21 -0700 Subject: [PATCH] qcacld-3.0: Fix the band setting in 11ac phymode update If user configures the phymode to 11ac then band is configured with only 5G that disables the 2.4G channels. Instead of setting the band to 5G, enable the 5G band during 11ac phymode update if the 5G band is not enabled. Change-Id: I4a4fa3a0bddb345e7ea73b7b36f0581644029316 CRs-Fixed: 2210359 --- core/hdd/src/wlan_hdd_wext.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index 94266bec3d06..49fc14ac7b8c 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -4021,11 +4021,21 @@ int wlan_hdd_update_phymode(struct net_device *net, tHalHandle hal, case IEEE80211_MODE_11AC_VHT40: case IEEE80211_MODE_11AC_VHT80: sme_set_phy_mode(hal, eCSR_DOT11_MODE_11ac); - if (hdd_reg_set_band(net, WLAN_HDD_UI_BAND_5_GHZ) == 0) { - phymode = eCSR_DOT11_MODE_11ac; - hdd_dot11mode = eHDD_DOT11_MODE_11ac; - chwidth = WNI_CFG_CHANNEL_BONDING_MODE_ENABLE; + phymode = eCSR_DOT11_MODE_11ac; + hdd_dot11mode = eHDD_DOT11_MODE_11ac; + chwidth = WNI_CFG_CHANNEL_BONDING_MODE_ENABLE; + if (band_5g && band_24) { + curr_band = BAND_ALL; + break; + } else if (band_5g) { curr_band = BAND_5G; + break; + } else if (new_phymode != IEEE80211_MODE_11AC_VHT80) { + curr_band = BAND_2G; + break; + } + if (hdd_reg_set_band(net, WLAN_HDD_UI_BAND_AUTO) == 0) { + curr_band = BAND_ALL; } else { sme_set_phy_mode(hal, old_phymode); return -EIO;