[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
This commit is contained in:
Adrian Chadd 2016-05-04 02:11:45 +00:00
parent 8e3543eebc
commit d191ae19a2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=299036

View File

@ -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 :