Lines Matching refs:vap

86 wds_vdetach(struct ieee80211vap *vap)
88 if (vap->iv_bss != NULL) {
90 if (vap->iv_bss->ni_wdsvap == vap)
91 vap->iv_bss->ni_wdsvap = NULL;
96 wds_vattach(struct ieee80211vap *vap)
98 vap->iv_newstate = wds_newstate;
99 vap->iv_input = wds_input;
100 vap->iv_recv_mgmt = wds_recv_mgmt;
101 vap->iv_opdetach = wds_vdetach;
127 ieee80211_create_wds(struct ieee80211vap *vap, struct ieee80211_channel *chan)
129 struct ieee80211com *ic = vap->iv_ic;
133 IEEE80211_DPRINTF(vap, IEEE80211_MSG_WDS,
135 ether_sprintf(vap->iv_des_bssid), ieee80211_chan2ieee(ic, chan));
137 /* NB: vap create must specify the bssid for the link */
138 KASSERT(vap->iv_flags & IEEE80211_F_DESBSSID, ("no bssid"));
140 KASSERT(vap->iv_state == IEEE80211_S_RUN, ("!RUN state"));
142 if ((vap->iv_flags_ext & IEEE80211_FEXT_WDSLEGACY) == 0) {
145 * station specified by the desired bssid setup at vap
146 * create. Point ni_wdsvap at the WDS vap so 4-address
147 * frames received through the associated AP vap will
149 * they arrived on the WDS vap.
153 ni = ieee80211_find_node_locked(&ic->ic_sta, vap->iv_des_bssid);
159 * the vap to be destroyed.
161 IEEE80211_DPRINTF(vap, IEEE80211_MSG_WDS,
163 __func__, ether_sprintf(vap->iv_des_bssid));
167 * Node already setup with a WDS vap; we cannot
173 IEEE80211_DPRINTF(vap, IEEE80211_MSG_WDS,
175 __func__, ether_sprintf(vap->iv_des_bssid),
182 obss = vap->iv_bss;
183 vap->iv_bss = ni;
184 ni->ni_wdsvap = vap;
193 * Legacy WDS vap setup.
197 * create a new node and install it as the vap's
202 ni = ieee80211_node_create_wds(vap, vap->iv_des_bssid, chan);
204 obss = vap->iv_bss;
205 vap->iv_bss = ieee80211_ref_node(ni);
213 if (vap->iv_auth->ia_node_join != NULL)
214 vap->iv_auth->ia_node_join(ni);
232 * Propagate multicast frames of an ap vap to all DWDS links.
241 struct ieee80211vap *vap;
250 TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) {
252 if (vap->iv_opmode != IEEE80211_M_WDS ||
253 (vap->iv_flags_ext & IEEE80211_FEXT_WDSLEGACY))
256 ifp = vap->iv_ifp;
268 ni = ieee80211_find_txnode(vap, eh->ether_dhost);
277 IEEE80211_DISCARD_MAC(vap,
281 vap->iv_stats.is_tx_classify++;
294 mcopy = ieee80211_encap(vap, ni, mcopy);
318 * to plumb the necessary WDS vap for this station. Frames
319 * received prior to the vap set running will then be reprocessed
333 * XXX per/vap beacon interval?
343 * IEEE80211_M_WDS vap state machine handler.
346 wds_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg)
348 struct ieee80211com *ic = vap->iv_ic;
354 ostate = vap->iv_state;
355 IEEE80211_DPRINTF(vap, IEEE80211_MSG_STATE, "%s: %s -> %s\n", __func__,
357 vap->iv_state = nstate; /* state transition */
358 callout_stop(&vap->iv_mgtsend); /* XXX callout_drain */
360 ieee80211_cancel_scan(vap); /* background scan */
366 ieee80211_cancel_scan(vap);
373 ieee80211_reset_bss(vap);
379 ieee80211_check_scan_current(vap);
391 error = ieee80211_create_wds(vap, ic->ic_curchan);
414 struct ieee80211vap *vap = ni->ni_vap;
416 struct ifnet *ifp = vap->iv_ifp;
455 IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_ANY,
458 vap->iv_stats.is_rx_tooshort++;
474 IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_ANY,
477 vap->iv_stats.is_rx_badversion++;
485 /* NB: WDS vap's do not scan */
487 IEEE80211_DISCARD_MAC(vap,
490 vap->iv_stats.is_rx_tooshort++;
494 if (!IEEE80211_ADDR_EQ(wh->i_addr1, vap->iv_myaddr) &&
497 IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_INPUT,
499 vap->iv_stats.is_rx_wrongbss++;
517 IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_ANY,
520 vap->iv_stats.is_rx_tooshort++;
524 IEEE80211_DISCARD(vap, IEEE80211_MSG_INPUT,
526 vap->iv_stats.is_rx_wrongdir++;
532 if ((vap->iv_flags_ext & IEEE80211_FEXT_WDSLEGACY) == 0) {
533 IEEE80211_DISCARD(vap, IEEE80211_MSG_INPUT,
535 vap->iv_stats.is_rx_wrongdir++;/*XXX*/
560 if ((vap->iv_flags & IEEE80211_F_PRIVACY) == 0) {
564 IEEE80211_DISCARD(vap, IEEE80211_MSG_INPUT,
566 vap->iv_stats.is_rx_noprivacy++;
606 if (!ieee80211_crypto_demic(vap, key, m, 0)) {
607 IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_INPUT,
609 vap->iv_stats.is_rx_demicfail++;
615 if (ieee80211_radiotap_active_vap(vap))
616 ieee80211_radiotap_rx(vap, m);
622 m = ieee80211_decap(vap, m, hdrspace);
629 IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_INPUT,
631 vap->iv_stats.is_rx_decap++;
646 IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_INPUT,
650 vap->iv_stats.is_rx_unauth++;
659 if ((vap->iv_flags & IEEE80211_F_DROPUNENC) &&
666 vap->iv_stats.is_rx_unencrypted++;
678 m = ieee80211_decap_fastframe(vap, ni, m);
683 ieee80211_deliver_data(vap, ni, m);
687 vap->iv_stats.is_rx_mgmt++;
690 IEEE80211_DISCARD(vap, IEEE80211_MSG_INPUT,
692 vap->iv_stats.is_rx_wrongdir++;
696 IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_ANY,
699 vap->iv_stats.is_rx_tooshort++;
703 if (ieee80211_msg_debug(vap) || ieee80211_msg_dumppkts(vap)) {
710 IEEE80211_DISCARD(vap, IEEE80211_MSG_INPUT,
712 vap->iv_stats.is_rx_mgtdiscard++; /* XXX */
715 vap->iv_recv_mgmt(ni, m, subtype, rxs, rssi, nf);
719 vap->iv_stats.is_rx_ctl++;
724 IEEE80211_DISCARD(vap, IEEE80211_MSG_ANY,
733 if (need_tap && ieee80211_radiotap_active_vap(vap))
734 ieee80211_radiotap_rx(vap, m);
744 struct ieee80211vap *vap = ni->ni_vap;
755 if (ni == vap->iv_bss) {
756 IEEE80211_DISCARD(vap, IEEE80211_MSG_INPUT,
758 vap->iv_stats.is_rx_mgtdiscard++;
759 } else if (!IEEE80211_ADDR_EQ(vap->iv_myaddr, wh->i_addr1)) {
761 IEEE80211_DISCARD(vap, IEEE80211_MSG_INPUT,
763 vap->iv_stats.is_rx_mgtdiscard++;
764 } else if (vap->iv_state != IEEE80211_S_RUN) {
765 IEEE80211_DISCARD(vap, IEEE80211_MSG_INPUT,
767 ieee80211_state_name[vap->iv_state]);
768 vap->iv_stats.is_rx_mgtdiscard++;
787 IEEE80211_DISCARD(vap, IEEE80211_MSG_INPUT,
789 vap->iv_stats.is_rx_mgtdiscard++;
793 IEEE80211_DISCARD(vap, IEEE80211_MSG_ANY,
795 vap->iv_stats.is_rx_badsubtype++;