Skip to content

Commit

Permalink
[PATCH] rt2x00: Stop link tuning when radio is down
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ivo van Doorn authored and David S. Miller committed Oct 10, 2007
1 parent 3e30968 commit 25ab002
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/net/wireless/rt2x00/rt2x00dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,13 @@ static void rt2x00lib_link_tuner(struct work_struct *work)
struct rt2x00_dev *rt2x00dev =
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.
*/
Expand Down

0 comments on commit 25ab002

Please sign in to comment.