MCPcopy Create free account
hub / github.com/F-Stack/f-stack / timeout_stations

Function timeout_stations

freebsd/net80211/ieee80211_node.c:2326–2443  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2324}
2325
2326static void
2327timeout_stations(void *arg __unused, struct ieee80211_node *ni)
2328{
2329 struct ieee80211com *ic = ni->ni_ic;
2330 struct ieee80211vap *vap = ni->ni_vap;
2331
2332 /*
2333 * Only process stations when in RUN state. This
2334 * insures, for example, that we don't timeout an
2335 * inactive station during CAC. Note that CSA state
2336 * is actually handled in ieee80211_node_timeout as
2337 * it applies to more than timeout processing.
2338 */
2339 if (vap->iv_state != IEEE80211_S_RUN)
2340 return;
2341 /*
2342 * Ignore entries for which have yet to receive an
2343 * authentication frame. These are transient and
2344 * will be reclaimed when the last reference to them
2345 * goes away (when frame xmits complete).
2346 */
2347 if ((vap->iv_opmode == IEEE80211_M_HOSTAP ||
2348 vap->iv_opmode == IEEE80211_M_STA) &&
2349 (ni->ni_flags & IEEE80211_NODE_AREF) == 0)
2350 return;
2351 /*
2352 * Free fragment if not needed anymore
2353 * (last fragment older than 1s).
2354 * XXX doesn't belong here, move to node_age
2355 */
2356 if (ni->ni_rxfrag[0] != NULL &&
2357 ticks > ni->ni_rxfragstamp + hz) {
2358 m_freem(ni->ni_rxfrag[0]);
2359 ni->ni_rxfrag[0] = NULL;
2360 }
2361 if (ni->ni_inact > 0) {
2362 ni->ni_inact--;
2363 IEEE80211_NOTE(vap, IEEE80211_MSG_INACT, ni,
2364 "%s: inact %u inact_reload %u nrates %u",
2365 __func__, ni->ni_inact, ni->ni_inact_reload,
2366 ni->ni_rates.rs_nrates);
2367 }
2368 /*
2369 * Special case ourself; we may be idle for extended periods
2370 * of time and regardless reclaiming our state is wrong.
2371 * XXX run ic_node_age
2372 */
2373 /* XXX before inact decrement? */
2374 if (ni == vap->iv_bss)
2375 return;
2376 if (ni->ni_associd != 0 ||
2377 (vap->iv_opmode == IEEE80211_M_IBSS ||
2378 vap->iv_opmode == IEEE80211_M_AHDEMO)) {
2379 /*
2380 * Age/drain resources held by the station.
2381 */
2382 ic->ic_node_age(ni);
2383 /*

Callers

nothing calls this directly

Calls 4

ieee80211_ref_nodeFunction · 0.85
ieee80211_send_nulldataFunction · 0.85
ieee80211_node_leaveFunction · 0.85
m_freemFunction · 0.50

Tested by

no test coverage detected