From: "Zhao, Gang" <gamerh2o@gmail.com>
To: <linux-wireless@vger.kernel.org>
Cc: Johannes Berg <johannes@sipsolutions.net>
Subject: [PATCH 1/6] cfg80211: some workqueue improvements
Date: Mon, 14 Apr 2014 17:51:30 +0800 [thread overview]
Message-ID: <8b5c4a61ae1f49400478b030fa7ae4e3a5ca2bcb.1397469035.git.gamerh2o@gmail.com> (raw)
Rdev->rfkill_sync and rdev->sched_scan_results_wk works are canceled
when unregistering wiphy.
Reg_regdb_work is canceled in regulatory_exit(), if related config
option is enabled.
Queue cfg80211_disconnect_work to cfg80211_wq, since it's a work used
by cfg80211.
Change flush_work() to more robust cancel_work_sync().
Signed-off-by: Zhao, Gang <gamerh2o@gmail.com>
---
net/wireless/core.c | 6 ++++--
net/wireless/reg.c | 4 ++++
net/wireless/sme.c | 2 +-
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/net/wireless/core.c b/net/wireless/core.c
index 276cf93..68a027c 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -671,9 +671,11 @@ void wiphy_unregister(struct wiphy *wiphy)
rtnl_unlock();
- flush_work(&rdev->scan_done_wk);
+ cancel_work_sync(&rdev->rfkill_sync);
+ cancel_work_sync(&rdev->scan_done_wk);
+ cancel_work_sync(&rdev->sched_scan_results_wk);
cancel_work_sync(&rdev->conn_work);
- flush_work(&rdev->event_work);
+ cancel_work_sync(&rdev->event_work);
cancel_delayed_work_sync(&rdev->dfs_update_channels_wk);
#ifdef CONFIG_PM
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index f59aaac..12d3194 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -2666,6 +2666,10 @@ void regulatory_exit(void)
cancel_work_sync(®_work);
cancel_delayed_work_sync(®_timeout);
+#ifdef CONFIG_CFG80211_INTERNAL_REGDB
+ cancel_work_sync(®_regdb_work);
+#endif
+
/* Lock to suppress warnings */
rtnl_lock();
reset_regdomains(true, NULL);
diff --git a/net/wireless/sme.c b/net/wireless/sme.c
index acdcb4a8..11b2779 100644
--- a/net/wireless/sme.c
+++ b/net/wireless/sme.c
@@ -873,7 +873,7 @@ void __cfg80211_disconnected(struct net_device *dev, const u8 *ie,
wdev->wext.connect.ssid_len = 0;
#endif
- schedule_work(&cfg80211_disconnect_work);
+ queue_work(cfg80211_wq, &cfg80211_disconnect_work);
}
void cfg80211_disconnected(struct net_device *dev, u16 reason,
--
1.9.0
next reply other threads:[~2014-04-14 9:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-14 9:51 Zhao, Gang [this message]
2014-04-14 9:51 ` [PATCH 2/6] mac80211: remove config option check Zhao, Gang
2014-04-14 9:51 ` [PATCH 3/6] mac80211: minor changes to ieee80211_reconfig() Zhao, Gang
2014-04-14 9:51 ` [PATCH 4/6] mac80211: return bool instead of numbers in yes/no function Zhao, Gang
2014-04-14 9:51 ` [PATCH 5/6] cfg80211: change pointer name Zhao, Gang
2014-04-14 9:51 ` [PATCH 6/6] cfg80211: change function name Zhao, Gang
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=8b5c4a61ae1f49400478b030fa7ae4e3a5ca2bcb.1397469035.git.gamerh2o@gmail.com \
--to=gamerh2o@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/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).