Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 225318
b: refs/heads/master
c: fb6a681
h: refs/heads/master
v: v3
  • Loading branch information
Luciano Coelho committed Dec 15, 2010
1 parent daafb0e commit 2646e2d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1036dc169f4cc6e5b753b1596d285d1cc3311a23
refs/heads/master: fb6a6819fad0d71b47577a51709440a9f8441f0a
16 changes: 10 additions & 6 deletions trunk/drivers/net/wireless/wl12xx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,6 @@ static int wl1271_dev_notify(struct notifier_block *me, unsigned long what,
static int wl1271_reg_notify(struct wiphy *wiphy,
struct regulatory_request *request)
{
struct wl1271 *wl = wiphy_to_ieee80211_hw(wiphy)->priv;
struct ieee80211_supported_band *band;
struct ieee80211_channel *ch;
int i;
Expand All @@ -349,11 +348,6 @@ static int wl1271_reg_notify(struct wiphy *wiphy,
if (ch->flags & IEEE80211_CHAN_DISABLED)
continue;

if (!wl->enable_11a) {
ch->flags |= IEEE80211_CHAN_DISABLED;
continue;
}

if (ch->flags & IEEE80211_CHAN_RADAR)
ch->flags |= IEEE80211_CHAN_NO_IBSS |
IEEE80211_CHAN_PASSIVE_SCAN;
Expand Down Expand Up @@ -1071,6 +1065,16 @@ static int wl1271_op_add_interface(struct ieee80211_hw *hw,
strncpy(wiphy->fw_version, wl->chip.fw_ver,
sizeof(wiphy->fw_version));

/*
* Now we know if 11a is supported (info from the NVS), so disable
* 11a channels if not supported
*/
if (!wl->enable_11a)
wiphy->bands[IEEE80211_BAND_5GHZ]->n_channels = 0;

wl1271_debug(DEBUG_MAC80211, "11a is %ssupported",
wl->enable_11a ? "" : "not ");

out:
mutex_unlock(&wl->mutex);

Expand Down

0 comments on commit 2646e2d

Please sign in to comment.