aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/p54/p54common.c8
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)
586 u16 freq = le16_to_cpu(hdr->freq); 586 u16 freq = le16_to_cpu(hdr->freq);
587 size_t header_len = sizeof(*hdr); 587 size_t header_len = sizeof(*hdr);
588 u32 tsf32; 588 u32 tsf32;
589 u8 rate = hdr->rate & 0xf;
589 590
590 /* 591 /*
591 * If the device is in a unspecified state we have to 592 * 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)
614 rx_status.qual = (100 * hdr->rssi) / 127; 615 rx_status.qual = (100 * hdr->rssi) / 127;
615 if (hdr->rate & 0x10) 616 if (hdr->rate & 0x10)
616 rx_status.flag |= RX_FLAG_SHORTPRE; 617 rx_status.flag |= RX_FLAG_SHORTPRE;
617 rx_status.rate_idx = (dev->conf.channel->band == IEEE80211_BAND_2GHZ ? 618 if (dev->conf.channel->band == IEEE80211_BAND_5GHZ)
618 hdr->rate : (hdr->rate - 4)) & 0xf; 619 rx_status.rate_idx = (rate < 4) ? 0 : rate - 4;
620 else
621 rx_status.rate_idx = rate;
622
619 rx_status.freq = freq; 623 rx_status.freq = freq;
620 rx_status.band = dev->conf.channel->band; 624 rx_status.band = dev->conf.channel->band;
621 rx_status.antenna = hdr->antenna; 625 rx_status.antenna = hdr->antenna;