Initialise the pps / packet tracking timestamp so 11n aggregation works again.
There's a bug in the ticks handling where when initialised at '0', once the ticks counter wrapped the comparison math would never trigger. The pps calculation would never happen, and thus aggregation was never enabled. It manifests itself as "oh you only get 11n transmit aggregation for the first 10 minutes of uptime." I'm sure there are other ticks related issues lurking in net80211. Tested: * ath / iwn, both with 'wlandebug +11n' and a little bit of iperf to kick off the transmit A-MPDU negotiation once the pps gets high enough.
This commit is contained in:
parent
d16528b2da
commit
83249cea34
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=280349
@ -1047,6 +1047,7 @@ ieee80211_ht_node_init(struct ieee80211_node *ni)
|
||||
tap = &ni->ni_tx_ampdu[tid];
|
||||
tap->txa_tid = tid;
|
||||
tap->txa_ni = ni;
|
||||
tap->txa_lastsample = ticks;
|
||||
/* NB: further initialization deferred */
|
||||
}
|
||||
ni->ni_flags |= IEEE80211_NODE_HT | IEEE80211_NODE_AMPDU;
|
||||
@ -1216,6 +1217,7 @@ ieee80211_ht_wds_init(struct ieee80211_node *ni)
|
||||
for (tid = 0; tid < WME_NUM_TID; tid++) {
|
||||
tap = &ni->ni_tx_ampdu[tid];
|
||||
tap->txa_tid = tid;
|
||||
tap->txa_lastsample = ticks;
|
||||
}
|
||||
/* NB: AMPDU tx/rx governed by IEEE80211_FHT_AMPDU_{TX,RX} */
|
||||
ni->ni_flags |= IEEE80211_NODE_HT | IEEE80211_NODE_AMPDU;
|
||||
@ -1691,6 +1693,7 @@ ampdu_tx_setup(struct ieee80211_tx_ampdu *tap)
|
||||
{
|
||||
callout_init(&tap->txa_timer, CALLOUT_MPSAFE);
|
||||
tap->txa_flags |= IEEE80211_AGGR_SETUP;
|
||||
tap->txa_lastsample = ticks;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1718,8 +1721,12 @@ ampdu_tx_stop(struct ieee80211_tx_ampdu *tap)
|
||||
*/
|
||||
bar_stop_timer(tap);
|
||||
|
||||
tap->txa_lastsample = 0;
|
||||
/*
|
||||
* Reset packet estimate.
|
||||
*/
|
||||
tap->txa_lastsample = ticks;
|
||||
tap->txa_avgpps = 0;
|
||||
|
||||
/* NB: clearing NAK means we may re-send ADDBA */
|
||||
tap->txa_flags &= ~(IEEE80211_AGGR_SETUP | IEEE80211_AGGR_NAK);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user