Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rtl8180: fix wrong parameter in grf5101_rf_set_channel

The grf5101 RF code needs to invoke grf5101_write_phy_antenna every time the
channel is being switch.

This should be done passing the channel number to that function.
Incorrectly we were passing the same value that is written on the
channel RF register.
This may cause problems when operating on ch 14.

This patch fixes it.

Thanks to Alessandro Di Marco who found this issue!

Signed-off-by: Andrea Merello <andreamrl@tiscali.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Andrea Merello and committed by
John W. Linville
bc1b1fb2 0a0ab41e

+1 -1
+1 -1
drivers/net/wireless/rtl8180_grf5101.c
··· 88 88 write_grf5101(dev, 0x0B, chan); 89 89 write_grf5101(dev, 0x07, 0x1000); 90 90 91 - grf5101_write_phy_antenna(dev, chan); 91 + grf5101_write_phy_antenna(dev, channel); 92 92 } 93 93 94 94 static void grf5101_rf_stop(struct ieee80211_hw *dev)