diff options
| author | John W. Linville <linville@tuxdriver.com> | 2010-11-24 16:49:20 -0500 |
|---|---|---|
| committer | John W. Linville <linville@tuxdriver.com> | 2010-11-24 16:49:20 -0500 |
| commit | 51cce8a590c4696d62bfacc63378d1036084cef7 (patch) | |
| tree | dc24485bdff37ca6a83c69e93ffdbe5c5807b59d /net/mac80211/status.c | |
| parent | 2fe66ec242d3f76e3b0101f36419e7e5405bcff3 (diff) | |
| parent | 4f8559383c41262b50dc758e2e310f257ce6a14d (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
Diffstat (limited to 'net/mac80211/status.c')
| -rw-r--r-- | net/mac80211/status.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/net/mac80211/status.c b/net/mac80211/status.c index 3153c19893b..bed7e32ed90 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c @@ -155,8 +155,21 @@ static void ieee80211_frame_acked(struct sta_info *sta, struct sk_buff *skb) ieee80211_queue_work(&local->hw, &local->recalc_smps); } + + if ((sdata->vif.type == NL80211_IFTYPE_STATION) && + (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)) + ieee80211_sta_tx_notify(sdata, (void *) skb->data); } +/* + * Use a static threshold for now, best value to be determined + * by testing ... + * Should it depend on: + * - on # of retransmissions + * - current throughput (higher value for higher tpt)? + */ +#define STA_LOST_PKT_THRESHOLD 50 + void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) { struct sk_buff *skb2; @@ -243,6 +256,19 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) if (!(info->flags & IEEE80211_TX_CTL_INJECTED) && (info->flags & IEEE80211_TX_STAT_ACK)) ieee80211_frame_acked(sta, skb); + + if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) { + 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; + } + } } rcu_read_unlock(); |
