diff options
author | adrian <adrian@FreeBSD.org> | 2016-05-04 02:11:45 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2016-05-04 02:11:45 +0000 |
commit | 31c3749d026d43c3b2556b49b23622053bb7e0ba (patch) | |
tree | 6e2863049b9c9072210563bedc1b9d98c672fd2e | |
parent | 0520b418110675ffa4da7672ea7bc35154730337 (diff) | |
download | FreeBSD-src-31c3749d026d43c3b2556b49b23622053bb7e0ba.zip FreeBSD-src-31c3749d026d43c3b2556b49b23622053bb7e0ba.tar.gz |
[bwn] fix rate control feedback.
* Add a debug print for the xmit completion status fields.
Yes, I like staring at a stream of DWORDS.
* Set the retrycnt to the number of full frame retries for now;
I'll figure out how to factor rts/cts failures into it when
I figure out what the difference is.
It's -1 because it's not "retries", it's "tries".
It now passes the youtube test.
Tested:
* BCM4312, STA mode
-rw-r--r-- | sys/dev/bwn/if_bwn.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/dev/bwn/if_bwn.c b/sys/dev/bwn/if_bwn.c index f7dc50c..60d408eb 100644 --- a/sys/dev/bwn/if_bwn.c +++ b/sys/dev/bwn/if_bwn.c @@ -4942,6 +4942,12 @@ bwn_intr_txeof(struct bwn_mac *mac) break; stat1 = BWN_READ_4(mac, BWN_XMITSTAT_1); + DPRINTF(mac->mac_sc, BWN_DEBUG_XMIT, + "%s: stat0=0x%08x, stat1=0x%08x\n", + __func__, + stat0, + stat1); + stat.cookie = (stat0 >> 16); stat.seq = (stat1 & 0x0000ffff); stat.phy_stat = ((stat1 & 0x00ff0000) >> 16); @@ -5517,11 +5523,8 @@ bwn_dma_handle_txeof(struct bwn_mac *mac, KASSERT(meta->mt_m != NULL, ("%s:%d: fail", __func__, __LINE__)); - /* XXX */ - if (status->ack == 0) - retrycnt = 1; - else - retrycnt = 0; + /* Just count full frame retries for now */ + retrycnt = status->framecnt - 1; ieee80211_ratectl_tx_complete(meta->mt_ni->ni_vap, meta->mt_ni, status->ack ? IEEE80211_RATECTL_TX_SUCCESS : @@ -5571,11 +5574,8 @@ bwn_pio_handle_txeof(struct bwn_mac *mac, * be done before releasing the node reference. */ - /* XXX */ - if (status->ack == 0) - retrycnt = 1; - else - retrycnt = 0; + /* Just count full frame retries for now */ + retrycnt = status->framecnt - 1; ieee80211_ratectl_tx_complete(tp->tp_ni->ni_vap, tp->tp_ni, status->ack ? IEEE80211_RATECTL_TX_SUCCESS : |