Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 224626
b: refs/heads/master
c: b7417d9
h: refs/heads/master
v: v3
  • Loading branch information
Juuso Oikarinen authored and Luciano Coelho committed Nov 22, 2010
1 parent 99e4cc2 commit d3f0208
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 91433029e42e58d8536299f32fa55cf589adff35
refs/heads/master: b7417d930afdc214daa24299912d984e7f4f390a
23 changes: 23 additions & 0 deletions trunk/drivers/net/wireless/wl12xx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,27 @@ static int wl1271_dev_notify(struct notifier_block *me, unsigned long what,
return NOTIFY_OK;
}

static int wl1271_reg_notify(struct wiphy *wiphy,
struct regulatory_request *request) {
struct ieee80211_supported_band *band;
struct ieee80211_channel *ch;
int i;

band = wiphy->bands[IEEE80211_BAND_5GHZ];
for (i = 0; i < band->n_channels; i++) {
ch = &band->channels[i];
if (ch->flags & IEEE80211_CHAN_DISABLED)
continue;

if (ch->flags & IEEE80211_CHAN_RADAR)
ch->flags |= IEEE80211_CHAN_NO_IBSS |
IEEE80211_CHAN_PASSIVE_SCAN;

}

return 0;
}

static void wl1271_conf_init(struct wl1271 *wl)
{

Expand Down Expand Up @@ -2590,6 +2611,8 @@ int wl1271_init_ieee80211(struct wl1271 *wl)
wl->hw->queues = 4;
wl->hw->max_rates = 1;

wl->hw->wiphy->reg_notifier = wl1271_reg_notify;

SET_IEEE80211_DEV(wl->hw, wl1271_wl_to_dev(wl));

return 0;
Expand Down

0 comments on commit d3f0208

Please sign in to comment.