aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2007-09-25 14:57:49 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:53:06 -0400
commitfdd0abc8175dc43a14fe414a09fd7e6a162757bd (patch)
tree8644342661201a1a6b40bfc2f5efe98351c942b4 /drivers/net
parentdcf5475bc8458798794af9afafdb3ef33ab67fd9 (diff)
[PATCH] rt2x00: Fix panic on rmmod with rfkill enabled
When ieee80211_hw.config indicates that the radio is enabled and is configuring options that require the link tuner to be restarted the link tuner will cause a kernel panic when rfkill has indicated the radio was in fact disabled. Signed-off-by: Modestas Vainius <modestas@vainius.eu> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00dev.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index 92b725263578..0216096c88cd 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -85,6 +85,9 @@ static void rt2x00lib_stop_link_tuner(struct rt2x00_dev *rt2x00dev)
85 85
86void rt2x00lib_reset_link_tuner(struct rt2x00_dev *rt2x00dev) 86void rt2x00lib_reset_link_tuner(struct rt2x00_dev *rt2x00dev)
87{ 87{
88 if (!test_bit(DEVICE_ENABLED_RADIO, &rt2x00dev->flags))
89 return;
90
88 rt2x00lib_stop_link_tuner(rt2x00dev); 91 rt2x00lib_stop_link_tuner(rt2x00dev);
89 rt2x00lib_start_link_tuner(rt2x00dev); 92 rt2x00lib_start_link_tuner(rt2x00dev);
90} 93}