Lines Matching refs:vap

119 static void wi_vap_delete(struct ieee80211vap *vap);
491 struct ieee80211vap *vap;
497 vap = &wvp->wv_vap;
498 ieee80211_vap_setup(ic, vap, name, unit, opmode, flags, bssid);
500 vap->iv_max_aid = WI_MAX_AID;
505 wvp->wv_newstate = vap->iv_newstate;
506 vap->iv_newstate = wi_newstate_sta;
508 wvp->wv_recv_mgmt = vap->iv_recv_mgmt;
509 vap->iv_recv_mgmt = wi_recv_mgmt;
513 wvp->wv_newstate = vap->iv_newstate;
514 vap->iv_newstate = wi_newstate_sta;
521 wvp->wv_newstate = vap->iv_newstate;
522 vap->iv_newstate = wi_newstate_hostap;
532 ieee80211_vap_attach(vap, ieee80211_media_change, wi_media_status, mac);
534 return vap;
538 wi_vap_delete(struct ieee80211vap *vap)
540 struct wi_vap *wvp = WI_VAP(vap);
542 ieee80211_vap_detach(vap);
767 struct ieee80211vap *vap = ni->ni_vap;
776 WI_VAP(vap)->wv_recv_mgmt(ni, m, subtype, rxs, rssi, nf);
780 wi_newstate_sta(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg)
782 struct ieee80211com *ic = vap->iv_ic;
787 ieee80211_state_name[vap->iv_state],
792 wi_setup_locked(sc, WI_PORTTYPE_BSS, 3, vap->iv_myaddr);
794 if (vap->iv_flags & IEEE80211_F_PMGTON) {
798 wi_write_val(sc, WI_RID_RTS_THRESH, vap->iv_rtsthreshold);
801 vap->iv_fragthreshold);
802 wi_write_txrate(sc, vap);
804 bss = vap->iv_bss;
811 wi_write_wep(sc, vap);
816 (vap->iv_flags & IEEE80211_F_WPA)) {
818 if (vap->iv_appie_wpa != NULL)
820 vap->iv_appie_wpa);
842 vap->iv_state = nstate;
845 return WI_VAP(vap)->wv_newstate(vap, nstate, arg);
849 wi_newstate_hostap(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg)
851 struct ieee80211com *ic = vap->iv_ic;
857 ieee80211_state_name[vap->iv_state],
860 error = WI_VAP(vap)->wv_newstate(vap, nstate, arg);
863 wi_setup_locked(sc, WI_PORTTYPE_HOSTAP, 0, vap->iv_myaddr);
865 bss = vap->iv_bss;
872 wi_write_txrate(sc, vap);
875 wi_write_val(sc, WI_RID_DTIM_PERIOD, vap->iv_dtim_period);
877 wi_write_val(sc, WI_RID_RTS_THRESH, vap->iv_rtsthreshold);
880 vap->iv_fragthreshold);
883 (vap->iv_flags & IEEE80211_F_HIDESSID)) {
892 (vap->iv_flags & IEEE80211_F_WPA) &&
893 vap->iv_appie_wpa != NULL)
894 wi_write_appie(sc, WI_RID_WPA_DATA, vap->iv_appie_wpa);
900 wi_write_wep(sc, vap);
1038 struct ieee80211vap *vap = ni->ni_vap;
1077 if (ieee80211_radiotap_active_vap(vap)) {
1079 ieee80211_radiotap_tx(vap, m0);
1192 struct ieee80211vap *vap = ifp->if_softc;
1193 struct ieee80211com *ic = vap->iv_ic;
1214 vap->iv_bss->ni_txrate = rate;
1223 struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
1224 struct ieee80211_node *ni = vap->iv_bss;
1436 struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
1450 if (vap == NULL)
1455 if (vap->iv_state == IEEE80211_S_RUN &&
1456 vap->iv_opmode != IEEE80211_M_IBSS)
1461 vap->iv_bss->ni_associd = 1 | 0xc000; /* NB: anything will do */
1462 ieee80211_new_state(vap, IEEE80211_S_RUN, 0);
1470 vap->iv_bss->ni_associd = 0;
1471 vap->iv_stats.is_rx_deauth++;
1472 ieee80211_new_state(vap, IEEE80211_S_SCAN, 0);
1476 /* XXX does this need to be per-vap? */
1480 if (vap->iv_opmode == IEEE80211_M_STA)
1481 ieee80211_new_state(vap, IEEE80211_S_SCAN,
1513 struct ieee80211vap *vap;
1525 TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) {
1529 ifp = vap->iv_ifp;
1660 wi_write_txrate(struct wi_softc *sc, struct ieee80211vap *vap)
1678 struct ieee80211com *ic = vap->iv_ic;
1681 tp = &vap->iv_txparms[ieee80211_chan2mode(ic->ic_bsschan)];
1688 wi_write_wep(struct wi_softc *sc, struct ieee80211vap *vap)
1697 val = (vap->iv_flags & IEEE80211_F_PRIVACY) ? 1 : 0;
1701 if ((vap->iv_flags & IEEE80211_F_PRIVACY) == 0)
1703 error = wi_write_val(sc, WI_RID_TX_CRYPT_KEY, vap->iv_def_txkey);
1708 keylen = vap->iv_nw_keys[i].wk_keylen;
1710 memcpy(wkey[i].wi_keydat, vap->iv_nw_keys[i].wk_key,
1720 if (vap->iv_flags & IEEE80211_F_PRIVACY) {
1735 vap->iv_bss->ni_authmode);
1746 error = wi_write_val(sc, WI_RID_P2_TX_CRYPT_KEY, vap->iv_def_txkey);