diff options
Diffstat (limited to 'net/mac80211/sta_info.c')
-rw-r--r-- | net/mac80211/sta_info.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 17caba27040b..42c196e86115 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
@@ -691,14 +691,13 @@ void sta_info_clear_tim_bit(struct sta_info *sta) | |||
691 | spin_unlock_irqrestore(&sta->local->sta_lock, flags); | 691 | spin_unlock_irqrestore(&sta->local->sta_lock, flags); |
692 | } | 692 | } |
693 | 693 | ||
694 | static int sta_info_buffer_expired(struct sta_info *sta, | 694 | static bool sta_info_buffer_expired(struct sta_info *sta, struct sk_buff *skb) |
695 | struct sk_buff *skb) | ||
696 | { | 695 | { |
697 | struct ieee80211_tx_info *info; | 696 | struct ieee80211_tx_info *info; |
698 | int timeout; | 697 | int timeout; |
699 | 698 | ||
700 | if (!skb) | 699 | if (!skb) |
701 | return 0; | 700 | return false; |
702 | 701 | ||
703 | info = IEEE80211_SKB_CB(skb); | 702 | info = IEEE80211_SKB_CB(skb); |
704 | 703 | ||
@@ -718,9 +717,6 @@ static bool sta_info_cleanup_expire_buffered(struct ieee80211_local *local, | |||
718 | unsigned long flags; | 717 | unsigned long flags; |
719 | struct sk_buff *skb; | 718 | struct sk_buff *skb; |
720 | 719 | ||
721 | if (skb_queue_empty(&sta->ps_tx_buf)) | ||
722 | return false; | ||
723 | |||
724 | for (;;) { | 720 | for (;;) { |
725 | spin_lock_irqsave(&sta->ps_tx_buf.lock, flags); | 721 | spin_lock_irqsave(&sta->ps_tx_buf.lock, flags); |
726 | skb = skb_peek(&sta->ps_tx_buf); | 722 | skb = skb_peek(&sta->ps_tx_buf); |
@@ -745,7 +741,7 @@ static bool sta_info_cleanup_expire_buffered(struct ieee80211_local *local, | |||
745 | sta_info_clear_tim_bit(sta); | 741 | sta_info_clear_tim_bit(sta); |
746 | } | 742 | } |
747 | 743 | ||
748 | return true; | 744 | return !skb_queue_empty(&sta->ps_tx_buf); |
749 | } | 745 | } |
750 | 746 | ||
751 | static int __must_check __sta_info_destroy(struct sta_info *sta) | 747 | static int __must_check __sta_info_destroy(struct sta_info *sta) |