aboutsummaryrefslogtreecommitdiff
path: root/sys/net80211
diff options
context:
space:
mode:
authorAdrian Chadd <adrian@FreeBSD.org>2015-03-22 17:54:00 +0000
committerAdrian Chadd <adrian@FreeBSD.org>2015-03-22 17:54:00 +0000
commit83249cea342fb7db037611093397f3664261c177 (patch)
tree8dae7d41a33f19aecf78679f8c7580d87194cb36 /sys/net80211
parentd16528b2da8853e63d5a4a21dc1b6364218c1c62 (diff)
downloadsrc-83249cea342fb7db037611093397f3664261c177.tar.gz
src-83249cea342fb7db037611093397f3664261c177.zip
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.
Notes
Notes: svn path=/head/; revision=280349
Diffstat (limited to 'sys/net80211')
-rw-r--r--sys/net80211/ieee80211_ht.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c
index a5c7d7c34fd8..5fe2e80f9725 100644
--- a/sys/net80211/ieee80211_ht.c
+++ b/sys/net80211/ieee80211_ht.c
@@ -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);
}