[PATCH] ieee80211: Fix A band channel count (resent)
authorJean Delvare <jdelvare@suse.de>
Thu, 4 May 2006 17:47:19 +0000 (19:47 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 5 May 2006 20:55:23 +0000 (16:55 -0400)
The channel count for 802.11a is still not right. We better
compute it from the min and max channel numbers, rather than
hardcoding it.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
include/net/ieee80211.h

index 4725ff861c57f74390a66735ee03b50de7492c9e..d5926bfb1fc967132850724040903bbf1cbbe550 100644 (file)
@@ -955,11 +955,13 @@ enum ieee80211_state {
 
 #define IEEE80211_24GHZ_MIN_CHANNEL 1
 #define IEEE80211_24GHZ_MAX_CHANNEL 14
-#define IEEE80211_24GHZ_CHANNELS    14
+#define IEEE80211_24GHZ_CHANNELS (IEEE80211_24GHZ_MAX_CHANNEL - \
+                                 IEEE80211_24GHZ_MIN_CHANNEL + 1)
 
 #define IEEE80211_52GHZ_MIN_CHANNEL 34
 #define IEEE80211_52GHZ_MAX_CHANNEL 165
-#define IEEE80211_52GHZ_CHANNELS    131
+#define IEEE80211_52GHZ_CHANNELS (IEEE80211_52GHZ_MAX_CHANNEL - \
+                                 IEEE80211_52GHZ_MIN_CHANNEL + 1)
 
 enum {
        IEEE80211_CH_PASSIVE_ONLY = (1 << 0),