Lines Matching +full:max +full:- +full:sample +full:- +full:rate +full:- +full:hz

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
4 * Copyright (c) 2007-2008 Sam Leffler, Errno Consulting
36 #define IEEE80211_AGGR_BAWMAX 64 /* max block ack window size */
37 /* threshold for aging overlapping non-HT bss */
50 #define IEEE80211_AGGR_AMSDU 0x0080 /* A-MSDU in A-MPDU TX allowed */
53 int txa_lastsample; /* ticks @ last traffic sample */
54 int txa_pkts; /* packets over last sample interval */
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 & \
96 * setup for AMPDU. The traffic rate can be used to decide
109 tap->txa_lastsample = ticks; in ieee80211_txampdu_init_pps()
110 tap->txa_avgpps = 0; in ieee80211_txampdu_init_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()
132 /* reset to start new sample interval */ 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()
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()