diff options
Diffstat (limited to 'drivers/net/wireless/b43/main.h')
-rw-r--r-- | drivers/net/wireless/b43/main.h | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/drivers/net/wireless/b43/main.h b/drivers/net/wireless/b43/main.h index 284d17da17d1..08e2e56e48f4 100644 --- a/drivers/net/wireless/b43/main.h +++ b/drivers/net/wireless/b43/main.h | |||
@@ -39,11 +39,11 @@ | |||
39 | #define PAD_BYTES(nr_bytes) P4D_BYTES( __LINE__ , (nr_bytes)) | 39 | #define PAD_BYTES(nr_bytes) P4D_BYTES( __LINE__ , (nr_bytes)) |
40 | 40 | ||
41 | /* Lightweight function to convert a frequency (in Mhz) to a channel number. */ | 41 | /* Lightweight function to convert a frequency (in Mhz) to a channel number. */ |
42 | static inline u8 b43_freq_to_channel_a(int freq) | 42 | static inline u8 b43_freq_to_channel_5ghz(int freq) |
43 | { | 43 | { |
44 | return ((freq - 5000) / 5); | 44 | return ((freq - 5000) / 5); |
45 | } | 45 | } |
46 | static inline u8 b43_freq_to_channel_bg(int freq) | 46 | static inline u8 b43_freq_to_channel_2ghz(int freq) |
47 | { | 47 | { |
48 | u8 channel; | 48 | u8 channel; |
49 | 49 | ||
@@ -54,19 +54,13 @@ static inline u8 b43_freq_to_channel_bg(int freq) | |||
54 | 54 | ||
55 | return channel; | 55 | return channel; |
56 | } | 56 | } |
57 | static inline u8 b43_freq_to_channel(struct b43_wldev *dev, int freq) | ||
58 | { | ||
59 | if (dev->phy.type == B43_PHYTYPE_A) | ||
60 | return b43_freq_to_channel_a(freq); | ||
61 | return b43_freq_to_channel_bg(freq); | ||
62 | } | ||
63 | 57 | ||
64 | /* Lightweight function to convert a channel number to a frequency (in Mhz). */ | 58 | /* Lightweight function to convert a channel number to a frequency (in Mhz). */ |
65 | static inline int b43_channel_to_freq_a(u8 channel) | 59 | static inline int b43_channel_to_freq_5ghz(u8 channel) |
66 | { | 60 | { |
67 | return (5000 + (5 * channel)); | 61 | return (5000 + (5 * channel)); |
68 | } | 62 | } |
69 | static inline int b43_channel_to_freq_bg(u8 channel) | 63 | static inline int b43_channel_to_freq_2ghz(u8 channel) |
70 | { | 64 | { |
71 | int freq; | 65 | int freq; |
72 | 66 | ||
@@ -77,12 +71,6 @@ static inline int b43_channel_to_freq_bg(u8 channel) | |||
77 | 71 | ||
78 | return freq; | 72 | return freq; |
79 | } | 73 | } |
80 | static inline int b43_channel_to_freq(struct b43_wldev *dev, u8 channel) | ||
81 | { | ||
82 | if (dev->phy.type == B43_PHYTYPE_A) | ||
83 | return b43_channel_to_freq_a(channel); | ||
84 | return b43_channel_to_freq_bg(channel); | ||
85 | } | ||
86 | 74 | ||
87 | static inline int b43_is_cck_rate(int rate) | 75 | static inline int b43_is_cck_rate(int rate) |
88 | { | 76 | { |