Skip to content

Commit

Permalink
p54: report appropriate rate and band values for 802.11a
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christian Lamparter authored and John W. Linville committed Oct 6, 2008
1 parent 5d6ffc5 commit cf3e74c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/net/wireless/p54/p54common.c
Original file line number Diff line number Diff line change
Expand Up @@ -507,9 +507,10 @@ static int p54_rx_data(struct ieee80211_hw *dev, struct sk_buff *skb)
rx_status.noise = priv->noise;
/* XX correct? */
rx_status.qual = (100 * hdr->rssi) / 127;
rx_status.rate_idx = hdr->rate & 0xf;
rx_status.rate_idx = (dev->conf.channel->band == IEEE80211_BAND_2GHZ ?
hdr->rate : (hdr->rate - 4)) & 0xf;
rx_status.freq = freq;
rx_status.band = IEEE80211_BAND_2GHZ;
rx_status.band = dev->conf.channel->band;
rx_status.antenna = hdr->antenna;

tsf32 = le32_to_cpu(hdr->tsf32);
Expand Down

0 comments on commit cf3e74c

Please sign in to comment.