wlan: Use HDD indexes to access wiphy band info
To make pronto driver to work with msm-4.9 kernel,
use: HDD_NL80211_BAND_2GHZ, HDD_NL80211_BAND_5GHZ and HDD_NUM_NL80211_BANDS,
instead of IEEE80211_BAND_2GHZ, IEEE80211_BAND_5GHZ and IEEE80211_NUM_BANDS
respectively.
Change-Id: I19f7e55e86eb6e0a551de3879ff842569caf2aa4
CRs-Fixed: 2208312
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index ea39239..40a6177 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -10663,7 +10663,8 @@
cache_chann->channel_info[i].channel_num,
&freq);
- for (band_num = 0; band_num < IEEE80211_NUM_BANDS; band_num++) {
+ for (band_num = 0; band_num < HDD_NUM_NL80211_BANDS;
+ band_num++) {
for (channel_num = 0; channel_num <
wiphy->bands[band_num]->n_channels;
channel_num++) {
@@ -10741,7 +10742,7 @@
cache_chann->channel_info[i].channel_num,
&freq);
- for (band_num = 0; band_num < IEEE80211_NUM_BANDS;
+ for (band_num = 0; band_num < HDD_NUM_NL80211_BANDS;
band_num++) {
for (band_ch_num = 0; band_ch_num <
wiphy->bands[band_num]->n_channels;
diff --git a/CORE/VOSS/src/vos_nvitem.c b/CORE/VOSS/src/vos_nvitem.c
index cf7aef9..175bb82 100644
--- a/CORE/VOSS/src/vos_nvitem.c
+++ b/CORE/VOSS/src/vos_nvitem.c
@@ -4845,15 +4845,15 @@
k = wiphy->bands[HDD_NL80211_BAND_2GHZ]->n_channels + j;
if ((wiphy->bands[HDD_NL80211_BAND_5GHZ]->channels[j].center_freq == 5260 ||
- wiphy->bands[IEEE80211_BAND_5GHZ]->channels[j].center_freq == 5280 ||
- wiphy->bands[IEEE80211_BAND_5GHZ]->channels[j].center_freq == 5300 ||
- wiphy->bands[IEEE80211_BAND_5GHZ]->channels[j].center_freq == 5320 ||
- wiphy->bands[IEEE80211_BAND_5GHZ]->channels[j].center_freq == 5500 ||
- wiphy->bands[IEEE80211_BAND_5GHZ]->channels[j].center_freq == 5520) &&
+ wiphy->bands[HDD_NL80211_BAND_5GHZ]->channels[j].center_freq == 5280 ||
+ wiphy->bands[HDD_NL80211_BAND_5GHZ]->channels[j].center_freq == 5300 ||
+ wiphy->bands[HDD_NL80211_BAND_5GHZ]->channels[j].center_freq == 5320 ||
+ wiphy->bands[HDD_NL80211_BAND_5GHZ]->channels[j].center_freq == 5500 ||
+ wiphy->bands[HDD_NL80211_BAND_5GHZ]->channels[j].center_freq == 5520) &&
((regChannels[k].enabled == NV_CHANNEL_ENABLE) ||
(regChannels[k].enabled == NV_CHANNEL_DFS)))
{
- wiphy->bands[IEEE80211_BAND_5GHZ]->channels[j].flags |= IEEE80211_CHAN_RADAR;
+ wiphy->bands[HDD_NL80211_BAND_5GHZ]->channels[j].flags |= IEEE80211_CHAN_RADAR;
}
}
}