Commit 573c67cf authored by Luciano Coelho's avatar Luciano Coelho

wl12xx: disable 11a channels when regulatory changes if 11a is not supported

Instead of simply not scanning for the 11a channels when not supported by the
hardware, disable the channels in reg_notify.  This centralizes the decision
on whether to scan 5GHz channel in one place and allows userspace to know
exactly which channels are in use.

Based on Juuso Oikarinen's idea.

Cc: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: default avatarLuciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: default avatarJuuso Oikarinen <juuso.oikarinen@nokia.com>
parent 67353299
...@@ -336,7 +336,9 @@ static int wl1271_dev_notify(struct notifier_block *me, unsigned long what, ...@@ -336,7 +336,9 @@ static int wl1271_dev_notify(struct notifier_block *me, unsigned long what,
} }
static int wl1271_reg_notify(struct wiphy *wiphy, static int wl1271_reg_notify(struct wiphy *wiphy,
struct regulatory_request *request) { struct regulatory_request *request)
{
struct wl1271 *wl = wiphy_to_ieee80211_hw(wiphy)->priv;
struct ieee80211_supported_band *band; struct ieee80211_supported_band *band;
struct ieee80211_channel *ch; struct ieee80211_channel *ch;
int i; int i;
...@@ -347,6 +349,11 @@ static int wl1271_reg_notify(struct wiphy *wiphy, ...@@ -347,6 +349,11 @@ static int wl1271_reg_notify(struct wiphy *wiphy,
if (ch->flags & IEEE80211_CHAN_DISABLED) if (ch->flags & IEEE80211_CHAN_DISABLED)
continue; continue;
if (!wl->enable_11a) {
ch->flags |= IEEE80211_CHAN_DISABLED;
continue;
}
if (ch->flags & IEEE80211_CHAN_RADAR) if (ch->flags & IEEE80211_CHAN_RADAR)
ch->flags |= IEEE80211_CHAN_NO_IBSS | ch->flags |= IEEE80211_CHAN_NO_IBSS |
IEEE80211_CHAN_PASSIVE_SCAN; IEEE80211_CHAN_PASSIVE_SCAN;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment