Lines Matching defs:vap

137 	 * Set flags to be propagated to all vap's;
154 ieee80211_node_vattach(struct ieee80211vap *vap)
157 vap->iv_max_aid = IEEE80211_AID_DEF;
160 vap->iv_inact_init = IEEE80211_INACT_INIT;
161 vap->iv_inact_auth = IEEE80211_INACT_AUTH;
162 vap->iv_inact_run = IEEE80211_INACT_RUN;
163 vap->iv_inact_probe = IEEE80211_INACT_PROBE;
165 IEEE80211_DPRINTF(vap, IEEE80211_MSG_INACT,
167 vap->iv_inact_init, vap->iv_inact_auth,
168 vap->iv_inact_run, vap->iv_inact_probe);
172 ieee80211_node_latevattach(struct ieee80211vap *vap)
176 IEEE80211_UNLOCK_ASSERT(vap->iv_ic);
178 if (vap->iv_opmode == IEEE80211_M_HOSTAP) {
180 if (vap->iv_max_aid < IEEE80211_AID_MIN) {
181 vap->iv_max_aid = IEEE80211_AID_MIN;
182 if_printf(vap->iv_ifp,
184 vap->iv_max_aid);
186 vap->iv_aid_bitmap = (uint32_t *) IEEE80211_MALLOC(
187 howmany(vap->iv_max_aid, 32) * sizeof(uint32_t),
190 if (vap->iv_aid_bitmap == NULL) {
193 __func__, vap->iv_max_aid);
194 vap->iv_max_aid = 0;
198 IEEE80211_LOCK(vap->iv_ic);
199 ieee80211_reset_bss(vap);
200 IEEE80211_UNLOCK(vap->iv_ic);
202 vap->iv_auth = ieee80211_authenticator_get(vap->iv_bss->ni_authmode);
206 ieee80211_node_vdetach(struct ieee80211vap *vap)
208 struct ieee80211com *ic = vap->iv_ic;
211 IEEE80211_UNLOCK_ASSERT(vap->iv_ic);
213 ieee80211_node_table_reset(&ic->ic_sta, vap);
215 if (vap->iv_bss != NULL) {
216 ieee80211_free_node(vap->iv_bss);
217 vap->iv_update_bss(vap, NULL);
220 if (vap->iv_aid_bitmap != NULL) {
221 IEEE80211_FREE(vap->iv_aid_bitmap, M_80211_NODE);
222 vap->iv_aid_bitmap = NULL;
233 struct ieee80211vap *vap = ni->ni_vap;
236 ni->ni_inact_reload = vap->iv_inact_run;
239 IEEE80211_NOTE(vap, IEEE80211_MSG_INACT, ni,
246 struct ieee80211vap *vap = ni->ni_vap;
249 ni->ni_inact_reload = vap->iv_inact_auth;
253 IEEE80211_NOTE(vap, IEEE80211_MSG_INACT, ni,
264 struct ieee80211vap *vap = ni->ni_vap;
293 ni->ni_txparms = &vap->iv_txparms[mode];
306 struct ieee80211vap *vap = ni->ni_vap;
325 (vap->iv_flags_ht & IEEE80211_FHT_PUREN) == 0)
328 (vap->iv_flags_ht & IEEE80211_FHT_PUREN) == 0)
331 (vap->iv_flags & IEEE80211_F_PUREG) == 0)
334 ni->ni_txparms = &vap->iv_txparms[mode];
350 ieee80211_create_ibss(struct ieee80211vap* vap, struct ieee80211_channel *chan)
352 struct ieee80211com *ic = vap->iv_ic;
355 IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN,
357 ieee80211_opmode_name[vap->iv_opmode],
362 ni = ieee80211_alloc_node(&ic->ic_sta, vap, vap->iv_myaddr,
368 IEEE80211_ADDR_COPY(ni->ni_bssid, vap->iv_myaddr);
369 ni->ni_esslen = vap->iv_des_ssid[0].len;
370 memcpy(ni->ni_essid, vap->iv_des_ssid[0].ssid, ni->ni_esslen);
371 if (vap->iv_bss != NULL)
372 copy_bss(ni, vap->iv_bss);
374 if (vap->iv_flags & IEEE80211_F_PRIVACY)
380 if (vap->iv_opmode == IEEE80211_M_IBSS) {
382 if (vap->iv_flags & IEEE80211_F_DESBSSID)
383 IEEE80211_ADDR_COPY(ni->ni_bssid, vap->iv_des_bssid);
390 } else if (vap->iv_opmode == IEEE80211_M_AHDEMO) {
391 if (vap->iv_flags & IEEE80211_F_DESBSSID)
392 IEEE80211_ADDR_COPY(ni->ni_bssid, vap->iv_des_bssid);
395 if ((vap->iv_caps & IEEE80211_C_TDMA) == 0)
399 } else if (vap->iv_opmode == IEEE80211_M_MBSS) {
400 ni->ni_meshidlen = vap->iv_mesh->ms_idlen;
401 memcpy(ni->ni_meshid, vap->iv_mesh->ms_id, ni->ni_meshidlen);
425 if (vap->iv_flags & IEEE80211_F_PUREG) {
464 ieee80211_reset_bss(struct ieee80211vap *vap)
466 struct ieee80211com *ic = vap->iv_ic;
471 ieee80211_node_table_reset(&ic->ic_sta, vap);
473 ieee80211_vap_reset_erp(vap);
475 ni = ieee80211_alloc_node(&ic->ic_sta, vap, vap->iv_myaddr,
478 obss = vap->iv_update_bss(vap, ieee80211_ref_node(ni));
484 IEEE80211_ADDR_COPY(ni->ni_bssid, vap->iv_myaddr);
505 check_bss(struct ieee80211vap *vap, struct ieee80211_node *ni)
512 if (vap->iv_opmode == IEEE80211_M_IBSS) {
519 if (vap->iv_flags & IEEE80211_F_PRIVACY) {
531 if (vap->iv_des_nssid != 0 &&
532 !match_ssid(ni, vap->iv_des_nssid, vap->iv_des_ssid))
534 if ((vap->iv_flags & IEEE80211_F_DESBSSID) &&
535 !IEEE80211_ADDR_EQ(vap->iv_des_bssid, ni->ni_bssid))
545 check_bss_debug(struct ieee80211vap *vap, struct ieee80211_node *ni)
554 if (vap->iv_opmode == IEEE80211_M_IBSS) {
561 if (vap->iv_flags & IEEE80211_F_PRIVACY) {
573 if (vap->iv_des_nssid != 0 &&
574 !match_ssid(ni, vap->iv_des_nssid, vap->iv_des_ssid))
576 if ((vap->iv_flags & IEEE80211_F_DESBSSID) &&
577 !IEEE80211_ADDR_EQ(vap->iv_des_bssid, ni->ni_bssid))
602 struct ieee80211vap *vap = ni->ni_vap;
604 if (ni == vap->iv_bss ||
605 IEEE80211_ADDR_EQ(ni->ni_bssid, vap->iv_bss->ni_bssid)) {
610 if (!check_bss(vap, ni)) {
612 IEEE80211_DPRINTF(vap, IEEE80211_MSG_ASSOC,
615 if (ieee80211_msg_assoc(vap))
616 check_bss_debug(vap, ni);
618 vap->iv_stats.is_ibss_capmismatch++;
639 struct ieee80211vap *vap = ni->ni_vap;
645 if (vap->iv_des_nssid == 0 && scan->ssid == NULL)
651 if (!! (vap->iv_des_nssid == 0) != !! (scan->ssid == NULL))
663 for (i = 0; i < vap->iv_des_nssid; i++) {
665 if (vap->iv_des_ssid[i].len != scan->ssid[1])
669 if (memcmp(vap->iv_des_ssid[i].ssid, scan->ssid + 2,
670 vap->iv_des_ssid[i].len) == 0)
696 struct ieee80211vap *vap = ni->ni_vap;
702 IEEE80211_DPRINTF(vap, IEEE80211_MSG_ASSOC,
705 vap->iv_flags&IEEE80211_F_SHPREAMBLE ? "short" : "long",
706 vap->iv_flags&IEEE80211_F_SHSLOT ? "short" : "long",
707 vap->iv_flags&IEEE80211_F_USEPROT ? ", protection" : ""
714 * This assumes ni_chan have been setup for each vap.
719 struct ieee80211vap *vap;
724 TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) {
725 if (vap->iv_state < IEEE80211_S_RUN)
727 switch (vap->iv_opmode) {
734 flags |= ieee80211_htchanflags(vap->iv_bss->ni_chan);
745 * This assumes ni_chan have been setup for each vap.
750 struct ieee80211vap *vap;
755 TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) {
756 if (vap->iv_state < IEEE80211_S_RUN)
758 switch (vap->iv_opmode) {
765 flags |= ieee80211_vhtchanflags(vap->iv_bss->ni_chan);
776 * any vap's are using HT20/HT40. This is used to sync the state
777 * of ic_curchan after a channel width change on a running vap.
802 * promoted if other vap's are operating with HT20/HT40.
811 * set of running vap's. This assumes we are called
812 * after ni_chan is setup for each vap.
862 struct ieee80211vap *vap = selbs->ni_vap;
871 obss = vap->iv_update_bss(vap, selbs); /* NB: caller assumed to bump refcnt */
879 vap->iv_state == IEEE80211_S_RUN &&
901 ieee80211_fix_rate(vap->iv_bss, &vap->iv_bss->ni_rates,
910 ieee80211_vap_reset_erp(vap);
911 ieee80211_wme_initparams(vap);
913 if (vap->iv_opmode == IEEE80211_M_STA) {
916 ieee80211_new_state(vap, IEEE80211_S_ASSOC, 1);
924 IEEE80211_DPRINTF(vap, IEEE80211_MSG_AUTH,
927 ieee80211_state_name[vap->iv_state]);
928 ieee80211_new_state(vap, IEEE80211_S_AUTH,
932 ieee80211_new_state(vap, IEEE80211_S_RUN, -1);
937 ieee80211_sta_join(struct ieee80211vap *vap, struct ieee80211_channel *chan,
940 struct ieee80211com *ic = vap->iv_ic;
944 ni = ieee80211_alloc_node(&ic->ic_sta, vap, se->se_macaddr,
968 if (vap->iv_opmode == IEEE80211_M_STA) {
1001 vap->iv_dtim_period = se->se_dtimperiod;
1002 vap->iv_dtim_count = 0;
1020 vap->iv_flags_ht & IEEE80211_FHT_HT) {
1036 vap->iv_vht_flags & IEEE80211_FVHT_VHT) {
1099 node_alloc(struct ieee80211vap *vap, const uint8_t macaddr[IEEE80211_ADDR_LEN])
1235 struct ieee80211vap *vap = ni->ni_vap;
1241 if (vap->iv_opmode != IEEE80211_M_STA)
1242 vap->iv_ps_sta--;
1244 IEEE80211_NOTE(vap, IEEE80211_MSG_POWER, ni,
1245 "power save mode off, %u sta's in ps mode", vap->iv_ps_sta);
1262 if (vap->iv_opmode == IEEE80211_M_MBSS)
1283 if (ieee80211_node_psq_drain(ni) != 0 && vap->iv_set_tim != NULL)
1284 vap->iv_set_tim(ni, 0);
1329 struct ieee80211vap *vap = ni->ni_vap;
1335 ni->ni_psq.psq_len == 0 && vap->iv_set_tim != NULL)
1336 vap->iv_set_tim(ni, 0);
1425 struct ieee80211vap *vap, const uint8_t macaddr[IEEE80211_ADDR_LEN],
1431 ni = ic->ic_node_alloc(vap, macaddr);
1433 vap->iv_stats.is_rx_nodealloc++;
1437 IEEE80211_DPRINTF(vap, IEEE80211_MSG_NODE,
1444 IEEE80211_DPRINTF(vap, IEEE80211_MSG_NODE,
1451 ni->ni_txparms = &vap->iv_txparms[ieee80211_chan2mode(ic->ic_curchan)];
1452 ieee80211_crypto_resetkey(vap, &ni->ni_ucastkey, IEEE80211_KEYIX_NONE);
1459 if (vap->iv_opmode == IEEE80211_M_MBSS)
1460 ieee80211_mesh_node_init(vap, ni);
1464 ni->ni_vap = vap;
1470 vap->iv_stats.is_rx_nodealloc++;
1477 IEEE80211_NOTE(vap, IEEE80211_MSG_INACT, ni,
1490 ieee80211_tmp_node(struct ieee80211vap *vap,
1493 struct ieee80211com *ic = vap->iv_ic;
1496 ni = ic->ic_node_alloc(vap, macaddr);
1498 struct ieee80211_node *bss = vap->iv_bss;
1500 IEEE80211_DPRINTF(vap, IEEE80211_MSG_NODE,
1505 ni->ni_vap = vap;
1512 IEEE80211_DPRINTF(vap, IEEE80211_MSG_NODE,
1518 ieee80211_crypto_resetkey(vap, &ni->ni_ucastkey,
1528 vap->iv_stats.is_rx_nodealloc++;
1537 vap->iv_stats.is_rx_nodealloc++;
1543 ieee80211_dup_bss(struct ieee80211vap *vap,
1546 struct ieee80211com *ic = vap->iv_ic;
1549 ni = ieee80211_alloc_node(&ic->ic_sta, vap, macaddr, __func__, __LINE__);
1551 struct ieee80211_node *bss = vap->iv_bss;
1563 * Create a bss node for a legacy WDS vap. The far end does
1570 ieee80211_node_create_wds(struct ieee80211vap *vap,
1573 struct ieee80211com *ic = vap->iv_ic;
1577 ni = ieee80211_alloc_node(&ic->ic_sta, vap, bssid, __func__, __LINE__);
1579 ni->ni_wdsvap = vap;
1584 copy_bss(ni, vap->iv_bss);
1587 ni->ni_esslen = vap->iv_des_ssid[0].len;
1588 memcpy(ni->ni_essid, vap->iv_des_ssid[0].ssid, ni->ni_esslen);
1595 if (vap->iv_flags & IEEE80211_F_WME)
1598 if (vap->iv_flags & IEEE80211_F_FF)
1603 (vap->iv_flags_ht & IEEE80211_FHT_HT)) {
1606 * the vap; setup HT operation. On return
1610 if (vap->iv_vht_flags & IEEE80211_FVHT_VHT) {
1670 const struct ieee80211vap *vap, const uint8_t macaddr[IEEE80211_ADDR_LEN],
1680 if (ni->ni_vap == vap &&
1698 const struct ieee80211vap *vap, const uint8_t macaddr[IEEE80211_ADDR_LEN],
1704 ni = _ieee80211_find_vap_node_locked(nt, vap, macaddr, func, line);
1716 ieee80211_fakeup_adhoc_node(struct ieee80211vap *vap,
1721 IEEE80211_DPRINTF(vap, IEEE80211_MSG_NODE | IEEE80211_MSG_ASSOC,
1723 ni = ieee80211_dup_bss(vap, macaddr);
1725 struct ieee80211com *ic = vap->iv_ic;
1728 ni->ni_rates = vap->iv_bss->ni_rates;
1731 if (vap->iv_opmode == IEEE80211_M_AHDEMO) {
1742 if (vap->iv_flags & IEEE80211_F_WME)
1745 if (vap->iv_flags & IEEE80211_F_FF)
1780 if (vap->iv_opmode == IEEE80211_M_IBSS) {
1782 vap->iv_myaddr, /* SA */
1784 vap->iv_bss->ni_bssid, /* BSSID */
1785 vap->iv_bss->ni_essid,
1786 vap->iv_bss->ni_esslen); /* SSID */
1922 ieee80211_add_neighbor(struct ieee80211vap *vap,
1928 IEEE80211_DPRINTF(vap, IEEE80211_MSG_ASSOC,
1930 ni = ieee80211_dup_bss(vap, wh->i_addr2);/* XXX alloc_node? */
1932 struct ieee80211com *ic = vap->iv_ic;
1960 return NULL; /* spam bcast probe req to all vap's */
2028 ni = NULL; /* spam bcast probe req to all vap's */
2044 _ieee80211_find_txnode(struct ieee80211vap *vap,
2048 struct ieee80211_node_table *nt = &vap->iv_ic->ic_sta;
2059 if (vap->iv_opmode == IEEE80211_M_STA ||
2060 vap->iv_opmode == IEEE80211_M_WDS ||
2062 ni = ieee80211_ref_node(vap->iv_bss);
2068 if (vap->iv_opmode == IEEE80211_M_IBSS ||
2069 vap->iv_opmode == IEEE80211_M_AHDEMO) {
2080 ni = ieee80211_fakeup_adhoc_node(vap, macaddr);
2084 IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_OUTPUT, macaddr,
2086 vap->iv_stats.is_tx_nonode++;
2112 * NB: careful about referencing the vap as it may be
2118 IEEE80211_DPRINTF(vap, IEEE80211_MSG_NODE,
2124 struct ieee80211vap *vap = ni->ni_vap;
2125 if (vap->iv_aid_bitmap != NULL)
2126 IEEE80211_AID_CLR(vap, ni->ni_associd);
2312 struct ieee80211vap *vap = ni->ni_vap;
2314 if (vap->iv_auth->ia_node_leave != NULL)
2315 vap->iv_auth->ia_node_leave(ni);
2316 if (vap->iv_aid_bitmap != NULL)
2317 IEEE80211_AID_CLR(vap, ni->ni_associd);
2324 * Make a separate pass to clear references to this vap
2326 * because ni_vap will point to the ap vap but we still
2327 * need to clear ni_wdsvap when the WDS vap is destroyed
2360 struct ieee80211vap *vap = ni->ni_vap;
2369 if (vap->iv_state != IEEE80211_S_RUN)
2377 if ((vap->iv_opmode == IEEE80211_M_HOSTAP ||
2378 vap->iv_opmode == IEEE80211_M_STA) &&
2393 IEEE80211_NOTE(vap, IEEE80211_MSG_INACT, ni,
2404 if (ni == vap->iv_bss)
2407 (vap->iv_opmode == IEEE80211_M_IBSS ||
2408 vap->iv_opmode == IEEE80211_M_AHDEMO)) {
2425 if ((vap->iv_flags_ext & IEEE80211_FEXT_INACT) &&
2427 ni->ni_inact <= vap->iv_inact_probe) &&
2429 IEEE80211_NOTE(vap,
2448 if ((vap->iv_flags_ext & IEEE80211_FEXT_INACT) &&
2450 IEEE80211_NOTE(vap,
2471 vap->iv_stats.is_node_timeout++;
2494 struct ieee80211vap *vap;
2505 vap = ni->ni_vap;
2513 if (vap->iv_state != IEEE80211_S_RUN)
2515 /* XXX can vap be NULL? */
2516 if ((vap->iv_opmode == IEEE80211_M_HOSTAP ||
2517 vap->iv_opmode == IEEE80211_M_STA) &&
2540 ieee80211_vap_timeout(struct ieee80211vap *vap)
2543 IEEE80211_LOCK_ASSERT(vap->iv_ic);
2545 ieee80211_vap_erp_timeout(vap);
2546 ieee80211_ht_timeout(vap);
2547 ieee80211_vht_timeout(vap);
2557 struct ieee80211vap *vap;
2574 TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next)
2575 ieee80211_vap_timeout(vap);
2583 * The same as ieee80211_iterate_nodes(), but for one vap only.
2587 struct ieee80211vap *vap, ieee80211_iter_func *f, void *arg)
2612 if (vap != NULL && ni->ni_vap != vap)
2615 ("node array overflow (vap %p, i %d, count %d)\n",
2616 vap, i, count));
2699 struct ieee80211vap *vap;
2703 TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next)
2704 if (vap->iv_opmode == IEEE80211_M_HOSTAP)
2705 ieee80211_beacon_notify(vap, IEEE80211_BEACON_ERP);
2715 struct ieee80211vap *vap = ni->ni_vap;
2727 vap->iv_longslotsta++;
2730 vap->iv_longslotsta);
2740 ieee80211_vap_set_shortslottime(vap, 0);
2749 vap->iv_nonerpsta++;
2752 vap->iv_nonerpsta);
2760 vap->iv_flags |= IEEE80211_F_USEBARKER;
2761 vap->iv_flags &= ~IEEE80211_F_SHPREAMBLE;
2762 ieee80211_vap_update_preamble(vap);
2768 if (vap->iv_protmode != IEEE80211_PROT_NONE &&
2769 vap->iv_nonerpsta == 1 &&
2770 (vap->iv_flags_ext & IEEE80211_FEXT_NONERP_PR) == 0) {
2773 vap->iv_flags |= IEEE80211_F_USEPROT;
2774 ieee80211_vap_update_erp_protmode(vap);
2784 struct ieee80211vap *vap = ni->ni_vap;
2790 KASSERT(vap->iv_aid_bitmap != NULL, ("no aid bitmap"));
2795 for (aid = 1; aid < vap->iv_max_aid; aid++) {
2796 if (!IEEE80211_AID_ISSET(vap, aid))
2799 if (aid >= vap->iv_max_aid) {
2807 IEEE80211_AID_SET(vap, ni->ni_associd);
2808 vap->iv_sta_assoc++;
2826 IEEE80211_NOTE(vap, IEEE80211_MSG_ASSOC | IEEE80211_MSG_DEBUG, ni,
2829 vap->iv_flags & IEEE80211_F_SHPREAMBLE ? "short" : "long",
2830 vap->iv_flags & IEEE80211_F_SHSLOT ? "short" : "long",
2831 vap->iv_flags & IEEE80211_F_USEPROT ? ", protection" : "",
2841 IEEE80211_ATH_CAP(vap, ni, IEEE80211_NODE_FF) ?
2843 IEEE80211_ATH_CAP(vap, ni, IEEE80211_NODE_TURBOP) ?
2854 if (vap->iv_auth->ia_node_join != NULL)
2855 vap->iv_auth->ia_node_join(ni);
2861 disable_protection(struct ieee80211vap *vap)
2863 struct ieee80211com *ic = vap->iv_ic;
2865 KASSERT(vap->iv_nonerpsta == 0 &&
2866 (vap->iv_flags_ext & IEEE80211_FEXT_NONERP_PR) == 0,
2867 ("%d non ERP stations, flags 0x%x", vap->iv_nonerpsta,
2868 vap->iv_flags_ext));
2870 vap->iv_flags &= ~IEEE80211_F_USEPROT;
2873 vap->iv_flags |= IEEE80211_F_SHPREAMBLE;
2874 vap->iv_flags &= ~IEEE80211_F_USEBARKER;
2876 ieee80211_vap_update_erp_protmode(vap);
2877 ieee80211_vap_update_preamble(vap);
2887 struct ieee80211vap *vap = ni->ni_vap;
2899 KASSERT(vap->iv_longslotsta > 0,
2900 ("bogus long slot station count %d", vap->iv_longslotsta));
2901 vap->iv_longslotsta--;
2904 vap->iv_longslotsta);
2908 if (vap->iv_longslotsta == 0) {
2919 ieee80211_vap_set_shortslottime(vap, 1);
2927 KASSERT(vap->iv_nonerpsta > 0,
2928 ("bogus non-ERP station count %d", vap->iv_nonerpsta));
2929 vap->iv_nonerpsta--;
2931 "non-ERP station leaves, count now %d%s", vap->iv_nonerpsta,
2932 (vap->iv_flags_ext & IEEE80211_FEXT_NONERP_PR) ?
2934 if (vap->iv_nonerpsta == 0 &&
2935 (vap->iv_flags_ext & IEEE80211_FEXT_NONERP_PR) == 0) {
2938 disable_protection(vap);
2952 ieee80211_vap_erp_timeout(struct ieee80211vap *vap)
2955 IEEE80211_LOCK_ASSERT(vap->iv_ic);
2957 if ((vap->iv_flags_ext & IEEE80211_FEXT_NONERP_PR) &&
2958 ieee80211_time_after(ticks, vap->iv_lastnonerp + IEEE80211_NONERP_PRESENT_AGE)) {
2959 IEEE80211_DPRINTF(vap, IEEE80211_MSG_ASSOC,
2961 vap->iv_flags_ext &= ~IEEE80211_FEXT_NONERP_PR;
2962 if (vap->iv_nonerpsta == 0)
2963 disable_protection(vap);
2975 struct ieee80211vap *vap = ni->ni_vap;
2978 IEEE80211_NOTE(vap, IEEE80211_MSG_ASSOC | IEEE80211_MSG_DEBUG, ni,
2981 KASSERT(vap->iv_opmode != IEEE80211_M_STA,
2982 ("unexpected operating mode %u", vap->iv_opmode));
2996 if (vap->iv_auth->ia_node_leave != NULL)
2997 vap->iv_auth->ia_node_leave(ni);
3000 IEEE80211_AID_CLR(vap, ni->ni_associd);
3001 vap->iv_sta_assoc--;
3042 struct ieee80211vap *vap = ni->ni_vap;
3048 rssi = vap->iv_ic->ic_node_getrssi(ni);
3059 struct ieee80211vap *vap = ni->ni_vap;
3066 rssi = vap->iv_ic->ic_node_getrssi(ni);
3078 struct ieee80211vap *vap = ni->ni_vap;
3084 rssi = vap->iv_ic->ic_node_getrssi(ni);
3093 ieee80211_getrssi(struct ieee80211vap *vap)
3096 struct ieee80211com *ic = vap->iv_ic;
3101 switch (vap->iv_opmode) {
3104 ieee80211_iterate_nodes_vap(&ic->ic_sta, vap, get_adhoc_rssi,
3108 ieee80211_iterate_nodes_vap(&ic->ic_sta, vap, get_hostap_rssi,
3113 ieee80211_iterate_nodes_vap(&ic->ic_sta, vap, get_mesh_rssi,
3120 if (vap->iv_bss != NULL)
3121 info.rssi_total = ic->ic_node_getrssi(vap->iv_bss);
3130 ieee80211_getsignal(struct ieee80211vap *vap, int8_t *rssi, int8_t *noise)
3133 if (vap->iv_bss == NULL) /* NB: shouldn't happen */
3135 vap->iv_ic->ic_node_getsignal(vap->iv_bss, rssi, noise);
3137 if (vap->iv_opmode != IEEE80211_M_STA)
3138 *rssi = ieee80211_getrssi(vap);