diff options
author | Michael Buesch <mb@bu3sch.de> | 2008-01-02 18:55:53 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-08 23:30:06 -0800 |
commit | d987160b710c98997015832422a05e18d9f0f925 (patch) | |
tree | ecb389959d6c9678b77dc88976cc57466c235d79 /drivers/net/wireless/b43/main.h | |
parent | 9e8d6f8959c356d8294d45f11231331c3e1bcae6 (diff) | |
download | kernel_samsung_tuna-d987160b710c98997015832422a05e18d9f0f925.zip kernel_samsung_tuna-d987160b710c98997015832422a05e18d9f0f925.tar.gz kernel_samsung_tuna-d987160b710c98997015832422a05e18d9f0f925.tar.bz2 |
b43: Fix rxheader channel parsing
This patch fixes the parsing of the RX data header channel field.
The current code parses the header incorrectly and passes a wrong
channel number and frequency for each frame to mac80211.
The FIXMEs added by this patch don't matter for now as the code
where they live won't get executed anyway. They will be fixed later.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
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 284d17d..08e2e56 100644 --- a/drivers/net/wireless/b43/main.h +++ b/drivers/net/wireless/b43/main.h @@ -39,11 +39,11 @@ #define PAD_BYTES(nr_bytes) P4D_BYTES( __LINE__ , (nr_bytes)) /* Lightweight function to convert a frequency (in Mhz) to a channel number. */ -static inline u8 b43_freq_to_channel_a(int freq) +static inline u8 b43_freq_to_channel_5ghz(int freq) { return ((freq - 5000) / 5); } -static inline u8 b43_freq_to_channel_bg(int freq) +static inline u8 b43_freq_to_channel_2ghz(int freq) { u8 channel; @@ -54,19 +54,13 @@ static inline u8 b43_freq_to_channel_bg(int freq) return channel; } -static inline u8 b43_freq_to_channel(struct b43_wldev *dev, int freq) -{ - if (dev->phy.type == B43_PHYTYPE_A) - return b43_freq_to_channel_a(freq); - return b43_freq_to_channel_bg(freq); -} /* Lightweight function to convert a channel number to a frequency (in Mhz). */ -static inline int b43_channel_to_freq_a(u8 channel) +static inline int b43_channel_to_freq_5ghz(u8 channel) { return (5000 + (5 * channel)); } -static inline int b43_channel_to_freq_bg(u8 channel) +static inline int b43_channel_to_freq_2ghz(u8 channel) { int freq; @@ -77,12 +71,6 @@ static inline int b43_channel_to_freq_bg(u8 channel) return freq; } -static inline int b43_channel_to_freq(struct b43_wldev *dev, u8 channel) -{ - if (dev->phy.type == B43_PHYTYPE_A) - return b43_channel_to_freq_a(channel); - return b43_channel_to_freq_bg(channel); -} static inline int b43_is_cck_rate(int rate) { |