diff options
Diffstat (limited to 'net/mac80211/status.c')
-rw-r--r-- | net/mac80211/status.c | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/net/mac80211/status.c b/net/mac80211/status.c index bb146f377ee4..e679b7c9b160 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c | |||
@@ -664,13 +664,15 @@ void ieee80211_tx_status_noskb(struct ieee80211_hw *hw, | |||
664 | struct ieee80211_supported_band *sband; | 664 | struct ieee80211_supported_band *sband; |
665 | int retry_count; | 665 | int retry_count; |
666 | int rates_idx; | 666 | int rates_idx; |
667 | bool acked; | 667 | bool acked, noack_success; |
668 | 668 | ||
669 | rates_idx = ieee80211_tx_get_rates(hw, info, &retry_count); | 669 | rates_idx = ieee80211_tx_get_rates(hw, info, &retry_count); |
670 | 670 | ||
671 | sband = hw->wiphy->bands[info->band]; | 671 | sband = hw->wiphy->bands[info->band]; |
672 | 672 | ||
673 | acked = !!(info->flags & IEEE80211_TX_STAT_ACK); | 673 | acked = !!(info->flags & IEEE80211_TX_STAT_ACK); |
674 | noack_success = !!(info->flags & IEEE80211_TX_STAT_NOACK_TRANSMITTED); | ||
675 | |||
674 | if (pubsta) { | 676 | if (pubsta) { |
675 | struct sta_info *sta; | 677 | struct sta_info *sta; |
676 | 678 | ||
@@ -696,7 +698,7 @@ void ieee80211_tx_status_noskb(struct ieee80211_hw *hw, | |||
696 | rate_control_tx_status_noskb(local, sband, sta, info); | 698 | rate_control_tx_status_noskb(local, sband, sta, info); |
697 | } | 699 | } |
698 | 700 | ||
699 | if (acked) { | 701 | if (acked || noack_success) { |
700 | local->dot11TransmittedFrameCount++; | 702 | local->dot11TransmittedFrameCount++; |
701 | if (!pubsta) | 703 | if (!pubsta) |
702 | local->dot11MulticastTransmittedFrameCount++; | 704 | local->dot11MulticastTransmittedFrameCount++; |
@@ -728,6 +730,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
728 | struct ieee80211_bar *bar; | 730 | struct ieee80211_bar *bar; |
729 | int rtap_len; | 731 | int rtap_len; |
730 | int shift = 0; | 732 | int shift = 0; |
733 | int tid = IEEE80211_NUM_TIDS; | ||
731 | 734 | ||
732 | rates_idx = ieee80211_tx_get_rates(hw, info, &retry_count); | 735 | rates_idx = ieee80211_tx_get_rates(hw, info, &retry_count); |
733 | 736 | ||
@@ -771,7 +774,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
771 | 774 | ||
772 | if ((info->flags & IEEE80211_TX_STAT_AMPDU_NO_BACK) && | 775 | if ((info->flags & IEEE80211_TX_STAT_AMPDU_NO_BACK) && |
773 | (ieee80211_is_data_qos(fc))) { | 776 | (ieee80211_is_data_qos(fc))) { |
774 | u16 tid, ssn; | 777 | u16 ssn; |
775 | u8 *qc; | 778 | u8 *qc; |
776 | 779 | ||
777 | qc = ieee80211_get_qos_ctl(hdr); | 780 | qc = ieee80211_get_qos_ctl(hdr); |
@@ -780,10 +783,14 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
780 | & IEEE80211_SCTL_SEQ); | 783 | & IEEE80211_SCTL_SEQ); |
781 | ieee80211_send_bar(&sta->sdata->vif, hdr->addr1, | 784 | ieee80211_send_bar(&sta->sdata->vif, hdr->addr1, |
782 | tid, ssn); | 785 | tid, ssn); |
786 | } else if (ieee80211_is_data_qos(fc)) { | ||
787 | u8 *qc = ieee80211_get_qos_ctl(hdr); | ||
788 | |||
789 | tid = qc[0] & 0xf; | ||
783 | } | 790 | } |
784 | 791 | ||
785 | if (!acked && ieee80211_is_back_req(fc)) { | 792 | if (!acked && ieee80211_is_back_req(fc)) { |
786 | u16 tid, control; | 793 | u16 control; |
787 | 794 | ||
788 | /* | 795 | /* |
789 | * BAR failed, store the last SSN and retry sending | 796 | * BAR failed, store the last SSN and retry sending |
@@ -811,6 +818,12 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
811 | if (!acked) | 818 | if (!acked) |
812 | sta->tx_retry_failed++; | 819 | sta->tx_retry_failed++; |
813 | sta->tx_retry_count += retry_count; | 820 | sta->tx_retry_count += retry_count; |
821 | |||
822 | if (ieee80211_is_data_present(fc)) { | ||
823 | if (!acked) | ||
824 | sta->tx_msdu_failed[tid]++; | ||
825 | sta->tx_msdu_retries[tid] += retry_count; | ||
826 | } | ||
814 | } | 827 | } |
815 | 828 | ||
816 | rate_control_tx_status(local, sband, sta, skb); | 829 | rate_control_tx_status(local, sband, sta, skb); |
@@ -856,10 +869,11 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
856 | * Fragments are passed to low-level drivers as separate skbs, so these | 869 | * Fragments are passed to low-level drivers as separate skbs, so these |
857 | * are actually fragments, not frames. Update frame counters only for | 870 | * are actually fragments, not frames. Update frame counters only for |
858 | * the first fragment of the frame. */ | 871 | * the first fragment of the frame. */ |
859 | if (info->flags & IEEE80211_TX_STAT_ACK) { | 872 | if ((info->flags & IEEE80211_TX_STAT_ACK) || |
873 | (info->flags & IEEE80211_TX_STAT_NOACK_TRANSMITTED)) { | ||
860 | if (ieee80211_is_first_frag(hdr->seq_ctrl)) { | 874 | if (ieee80211_is_first_frag(hdr->seq_ctrl)) { |
861 | local->dot11TransmittedFrameCount++; | 875 | local->dot11TransmittedFrameCount++; |
862 | if (is_multicast_ether_addr(hdr->addr1)) | 876 | if (is_multicast_ether_addr(ieee80211_get_DA(hdr))) |
863 | local->dot11MulticastTransmittedFrameCount++; | 877 | local->dot11MulticastTransmittedFrameCount++; |
864 | if (retry_count > 0) | 878 | if (retry_count > 0) |
865 | local->dot11RetryCount++; | 879 | local->dot11RetryCount++; |