diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2006-06-25 21:32:21 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-07-05 13:42:57 -0400 |
commit | fc8fd3400b716615933a47be453839d190b235bd (patch) | |
tree | 816af20b5725ecc7264553ebd901c4209c472d39 /drivers/net/wireless/bcm43xx/bcm43xx_main.h | |
parent | 60d48f1e23c25d09dbe7025ff179b808d72704b3 (diff) | |
download | blackbird-op-linux-fc8fd3400b716615933a47be453839d190b235bd.tar.gz blackbird-op-linux-fc8fd3400b716615933a47be453839d190b235bd.zip |
[PATCH] Convert bcm43xx-softmac to use the ieee80211_is_valid_channel routine
The current version of bcm43xx-softmac uses local routines to check
if a channel is valid. As noted in the comments, these routines do
not take any regulatory information into account. This patch converts
the code to use the equivalent routine in ieee80211, which is being
converted to know about regulatory information.
Signed-Off-By: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/bcm43xx/bcm43xx_main.h')
-rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_main.h | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.h b/drivers/net/wireless/bcm43xx/bcm43xx_main.h index 30a202b258b5..116493671f88 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_main.h +++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.h @@ -112,30 +112,6 @@ int bcm43xx_channel_to_freq(struct bcm43xx_private *bcm, return bcm43xx_channel_to_freq_bg(channel); } -/* Lightweight function to check if a channel number is valid. - * Note that this does _NOT_ check for geographical restrictions! - */ -static inline -int bcm43xx_is_valid_channel_a(u8 channel) -{ - return (channel >= IEEE80211_52GHZ_MIN_CHANNEL - && channel <= IEEE80211_52GHZ_MAX_CHANNEL); -} -static inline -int bcm43xx_is_valid_channel_bg(u8 channel) -{ - return (channel >= IEEE80211_24GHZ_MIN_CHANNEL - && channel <= IEEE80211_24GHZ_MAX_CHANNEL); -} -static inline -int bcm43xx_is_valid_channel(struct bcm43xx_private *bcm, - u8 channel) -{ - if (bcm43xx_current_phy(bcm)->type == BCM43xx_PHYTYPE_A) - return bcm43xx_is_valid_channel_a(channel); - return bcm43xx_is_valid_channel_bg(channel); -} - void bcm43xx_tsf_read(struct bcm43xx_private *bcm, u64 *tsf); void bcm43xx_tsf_write(struct bcm43xx_private *bcm, u64 tsf); |