diff options
author | Christian Lamparter <chunkeey@web.de> | 2008-12-26 19:09:45 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-12 14:24:56 -0500 |
commit | 124b68e755c2ef9342d5d477142c499fd7901360 (patch) | |
tree | 7058fccf7eb92efdb790c9731898125954fa0837 /drivers | |
parent | dcebf45cdc8384be9009b2b9a825054b64742768 (diff) | |
download | linux-124b68e755c2ef9342d5d477142c499fd7901360.tar.gz linux-124b68e755c2ef9342d5d477142c499fd7901360.tar.bz2 linux-124b68e755c2ef9342d5d477142c499fd7901360.zip |
p54: fix WARN_ON at line 2247 of net/mac80211/rx.c
This patch hopefully fixes a mac80211<->p54 interaction problem, which was
described by Larry Finger (ref: http://marc.info/?l=linux-wireless&m=123009889327707 )
I guess the warning was triggered by pending frames in the receive queue,
while we're doing a band change 5GHz.
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/p54/p54common.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/wireless/p54/p54common.c b/drivers/net/wireless/p54/p54common.c index 37294a657f8b..cba89ed0f572 100644 --- a/drivers/net/wireless/p54/p54common.c +++ b/drivers/net/wireless/p54/p54common.c @@ -586,6 +586,7 @@ static int p54_rx_data(struct ieee80211_hw *dev, struct sk_buff *skb) u16 freq = le16_to_cpu(hdr->freq); size_t header_len = sizeof(*hdr); u32 tsf32; + u8 rate = hdr->rate & 0xf; /* * If the device is in a unspecified state we have to @@ -614,8 +615,11 @@ static int p54_rx_data(struct ieee80211_hw *dev, struct sk_buff *skb) rx_status.qual = (100 * hdr->rssi) / 127; if (hdr->rate & 0x10) rx_status.flag |= RX_FLAG_SHORTPRE; - rx_status.rate_idx = (dev->conf.channel->band == IEEE80211_BAND_2GHZ ? - hdr->rate : (hdr->rate - 4)) & 0xf; + if (dev->conf.channel->band == IEEE80211_BAND_5GHZ) + rx_status.rate_idx = (rate < 4) ? 0 : rate - 4; + else + rx_status.rate_idx = rate; + rx_status.freq = freq; rx_status.band = dev->conf.channel->band; rx_status.antenna = hdr->antenna; |