Skip to content

Commit 2fc68eb

Browse files
rmileckilinvjw
authored andcommitted
b43: fix frequency reported on G-PHY with /new/ firmware
Support for firmware rev 508+ was added years ago, but we never noticed it reports channel in a different way for G-PHY devices. Instead of offset from 2400 MHz it simply passes channel id (AKA hw_value). So far it was (most probably) affecting monitor mode users only, but the following recent commit made it noticeable for quite everybody: commit 3afc216 Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Date: Tue Mar 4 16:50:13 2014 +0200 cfg80211/mac80211: ignore signal if the frame was heard on wrong channel Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Cc: stable@vger.kernel.org Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
1 parent b663cd1 commit 2fc68eb

File tree

1 file changed

+7
-3
lines changed
  • drivers/net/wireless/b43

1 file changed

+7
-3
lines changed

drivers/net/wireless/b43/xmit.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -811,9 +811,13 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)
811811
break;
812812
case B43_PHYTYPE_G:
813813
status.band = IEEE80211_BAND_2GHZ;
814-
/* chanid is the radio channel cookie value as used
815-
* to tune the radio. */
816-
status.freq = chanid + 2400;
814+
/* Somewhere between 478.104 and 508.1084 firmware for G-PHY
815+
* has been modified to be compatible with N-PHY and others.
816+
*/
817+
if (dev->fw.rev >= 508)
818+
status.freq = ieee80211_channel_to_frequency(chanid, status.band);
819+
else
820+
status.freq = chanid + 2400;
817821
break;
818822
case B43_PHYTYPE_N:
819823
case B43_PHYTYPE_LP:

0 commit comments

Comments
 (0)