summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2014-07-23 16:55:44 +0200
committerJohn W. Linville <linville@tuxdriver.com>2014-07-23 13:08:35 -0400
commitc0624881187cd06fbcbdc177c507ab589b1b6f1e (patch)
treeec2b34891a1225225d241812cffda1c219564290 /drivers/net/wireless
parent5d26b50813ea6206a7bbab2e645e68044f101ac5 (diff)
downloadop-kernel-dev-c0624881187cd06fbcbdc177c507ab589b1b6f1e.zip
op-kernel-dev-c0624881187cd06fbcbdc177c507ab589b1b6f1e.tar.gz
b43: report correct rate to mac80211 for 5 GHz packets
So far we were assuming only A-PHY supports 5 GHz. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/b43/xmit.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c
index 6e6ef3f..426dc13 100644
--- a/drivers/net/wireless/b43/xmit.c
+++ b/drivers/net/wireless/b43/xmit.c
@@ -80,9 +80,10 @@ static int b43_plcp_get_bitrate_idx_cck(struct b43_plcp_hdr6 *plcp)
}
/* Extract the bitrate index out of an OFDM PLCP header. */
-static int b43_plcp_get_bitrate_idx_ofdm(struct b43_plcp_hdr6 *plcp, bool aphy)
+static int b43_plcp_get_bitrate_idx_ofdm(struct b43_plcp_hdr6 *plcp, bool ghz5)
{
- int base = aphy ? 0 : 4;
+ /* For 2 GHz band first OFDM rate is at index 4, see main.c */
+ int base = ghz5 ? 0 : 4;
switch (plcp->raw[0] & 0xF) {
case 0xB:
@@ -767,7 +768,7 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)
if (phystat0 & B43_RX_PHYST0_OFDM)
rate_idx = b43_plcp_get_bitrate_idx_ofdm(plcp,
- phytype == B43_PHYTYPE_A);
+ !!(chanstat & B43_RX_CHAN_5GHZ));
else
rate_idx = b43_plcp_get_bitrate_idx_cck(plcp);
if (unlikely(rate_idx == -1)) {
OpenPOWER on IntegriCloud