Lines Matching +full:over +full:- +full:current +full:- +full:scale +full:- +full:factor
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
4 * Copyright (c) 2007-2008 Sam Leffler, Errno Consulting
37 /* threshold for aging overlapping non-HT bss */
50 #define IEEE80211_AGGR_AMSDU 0x0080 /* A-MSDU in A-MPDU TX allowed */
54 int txa_pkts; /* packets over last sample interval */
55 int txa_avgpps; /* filtered traffic over window */
64 void *txa_private; /* driver-private storage */
68 /* return non-zero if AMPDU tx for the TID is running */
70 (((tap)->txa_flags & IEEE80211_AGGR_RUNNING) != 0)
73 * Return non-zero if AMPDU tx for the TID is running and we can do
74 * A-MSDU in A-MPDU
77 (((tap)->txa_flags & (IEEE80211_AGGR_RUNNING | IEEE80211_AGGR_AMSDU)) \
80 /* return non-zero if AMPDU tx for the TID was NACKed */
82 (!! ((tap)->txa_flags & IEEE80211_AGGR_NAK))
84 /* return non-zero if AMPDU tx for the TID is running or started */
86 (((tap)->txa_flags & \
109 tap->txa_lastsample = ticks; in ieee80211_txampdu_init_pps()
110 tap->txa_avgpps = 0; in ieee80211_txampdu_init_pps()
117 /* NB: scale factor of 2 was picked heuristically */ in ieee80211_txampdu_update_pps()
118 tap->txa_avgpps = ((tap->txa_avgpps << 2) - in ieee80211_txampdu_update_pps()
119 tap->txa_avgpps + tap->txa_pkts) >> 2; in ieee80211_txampdu_update_pps()
130 while (ticks - tap->txa_lastsample >= hz) { in ieee80211_txampdu_count_packet()
133 tap->txa_pkts = 0; in ieee80211_txampdu_count_packet()
134 if (tap->txa_avgpps == 0) { in ieee80211_txampdu_count_packet()
135 tap->txa_lastsample = ticks; in ieee80211_txampdu_count_packet()
138 tap->txa_lastsample += hz; in ieee80211_txampdu_count_packet()
140 tap->txa_pkts++; in ieee80211_txampdu_count_packet()
144 * Get the current pps estimate. If the average is out of
152 while (ticks - tap->txa_lastsample >= hz) { in ieee80211_txampdu_getpps()
154 tap->txa_pkts = 0; in ieee80211_txampdu_getpps()
155 if (tap->txa_avgpps == 0) { in ieee80211_txampdu_getpps()
156 tap->txa_lastsample = ticks; in ieee80211_txampdu_getpps()
159 tap->txa_lastsample += hz; in ieee80211_txampdu_getpps()
161 return tap->txa_avgpps; in ieee80211_txampdu_getpps()
169 ieee80211_seq rxa_start; /* start of current BA window */