aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorSeth Forshee <seth.forshee@canonical.com>2012-11-15 09:07:52 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-11-20 14:03:21 -0500
commit5c8067caeecbabf8c60dbb73dd517d2a2aad16a5 (patch)
treedd4575535a23f1e6393dbed8a689c0ea8cf2a4f0 /drivers/net
parentef2c0512bbf43440a78a6471059e19641eab1e83 (diff)
brcmsmac: Don't weight AMPDU packets in txfifo
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>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/brcm80211/brcmsmac/ampdu.c12
-rw-r--r--drivers/net/wireless/brcm80211/brcmsmac/main.c19
-rw-r--r--drivers/net/wireless/brcm80211/brcmsmac/main.h6
3 files changed, 14 insertions, 23 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
index 573953453055..ea84087f8140 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
@@ -40,8 +40,6 @@
40#define AMPDU_DEF_RETRY_LIMIT 5 40#define AMPDU_DEF_RETRY_LIMIT 5
41/* default tx retry limit at reg rate */ 41/* default tx retry limit at reg rate */
42#define AMPDU_DEF_RR_RETRY_LIMIT 2 42#define AMPDU_DEF_RR_RETRY_LIMIT 2
43/* default weight of ampdu in txfifo */
44#define AMPDU_DEF_TXPKT_WEIGHT 2
45/* default ffpld reserved bytes */ 43/* default ffpld reserved bytes */
46#define AMPDU_DEF_FFPLD_RSVD 2048 44#define AMPDU_DEF_FFPLD_RSVD 2048
47/* # of inis to be freed on detach */ 45/* # of inis to be freed on detach */
@@ -114,7 +112,6 @@ struct brcms_fifo_info {
114 * mpdu_density: min mpdu spacing (0-7) ==> 2^(x-1)/8 usec 112 * mpdu_density: min mpdu spacing (0-7) ==> 2^(x-1)/8 usec
115 * max_pdu: max pdus allowed in ampdu 113 * max_pdu: max pdus allowed in ampdu
116 * dur: max duration of an ampdu (in msec) 114 * dur: max duration of an ampdu (in msec)
117 * txpkt_weight: weight of ampdu in txfifo; reduces rate lag
118 * rx_factor: maximum rx ampdu factor (0-3) ==> 2^(13+x) bytes 115 * rx_factor: maximum rx ampdu factor (0-3) ==> 2^(13+x) bytes
119 * ffpld_rsvd: number of bytes to reserve for preload 116 * ffpld_rsvd: number of bytes to reserve for preload
120 * max_txlen: max size of ampdu per mcs, bw and sgi 117 * max_txlen: max size of ampdu per mcs, bw and sgi
@@ -136,7 +133,6 @@ struct ampdu_info {
136 u8 mpdu_density; 133 u8 mpdu_density;
137 s8 max_pdu; 134 s8 max_pdu;
138 u8 dur; 135 u8 dur;
139 u8 txpkt_weight;
140 u8 rx_factor; 136 u8 rx_factor;
141 u32 ffpld_rsvd; 137 u32 ffpld_rsvd;
142 u32 max_txlen[MCS_TABLE_SIZE][2][2]; 138 u32 max_txlen[MCS_TABLE_SIZE][2][2];
@@ -247,7 +243,6 @@ struct ampdu_info *brcms_c_ampdu_attach(struct brcms_c_info *wlc)
247 ampdu->mpdu_density = AMPDU_DEF_MPDU_DENSITY; 243 ampdu->mpdu_density = AMPDU_DEF_MPDU_DENSITY;
248 ampdu->max_pdu = AUTO; 244 ampdu->max_pdu = AUTO;
249 ampdu->dur = AMPDU_MAX_DUR; 245 ampdu->dur = AMPDU_MAX_DUR;
250 ampdu->txpkt_weight = AMPDU_DEF_TXPKT_WEIGHT;
251 246
252 ampdu->ffpld_rsvd = AMPDU_DEF_FFPLD_RSVD; 247 ampdu->ffpld_rsvd = AMPDU_DEF_FFPLD_RSVD;
253 /* 248 /*
@@ -942,8 +937,7 @@ brcms_c_sendampdu(struct ampdu_info *ampdu, struct brcms_txq_info *qi,
942 937
943 while ((p = skb_dequeue(&session.skb_list)) != NULL) 938 while ((p = skb_dequeue(&session.skb_list)) != NULL)
944 brcms_c_txfifo(wlc, fifo, p, 939 brcms_c_txfifo(wlc, fifo, p,
945 skb_queue_empty(&session.skb_list), 940 skb_queue_empty(&session.skb_list));
946 ampdu->txpkt_weight);
947 } 941 }
948 /* endif (count) */ 942 /* endif (count) */
949 return err; 943 return err;
@@ -1162,7 +1156,7 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
1162 /* update rate state */ 1156 /* update rate state */
1163 antselid = brcms_c_antsel_antsel2id(wlc->asi, mimoantsel); 1157 antselid = brcms_c_antsel_antsel2id(wlc->asi, mimoantsel);
1164 1158
1165 brcms_c_txfifo_complete(wlc, queue, ampdu->txpkt_weight); 1159 brcms_c_txfifo_complete(wlc, queue);
1166} 1160}
1167 1161
1168void 1162void
@@ -1219,7 +1213,7 @@ brcms_c_ampdu_dotxstatus(struct ampdu_info *ampdu, struct scb *scb,
1219 p = dma_getnexttxp(wlc->hw->di[queue], 1213 p = dma_getnexttxp(wlc->hw->di[queue],
1220 DMA_RANGE_TRANSMITTED); 1214 DMA_RANGE_TRANSMITTED);
1221 } 1215 }
1222 brcms_c_txfifo_complete(wlc, queue, ampdu->txpkt_weight); 1216 brcms_c_txfifo_complete(wlc, queue);
1223 } 1217 }
1224} 1218}
1225 1219
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c
index 565c15abbed5..f22659f30ccc 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
@@ -982,7 +982,7 @@ brcms_c_dotxstatus(struct brcms_c_info *wlc, struct tx_status *txs)
982 totlen = p->len; 982 totlen = p->len;
983 free_pdu = true; 983 free_pdu = true;
984 984
985 brcms_c_txfifo_complete(wlc, queue, 1); 985 brcms_c_txfifo_complete(wlc, queue);
986 986
987 if (lastframe) { 987 if (lastframe) {
988 /* remove PLCP & Broadcom tx descriptor header */ 988 /* remove PLCP & Broadcom tx descriptor header */
@@ -7319,8 +7319,7 @@ void brcms_c_send_q(struct brcms_c_info *wlc)
7319 err = brcms_c_prep_pdu(wlc, pkt[0], &fifo); 7319 err = brcms_c_prep_pdu(wlc, pkt[0], &fifo);
7320 if (!err) { 7320 if (!err) {
7321 for (i = 0; i < count; i++) 7321 for (i = 0; i < count; i++)
7322 brcms_c_txfifo(wlc, fifo, pkt[i], true, 7322 brcms_c_txfifo(wlc, fifo, pkt[i], true);
7323 1);
7324 } 7323 }
7325 } 7324 }
7326 7325
@@ -7340,7 +7339,7 @@ void brcms_c_send_q(struct brcms_c_info *wlc)
7340 7339
7341void 7340void
7342brcms_c_txfifo(struct brcms_c_info *wlc, uint fifo, struct sk_buff *p, 7341brcms_c_txfifo(struct brcms_c_info *wlc, uint fifo, struct sk_buff *p,
7343 bool commit, s8 txpktpend) 7342 bool commit)
7344{ 7343{
7345 u16 frameid = INVALIDFID; 7344 u16 frameid = INVALIDFID;
7346 struct d11txh *txh; 7345 struct d11txh *txh;
@@ -7358,9 +7357,9 @@ brcms_c_txfifo(struct brcms_c_info *wlc, uint fifo, struct sk_buff *p,
7358 * used, this will be handled in brcms_b_txfifo() 7357 * used, this will be handled in brcms_b_txfifo()
7359 */ 7358 */
7360 if (commit) { 7359 if (commit) {
7361 wlc->core->txpktpend[fifo] += txpktpend; 7360 wlc->core->txpktpend[fifo] += 1;
7362 BCMMSG(wlc->wiphy, "pktpend inc %d to %d\n", 7361 BCMMSG(wlc->wiphy, "pktpend inc 1 to %d\n",
7363 txpktpend, wlc->core->txpktpend[fifo]); 7362 wlc->core->txpktpend[fifo]);
7364 } 7363 }
7365 7364
7366 /* Commit BCMC sequence number in the SHM frame ID location */ 7365 /* 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,
7424} 7423}
7425 7424
7426void 7425void
7427brcms_c_txfifo_complete(struct brcms_c_info *wlc, uint fifo, s8 txpktpend) 7426brcms_c_txfifo_complete(struct brcms_c_info *wlc, uint fifo)
7428{ 7427{
7429 wlc->core->txpktpend[fifo] -= txpktpend; 7428 wlc->core->txpktpend[fifo] -= 1;
7430 BCMMSG(wlc->wiphy, "pktpend dec %d to %d\n", txpktpend, 7429 BCMMSG(wlc->wiphy, "pktpend dec 1 to %d\n",
7431 wlc->core->txpktpend[fifo]); 7430 wlc->core->txpktpend[fifo]);
7432 7431
7433 /* There is more room; mark precedences related to this FIFO sendable */ 7432 /* There is more room; mark precedences related to this FIFO sendable */
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.h b/drivers/net/wireless/brcm80211/brcmsmac/main.h
index 8debc74c54e1..0ab7d36a1445 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/main.h
+++ b/drivers/net/wireless/brcm80211/brcmsmac/main.h
@@ -638,10 +638,8 @@ struct brcms_bss_cfg {
638}; 638};
639 639
640extern void brcms_c_txfifo(struct brcms_c_info *wlc, uint fifo, 640extern void brcms_c_txfifo(struct brcms_c_info *wlc, uint fifo,
641 struct sk_buff *p, 641 struct sk_buff *p, bool commit);
642 bool commit, s8 txpktpend); 642extern void brcms_c_txfifo_complete(struct brcms_c_info *wlc, uint fifo);
643extern void brcms_c_txfifo_complete(struct brcms_c_info *wlc, uint fifo,
644 s8 txpktpend);
645extern void brcms_c_txq_enq(struct brcms_c_info *wlc, struct scb *scb, 643extern void brcms_c_txq_enq(struct brcms_c_info *wlc, struct scb *scb,
646 struct sk_buff *sdu, uint prec); 644 struct sk_buff *sdu, uint prec);
647extern void brcms_c_print_txstatus(struct tx_status *txs); 645extern void brcms_c_print_txstatus(struct tx_status *txs);