From: Ivo van Doorn <ivdoorn@gmail.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org, rt2400-devel@lists.sourceforge.net
Subject: [PATCH 9/12] rt2x00: Stop link tuning when radio is down
Date: Tue, 25 Sep 2007 20:57:04 +0200 [thread overview]
Message-ID: <200709252057.04999.IvDoorn@gmail.com> (raw)
In-Reply-To: <200709252052.34803.IvDoorn@gmail.com>
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>
---
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 e8c91fb..92b7252 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);
--
1.5.3.2
next prev parent reply other threads:[~2007-09-25 18:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-25 18:52 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
2007-09-25 18:53 ` [PATCH 1/12] rt2x00: Correct error in calculating rssi for link tuner Ivo van Doorn
2007-09-25 18:53 ` [PATCH 2/12] rt2x00: Make *_beacon_update static Ivo van Doorn
2007-09-25 18:54 ` [PATCH 3/12] rt2x00: Increase rt2x00usb_vendor_request timeout Ivo van Doorn
2007-09-25 18:54 ` [PATCH 4/12] rt2x00: Correctly identify rt2561turbo Ivo van Doorn
2007-09-25 18:55 ` [PATCH 5/12] rt2x00: adapt to filter configuration API Ivo van Doorn
2007-09-25 18:55 ` [PATCH 6/12] rt2x00: Reorganize rt2x00dev->flags Ivo van Doorn
2007-09-25 18:56 ` [PATCH 7/12] rt2x00: Add rt2x00dev->flags to debugfs Ivo van Doorn
2007-09-25 18:56 ` [PATCH 8/12] rt2x00: make rt2x00lib_stop_link_tuner() reentrant with link_tuner work Ivo van Doorn
2007-09-25 18:57 ` Ivo van Doorn [this message]
2007-09-25 18:57 ` [PATCH 10/12] rt2x00: Fix obvious typo in comment Ivo van Doorn
2007-09-25 18:57 ` [PATCH 11/12] rt2x00: Fix panic on rmmod with rfkill enabled Ivo van Doorn
2007-09-25 18:58 ` [PATCH 12/12] rt2x00: Release rt2x00 2.0.9 Ivo van Doorn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200709252057.04999.IvDoorn@gmail.com \
--to=ivdoorn@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=rt2400-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).