From 7b6f426ea4cbe304bc4c99ceca6d2d620186084f Mon Sep 17 00:00:00 2001 From: "Masti, Narayanraddi" Date: Fri, 20 May 2016 15:22:40 +0530 Subject: qcacld-2.0: Ensure that phy mode from ini is considered for wlan scan Regardless of phy mode in ini, 5Ghz band is configured to wiphy which was leading to scan on 5ghz even though phy mode was set to 11b/g. Fix will ensure to configure 5Ghz band if ini supports for 5ghz. Change-Id: Ie7735b06ca5ae370077c962a645296ba054ac5d4 CRs-Fixed: 1018993 --- CORE/HDD/src/wlan_hdd_cfg80211.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index 9aad401541b1..740714b06bf4 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -11979,7 +11979,11 @@ int wlan_hdd_cfg80211_init(struct device *dev, vos_mem_copy(wiphy->bands[IEEE80211_BAND_2GHZ]->channels, &hdd_channels_2_4_GHZ[0], sizeof(hdd_channels_2_4_GHZ)); - if (hdd_is_5g_supported(pHddCtx)) + if (hdd_is_5g_supported(pHddCtx) && + ((eHDD_DOT11_MODE_11b != pCfg->dot11Mode) || + (eHDD_DOT11_MODE_11g != pCfg->dot11Mode) || + (eHDD_DOT11_MODE_11b_ONLY != pCfg->dot11Mode) || + (eHDD_DOT11_MODE_11g_ONLY != pCfg->dot11Mode))) { wiphy->bands[IEEE80211_BAND_5GHZ] = &wlan_hdd_band_5_GHZ; wiphy->bands[IEEE80211_BAND_5GHZ]->channels = -- cgit v1.2.3