From f21709d70ad6d7ad50288f7056c3a368138b017c Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Thu, 4 May 2006 19:47:19 +0200 Subject: [PATCH] ieee80211: Fix A band channel count (resent) 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 Signed-off-by: John W. Linville --- include/net/ieee80211.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/net') diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h index 4725ff861c57..d5926bfb1fc9 100644 --- a/include/net/ieee80211.h +++ b/include/net/ieee80211.h @@ -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), -- cgit v1.2.3-59-g8ed1b