aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis R. Rodriguez2010-10-01 12:25:26 -0500
committerLuis R. Rodriguez2010-10-01 12:27:06 -0500
commit4f9e2366a172d1653fb1b3d36d9cad0062a6df9e (patch)
treeac26e6cc299d36c9f4fcb8dbd3295099d689056b /linux-next-pending
parent8834f56330e1a72da67da33fddc1bd2f2fd56eb9 (diff)
downloadcompat-wireless-4f9e2366a172d1653fb1b3d36d9cad0062a6df9e.tar.gz
compat-wireless-4f9e2366a172d1653fb1b3d36d9cad0062a6df9e.tar.xz
compat-wireless-4f9e2366a172d1653fb1b3d36d9cad0062a6df9e.zip
compat-wireless: Add the pending mac80211 reset work patch
We add the patch: mac80211: perform scan cancel in hw reset work patch to linux-next-pending/ directory because: On Fri, Oct 01, 2010 at 05:47:53AM -0700, Christian Lamparter wrote: > Currently, everyone is waiting for: > "[PATCH 1/6] mac80211: perform scan cancel in hw reset work" > (hopefully, it fixes the dreaded ieee80211_hw_restart deadlock.) We need this for testing purposes for carl9170 which may get done this weekend. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Diffstat (limited to 'linux-next-pending')
-rw-r--r--linux-next-pending/0001-mac80211-perform-scan-cancel-in-hw-reset-work.patch72
1 files changed, 72 insertions, 0 deletions
diff --git a/linux-next-pending/0001-mac80211-perform-scan-cancel-in-hw-reset-work.patch b/linux-next-pending/0001-mac80211-perform-scan-cancel-in-hw-reset-work.patch
new file mode 100644
index 0000000..d606cbc
--- /dev/null
+++ b/linux-next-pending/0001-mac80211-perform-scan-cancel-in-hw-reset-work.patch
@@ -0,0 +1,72 @@
1
2Reason for adding to linux-next-pending/ :
3
4On Fri, Oct 01, 2010 at 05:47:53AM -0700, Christian Lamparter wrote:
5> Currently, everyone is waiting for:
6> "[PATCH 1/6] mac80211: perform scan cancel in hw reset work"
7> (hopefully, it fixes the dreaded ieee80211_hw_restart deadlock.)
8
9We need this for testing purposes for carl9170 which may
10get done this weekend.
11
12From 6b2daf7ad7067f3acc90f046700383a2c3ffad19 Mon Sep 17 00:00:00 2001
13From: Stanislaw Gruszka <sgruszka@redhat.com>
14Date: Fri, 1 Oct 2010 14:05:27 +0200
15Subject: [PATCH] mac80211: perform scan cancel in hw reset work
16
17Move ieee80211_scan_cancel() and all other related code to
18ieee80211_restart_work() as ieee80211_restart_hw() is intended to be
19callable from any context.
20
21Fix a bug that RTNL lock is not taken during ieee80211_cancel_scan().
22
23Take local->mtx before WARN(test_bit(SCAN_HW_SCANNING, &local->scanning)
24to prevent the race condition with __ieee80211_start_scan() described
25here: http://marc.info/?l=linux-wireless&m=128516716810537&w=2
26
27Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
28---
29 net/mac80211/main.c | 19 ++++++++++---------
30 1 files changed, 10 insertions(+), 9 deletions(-)
31
32diff --git a/net/mac80211/main.c b/net/mac80211/main.c
33index db341a9..ba332ef 100644
34--- a/net/mac80211/main.c
35+++ b/net/mac80211/main.c
36@@ -295,7 +295,17 @@ static void ieee80211_restart_work(struct work_struct *work)
37 struct ieee80211_local *local =
38 container_of(work, struct ieee80211_local, restart_work);
39
40+ /* wait for scan work complete */
41+ flush_workqueue(local->workqueue);
42+
43+ mutex_lock(&local->mtx);
44+ WARN(test_bit(SCAN_HW_SCANNING, &local->scanning),
45+ "%s called with hardware scan in progress\n", __func__);
46+ mutex_unlock(&local->mtx);
47+
48 rtnl_lock();
49+ if (unlikely(test_bit(SCAN_SW_SCANNING, &local->scanning)))
50+ ieee80211_scan_cancel(local);
51 ieee80211_reconfig(local);
52 rtnl_unlock();
53 }
54@@ -306,15 +316,6 @@ void ieee80211_restart_hw(struct ieee80211_hw *hw)
55
56 trace_api_restart_hw(local);
57
58- /* wait for scan work complete */
59- flush_workqueue(local->workqueue);
60-
61- WARN(test_bit(SCAN_HW_SCANNING, &local->scanning),
62- "%s called with hardware scan in progress\n", __func__);
63-
64- if (unlikely(test_bit(SCAN_SW_SCANNING, &local->scanning)))
65- ieee80211_scan_cancel(local);
66-
67 /* use this reason, ieee80211_reconfig will unblock it */
68 ieee80211_stop_queues_by_reason(hw,
69 IEEE80211_QUEUE_STOP_REASON_SUSPEND);
70--
711.7.0.4
72