aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/main.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-09-10 20:03:28 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-09-15 16:48:23 -0400
commit95dac040041723d0c0ab245642c1b9802f12cc8d (patch)
tree2ac4f11b3cb1a350a892ac80ac3ba76d24076c70 /net/mac80211/main.c
parent81c065238644ade3869391f977438ff7ed3158db (diff)
mac80211: small rate control changes
This patch fixes mac80211 to not rely on the rate control algorithm to update sta->tx_retry_failed and sta->tx_retry_count (even if we don't currently use them), removes a number of completely unused values we don't even show in debugfs and changes the code in ieee80211_tx_status() to not look up the sta_info repeatedly. The only behaviour change here would be not calling the rate control function rate_control_tx_status() when no sta_info is found, but all rate control algorithms ignore such calls anyway. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r--net/mac80211/main.c50
1 files changed, 25 insertions, 25 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