aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-05-08 15:45:15 -0400
committerJohannes Berg <johannes.berg@intel.com>2013-05-24 18:02:15 -0400
commit5fe231e873729fa2f57cdc417d5c1f80871e2d7d (patch)
tree48810991fa4cf4faa69c0a992fdaf962feb6edda /include
parent73810b77def898b43a97638478692922b7f820eb (diff)
cfg80211: vastly simplify locking
Virtually all code paths in cfg80211 already (need to) hold the RTNL. As such, there's little point in having another four mutexes for various parts of the code, they just cause lock ordering issues (and much of the time, the RTNL and a few of the others need thus be held.) Simplify all this by getting rid of the extra four mutexes and just use the RTNL throughout. Only a few code changes were needed to do this and we can get rid of a work struct for bonus points. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/net/cfg80211.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 58f6302da145..5430f70c63b3 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1257,6 +1257,7 @@ struct cfg80211_ssid {
1257 * @scan_start: time (in jiffies) when the scan started 1257 * @scan_start: time (in jiffies) when the scan started
1258 * @wdev: the wireless device to scan for 1258 * @wdev: the wireless device to scan for
1259 * @aborted: (internal) scan request was notified as aborted 1259 * @aborted: (internal) scan request was notified as aborted
1260 * @notified: (internal) scan request was notified as done or aborted
1260 * @no_cck: used to send probe requests at non CCK rate in 2GHz band 1261 * @no_cck: used to send probe requests at non CCK rate in 2GHz band
1261 */ 1262 */
1262struct cfg80211_scan_request { 1263struct cfg80211_scan_request {
@@ -1274,7 +1275,7 @@ struct cfg80211_scan_request {
1274 /* internal */ 1275 /* internal */
1275 struct wiphy *wiphy; 1276 struct wiphy *wiphy;
1276 unsigned long scan_start; 1277 unsigned long scan_start;
1277 bool aborted; 1278 bool aborted, notified;
1278 bool no_cck; 1279 bool no_cck;
1279 1280
1280 /* keep last */ 1281 /* keep last */
@@ -2874,8 +2875,6 @@ struct wireless_dev {
2874 2875
2875 struct mutex mtx; 2876 struct mutex mtx;
2876 2877
2877 struct work_struct cleanup_work;
2878
2879 bool use_4addr, p2p_started; 2878 bool use_4addr, p2p_started;
2880 2879
2881 u8 address[ETH_ALEN] __aligned(sizeof(u16)); 2880 u8 address[ETH_ALEN] __aligned(sizeof(u16));