svn commit: r299036 - head/sys/dev/bwn
Adrian Chadd
adrian at FreeBSD.org
Wed May 4 02:11:46 UTC 2016
Author: adrian
Date: Wed May 4 02:11:45 2016
New Revision: 299036
URL: https://svnweb.freebsd.org/changeset/base/299036
Log:
[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
Modified:
head/sys/dev/bwn/if_bwn.c
Modified: head/sys/dev/bwn/if_bwn.c
==============================================================================
--- head/sys/dev/bwn/if_bwn.c Wed May 4 02:06:46 2016 (r299035)
+++ head/sys/dev/bwn/if_bwn.c Wed May 4 02:11:45 2016 (r299036)
@@ -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 :
More information about the svn-src-head
mailing list