PERFORCE change 135426 for review
Sepherosa Ziehau
sephe at FreeBSD.org
Thu Feb 14 21:53:25 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=135426
Change 135426 by sephe at sephe_zealot:sam_wifi on 2008/02/15 05:52:45
Do TX rate control only for packets that need MAC level ack
Obtained from: sam
Affected files ...
.. //depot/projects/wifi/sys/dev/bwi/if_bwi.c#18 edit
Differences ...
==== //depot/projects/wifi/sys/dev/bwi/if_bwi.c#18 (text+ko) ====
@@ -3175,13 +3175,17 @@
ni = tb->tb_ni;
if (tb->tb_ni != NULL) {
struct bwi_node *bn = (struct bwi_node *) tb->tb_ni;
+ const struct bwi_txbuf_hdr *hdr =
+ mtod(tb->tb_mbuf, const struct bwi_txbuf_hdr *);
- /* XXX only for unicast frames */
- /* Feed back 'acked and data_txcnt' */
- if (acked)
- bn->amn.amn_success++;
- bn->amn.amn_txcnt++;
- bn->amn.amn_retrycnt += data_txcnt-1;
+ /* NB: update rate control only for unicast frames */
+ if (hdr->txh_mac_ctrl & htole32(BWI_TXH_MAC_C_ACK)) {
+ /* Feed back 'acked and data_txcnt' */
+ if (acked)
+ bn->amn.amn_success++;
+ bn->amn.amn_txcnt++;
+ bn->amn.amn_retrycnt += data_txcnt-1;
+ }
/*
* Do any tx complete callback. Note this must
More information about the p4-projects
mailing list