diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2007-09-25 22:57:04 +0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-11 03:53:05 +0400 |
commit | 25ab002f94c73d9f214130fe0e0a8065e7b55841 (patch) | |
tree | 5933c09de55a8504a9cb61883e822e20af46328d /drivers/net/wireless/rt2x00/rt2x00dev.c | |
parent | 3e30968e55e43ef08ee08c71258711a79c550f25 (diff) | |
download | linux-25ab002f94c73d9f214130fe0e0a8065e7b55841.tar.xz |
[PATCH] rt2x00: Stop link tuning when radio is down
As pointed out by Modestas Vainius the link tuner
could continue working while the radio is already
down. This because at the start of disable_radio
the ENABLED_RADIO flag is cleared and causes the
toggle_rx to skip the stop_link_tuner() call.
This will add a check to the start of the link tuner
which will automatically stop the link tuner when the
radio is disabled.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00dev.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00dev.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index e8c91fb71a52..92b725263578 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c @@ -237,6 +237,13 @@ static void rt2x00lib_link_tuner(struct work_struct *work) container_of(work, struct rt2x00_dev, link.work.work); /* + * When the radio is shutting down we should + * immediately cease all link tuning. + */ + if (!test_bit(DEVICE_ENABLED_RADIO, &rt2x00dev->flags)) + return; + + /* * Update statistics. */ rt2x00dev->ops->lib->link_stats(rt2x00dev); |