]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
brcmsmac: Don't weight AMPDU packets in txfifo
authorSeth Forshee <seth.forshee@canonical.com>
Thu, 15 Nov 2012 14:07:52 +0000 (08:07 -0600)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 20 Nov 2012 19:03:21 +0000 (14:03 -0500)
According to the comments this "reduces rate lag," but in reality the
only way this value is used is for determining whether or not any frames
remain to be transmitted. Therefore there's no reason for AMPDU packets
to receive any weighting.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
drivers/net/wireless/brcm80211/brcmsmac/main.c
drivers/net/wireless/brcm80211/brcmsmac/main.h

index 5739534530554f6c0c3ea5a3b46d4124ceae77ec..ea84087f81404ac165ce6cd5ca8c1a3b5fcbd3df 100644 (file)
@@ -40,8 +40,6 @@
 #define AMPDU_DEF_RETRY_LIMIT          5
 /* default tx retry limit at reg rate */
 #define AMPDU_DEF_RR_RETRY_LIMIT       2
-/* default weight of ampdu in txfifo */
-#define AMPDU_DEF_TXPKT_WEIGHT         2
 /* default ffpld reserved bytes */
 #define AMPDU_DEF_FFPLD_RSVD           2048
 /* # of inis to be freed on detach */
@@ -114,7 +112,6 @@ struct brcms_fifo_info {
  * mpdu_density: min mpdu spacing (0-7) ==> 2^(x-1)/8 usec
  * max_pdu: max pdus allowed in ampdu
  * dur: max duration of an ampdu (in msec)
- * txpkt_weight: weight of ampdu in txfifo; reduces rate lag
  * rx_factor: maximum rx ampdu factor (0-3) ==> 2^(13+x) bytes
  * ffpld_rsvd: number of bytes to reserve for preload
  * max_txlen: max size of ampdu per mcs, bw and sgi
@@ -136,7 +133,6 @@ struct ampdu_info {
        u8 mpdu_density;
        s8 max_pdu;
        u8 dur;
-       u8 txpkt_weight;
        u8 rx_factor;
        u32 ffpld_rsvd;
        u32 max_txlen[MCS_TABLE_SIZE][2][2];
@@ -247,7 +243,6 @@ struct ampdu_info *brcms_c_ampdu_attach(struct brcms_c_info *wlc)
        ampdu->mpdu_density = AMPDU_DEF_MPDU_DENSITY;
        ampdu->max_pdu = AUTO;
        ampdu->dur = AMPDU_MAX_DUR;
-       ampdu->txpkt_weight = AMPDU_DEF_TXPKT_WEIGHT;
 
        ampdu->ffpld_rsvd = AMPDU_DEF_FFPLD_RSVD;
        /*
@@ -942,8 +937,7 @@ brcms_c_sendampdu(struct ampdu_info *ampdu, struct brcms_txq_info *qi,
 
                while ((p = skb_dequeue(&session.skb_list)) != NULL)
                        brcms_c_txfifo(wlc, fifo, p,
-                                      skb_queue_empty(&session.skb_list),
-                                      ampdu->txpkt_weight);
+                                      skb_queue_empty(&session.skb_list));
        }
        /* endif (count) */
        return err;
@@ -1162,7 +1156,7 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
        /* update rate state */
        antselid = brcms_c_antsel_antsel2id(wlc->asi, mimoantsel);
 
-       brcms_c_txfifo_complete(wlc, queue, ampdu->txpkt_weight);
+       brcms_c_txfifo_complete(wlc, queue);
 }
 
 void
@@ -1219,7 +1213,7 @@ brcms_c_ampdu_dotxstatus(struct ampdu_info *ampdu, struct scb *scb,
                        p = dma_getnexttxp(wlc->hw->di[queue],
                                           DMA_RANGE_TRANSMITTED);
                }
-               brcms_c_txfifo_complete(wlc, queue, ampdu->txpkt_weight);
+               brcms_c_txfifo_complete(wlc, queue);
        }
 }
 
index 565c15abbed546cf4bfe6acb3771dcf34f45f1ad..f22659f30ccc908502dffb1596ad8c9b30f42d91 100644 (file)
@@ -982,7 +982,7 @@ brcms_c_dotxstatus(struct brcms_c_info *wlc, struct tx_status *txs)
        totlen = p->len;
        free_pdu = true;
 
-       brcms_c_txfifo_complete(wlc, queue, 1);
+       brcms_c_txfifo_complete(wlc, queue);
 
        if (lastframe) {
                /* remove PLCP & Broadcom tx descriptor header */
@@ -7319,8 +7319,7 @@ void brcms_c_send_q(struct brcms_c_info *wlc)
                        err = brcms_c_prep_pdu(wlc, pkt[0], &fifo);
                        if (!err) {
                                for (i = 0; i < count; i++)
-                                       brcms_c_txfifo(wlc, fifo, pkt[i], true,
-                                                      1);
+                                       brcms_c_txfifo(wlc, fifo, pkt[i], true);
                        }
                }
 
@@ -7340,7 +7339,7 @@ void brcms_c_send_q(struct brcms_c_info *wlc)
 
 void
 brcms_c_txfifo(struct brcms_c_info *wlc, uint fifo, struct sk_buff *p,
-              bool commit, s8 txpktpend)
+              bool commit)
 {
        u16 frameid = INVALIDFID;
        struct d11txh *txh;
@@ -7358,9 +7357,9 @@ brcms_c_txfifo(struct brcms_c_info *wlc, uint fifo, struct sk_buff *p,
         * used, this will be handled in brcms_b_txfifo()
         */
        if (commit) {
-               wlc->core->txpktpend[fifo] += txpktpend;
-               BCMMSG(wlc->wiphy, "pktpend inc %d to %d\n",
-                        txpktpend, wlc->core->txpktpend[fifo]);
+               wlc->core->txpktpend[fifo] += 1;
+               BCMMSG(wlc->wiphy, "pktpend inc 1 to %d\n",
+                        wlc->core->txpktpend[fifo]);
        }
 
        /* Commit BCMC sequence number in the SHM frame ID location */
@@ -7424,10 +7423,10 @@ brcms_c_rspec_to_rts_rspec(struct brcms_c_info *wlc, u32 rspec,
 }
 
 void
-brcms_c_txfifo_complete(struct brcms_c_info *wlc, uint fifo, s8 txpktpend)
+brcms_c_txfifo_complete(struct brcms_c_info *wlc, uint fifo)
 {
-       wlc->core->txpktpend[fifo] -= txpktpend;
-       BCMMSG(wlc->wiphy, "pktpend dec %d to %d\n", txpktpend,
+       wlc->core->txpktpend[fifo] -= 1;
+       BCMMSG(wlc->wiphy, "pktpend dec 1 to %d\n",
               wlc->core->txpktpend[fifo]);
 
        /* There is more room; mark precedences related to this FIFO sendable */
index 8debc74c54e1a63b5d9be1eae54e3c52d33375ba..0ab7d36a14459d7b54e753cc1d2924f8c55ad3de 100644 (file)
@@ -638,10 +638,8 @@ struct brcms_bss_cfg {
 };
 
 extern void brcms_c_txfifo(struct brcms_c_info *wlc, uint fifo,
-                          struct sk_buff *p,
-                          bool commit, s8 txpktpend);
-extern void brcms_c_txfifo_complete(struct brcms_c_info *wlc, uint fifo,
-                                   s8 txpktpend);
+                          struct sk_buff *p, bool commit);
+extern void brcms_c_txfifo_complete(struct brcms_c_info *wlc, uint fifo);
 extern void brcms_c_txq_enq(struct brcms_c_info *wlc, struct scb *scb,
                            struct sk_buff *sdu, uint prec);
 extern void brcms_c_print_txstatus(struct tx_status *txs);