diff options
author | John W. Linville <linville@tuxdriver.com> | 2014-05-29 12:55:38 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-05-29 12:55:38 -0400 |
commit | 737be10d8cb783d1cadb1868b061abb2b4314eae (patch) | |
tree | 1b72ea0d454affab6d6cc743939cfb316fad14b3 /net/mac80211/status.c | |
parent | 03c4444650969431b3a5effde4995de767e3013a (diff) | |
parent | d3a58df87a2e4c2301ac843604202d290a48440b (diff) | |
download | talos-obmc-linux-737be10d8cb783d1cadb1868b061abb2b4314eae.tar.gz talos-obmc-linux-737be10d8cb783d1cadb1868b061abb2b4314eae.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Diffstat (limited to 'net/mac80211/status.c')
-rw-r--r-- | net/mac80211/status.c | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/net/mac80211/status.c b/net/mac80211/status.c index 60cb7a665976..ba29ebc86141 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c @@ -541,6 +541,23 @@ static void ieee80211_tx_latency_end_msrmnt(struct ieee80211_local *local, */ #define STA_LOST_PKT_THRESHOLD 50 +static void ieee80211_lost_packet(struct sta_info *sta, struct sk_buff *skb) +{ + struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); + + /* This packet was aggregated but doesn't carry status info */ + if ((info->flags & IEEE80211_TX_CTL_AMPDU) && + !(info->flags & IEEE80211_TX_STAT_AMPDU)) + return; + + if (++sta->lost_packets < STA_LOST_PKT_THRESHOLD) + return; + + cfg80211_cqm_pktloss_notify(sta->sdata->dev, sta->sta.addr, + sta->lost_packets, GFP_ATOMIC); + sta->lost_packets = 0; +} + void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) { struct sk_buff *skb2; @@ -680,12 +697,8 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) if (info->flags & IEEE80211_TX_STAT_ACK) { if (sta->lost_packets) sta->lost_packets = 0; - } else if (++sta->lost_packets >= STA_LOST_PKT_THRESHOLD) { - cfg80211_cqm_pktloss_notify(sta->sdata->dev, - sta->sta.addr, - sta->lost_packets, - GFP_ATOMIC); - sta->lost_packets = 0; + } else { + ieee80211_lost_packet(sta, skb); } } |