summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00dev.c
diff options
context:
space:
mode:
authorHelmut Schaa <helmut.schaa@googlemail.com>2010-06-29 21:38:12 +0200
committerJohn W. Linville <linville@tuxdriver.com>2010-06-30 15:00:48 -0400
commit1df90809f79b765fd4e8868c2b182d948f198a17 (patch)
tree2f7d7165d30b6f87f76c25389b4c0e96f9d7066c /drivers/net/wireless/rt2x00/rt2x00dev.c
parentf35376a44f7655bcb9a9abea1fbffcde1b80be55 (diff)
downloadtalos-op-linux-1df90809f79b765fd4e8868c2b182d948f198a17.tar.gz
talos-op-linux-1df90809f79b765fd4e8868c2b182d948f198a17.zip
rt2x00: Implement tx mpdu aggregation
In order to implement tx mpdu aggregation we only have to implement the ampdu_action callback such that mac80211 allows negotiation of blockack sessions. The hardware will handle everything on its own as long as the ampdu flag in the TXWI struct is set up correctly and we translate the tx status correctly. For now, refuse requests to start rx aggregation. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00dev.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00dev.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index 339cc84bf4fb..a914855099b7 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -286,6 +286,21 @@ void rt2x00lib_txdone(struct queue_entry *entry,
rt2x00dev->low_level_stats.dot11ACKFailureCount++;
}
+ /*
+ * Every single frame has it's own tx status, hence report
+ * every frame as ampdu of size 1.
+ *
+ * TODO: if we can find out how many frames were aggregated
+ * by the hw we could provide the real ampdu_len to mac80211
+ * which would allow the rc algorithm to better decide on
+ * which rates are suitable.
+ */
+ if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) {
+ tx_info->flags |= IEEE80211_TX_STAT_AMPDU;
+ tx_info->status.ampdu_len = 1;
+ tx_info->status.ampdu_ack_len = success ? 1 : 0;
+ }
+
if (rate_flags & IEEE80211_TX_RC_USE_RTS_CTS) {
if (success)
rt2x00dev->low_level_stats.dot11RTSSuccessCount++;
OpenPOWER on IntegriCloud