Lines Matching refs:vap

62 null_key_alloc(struct ieee80211vap *vap, struct ieee80211_key *k,  in null_key_alloc()  argument
66 if (!ieee80211_is_key_global(vap, k)) { in null_key_alloc()
81 *keyix = ieee80211_crypto_get_key_wepidx(vap, k); in null_key_alloc()
87 null_key_delete(struct ieee80211vap *vap, const struct ieee80211_key *k) in null_key_delete() argument
92 null_key_set(struct ieee80211vap *vap, const struct ieee80211_key *k) in null_key_set() argument
96 static void null_key_update(struct ieee80211vap *vap) {} in null_key_update() argument
108 cipher_attach(struct ieee80211vap *vap, struct ieee80211_key *key) in cipher_attach() argument
110 return key->wk_cipher->ic_attach(vap, key); in cipher_attach()
117 dev_key_alloc(struct ieee80211vap *vap, in dev_key_alloc() argument
121 return vap->iv_key_alloc(vap, key, keyix, rxkeyix); in dev_key_alloc()
125 dev_key_delete(struct ieee80211vap *vap, in dev_key_delete() argument
128 return vap->iv_key_delete(vap, key); in dev_key_delete()
132 dev_key_set(struct ieee80211vap *vap, const struct ieee80211_key *key) in dev_key_set() argument
134 return vap->iv_key_set(vap, key); in dev_key_set()
227 ieee80211_crypto_vattach(struct ieee80211vap *vap) in ieee80211_crypto_vattach() argument
232 vap->iv_max_keyix = IEEE80211_WEP_NKID; in ieee80211_crypto_vattach()
233 vap->iv_def_txkey = IEEE80211_KEYIX_NONE; in ieee80211_crypto_vattach()
235 ieee80211_crypto_resetkey(vap, &vap->iv_nw_keys[i], in ieee80211_crypto_vattach()
241 vap->iv_key_alloc = null_key_alloc; in ieee80211_crypto_vattach()
242 vap->iv_key_set = null_key_set; in ieee80211_crypto_vattach()
243 vap->iv_key_delete = null_key_delete; in ieee80211_crypto_vattach()
244 vap->iv_key_update_begin = null_key_update; in ieee80211_crypto_vattach()
245 vap->iv_key_update_end = null_key_update; in ieee80211_crypto_vattach()
252 ieee80211_crypto_vdetach(struct ieee80211vap *vap) in ieee80211_crypto_vdetach() argument
254 ieee80211_crypto_delglobalkeys(vap); in ieee80211_crypto_vdetach()
337 ieee80211_crypto_newkey(struct ieee80211vap *vap, in ieee80211_crypto_newkey() argument
340 struct ieee80211com *ic = vap->iv_ic; in ieee80211_crypto_newkey()
346 IEEE80211_DPRINTF(vap, IEEE80211_MSG_CRYPTO, in ieee80211_crypto_newkey()
354 IEEE80211_DPRINTF(vap, IEEE80211_MSG_CRYPTO, in ieee80211_crypto_newkey()
356 vap->iv_stats.is_crypto_badcipher++; in ieee80211_crypto_newkey()
367 IEEE80211_DPRINTF(vap, IEEE80211_MSG_CRYPTO, in ieee80211_crypto_newkey()
378 IEEE80211_DPRINTF(vap, IEEE80211_MSG_CRYPTO, in ieee80211_crypto_newkey()
381 vap->iv_stats.is_crypto_nocipher++; in ieee80211_crypto_newkey()
395 IEEE80211_DPRINTF(vap, IEEE80211_MSG_CRYPTO, in ieee80211_crypto_newkey()
409 IEEE80211_DPRINTF(vap, IEEE80211_MSG_CRYPTO, in ieee80211_crypto_newkey()
412 vap->iv_stats.is_crypto_swcipherfail++; in ieee80211_crypto_newkey()
422 IEEE80211_DPRINTF(vap, IEEE80211_MSG_CRYPTO, in ieee80211_crypto_newkey()
442 keyctx = cip->ic_attach(vap, key); in ieee80211_crypto_newkey()
444 IEEE80211_DPRINTF(vap, IEEE80211_MSG_CRYPTO, in ieee80211_crypto_newkey()
448 vap->iv_stats.is_crypto_attachfail++; in ieee80211_crypto_newkey()
465 if (!dev_key_alloc(vap, key, &keyix, &rxkeyix)) { in ieee80211_crypto_newkey()
469 vap->iv_stats.is_crypto_keyfail++; in ieee80211_crypto_newkey()
470 IEEE80211_DPRINTF(vap, IEEE80211_MSG_CRYPTO, in ieee80211_crypto_newkey()
482 IEEE80211_DPRINTF(vap, IEEE80211_MSG_CRYPTO, in ieee80211_crypto_newkey()
487 keyctx = cip->ic_attach(vap, key); in ieee80211_crypto_newkey()
489 IEEE80211_DPRINTF(vap, IEEE80211_MSG_CRYPTO, in ieee80211_crypto_newkey()
494 vap->iv_stats.is_crypto_attachfail++; in ieee80211_crypto_newkey()
512 _ieee80211_crypto_delkey(struct ieee80211vap *vap, struct ieee80211_key *key) in _ieee80211_crypto_delkey() argument
516 IEEE80211_DPRINTF(vap, IEEE80211_MSG_CRYPTO, in _ieee80211_crypto_delkey()
528 if (!dev_key_delete(vap, key)) { in _ieee80211_crypto_delkey()
529 IEEE80211_DPRINTF(vap, IEEE80211_MSG_CRYPTO, in _ieee80211_crypto_delkey()
532 vap->iv_stats.is_crypto_delkey++; in _ieee80211_crypto_delkey()
538 ieee80211_crypto_resetkey(vap, key, IEEE80211_KEYIX_NONE); in _ieee80211_crypto_delkey()
546 ieee80211_crypto_delkey(struct ieee80211vap *vap, struct ieee80211_key *key) in ieee80211_crypto_delkey() argument
550 ieee80211_key_update_begin(vap); in ieee80211_crypto_delkey()
551 status = _ieee80211_crypto_delkey(vap, key); in ieee80211_crypto_delkey()
552 ieee80211_key_update_end(vap); in ieee80211_crypto_delkey()
560 ieee80211_crypto_delglobalkeys(struct ieee80211vap *vap) in ieee80211_crypto_delglobalkeys() argument
564 ieee80211_key_update_begin(vap); in ieee80211_crypto_delglobalkeys()
566 (void) _ieee80211_crypto_delkey(vap, &vap->iv_nw_keys[i]); in ieee80211_crypto_delglobalkeys()
567 ieee80211_key_update_end(vap); in ieee80211_crypto_delglobalkeys()
578 ieee80211_crypto_setkey(struct ieee80211vap *vap, struct ieee80211_key *key) in ieee80211_crypto_setkey() argument
584 IEEE80211_DPRINTF(vap, IEEE80211_MSG_CRYPTO, in ieee80211_crypto_setkey()
593 IEEE80211_DPRINTF(vap, IEEE80211_MSG_CRYPTO, in ieee80211_crypto_setkey()
596 vap->iv_stats.is_crypto_setkey_nokey++; in ieee80211_crypto_setkey()
604 IEEE80211_DPRINTF(vap, IEEE80211_MSG_CRYPTO, in ieee80211_crypto_setkey()
608 vap->iv_stats.is_crypto_setkey_cipher++; in ieee80211_crypto_setkey()
611 return dev_key_set(vap, key); in ieee80211_crypto_setkey()
621 ieee80211_crypto_get_key_wepidx(const struct ieee80211vap *vap, in ieee80211_crypto_get_key_wepidx() argument
625 if (ieee80211_is_key_global(vap, k)) { in ieee80211_crypto_get_key_wepidx()
626 return (k - vap->iv_nw_keys); in ieee80211_crypto_get_key_wepidx()
635 ieee80211_crypto_get_keyid(struct ieee80211vap *vap, struct ieee80211_key *k) in ieee80211_crypto_get_keyid() argument
637 if (ieee80211_is_key_global(vap, k)) { in ieee80211_crypto_get_keyid()
638 return (k - vap->iv_nw_keys); in ieee80211_crypto_get_keyid()
647 struct ieee80211vap *vap = ni->ni_vap; in ieee80211_crypto_get_txkey() local
663 if (vap->iv_def_txkey == IEEE80211_KEYIX_NONE) { in ieee80211_crypto_get_txkey()
664 IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_CRYPTO, in ieee80211_crypto_get_txkey()
667 __func__, vap->iv_def_txkey); in ieee80211_crypto_get_txkey()
668 vap->iv_stats.is_tx_nodefkey++; in ieee80211_crypto_get_txkey()
671 return &vap->iv_nw_keys[vap->iv_def_txkey]; in ieee80211_crypto_get_txkey()
708 struct ieee80211vap *vap = ni->ni_vap; in ieee80211_crypto_decap() local
737 IEEE80211_DPRINTF(vap, IEEE80211_MSG_ANY, in ieee80211_crypto_decap()
740 vap->iv_stats.is_rx_tooshort++; /* XXX need unique stat? */ in ieee80211_crypto_decap()
755 k = &vap->iv_nw_keys[keyid >> 6]; in ieee80211_crypto_decap()
765 IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_CRYPTO, wh->i_addr2, in ieee80211_crypto_decap()
768 vap->iv_stats.is_rx_tooshort++; in ieee80211_crypto_decap()
810 ieee80211_crypto_demic(struct ieee80211vap *vap, struct ieee80211_key *k, in ieee80211_crypto_demic() argument
833 ieee80211_notify_michael_failure(vap, wh, in ieee80211_crypto_demic()
864 struct ieee80211vap *vap = ni->ni_vap; in load_ucastkey() local
867 if (vap->iv_state != IEEE80211_S_RUN) in load_ucastkey()
871 dev_key_set(vap, k); in load_ucastkey()
882 struct ieee80211vap *vap; in ieee80211_crypto_reload_keys() local
889 TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) { in ieee80211_crypto_reload_keys()
890 if (vap->iv_state != IEEE80211_S_RUN) in ieee80211_crypto_reload_keys()
893 const struct ieee80211_key *k = &vap->iv_nw_keys[i]; in ieee80211_crypto_reload_keys()
895 dev_key_set(vap, k); in ieee80211_crypto_reload_keys()
911 ieee80211_crypto_set_deftxkey(struct ieee80211vap *vap, ieee80211_keyix kid) in ieee80211_crypto_set_deftxkey() argument
916 vap->iv_update_deftxkey(vap, kid); in ieee80211_crypto_set_deftxkey()