aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRajkumar Manoharan <rmanohar@qca.qualcomm.com>2011-08-23 03:02:57 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-08-26 10:47:55 -0400
commit1a6e9d0f2e5de4cc8dfa3e8e67c2decd02976cf3 (patch)
tree33dab60aeac1434f1b9d14933b6b9ba0b0e02759
parent2a33bee2753bf28411de8822e3e3c7501966eb1b (diff)
ath9k: Send legacy rated frames as unaggregated
Currently the aggregation is formed till the aggregation limit is reached and the rate lookup is done for the first frame alone. But there can be a legacy rated frames in tid queue. This patch limits the subframe addition based on presence of legacy rate and sends the legacy rated frames as unaggregated one. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/xmit.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 20626729795d..5e2982938ffc 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -571,6 +571,25 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
571 ath_reset(sc, false); 571 ath_reset(sc, false);
572} 572}
573 573
574static bool ath_lookup_legacy(struct ath_buf *bf)
575{
576 struct sk_buff *skb;
577 struct ieee80211_tx_info *tx_info;
578 struct ieee80211_tx_rate *rates;
579 int i;
580
581 skb = bf->bf_mpdu;
582 tx_info = IEEE80211_SKB_CB(skb);
583 rates = tx_info->control.rates;
584
585 for (i = 3; i >= 0; i--) {
586 if (!(rates[i].flags & IEEE80211_TX_RC_MCS))
587 return true;
588 }
589
590 return false;
591}
592
574static u32 ath_lookup_rate(struct ath_softc *sc, struct ath_buf *bf, 593static u32 ath_lookup_rate(struct ath_softc *sc, struct ath_buf *bf,
575 struct ath_atx_tid *tid) 594 struct ath_atx_tid *tid)
576{ 595{
@@ -750,7 +769,8 @@ static enum ATH_AGGR_STATUS ath_tx_form_aggr(struct ath_softc *sc,
750 al_delta = ATH_AGGR_DELIM_SZ + fi->framelen; 769 al_delta = ATH_AGGR_DELIM_SZ + fi->framelen;
751 770
752 if (nframes && 771 if (nframes &&
753 (aggr_limit < (al + bpad + al_delta + prev_al))) { 772 ((aggr_limit < (al + bpad + al_delta + prev_al)) ||
773 ath_lookup_legacy(bf))) {
754 status = ATH_AGGR_LIMITED; 774 status = ATH_AGGR_LIMITED;
755 break; 775 break;
756 } 776 }