{
        struct ieee80211_local *local = sta->local;
        struct ps_data *ps;
-       unsigned long flags;
        bool indicate_tim = false;
        u8 ignore_for_tim = sta->sta.uapsd_queues;
        int ac;
        }
 
  done:
-       spin_lock_irqsave(&local->tim_lock, flags);
+       spin_lock_bh(&local->tim_lock);
 
        if (indicate_tim)
                __bss_tim_set(ps->tim, id);
                local->tim_in_locked_section = false;
        }
 
-       spin_unlock_irqrestore(&local->tim_lock, flags);
+       spin_unlock_bh(&local->tim_lock);
 }
 
 static bool sta_info_buffer_expired(struct sta_info *sta, struct sk_buff *skb)
 
        if (local->tim_in_locked_section) {
                __ieee80211_beacon_add_tim(sdata, ps, skb);
        } else {
-               unsigned long flags;
-
-               spin_lock_irqsave(&local->tim_lock, flags);
+               spin_lock(&local->tim_lock);
                __ieee80211_beacon_add_tim(sdata, ps, skb);
-               spin_unlock_irqrestore(&local->tim_lock, flags);
+               spin_unlock(&local->tim_lock);
        }
 
        return 0;