diff options
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 3153c19893b8..bed7e32ed908 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) | |||
155 | 155 | ||
156 | ieee80211_queue_work(&local->hw, &local->recalc_smps); | 156 | ieee80211_queue_work(&local->hw, &local->recalc_smps); |
157 | } | 157 | } |
158 | |||
159 | if ((sdata->vif.type == NL80211_IFTYPE_STATION) && | ||
160 | (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)) | ||
161 | ieee80211_sta_tx_notify(sdata, (void *) skb->data); | ||
158 | } | 162 | } |
159 | 163 | ||
164 | /* | ||
165 | * Use a static threshold for now, best value to be determined | ||
166 | * by testing ... | ||
167 | * Should it depend on: | ||
168 | * - on # of retransmissions | ||
169 | * - current throughput (higher value for higher tpt)? | ||
170 | */ | ||
171 | #define STA_LOST_PKT_THRESHOLD 50 | ||
172 | |||
160 | void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) | 173 | void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) |
161 | { | 174 | { |
162 | struct sk_buff *skb2; | 175 | struct sk_buff *skb2; |
@@ -243,6 +256,19 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
243 | if (!(info->flags & IEEE80211_TX_CTL_INJECTED) && | 256 | if (!(info->flags & IEEE80211_TX_CTL_INJECTED) && |
244 | (info->flags & IEEE80211_TX_STAT_ACK)) | 257 | (info->flags & IEEE80211_TX_STAT_ACK)) |
245 | ieee80211_frame_acked(sta, skb); | 258 | ieee80211_frame_acked(sta, skb); |
259 | |||
260 | if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) { | ||
261 | if (info->flags & IEEE80211_TX_STAT_ACK) { | ||
262 | if (sta->lost_packets) | ||
263 | sta->lost_packets = 0; | ||
264 | } else if (++sta->lost_packets >= STA_LOST_PKT_THRESHOLD) { | ||
265 | cfg80211_cqm_pktloss_notify(sta->sdata->dev, | ||
266 | sta->sta.addr, | ||
267 | sta->lost_packets, | ||
268 | GFP_ATOMIC); | ||
269 | sta->lost_packets = 0; | ||
270 | } | ||
271 | } | ||
246 | } | 272 | } |
247 | 273 | ||
248 | rcu_read_unlock(); | 274 | rcu_read_unlock(); |