carl9170 firmware: allow fallback to non-aggregation xmit
authorChristian Lamparter <chunkeey@googlemail.com>
Mon, 26 Jul 2010 21:28:39 +0000 (23:28 +0200)
committerChristian Lamparter <chunkeey@googlemail.com>
Mon, 26 Jul 2010 21:28:39 +0000 (23:28 +0200)
This feature might come handy in future. Because aggregation
does not always work as smoothly as hoped. Furthermore,
the original firmware did something similar.

But be advised that once the aggregation for any particular
frame retry was disabled. It should remain disabled for all
following tries and not be enabled again.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
carlfw/src/wlan.c
include/shared/wlan.h

index 1f4afa3b618d147a7a7b9b493f85a86b5ae60a4c..3661871e342e908cc001405a1660b9793e9c01d0 100644 (file)
@@ -198,6 +198,7 @@ static bool wlan_tx_consume_retry(struct carl9170_tx_superframe *super)
 
                /* update MAC flags */
                super->f.hdr.mac.erp_prot = super->s.ri[super->s.rix].erp_prot;
 
                /* update MAC flags */
                super->f.hdr.mac.erp_prot = super->s.ri[super->s.rix].erp_prot;
+               super->f.hdr.mac.ampdu = super->s.ri[super->s.rix].ampdu;
 
                /* reinitialize try counter */
                super->s.cnt = 1;
 
                /* reinitialize try counter */
                super->s.cnt = 1;
index f859d89ffd0b05d62c131577550820d81ef97eee..fbfee178265e4483f04e9d2320d3afe34952e8f3 100644 (file)
@@ -234,7 +234,8 @@ struct ar9170_tx_hw_phy_control {
 struct ar9170_tx_rate_info {
        u8 tries:3;
        u8 erp_prot:2;
 struct ar9170_tx_rate_info {
        u8 tries:3;
        u8 erp_prot:2;
-       u8 free:3; /* free for use (e.g.:RIFS/TXOP/AMPDU) */
+       u8 ampdu:1;
+       u8 free:2; /* free for use (e.g.:RIFS/TXOP/AMPDU) */
 } __packed;
 
 struct carl9170_tx_superdesc {
 } __packed;
 
 struct carl9170_tx_superdesc {
@@ -304,6 +305,8 @@ struct _ar9170_tx_hwdesc {
 #define CARL9170_TX_SUPER_RI_TRIES_S                   0
 #define CARL9170_TX_SUPER_RI_ERP_PROT                  0x18
 #define CARL9170_TX_SUPER_RI_ERP_PROT_S                        3
 #define CARL9170_TX_SUPER_RI_TRIES_S                   0
 #define CARL9170_TX_SUPER_RI_ERP_PROT                  0x18
 #define CARL9170_TX_SUPER_RI_ERP_PROT_S                        3
+#define CARL9170_TX_SUPER_RI_AMPDU                     0x20
+#define CARL9170_TX_SUPER_RI_AMPDU_S                   5
 
 struct _carl9170_tx_superdesc {
        __le16 len;
 
 struct _carl9170_tx_superdesc {
        __le16 len;