diff options
Diffstat (limited to 'net/mac80211/status.c')
-rw-r--r-- | net/mac80211/status.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/net/mac80211/status.c b/net/mac80211/status.c index 4958710a7d92..38a797217a91 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c | |||
@@ -155,10 +155,6 @@ 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); | ||
162 | } | 158 | } |
163 | 159 | ||
164 | /* | 160 | /* |
@@ -186,6 +182,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
186 | int retry_count = -1, i; | 182 | int retry_count = -1, i; |
187 | int rates_idx = -1; | 183 | int rates_idx = -1; |
188 | bool send_to_cooked; | 184 | bool send_to_cooked; |
185 | bool acked; | ||
189 | 186 | ||
190 | for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) { | 187 | for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) { |
191 | /* the HW cannot have attempted that rate */ | 188 | /* the HW cannot have attempted that rate */ |
@@ -211,8 +208,8 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
211 | if (memcmp(hdr->addr2, sta->sdata->vif.addr, ETH_ALEN)) | 208 | if (memcmp(hdr->addr2, sta->sdata->vif.addr, ETH_ALEN)) |
212 | continue; | 209 | continue; |
213 | 210 | ||
214 | if (!(info->flags & IEEE80211_TX_STAT_ACK) && | 211 | acked = !!(info->flags & IEEE80211_TX_STAT_ACK); |
215 | test_sta_flags(sta, WLAN_STA_PS_STA)) { | 212 | if (!acked && test_sta_flags(sta, WLAN_STA_PS_STA)) { |
216 | /* | 213 | /* |
217 | * The STA is in power save mode, so assume | 214 | * The STA is in power save mode, so assume |
218 | * that this TX packet failed because of that. | 215 | * that this TX packet failed because of that. |
@@ -244,7 +241,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
244 | rcu_read_unlock(); | 241 | rcu_read_unlock(); |
245 | return; | 242 | return; |
246 | } else { | 243 | } else { |
247 | if (!(info->flags & IEEE80211_TX_STAT_ACK)) | 244 | if (!acked) |
248 | sta->tx_retry_failed++; | 245 | sta->tx_retry_failed++; |
249 | sta->tx_retry_count += retry_count; | 246 | sta->tx_retry_count += retry_count; |
250 | } | 247 | } |
@@ -253,10 +250,13 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
253 | if (ieee80211_vif_is_mesh(&sta->sdata->vif)) | 250 | if (ieee80211_vif_is_mesh(&sta->sdata->vif)) |
254 | ieee80211s_update_metric(local, sta, skb); | 251 | ieee80211s_update_metric(local, sta, skb); |
255 | 252 | ||
256 | if (!(info->flags & IEEE80211_TX_CTL_INJECTED) && | 253 | if (!(info->flags & IEEE80211_TX_CTL_INJECTED) && acked) |
257 | (info->flags & IEEE80211_TX_STAT_ACK)) | ||
258 | ieee80211_frame_acked(sta, skb); | 254 | ieee80211_frame_acked(sta, skb); |
259 | 255 | ||
256 | if ((sta->sdata->vif.type == NL80211_IFTYPE_STATION) && | ||
257 | (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)) | ||
258 | ieee80211_sta_tx_notify(sta->sdata, (void *) skb->data, acked); | ||
259 | |||
260 | if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) { | 260 | if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) { |
261 | if (info->flags & IEEE80211_TX_STAT_ACK) { | 261 | if (info->flags & IEEE80211_TX_STAT_ACK) { |
262 | if (sta->lost_packets) | 262 | if (sta->lost_packets) |