aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/main.c50
-rw-r--r--net/mac80211/rc80211_pid_algo.c11
-rw-r--r--net/mac80211/sta_info.h7
3 files changed, 25 insertions, 43 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index dd838b725afb..c307dba7ec03 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -546,29 +546,27 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
546 546
547 rcu_read_lock(); 547 rcu_read_lock();
548 548
549 if (info->status.excessive_retries) { 549 sta = sta_info_get(local, hdr->addr1);
550 sta = sta_info_get(local, hdr->addr1); 550
551 if (sta) { 551 if (sta) {
552 if (test_sta_flags(sta, WLAN_STA_PS)) { 552 if (info->status.excessive_retries &&
553 /* 553 test_sta_flags(sta, WLAN_STA_PS)) {
554 * The STA is in power save mode, so assume 554 /*
555 * that this TX packet failed because of that. 555 * The STA is in power save mode, so assume
556 */ 556 * that this TX packet failed because of that.
557 ieee80211_handle_filtered_frame(local, sta, skb); 557 */
558 rcu_read_unlock(); 558 ieee80211_handle_filtered_frame(local, sta, skb);
559 return; 559 rcu_read_unlock();
560 } 560 return;
561 } 561 }
562 }
563 562
564 fc = hdr->frame_control; 563 fc = hdr->frame_control;
564
565 if ((info->flags & IEEE80211_TX_STAT_AMPDU_NO_BACK) &&
566 (ieee80211_is_data_qos(fc))) {
567 u16 tid, ssn;
568 u8 *qc;
565 569
566 if ((info->flags & IEEE80211_TX_STAT_AMPDU_NO_BACK) &&
567 (ieee80211_is_data_qos(fc))) {
568 u16 tid, ssn;
569 u8 *qc;
570 sta = sta_info_get(local, hdr->addr1);
571 if (sta) {
572 qc = ieee80211_get_qos_ctl(hdr); 570 qc = ieee80211_get_qos_ctl(hdr);
573 tid = qc[0] & 0xf; 571 tid = qc[0] & 0xf;
574 ssn = ((le16_to_cpu(hdr->seq_ctrl) + 0x10) 572 ssn = ((le16_to_cpu(hdr->seq_ctrl) + 0x10)
@@ -576,17 +574,19 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
576 ieee80211_send_bar(sta->sdata, hdr->addr1, 574 ieee80211_send_bar(sta->sdata, hdr->addr1,
577 tid, ssn); 575 tid, ssn);
578 } 576 }
579 }
580 577
581 if (info->flags & IEEE80211_TX_STAT_TX_FILTERED) { 578 if (info->flags & IEEE80211_TX_STAT_TX_FILTERED) {
582 sta = sta_info_get(local, hdr->addr1);
583 if (sta) {
584 ieee80211_handle_filtered_frame(local, sta, skb); 579 ieee80211_handle_filtered_frame(local, sta, skb);
585 rcu_read_unlock(); 580 rcu_read_unlock();
586 return; 581 return;
582 } else {
583 if (info->status.excessive_retries)
584 sta->tx_retry_failed++;
585 sta->tx_retry_count += info->status.retry_count;
587 } 586 }
588 } else 587
589 rate_control_tx_status(local->mdev, skb); 588 rate_control_tx_status(local->mdev, skb);
589 }
590 590
591 rcu_read_unlock(); 591 rcu_read_unlock();
592 592
diff --git a/net/mac80211/rc80211_pid_algo.c b/net/mac80211/rc80211_pid_algo.c
index 21e1942ea975..94867860c3e0 100644
--- a/net/mac80211/rc80211_pid_algo.c
+++ b/net/mac80211/rc80211_pid_algo.c
@@ -282,17 +282,6 @@ static void rate_control_pid_tx_status(void *priv, struct net_device *dev,
282 spinfo->tx_num_xmit++; 282 spinfo->tx_num_xmit++;
283 } 283 }
284 284
285 if (info->status.excessive_retries) {
286 sta->tx_retry_failed++;
287 sta->tx_num_consecutive_failures++;
288 sta->tx_num_mpdu_fail++;
289 } else {
290 sta->tx_num_consecutive_failures = 0;
291 sta->tx_num_mpdu_ok++;
292 }
293 sta->tx_retry_count += info->status.retry_count;
294 sta->tx_num_mpdu_fail += info->status.retry_count;
295
296 /* Update PID controller state. */ 285 /* Update PID controller state. */
297 period = (HZ * pinfo->sampling_period + 500) / 1000; 286 period = (HZ * pinfo->sampling_period + 500) / 1000;
298 if (!period) 287 if (!period)
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h
index e7ce12dbf270..4a9b96eeb687 100644
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
@@ -195,9 +195,6 @@ struct sta_ampdu_mlme {
195 * @tx_filtered_count: TBD 195 * @tx_filtered_count: TBD
196 * @tx_retry_failed: TBD 196 * @tx_retry_failed: TBD
197 * @tx_retry_count: TBD 197 * @tx_retry_count: TBD
198 * @tx_num_consecutive_failures: TBD
199 * @tx_num_mpdu_ok: TBD
200 * @tx_num_mpdu_fail: TBD
201 * @fail_avg: moving percentage of failed MSDUs 198 * @fail_avg: moving percentage of failed MSDUs
202 * @tx_packets: number of RX/TX MSDUs 199 * @tx_packets: number of RX/TX MSDUs
203 * @tx_bytes: TBD 200 * @tx_bytes: TBD
@@ -273,10 +270,6 @@ struct sta_info {
273 /* Updated from TX status path only, no locking requirements */ 270 /* Updated from TX status path only, no locking requirements */
274 unsigned long tx_filtered_count; 271 unsigned long tx_filtered_count;
275 unsigned long tx_retry_failed, tx_retry_count; 272 unsigned long tx_retry_failed, tx_retry_count;
276 /* TODO: update in generic code not rate control? */
277 u32 tx_num_consecutive_failures;
278 u32 tx_num_mpdu_ok;
279 u32 tx_num_mpdu_fail;
280 /* moving percentage of failed MSDUs */ 273 /* moving percentage of failed MSDUs */
281 unsigned int fail_avg; 274 unsigned int fail_avg;
282 275