aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/sta_info.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-02-13 11:39:53 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-02-15 03:41:12 -0500
commit65f704a52ec5db356c58f8ba53a31d3aef02737f (patch)
treebc5e0d6388005a74f4becc5ecf83713c8ea744c9 /net/mac80211/sta_info.c
parent441a33baf1805861354fb9e3149c000311b6996f (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/sta_info.c')
-rw-r--r--net/mac80211/sta_info.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index fb3b5865fc39..0794b9018ed4 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -571,7 +571,6 @@ void sta_info_recalc_tim(struct sta_info *sta)
571{ 571{
572 struct ieee80211_local *local = sta->local; 572 struct ieee80211_local *local = sta->local;
573 struct ps_data *ps; 573 struct ps_data *ps;
574 unsigned long flags;
575 bool indicate_tim = false; 574 bool indicate_tim = false;
576 u8 ignore_for_tim = sta->sta.uapsd_queues; 575 u8 ignore_for_tim = sta->sta.uapsd_queues;
577 int ac; 576 int ac;
@@ -628,7 +627,7 @@ void sta_info_recalc_tim(struct sta_info *sta)
628 } 627 }
629 628
630 done: 629 done:
631 spin_lock_irqsave(&local->tim_lock, flags); 630 spin_lock_bh(&local->tim_lock);
632 631
633 if (indicate_tim) 632 if (indicate_tim)
634 __bss_tim_set(ps->tim, id); 633 __bss_tim_set(ps->tim, id);
@@ -641,7 +640,7 @@ void sta_info_recalc_tim(struct sta_info *sta)
641 local->tim_in_locked_section = false; 640 local->tim_in_locked_section = false;
642 } 641 }
643 642
644 spin_unlock_irqrestore(&local->tim_lock, flags); 643 spin_unlock_bh(&local->tim_lock);
645} 644}
646 645
647static bool sta_info_buffer_expired(struct sta_info *sta, struct sk_buff *skb) 646static bool sta_info_buffer_expired(struct sta_info *sta, struct sk_buff *skb)