diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/xmit.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/xmit.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index e1d1e903229b..feef0135515c 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c | |||
@@ -644,8 +644,10 @@ static u32 ath_lookup_rate(struct ath_softc *sc, struct ath_buf *bf, | |||
644 | * meet the minimum required mpdudensity. | 644 | * meet the minimum required mpdudensity. |
645 | */ | 645 | */ |
646 | static int ath_compute_num_delims(struct ath_softc *sc, struct ath_atx_tid *tid, | 646 | static int ath_compute_num_delims(struct ath_softc *sc, struct ath_atx_tid *tid, |
647 | struct ath_buf *bf, u16 frmlen) | 647 | struct ath_buf *bf, u16 frmlen, |
648 | bool first_subfrm) | ||
648 | { | 649 | { |
650 | #define FIRST_DESC_NDELIMS 60 | ||
649 | struct sk_buff *skb = bf->bf_mpdu; | 651 | struct sk_buff *skb = bf->bf_mpdu; |
650 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); | 652 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); |
651 | u32 nsymbits, nsymbols; | 653 | u32 nsymbits, nsymbols; |
@@ -668,6 +670,13 @@ static int ath_compute_num_delims(struct ath_softc *sc, struct ath_atx_tid *tid, | |||
668 | ndelim += ATH_AGGR_ENCRYPTDELIM; | 670 | ndelim += ATH_AGGR_ENCRYPTDELIM; |
669 | 671 | ||
670 | /* | 672 | /* |
673 | * Add delimiter when using RTS/CTS with aggregation | ||
674 | * and non enterprise AR9003 card | ||
675 | */ | ||
676 | if (first_subfrm) | ||
677 | ndelim = max(ndelim, FIRST_DESC_NDELIMS); | ||
678 | |||
679 | /* | ||
671 | * Convert desired mpdu density from microeconds to bytes based | 680 | * Convert desired mpdu density from microeconds to bytes based |
672 | * on highest rate in rate series (i.e. first rate) to determine | 681 | * on highest rate in rate series (i.e. first rate) to determine |
673 | * required minimum length for subframe. Take into account | 682 | * required minimum length for subframe. Take into account |
@@ -756,7 +765,6 @@ static enum ATH_AGGR_STATUS ath_tx_form_aggr(struct ath_softc *sc, | |||
756 | status = ATH_AGGR_LIMITED; | 765 | status = ATH_AGGR_LIMITED; |
757 | break; | 766 | break; |
758 | } | 767 | } |
759 | nframes++; | ||
760 | 768 | ||
761 | /* add padding for previous frame to aggregation length */ | 769 | /* add padding for previous frame to aggregation length */ |
762 | al += bpad + al_delta; | 770 | al += bpad + al_delta; |
@@ -765,9 +773,11 @@ static enum ATH_AGGR_STATUS ath_tx_form_aggr(struct ath_softc *sc, | |||
765 | * Get the delimiters needed to meet the MPDU | 773 | * Get the delimiters needed to meet the MPDU |
766 | * density for this node. | 774 | * density for this node. |
767 | */ | 775 | */ |
768 | ndelim = ath_compute_num_delims(sc, tid, bf_first, fi->framelen); | 776 | ndelim = ath_compute_num_delims(sc, tid, bf_first, fi->framelen, |
777 | !nframes); | ||
769 | bpad = PADBYTES(al_delta) + (ndelim << 2); | 778 | bpad = PADBYTES(al_delta) + (ndelim << 2); |
770 | 779 | ||
780 | nframes++; | ||
771 | bf->bf_next = NULL; | 781 | bf->bf_next = NULL; |
772 | ath9k_hw_set_desc_link(sc->sc_ah, bf->bf_desc, 0); | 782 | ath9k_hw_set_desc_link(sc->sc_ah, bf->bf_desc, 0); |
773 | 783 | ||