diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-02-13 11:39:53 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-02-15 03:41:12 -0500 |
commit | 65f704a52ec5db356c58f8ba53a31d3aef02737f (patch) | |
tree | bc5e0d6388005a74f4becc5ecf83713c8ea744c9 /net/mac80211/tx.c | |
parent | 441a33baf1805861354fb9e3149c000311b6996f (diff) |
mac80211: use spin_lock_bh() for tim_lock
There's no need to use _irqsave() as the lock
is never used in interrupt context.
This also fixes a problem in the iwlwifi MVM
driver that calls spin_unlock_bh() within its
set_tim() callback.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r-- | net/mac80211/tx.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index f4c89f506e9d..7d8c629f1e6a 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -2364,11 +2364,9 @@ static int ieee80211_beacon_add_tim(struct ieee80211_sub_if_data *sdata, | |||
2364 | if (local->tim_in_locked_section) { | 2364 | if (local->tim_in_locked_section) { |
2365 | __ieee80211_beacon_add_tim(sdata, ps, skb); | 2365 | __ieee80211_beacon_add_tim(sdata, ps, skb); |
2366 | } else { | 2366 | } else { |
2367 | unsigned long flags; | 2367 | spin_lock(&local->tim_lock); |
2368 | |||
2369 | spin_lock_irqsave(&local->tim_lock, flags); | ||
2370 | __ieee80211_beacon_add_tim(sdata, ps, skb); | 2368 | __ieee80211_beacon_add_tim(sdata, ps, skb); |
2371 | spin_unlock_irqrestore(&local->tim_lock, flags); | 2369 | spin_unlock(&local->tim_lock); |
2372 | } | 2370 | } |
2373 | 2371 | ||
2374 | return 0; | 2372 | return 0; |