diff options
author | Christian Lamparter <chunkeey@web.de> | 2008-09-30 17:36:00 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-10-06 18:14:56 -0400 |
commit | cf3e74c2e4a438480c11782b17e90029f5d24696 (patch) | |
tree | a321c00344ae7b2b871cf1eb405fe5c1718b9dc1 /drivers/net | |
parent | 5d6ffc533678c936e366809acaff8401af43a4af (diff) |
p54: report appropriate rate and band values for 802.11a
This patch adds the a few lines that went missing in
"p54: 802.11a 5GHz phy support"
Essentially: the rx-code wasn't updated and therefore reported the wrong band,
but more importantly the rate index was off as well, since 802.11a doesn't
allow the "four" 802.11b rates...
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/p54/p54common.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/p54/p54common.c b/drivers/net/wireless/p54/p54common.c index de5e8f44b202..1994aa199d37 100644 --- a/drivers/net/wireless/p54/p54common.c +++ b/drivers/net/wireless/p54/p54common.c | |||
@@ -507,9 +507,10 @@ static int p54_rx_data(struct ieee80211_hw *dev, struct sk_buff *skb) | |||
507 | rx_status.noise = priv->noise; | 507 | rx_status.noise = priv->noise; |
508 | /* XX correct? */ | 508 | /* XX correct? */ |
509 | rx_status.qual = (100 * hdr->rssi) / 127; | 509 | rx_status.qual = (100 * hdr->rssi) / 127; |
510 | rx_status.rate_idx = hdr->rate & 0xf; | 510 | rx_status.rate_idx = (dev->conf.channel->band == IEEE80211_BAND_2GHZ ? |
511 | hdr->rate : (hdr->rate - 4)) & 0xf; | ||
511 | rx_status.freq = freq; | 512 | rx_status.freq = freq; |
512 | rx_status.band = IEEE80211_BAND_2GHZ; | 513 | rx_status.band = dev->conf.channel->band; |
513 | rx_status.antenna = hdr->antenna; | 514 | rx_status.antenna = hdr->antenna; |
514 | 515 | ||
515 | tsf32 = le32_to_cpu(hdr->tsf32); | 516 | tsf32 = le32_to_cpu(hdr->tsf32); |