From 6edb5afbd97264deda20e63f8ff44e32ec1a79e1 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Tue, 6 Sep 2011 14:13:06 +0200 Subject: [PATCH] --- yaml --- r: 266017 b: refs/heads/master c: cd0b8d89c75233d8468f3c585e4e022f6779ac84 h: refs/heads/master i: 266015: 03d3b2a41526a5ba76316a78589cb9fa390fc418 v: v3 --- [refs] | 2 +- trunk/net/mac80211/sta_info.c | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index cfe9b28dfc4d..e2c6f1c1adad 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0eff8fcd290dc7f25d393fb3692e8e673babdeeb +refs/heads/master: cd0b8d89c75233d8468f3c585e4e022f6779ac84 diff --git a/trunk/net/mac80211/sta_info.c b/trunk/net/mac80211/sta_info.c index 17caba27040b..42c196e86115 100644 --- a/trunk/net/mac80211/sta_info.c +++ b/trunk/net/mac80211/sta_info.c @@ -691,14 +691,13 @@ void sta_info_clear_tim_bit(struct sta_info *sta) spin_unlock_irqrestore(&sta->local->sta_lock, flags); } -static int sta_info_buffer_expired(struct sta_info *sta, - struct sk_buff *skb) +static bool sta_info_buffer_expired(struct sta_info *sta, struct sk_buff *skb) { struct ieee80211_tx_info *info; int timeout; if (!skb) - return 0; + return false; info = IEEE80211_SKB_CB(skb); @@ -718,9 +717,6 @@ static bool sta_info_cleanup_expire_buffered(struct ieee80211_local *local, unsigned long flags; struct sk_buff *skb; - if (skb_queue_empty(&sta->ps_tx_buf)) - return false; - for (;;) { spin_lock_irqsave(&sta->ps_tx_buf.lock, flags); skb = skb_peek(&sta->ps_tx_buf); @@ -745,7 +741,7 @@ static bool sta_info_cleanup_expire_buffered(struct ieee80211_local *local, sta_info_clear_tim_bit(sta); } - return true; + return !skb_queue_empty(&sta->ps_tx_buf); } static int __must_check __sta_info_destroy(struct sta_info *sta)