diff mbox

[v3,1/2] b43: fix the wrong assignment of status.freq in b43_rx()

Message ID b28b37da08e43e0f459c5094ed210649ab1f7090.1389970392.git.gamerh2o@gmail.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Gang ZHAO Jan. 17, 2014, 3:19 p.m. UTC
Use the right function to update status.freq. The wrong frequency
value can cause problem that bss info can't be updated when it
should be.

This bug is introduced by commit 8318d78a44d49ac1edf2bdec7299de3617c4232e
"cfg80211 API for channels/bitrates, mac80211 and driver conversion".

Cc: Stable <stable@vger.kernel.org>
Signed-off-by: ZHAO Gang <gamerh2o@gmail.com>
---
v3: change commit log
    suggested by Luca Coelho, Rafa? Mi?ecki and Jonas Gorski

I'm not very familiar with wireless subsystem yet. If commit message needs
more changes, feel free to point it out.

 drivers/net/wireless/b43/xmit.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Johannes Berg Jan. 17, 2014, 3:29 p.m. UTC | #1
On Fri, 2014-01-17 at 23:19 +0800, ZHAO Gang wrote:
> Use the right function to update status.freq. The wrong frequency
> value can cause problem that bss info can't be updated when it
> should be.
> 
> This bug is introduced by commit 8318d78a44d49ac1edf2bdec7299de3617c4232e
> "cfg80211 API for channels/bitrates, mac80211 and driver conversion".
> 
> Cc: Stable <stable@vger.kernel.org>
> Signed-off-by: ZHAO Gang <gamerh2o@gmail.com>
> ---
> v3: change commit log
>     suggested by Luca Coelho, Rafa? Mi?ecki and Jonas Gorski
> 
> I'm not very familiar with wireless subsystem yet. If commit message needs
> more changes, feel free to point it out.

In general, you should also put a Fixes: pseudo-header (with 12-digit
commit ID and commit subject) into such commits, so this would be:

Cc: stable@vger.kernel.org
Fixes: 8318d78a44d4 ("cfg80211 API for channels/bitrates, mac80211 and driver conversion")
Signed-off-by: ...


Thanks for fixing this!

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c
index 4ae63f4..50e5ddb 100644
--- a/drivers/net/wireless/b43/xmit.c
+++ b/drivers/net/wireless/b43/xmit.c
@@ -821,10 +821,10 @@  void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)
 		 * channel number in b43. */
 		if (chanstat & B43_RX_CHAN_5GHZ) {
 			status.band = IEEE80211_BAND_5GHZ;
-			status.freq = b43_freq_to_channel_5ghz(chanid);
+			status.freq = b43_channel_to_freq_5ghz(chanid);
 		} else {
 			status.band = IEEE80211_BAND_2GHZ;
-			status.freq = b43_freq_to_channel_2ghz(chanid);
+			status.freq = b43_channel_to_freq_2ghz(chanid);
 		}
 		break;
 	default: