aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-05-23 14:05:28 -0400
committerJohannes Berg <johannes.berg@intel.com>2014-05-28 10:22:48 -0400
commitabd43a6a68b2f69821eef3daf789242b262ba2c0 (patch)
tree727522f4ce78e2f36af5a3e97fc7ef6bbca05629 /net/mac80211
parent923eaf367206e01f22c97aee22300e332d071916 (diff)
mac80211: reduce packet loss notifications under load
During strong signal fluctuations under high throughput, few consecutive failed A-MPDU transmissions can easily trigger packet loss notification, and thus (in AP mode) client disconnection. Reduce the number of false positives by checking the A-MPDU status flag and treating a failed A-MPDU as a single packet. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/status.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/net/mac80211/status.c b/net/mac80211/status.c
index e6e574a307c8..bfa5326776ab 100644
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -542,6 +542,23 @@ static void ieee80211_tx_latency_end_msrmnt(struct ieee80211_local *local,
542 */ 542 */
543#define STA_LOST_PKT_THRESHOLD 50 543#define STA_LOST_PKT_THRESHOLD 50
544 544
545static void ieee80211_lost_packet(struct sta_info *sta, struct sk_buff *skb)
546{
547 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
548
549 /* This packet was aggregated but doesn't carry status info */
550 if ((info->flags & IEEE80211_TX_CTL_AMPDU) &&
551 !(info->flags & IEEE80211_TX_STAT_AMPDU))
552 return;
553
554 if (++sta->lost_packets < STA_LOST_PKT_THRESHOLD)
555 return;
556
557 cfg80211_cqm_pktloss_notify(sta->sdata->dev, sta->sta.addr,
558 sta->lost_packets, GFP_ATOMIC);
559 sta->lost_packets = 0;
560}
561
545void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) 562void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
546{ 563{
547 struct sk_buff *skb2; 564 struct sk_buff *skb2;
@@ -680,12 +697,8 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
680 if (info->flags & IEEE80211_TX_STAT_ACK) { 697 if (info->flags & IEEE80211_TX_STAT_ACK) {
681 if (sta->lost_packets) 698 if (sta->lost_packets)
682 sta->lost_packets = 0; 699 sta->lost_packets = 0;
683 } else if (++sta->lost_packets >= STA_LOST_PKT_THRESHOLD) { 700 } else {
684 cfg80211_cqm_pktloss_notify(sta->sdata->dev, 701 ieee80211_lost_packet(sta, skb);
685 sta->sta.addr,
686 sta->lost_packets,
687 GFP_ATOMIC);
688 sta->lost_packets = 0;
689 } 702 }
690 } 703 }
691 704