qcacld-3.0: Ensure that phy mode from ini is considered for wlan scan

qcacld-2.0 to qcacld-3.0 propagation

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.

Git-commit: 7b6f426ea4cbe304bc4c99ceca6d2d620186084f
Change-Id: Ie7735b06ca5ae370077c962a645296ba054ac5d4
CRs-Fixed: 1018993
This commit is contained in:
Selvaraj, Sridhar 2016-07-31 15:37:07 +05:30 • committed by qcabuildsw
commit cd3cc70222

View file

@ -7925,7 +7925,11 @@ int wlan_hdd_cfg80211_init(struct device *dev,
qdf_mem_copy(wiphy->bands[IEEE80211_BAND_2GHZ]->channels,
&hdd_channels_2_4_ghz[0],
sizeof(hdd_channels_2_4_ghz));
if (true == 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 =
qdf_mem_malloc(sizeof(hdd_channels_5_ghz));