diff mbox

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

Message ID 1290775390-3391-1-git-send-email-luciano.coelho@nokia.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Luciano Coelho Nov. 26, 2010, 12:43 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 35cfcf6..97eb186 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -336,7 +336,9 @@  out:
 }
 
 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_channel *ch;
 	int i;
@@ -347,6 +349,11 @@  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;