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

Function ieee80211_node_table_reset

freebsd/net80211/ieee80211_node.c:2270–2305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2268}
2269
2270static void
2271ieee80211_node_table_reset(struct ieee80211_node_table *nt,
2272 struct ieee80211vap *match)
2273{
2274 struct ieee80211_node *ni, *next;
2275
2276 IEEE80211_NODE_LOCK(nt);
2277 TAILQ_FOREACH_SAFE(ni, &nt->nt_node, ni_list, next) {
2278 if (match != NULL && ni->ni_vap != match)
2279 continue;
2280 /* XXX can this happen? if so need's work */
2281 if (ni->ni_associd != 0) {
2282 struct ieee80211vap *vap = ni->ni_vap;
2283
2284 if (vap->iv_auth->ia_node_leave != NULL)
2285 vap->iv_auth->ia_node_leave(ni);
2286 if (vap->iv_aid_bitmap != NULL)
2287 IEEE80211_AID_CLR(vap, ni->ni_associd);
2288 }
2289 ni->ni_wdsvap = NULL; /* clear reference */
2290 node_reclaim(nt, ni);
2291 }
2292 if (match != NULL && match->iv_opmode == IEEE80211_M_WDS) {
2293 /*
2294 * Make a separate pass to clear references to this vap
2295 * held by DWDS entries. They will not be matched above
2296 * because ni_vap will point to the ap vap but we still
2297 * need to clear ni_wdsvap when the WDS vap is destroyed
2298 * and/or reset.
2299 */
2300 TAILQ_FOREACH_SAFE(ni, &nt->nt_node, ni_list, next)
2301 if (ni->ni_wdsvap == match)
2302 ni->ni_wdsvap = NULL;
2303 }
2304 IEEE80211_NODE_UNLOCK(nt);
2305}
2306
2307static void
2308ieee80211_node_table_cleanup(struct ieee80211_node_table *nt)

Callers 3

ieee80211_node_vdetachFunction · 0.85
ieee80211_reset_bssFunction · 0.85

Calls 1

node_reclaimFunction · 0.85

Tested by

no test coverage detected