]> err.no Git - linux-2.6/blobdiff - drivers/net/wireless/bcm43xx/bcm43xx_main.h
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[linux-2.6] / drivers / net / wireless / bcm43xx / bcm43xx_main.h
index 086136c3d01f53f5d31f3bb943ec5c7676c2381d..116493671f88f00e41701348f59f3e8c0dc621b1 100644 (file)
@@ -80,7 +80,7 @@ static inline
 u8 bcm43xx_freq_to_channel(struct bcm43xx_private *bcm,
                           int freq)
 {
-       if (bcm->current_core->phy->type == BCM43xx_PHYTYPE_A)
+       if (bcm43xx_current_phy(bcm)->type == BCM43xx_PHYTYPE_A)
                return bcm43xx_freq_to_channel_a(freq);
        return bcm43xx_freq_to_channel_bg(freq);
 }
@@ -107,33 +107,11 @@ static inline
 int bcm43xx_channel_to_freq(struct bcm43xx_private *bcm,
                            u8 channel)
 {
-       if (bcm->current_core->phy->type == BCM43xx_PHYTYPE_A)
+       if (bcm43xx_current_phy(bcm)->type == BCM43xx_PHYTYPE_A)
                return bcm43xx_channel_to_freq_a(channel);
        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 <= 200);
-}
-static inline
-int bcm43xx_is_valid_channel_bg(u8 channel)
-{
-       return (channel >= 1 && channel <= 14);
-}
-static inline
-int bcm43xx_is_valid_channel(struct bcm43xx_private *bcm,
-                            u8 channel)
-{
-       if (bcm->current_core->phy->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);