Author: adrian Date: Sun Mar 22 17:54:00 2015 New Revision: 280349 URL: https://svnweb.freebsd.org/changeset/base/280349
Log: 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. Modified: head/sys/net80211/ieee80211_ht.c Modified: head/sys/net80211/ieee80211_ht.c ============================================================================== --- head/sys/net80211/ieee80211_ht.c Sun Mar 22 17:29:14 2015 (r280348) +++ head/sys/net80211/ieee80211_ht.c Sun Mar 22 17:54:00 2015 (r280349) @@ -1047,6 +1047,7 @@ ieee80211_ht_node_init(struct ieee80211_ 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_n 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 { 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 */ 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); } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"