linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath9k: Send legacy rated frames as unaggregated
@ 2011-08-22 12:37 Rajkumar Manoharan
  2011-08-22 15:02 ` Felix Fietkau
  0 siblings, 1 reply; 2+ messages in thread
From: Rajkumar Manoharan @ 2011-08-22 12:37 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Rajkumar Manoharan

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 last MRR's rate and sends
the legacy rated frames as unaggregated one.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/xmit.c |   23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 2062672..41d9184 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -571,6 +571,26 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
 		ath_reset(sc, false);
 }
 
+static bool ath_lookup_lecacy(struct ath_buf *bf)
+{
+	struct sk_buff *skb;
+	struct ieee80211_tx_info *tx_info;
+	struct ieee80211_tx_rate *rates;
+
+	skb = bf->bf_mpdu;
+	tx_info = IEEE80211_SKB_CB(skb);
+	rates = tx_info->control.rates;
+
+	/*
+	 * Checking the last MRR's flag is sufficient to
+	 * determine legacy or not
+	 */
+	if (!(rates[3].flags & IEEE80211_TX_RC_MCS))
+		return true;
+
+	return false;
+}
+
 static u32 ath_lookup_rate(struct ath_softc *sc, struct ath_buf *bf,
 			   struct ath_atx_tid *tid)
 {
@@ -750,7 +770,8 @@ static enum ATH_AGGR_STATUS ath_tx_form_aggr(struct ath_softc *sc,
 		al_delta = ATH_AGGR_DELIM_SZ + fi->framelen;
 
 		if (nframes &&
-		    (aggr_limit < (al + bpad + al_delta + prev_al))) {
+		    ((aggr_limit < (al + bpad + al_delta + prev_al)) ||
+		     ath_lookup_lecacy(bf))) {
 			status = ATH_AGGR_LIMITED;
 			break;
 		}
-- 
1.7.6


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-08-22 15:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-22 12:37 [PATCH] ath9k: Send legacy rated frames as unaggregated Rajkumar Manoharan
2011-08-22 15:02 ` Felix Fietkau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).