diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/wl12xx/main.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index dc3a09319d12..0b79c49cd877 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c | |||
@@ -338,7 +338,6 @@ out: | |||
338 | static int wl1271_reg_notify(struct wiphy *wiphy, | 338 | static int wl1271_reg_notify(struct wiphy *wiphy, |
339 | struct regulatory_request *request) | 339 | struct regulatory_request *request) |
340 | { | 340 | { |
341 | struct wl1271 *wl = wiphy_to_ieee80211_hw(wiphy)->priv; | ||
342 | struct ieee80211_supported_band *band; | 341 | struct ieee80211_supported_band *band; |
343 | struct ieee80211_channel *ch; | 342 | struct ieee80211_channel *ch; |
344 | int i; | 343 | int i; |
@@ -349,11 +348,6 @@ static int wl1271_reg_notify(struct wiphy *wiphy, | |||
349 | if (ch->flags & IEEE80211_CHAN_DISABLED) | 348 | if (ch->flags & IEEE80211_CHAN_DISABLED) |
350 | continue; | 349 | continue; |
351 | 350 | ||
352 | if (!wl->enable_11a) { | ||
353 | ch->flags |= IEEE80211_CHAN_DISABLED; | ||
354 | continue; | ||
355 | } | ||
356 | |||
357 | if (ch->flags & IEEE80211_CHAN_RADAR) | 351 | if (ch->flags & IEEE80211_CHAN_RADAR) |
358 | ch->flags |= IEEE80211_CHAN_NO_IBSS | | 352 | ch->flags |= IEEE80211_CHAN_NO_IBSS | |
359 | IEEE80211_CHAN_PASSIVE_SCAN; | 353 | IEEE80211_CHAN_PASSIVE_SCAN; |
@@ -1071,6 +1065,16 @@ power_off: | |||
1071 | strncpy(wiphy->fw_version, wl->chip.fw_ver, | 1065 | strncpy(wiphy->fw_version, wl->chip.fw_ver, |
1072 | sizeof(wiphy->fw_version)); | 1066 | sizeof(wiphy->fw_version)); |
1073 | 1067 | ||
1068 | /* | ||
1069 | * Now we know if 11a is supported (info from the NVS), so disable | ||
1070 | * 11a channels if not supported | ||
1071 | */ | ||
1072 | if (!wl->enable_11a) | ||
1073 | wiphy->bands[IEEE80211_BAND_5GHZ]->n_channels = 0; | ||
1074 | |||
1075 | wl1271_debug(DEBUG_MAC80211, "11a is %ssupported", | ||
1076 | wl->enable_11a ? "" : "not "); | ||
1077 | |||
1074 | out: | 1078 | out: |
1075 | mutex_unlock(&wl->mutex); | 1079 | mutex_unlock(&wl->mutex); |
1076 | 1080 | ||