diff options
| author | Amar Singhal <asinghal@codeaurora.org> | 2016-10-19 10:49:58 -0700 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2016-10-25 08:49:53 -0700 |
| commit | b7fe2611ea22c6f7e0687e7f60747274655aec2a (patch) | |
| tree | 35a7e8287b0d4d05ab8ef06bbb4aa902143d49ff | |
| parent | a87e2feaf8d0c83cc0e8dc2f9c3418030e318071 (diff) | |
qcacld-3.0: Disable non-20 mhz 2G world regulatory channels
The minimum bandwidth supported is 5 MHZ. Kernel API
wiphy_apply_custom_regulatory can enable channels 12/13
with BW 5/10 even for reg rule 2402-2472. Circumvent the issue
by doing a check in the driver.
Change-Id: I9ad600eda2e507312a3016aa6d1fe6fdc41724f2
CRs-Fixed: 1079851
| -rw-r--r-- | core/hdd/src/wlan_hdd_regulatory.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/core/hdd/src/wlan_hdd_regulatory.c b/core/hdd/src/wlan_hdd_regulatory.c index 4487d5dd2500..2c237469c234 100644 --- a/core/hdd/src/wlan_hdd_regulatory.c +++ b/core/hdd/src/wlan_hdd_regulatory.c @@ -230,6 +230,8 @@ static void hdd_regulatory_wiphy_init(hdd_context_t *hdd_ctx, struct wiphy *wiphy) { const struct ieee80211_regdomain *reg_rules; + int chan_num; + struct ieee80211_channel chan; if (hdd_is_world_regdomain(reg->reg_domain)) { reg_rules = hdd_get_world_regrules(reg); @@ -249,6 +251,17 @@ static void hdd_regulatory_wiphy_init(hdd_context_t *hdd_ctx, wiphy_apply_custom_regulatory(wiphy, reg_rules); /* + * disable 2.4 Ghz channels that dont have 20 mhz bw + */ + for (chan_num = 0; + chan_num < wiphy->bands[IEEE80211_BAND_2GHZ]->n_channels; + chan_num++) { + chan = wiphy->bands[IEEE80211_BAND_2GHZ]->channels[chan_num]; + if (chan.flags & IEEE80211_CHAN_NO_20MHZ) + chan.flags |= IEEE80211_CHAN_DISABLED; + } + + /* * restore the driver regulatory flags since * wiphy_apply_custom_regulatory may have * changed them |
