diff options
author | Juuso Oikarinen <juuso.oikarinen@nokia.com> | 2010-11-10 05:27:19 -0500 |
---|---|---|
committer | Luciano Coelho <luciano.coelho@nokia.com> | 2010-11-22 09:45:11 -0500 |
commit | b7417d930afdc214daa24299912d984e7f4f390a (patch) | |
tree | f17b2eed017b8ce5b86c99c728d92e5df0538043 /drivers/net/wireless | |
parent | 91433029e42e58d8536299f32fa55cf589adff35 (diff) |
wl1271: Prevent ad-hoc and active scanning on 11a DFS frequencies
The wl1271 does not support radar detection. Hence, prevent ad-hoc and
active scanning on frequencies requiring DFS.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Tested-by: Tuomas Katila <ext-tuomas.2.katila@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/wl12xx/main.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index c00523008be4..07243282e50a 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c | |||
@@ -335,6 +335,27 @@ out: | |||
335 | return NOTIFY_OK; | 335 | return NOTIFY_OK; |
336 | } | 336 | } |
337 | 337 | ||
338 | static int wl1271_reg_notify(struct wiphy *wiphy, | ||
339 | struct regulatory_request *request) { | ||
340 | struct ieee80211_supported_band *band; | ||
341 | struct ieee80211_channel *ch; | ||
342 | int i; | ||
343 | |||
344 | band = wiphy->bands[IEEE80211_BAND_5GHZ]; | ||
345 | for (i = 0; i < band->n_channels; i++) { | ||
346 | ch = &band->channels[i]; | ||
347 | if (ch->flags & IEEE80211_CHAN_DISABLED) | ||
348 | continue; | ||
349 | |||
350 | if (ch->flags & IEEE80211_CHAN_RADAR) | ||
351 | ch->flags |= IEEE80211_CHAN_NO_IBSS | | ||
352 | IEEE80211_CHAN_PASSIVE_SCAN; | ||
353 | |||
354 | } | ||
355 | |||
356 | return 0; | ||
357 | } | ||
358 | |||
338 | static void wl1271_conf_init(struct wl1271 *wl) | 359 | static void wl1271_conf_init(struct wl1271 *wl) |
339 | { | 360 | { |
340 | 361 | ||
@@ -2590,6 +2611,8 @@ int wl1271_init_ieee80211(struct wl1271 *wl) | |||
2590 | wl->hw->queues = 4; | 2611 | wl->hw->queues = 4; |
2591 | wl->hw->max_rates = 1; | 2612 | wl->hw->max_rates = 1; |
2592 | 2613 | ||
2614 | wl->hw->wiphy->reg_notifier = wl1271_reg_notify; | ||
2615 | |||
2593 | SET_IEEE80211_DEV(wl->hw, wl1271_wl_to_dev(wl)); | 2616 | SET_IEEE80211_DEV(wl->hw, wl1271_wl_to_dev(wl)); |
2594 | 2617 | ||
2595 | return 0; | 2618 | return 0; |