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

b43: Fix Bugzilla #14181 and the bug from the previous 'fix'

"b43: Fix PPC crash in rfkill polling on unload" fixed the bug reported
in Bugzilla No. 14181; however, it introduced a new bug. Whenever the
radio switch was turned off, it was necessary to unload and reload
the driver for it to recognize the switch again.

This patch fixes both the original bug in #14181 and the bug introduced by
the previous patch. It must be stated, however, that if there is a BCM4306/3
with an rfkill switch (not yet proven), then the driver will need an
unload/reload cycle to turn the device back on.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Larry Finger and committed by
John W. Linville
d50bae33 17616310

+2 -2
-1
drivers/net/wireless/b43/main.c
··· 4501 4501 4502 4502 cancel_work_sync(&(wl->beacon_update_trigger)); 4503 4503 4504 - wiphy_rfkill_stop_polling(hw->wiphy); 4505 4504 mutex_lock(&wl->mutex); 4506 4505 if (b43_status(dev) >= B43_STAT_STARTED) { 4507 4506 dev = b43_wireless_core_stop(dev);
+2 -1
drivers/net/wireless/b43/rfkill.c
··· 33 33 & B43_MMIO_RADIO_HWENABLED_HI_MASK)) 34 34 return 1; 35 35 } else { 36 - if (b43_read16(dev, B43_MMIO_RADIO_HWENABLED_LO) 36 + if (b43_status(dev) >= B43_STAT_STARTED && 37 + b43_read16(dev, B43_MMIO_RADIO_HWENABLED_LO) 37 38 & B43_MMIO_RADIO_HWENABLED_LO_MASK) 38 39 return 1; 39 40 }