42#include <sys/malloc.h>
43#include <sys/kernel.h>
45#include <sys/socket.h>
46#include <sys/sockio.h>
47#include <sys/endian.h>
50#include <sys/sysctl.h>
53#include <net/if_var.h>
54#include <net/if_media.h>
55#include <net/if_llc.h>
56#include <net/ethernet.h>
63#ifdef IEEE80211_SUPPORT_SUPERG
70#define IEEE80211_RATE2MBS(r) (((r) & IEEE80211_RATE_VAL) / 2)
131 "%s: inact %u", __func__, ni->
ni_inact);
310#ifdef IEEE80211_DEBUG
311 if (ieee80211_msg_debug(vap)) {
314 "synchronized with %s ssid ",
319 printf(
" channel %d start %uMb\n",
363 struct ether_header *eh = mtod(m,
struct ether_header *);
364 struct ifnet *ifp = vap->
iv_ifp;
367 m->m_flags &= ~(M_MCAST | M_BCAST);
375 if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1);
378 if (ETHER_IS_MULTICAST(eh->ether_dhost)) {
379 m->m_flags |= M_MCAST;
386 struct mbuf *mcopy = NULL;
388 if (m->m_flags & M_MCAST) {
389 mcopy = m_dup(m, M_NOWAIT);
391 if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
393 mcopy->m_flags |= M_MCAST;
429 m->m_pkthdr.rcvif = ifp;
430 if (m->m_flags & M_MCAST) {
439 m->m_pkthdr.ether_vtag = ni->
ni_vlan;
440 m->m_flags |= M_VLANTAG;
442 ifp->if_input(ifp, m);
480 struct ifnet *ifp = vap->
iv_ifp;
483 struct ether_header *eh;
484 int hdrspace, need_tap = 1;
485 uint8_t dir, type, subtype, qos;
487 int is_hw_decrypted = 0;
488 int has_decrypted = 0;
515 KASSERT(ni != NULL, (
"null node"));
523 "too short (1): len %u", m->m_pkthdr.len);
538 ni->
ni_macaddr, NULL,
"wrong version, fc %02x:%02x",
556 NULL,
"too short (2): len %u",
572 bssid, NULL,
"%s",
"not to bss");
592 if (m->m_len < hdrspace &&
593 (m = m_pullup(m, hdrspace)) == NULL) {
596 "data too short: expecting %u", hdrspace);
606 "incorrect dir 0x%x", dir);
612 "%s",
"DWDS not enabled");
620 wh,
"data",
"%s",
"unknown src");
629 wh,
"data",
"%s",
"unassoc src");
656 "%s",
"unauthorized port");
692 wh,
"WEP",
"%s",
"PRIVACY off");
703 wh->
i_fc[1] &= ~IEEE80211_FC1_PROTECTED;
761 eh = mtod(m,
struct ether_header *);
774 eh->ether_type != htons(ETHERTYPE_PAE)) {
777 "unknown port: ether type 0x%x len %u",
778 eh == NULL ? -1 : eh->ether_type,
790 ((has_decrypted == 0) && (m->m_flags &
M_WEP) == 0) &&
791 (is_hw_decrypted == 0) &&
793 eh->ether_type != htons(ETHERTYPE_PAE))) {
808#ifdef IEEE80211_SUPPORT_SUPERG
825 wh,
"mgt",
"incorrect dir 0x%x", dir);
839 wh, NULL,
"source is multicast: %s",
844#ifdef IEEE80211_DEBUG
845 if ((ieee80211_msg_debug(vap) &&
doprint(vap, subtype)) ||
847 if_printf(ifp,
"received %s from %s rssi %d\n",
849 ether_sprintf(wh->
i_addr2), rssi);
860 "%s",
"WEP set but not permitted");
869 wh, NULL,
"%s",
"WEP set but PRIVACY off");
879 wh->
i_fc[1] &= ~IEEE80211_FC1_PROTECTED;
900 wh,
"bad",
"frame type 0x%x", type);
905 if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
917 int rssi,
int nf, uint16_t seq, uint16_t status)
966 if (vap->
iv_acl != NULL &&
977 "%s",
"station authentication defered (radius acl)");
983 "%s",
"station authenticated (open)");
995 uint8_t *frm, uint8_t *efrm,
int rssi,
int nf,
996 uint16_t seq, uint16_t status)
1015 "%s",
" PRIVACY is disabled");
1035 if (frm + 1 < efrm) {
1036 if ((frm[1] + 2) > (efrm - frm)) {
1039 "ie %d/%d too long",
1040 frm[0], (frm[1] + 2) - (efrm - frm));
1052 if (challenge == NULL) {
1055 "%s",
"no challenge");
1063 "bad challenge len %d", challenge[1]);
1074#ifdef IEEE80211_DEBUG
1084#ifdef IEEE80211_DEBUG
1090#ifdef IEEE80211_DEBUG
1114 ni,
"shared key %sauth request", allocbs ?
"" :
"re");
1122 if (vap->
iv_acl != NULL &&
1127 "%s",
"station authentication defered (radius acl)");
1137 "%s",
"unknown station");
1144 "%s",
"no challenge recorded");
1150 challenge[1]) != 0) {
1153 "%s",
"challenge mismatch");
1159 ni,
"%s",
"station authenticated (shared key)");
1179 (seq + 1) | (estatus<<16));
1190#define WPA_SEL(x) (((x)<<24)|WPA_OUI)
1191 uint32_t w = le32dec(sel);
1199 *keylen = 40 / NBBY;
1204 *keylen = 104 / NBBY;
1228#define WPA_SEL(x) (((x)<<24)|WPA_OUI)
1229 uint32_t w = le32dec(sel);
1253 uint8_t len = frm[1];
1265 wh,
"WPA",
"not WPA, flags 0x%x", vap->
iv_flags);
1271 wh,
"WPA",
"too short, len %u", len);
1280 wh,
"WPA",
"bad version %u", w);
1285 memset(rsn, 0,
sizeof(*rsn));
1292 wh,
"WPA",
"unknown mcast cipher suite %08X",
1304 wh,
"WPA",
"ucast cipher data too short; len %u, n %u",
1309 for (; n > 0; n--) {
1321 wh,
"WPA",
"no usable pairwise cipher suite found (w=%d)",
1337 wh,
"WPA",
"key mgmt alg data too short; len %u, n %u",
1342 for (; n > 0; n--) {
1365#define RSN_SEL(x) (((x)<<24)|RSN_OUI)
1366 uint32_t w = le32dec(sel);
1374 *keylen = 40 / NBBY;
1379 *keylen = 104 / NBBY;
1406#define RSN_SEL(x) (((x)<<24)|RSN_OUI)
1407 uint32_t w = le32dec(sel);
1430 uint8_t len = frm[1];
1442 wh,
"WPA",
"not RSN, flags 0x%x", vap->
iv_flags);
1449 wh,
"RSN",
"too short, len %u", len);
1457 wh,
"RSN",
"bad version %u", w);
1462 memset(rsn, 0,
sizeof(*rsn));
1469 wh,
"RSN",
"unknown mcast cipher suite %08X",
1476 wh,
"RSN",
"invalid mcast cipher suite %d",
1488 wh,
"RSN",
"ucast cipher data too short; len %u, n %u",
1494 for (; n > 0; n--) {
1516 wh,
"RSN",
"no usable pairwise cipher suite found (w=%d)",
1527 wh,
"RSN",
"key mgmt alg data too short; len %u, n %u",
1532 for (; n > 0; n--) {
1555 const uint8_t *rsn, uint16_t capinfo)
1562 if (wpa == NULL && rsn == NULL) {
1582 wh, NULL,
"%s",
"no WPA/RSN IE in association request");
1591 badwparsn = (wpa == NULL);
1594 badwparsn = (rsn == NULL);
1597 badwparsn = (wpa == NULL && rsn == NULL);
1603 "%s",
"missing WPA/RSN IE in association request");
1622 "%s ie: mc %u/%u uc %u/%u key %u caps 0x%x",
1623 wpa != NULL ?
"WPA" :
"RSN",
1652 struct ifnet *ifp = vap->
iv_ifp;
1655 struct ether_header *eh;
1657 m = m_gethdr(M_NOWAIT, MT_DATA);
1660 "%s",
"no mbuf for l2uf frame");
1670 eh->ether_type = htons(
sizeof(*l2uf) -
sizeof(*eh));
1675 l2uf->
xid[0] = 0x81;
1676 l2uf->
xid[1] = 0x80;
1677 l2uf->
xid[2] = 0x00;
1679 m->m_pkthdr.len = m->m_len =
sizeof(*l2uf);
1685 int reassoc,
int resp,
const char *tag,
int rate)
1688 "deny %s request, %s rate set mismatch, rate/MCS %d",
1696 int reassoc,
int resp,
const char *tag,
int capinfo)
1701 "deny %s request, %s mismatch 0x%x",
1702 reassoc ?
"reassoc" :
"assoc", tag, capinfo);
1710 int reassoc,
int resp)
1713 "deny %s request, %s missing HT ie", reassoc ?
"reassoc" :
"assoc");
1721 int algo,
int seq,
int status)
1726 wh, NULL,
"unsupported alg %d", algo);
1729 seq | (status << 16));
1744 static const uint32_t brates = (1<<2*1)|(1<<2*2)|(1<<11)|(1<<2*11);
1748 if (xrates != NULL || rates == NULL)
1750 for (i = 0; i < rates[1]; i++) {
1752 if (r > 2*11 || ((1<<r) & brates) == 0)
1765 uint8_t *frm, *efrm, *sfrm;
1766 uint8_t *ssid, *rates, *xrates, *wpa, *rsn, *wme, *ath, *htcap;
1767 uint8_t *vhtcap, *vhtinfo;
1772 frm = (uint8_t *)&wh[1];
1773 efrm = mtod(m0, uint8_t *) + m0->m_len;
1830 ((scan.
erp & 0x100) == 0 ||
1841 "non-ERP present on channel %d "
1842 "(saw erp 0x%x from channel %d), "
1843 "enable use of protection",
1866 if (scan.
htinfo == NULL) {
1890 wh, NULL,
"%s",
"disallowed by ACL");
1901 while (efrm - frm > 1) {
1925 "%s",
"no ssid with ssid suppression enabled");
1932 "%s",
"recv probe req");
1944 uint16_t algo, seq,
status;
1952 wh, NULL,
"%s",
"wrong bssid");
1964 algo = le16toh(*(uint16_t *)frm);
1965 seq = le16toh(*(uint16_t *)(frm + 2));
1966 status = le16toh(*(uint16_t *)(frm + 4));
1968 "recv auth frame with algorithm %d seq %d", algo, seq);
1974 wh, NULL,
"%s",
"disallowed by ACL");
1984 wh, NULL,
"%s",
"TKIP countermeasures enabled");
2028 wh, NULL,
"%s",
"wrong bssid");
2041 "deny %s request, sta not authenticated",
2042 reassoc ?
"reassoc" :
"assoc");
2063 capinfo = le16toh(*(uint16_t *)frm); frm += 2;
2064 lintval = le16toh(*(uint16_t *)frm); frm += 2;
2067 ssid = rates = xrates = wpa = rsn = wme = ath = htcap = NULL;
2068 vhtcap = vhtinfo = NULL;
2070 while (efrm - frm > 1) {
2099#ifdef IEEE80211_SUPPORT_SUPERG
2117 if (htcap != NULL) {
2126 if (vhtcap != NULL) {
2131 if (vhtinfo != NULL) {
2148 "capability", capinfo);
2158 "slot time", capinfo);
2191 printf(
"%s: VHT TODO!\n", __func__);
2218#ifdef IEEE80211_SUPPORT_SUPERG
2234 "disallow HT use because WEP or TKIP requested, "
2235 "capinfo 0x%x ucastcipher %d", capinfo,
2238#ifdef IEEE80211_SUPPORT_SUPERG
2264#define setie(_ie, _off) ieee80211_ies_setie(ni->ni_ies, _ie, _off)
2266 setie(wpa_ie, wpa - sfrm);
2268 setie(rsn_ie, rsn - sfrm);
2270 setie(htcap_ie, htcap - sfrm);
2272 setie(wme_ie, wme - sfrm);
2283 ~IEEE80211_NODE_UAPSD;
2289#ifdef IEEE80211_SUPPORT_SUPERG
2291 setie(ath_ie, ath - sfrm);
2301 ni->
ni_flags &= ~IEEE80211_NODE_QOS;
2302 ni->
ni_flags &= ~IEEE80211_NODE_UAPSD;
2312#ifdef IEEE80211_DEBUG
2327#ifdef IEEE80211_DEBUG
2328 reason = le16toh(*(uint16_t *)frm);
2338 "recv %s (reason: %d (%s))",
2350 wh, NULL,
"%s",
"unknown node");
2355 wh, NULL,
"%s",
"not for us");
2359 wh, NULL,
"wrong state %s",
2373 wh, NULL,
"%s",
"not handled");
2379 wh,
"mgt",
"subtype 0x%x not handled", subtype);
2416 "%s",
"unassociated station");
2423 aid = le16toh(*(uint16_t *)wh->
i_dur);
2428 "aid mismatch: sta aid 0x%x poll aid 0x%x",
2446 "%s",
"recv ps-poll, but queue empty");
2460 "recv ps-poll, send packet, %u still queued", qlen);
2464 "%s",
"recv ps-poll, send packet, queue empty");
#define IEEE80211_IS_CHAN_HT(_c)
#define IEEE80211_RX_F_DECRYPTED
#define IEEE80211_CHAN_QUARTER
#define IEEE80211_RATE_MAXSIZE
#define IEEE80211_CHAN_HT
#define IEEE80211_CHAN_5GHZ
#define IEEE80211_CHAN_2GHZ
#define IEEE80211_IS_CHAN_RADAR(_c)
#define IEEE80211_CHAN_ANYC
#define IEEE80211_CHAN_HALF
#define IEEE80211_IS_CHAN_HT40(_c)
#define IEEE80211_IS_CHAN_VHT(_c)
#define IEEE80211_IS_CHAN_ANYG(_c)
int ieee80211_chan2ieee(struct ieee80211com *ic, const struct ieee80211_channel *c)
#define WPA_ASE_8021X_UNSPEC
#define IEEE80211_FC0_SUBTYPE_ASSOC_REQ
#define IEEE80211_FC0_SUBTYPE_ACTION
#define IEEE80211_CAPINFO_PRIVACY
#define IEEE80211_CAPINFO_ESS
#define IEEE80211_FC0_TYPE_CTL
#define RSN_ASE_8021X_UNSPEC
#define IEEE80211_AUTH_ALG_SHARED
#define IEEE80211_FC0_TYPE_MASK
#define IEEE80211_FC0_SUBTYPE_ATIM
#define IEEE80211_FC0_SUBTYPE_REASSOC_REQ
#define IEEE80211_FC0_SUBTYPE_PROBE_REQ
#define IEEE80211_HTINFO_OPMODE_MIXED
#define IEEE80211_FC1_PROTECTED
#define IEEE80211_CAPINFO_SHORT_SLOTTIME
#define IEEE80211_HAS_SEQ(type, subtype)
#define IEEE80211_FC0_SUBTYPE_ASSOC_RESP
#define IEEE80211_FC0_VERSION_MASK
#define IEEE80211_FC0_SUBTYPE_DEAUTH
#define IEEE80211_FC0_SUBTYPE_PS_POLL
#define IEEE80211_FC1_DIR_DSTODS
#define IEEE80211_RATE_VAL
#define IEEE80211_FC0_SUBTYPE_BAR
#define IEEE80211_FC0_TYPE_MGT
#define IEEE80211_FC0_SUBTYPE_PROBE_RESP
#define IEEE80211_RATE_BASIC
#define IEEE80211_FC0_TYPE_DATA
#define IEEE80211_ERP_NON_ERP_PRESENT
#define IEEE80211_HTINFO_NONHT_PRESENT
#define IEEE80211_IS_MULTICAST(_a)
#define IEEE80211_QOS_HAS_SEQ(wh)
@ IEEE80211_AUTH_OPEN_REQUEST
#define IEEE80211_FC0_SUBTYPE_TIMING_ADV
#define IEEE80211_FC0_SUBTYPE_DISASSOC
#define TID_TO_WME_AC(_tid)
#define IEEE80211_FC1_DIR_NODS
#define RSN_ASE_8021X_PSK
#define IEEE80211_FC1_DIR_MASK
#define IEEE80211_FC0_VERSION_0
@ IEEE80211_AUTH_SHARED_REQUEST
@ IEEE80211_AUTH_SHARED_CHALLENGE
@ IEEE80211_AUTH_SHARED_RESPONSE
#define IEEE80211_FC0_SUBTYPE_NODATA
#define IEEE80211_AUTH_ALG_OPEN
#define IEEE80211_FC0_SUBTYPE_REASSOC_RESP
#define IEEE80211_FC0_SUBTYPE_QOS
#define IEEE80211_FC1_PWR_MGT
#define IEEE80211_FC0_SUBTYPE_ACTION_NOACK
#define IEEE80211_FC0_SUBTYPE_QOS_NULL
#define IEEE80211_FC1_DIR_TODS
#define IEEE80211_NWID_LEN
@ IEEE80211_REASON_IE_INVALID
@ IEEE80211_REASON_MIC_FAILURE
@ IEEE80211_STATUS_CAPINFO
@ IEEE80211_REASON_UNSUPP_RSN_IE_VERSION
@ IEEE80211_STATUS_UNSPECIFIED
@ IEEE80211_STATUS_BASIC_RATE
@ IEEE80211_STATUS_CHALLENGE
@ IEEE80211_REASON_ASSOC_NOT_AUTHED
@ IEEE80211_STATUS_MISSING_HT_CAPS
@ IEEE80211_STATUS_SEQUENCE
@ IEEE80211_REASON_NOT_AUTHED
@ IEEE80211_REASON_NOT_ASSOCED
@ IEEE80211_REASON_GROUP_CIPHER_INVALID
@ IEEE80211_REASON_PAIRWISE_CIPHER_INVALID
@ IEEE80211_REASON_ASSOC_LEAVE
#define IEEE80211_QOS_AMSDU
@ IEEE80211_ELEMID_VENDOR
@ IEEE80211_ELEMID_CHALLENGE
@ IEEE80211_ELEMID_VHT_OPMODE
@ IEEE80211_ELEMID_XRATES
@ IEEE80211_ELEMID_VHT_CAP
#define IEEE80211_FC0_SUBTYPE_MASK
#define IEEE80211_HTINFO_OPMODE
#define IEEE80211_FC0_SUBTYPE_BEACON
#define IEEE80211_FC0_SUBTYPE_AUTH
#define IEEE80211_HTINFO_OPMODE_PROTOPT
#define IEEE80211_CHALLENGE_LEN
#define IEEE80211_AUTH_ALG_LEAP
#define WPA_ASE_8021X_PSK
int ieee80211_crypto_decap(struct ieee80211_node *ni, struct mbuf *m, int hdrlen, struct ieee80211_key **key)
int ieee80211_crypto_demic(struct ieee80211vap *vap, struct ieee80211_key *k, struct mbuf *m, int force)
#define IEEE80211_CIPHER_WEP
#define IEEE80211_CIPHER_NONE
#define IEEE80211_CIPHER_AES_CCM
#define IEEE80211_CIPHER_AES_OCB
#define IEEE80211_CIPHER_TKIP
void ieee80211_dfs_cac_start(struct ieee80211vap *vap)
void ieee80211_dfs_cac_stop(struct ieee80211vap *vap)
void ieee80211_notify_node_auth(struct ieee80211_node *ni)
void net80211_get_random_bytes(void *p, size_t n)
int ieee80211_parent_xmitpkt(struct ieee80211com *ic, struct mbuf *m)
int ieee80211_vap_xmitpkt(struct ieee80211vap *vap, struct mbuf *m)
#define IEEE80211_LOCK_ASSERT(_ic)
static int rsn_keymgmt(const uint8_t *sel)
static void sta_disassoc(void *arg, struct ieee80211_node *ni)
static void hostap_vattach(struct ieee80211vap *)
static int is11bclient(const uint8_t *rates, const uint8_t *xrates)
static int ieee80211_parse_wpa(struct ieee80211vap *vap, const uint8_t *frm, struct ieee80211_rsnparms *rsn, const struct ieee80211_frame *wh)
static void hostap_recv_ctl(struct ieee80211_node *, struct mbuf *, int)
static int hostap_input(struct ieee80211_node *ni, struct mbuf *m, const struct ieee80211_rx_stats *, int rssi, int nf)
static void authalgreject(struct ieee80211_node *ni, const struct ieee80211_frame *wh, int algo, int seq, int status)
static void ratesetmismatch(struct ieee80211_node *ni, const struct ieee80211_frame *wh, int reassoc, int resp, const char *tag, int rate)
static int isbandchange(struct ieee80211com *ic)
static __inline int ishtmixed(const uint8_t *ie)
static void ieee80211_deliver_l2uf(struct ieee80211_node *ni)
static int ieee80211_parse_rsn(struct ieee80211vap *vap, const uint8_t *frm, struct ieee80211_rsnparms *rsn, const struct ieee80211_frame *wh)
static int wpa_cipher(const uint8_t *sel, uint8_t *keylen, uint8_t *cipher)
static void sta_csa(void *arg, struct ieee80211_node *ni)
static void capinfomismatch(struct ieee80211_node *ni, const struct ieee80211_frame *wh, int reassoc, int resp, const char *tag, int capinfo)
static void sta_drop(void *arg, struct ieee80211_node *ni)
static void hostap_deliver_data(struct ieee80211vap *, struct ieee80211_node *, struct mbuf *)
static int wpa_keymgmt(const uint8_t *sel)
static __inline int doprint(struct ieee80211vap *vap, int subtype)
#define IEEE80211_RATE2MBS(r)
static void hostap_auth_shared(struct ieee80211_node *ni, struct ieee80211_frame *wh, uint8_t *frm, uint8_t *efrm, int rssi, int nf, uint16_t seq, uint16_t status)
void ieee80211_hostap_attach(struct ieee80211com *ic)
static int wpa_assocreq(struct ieee80211_node *ni, struct ieee80211_rsnparms *rsnparms, const struct ieee80211_frame *wh, const uint8_t *wpa, const uint8_t *rsn, uint16_t capinfo)
struct l2_update_frame __packed
void ieee80211_recv_pspoll(struct ieee80211_node *ni, struct mbuf *m0)
static void htcapmismatch(struct ieee80211_node *ni, const struct ieee80211_frame *wh, int reassoc, int resp)
static int hostap_newstate(struct ieee80211vap *, enum ieee80211_state, int)
static void hostap_vdetach(struct ieee80211vap *vap)
void ieee80211_hostap_detach(struct ieee80211com *ic)
static void hostap_auth_open(struct ieee80211_node *ni, struct ieee80211_frame *wh, int rssi, int nf, uint16_t seq, uint16_t status)
static int rsn_cipher(const uint8_t *sel, uint8_t *keylen, uint8_t *cipher)
static void hostap_recv_mgmt(struct ieee80211_node *, struct mbuf *, int subtype, const struct ieee80211_rx_stats *rxs, int rssi, int nf)
struct ieee80211_channel * ieee80211_ht_adjust_channel(struct ieee80211com *ic, struct ieee80211_channel *chan, int flags)
void ieee80211_recv_bar(struct ieee80211_node *ni, struct mbuf *m0)
void ieee80211_ht_updatehtcap(struct ieee80211_node *ni, const uint8_t *htcapie)
void ieee80211_htprot_update(struct ieee80211vap *vap, int protmode)
void ieee80211_ht_node_cleanup(struct ieee80211_node *ni)
void ieee80211_ht_node_init(struct ieee80211_node *ni)
int ieee80211_ampdu_reorder(struct ieee80211_node *ni, struct mbuf *m, const struct ieee80211_rx_stats *rxs)
int ieee80211_setup_htrates(struct ieee80211_node *ni, const uint8_t *ie, int flags)
void ieee80211_ht_updatehtcap_final(struct ieee80211_node *ni)
struct mbuf * ieee80211_decap_amsdu(struct ieee80211_node *ni, struct mbuf *m)
@ IEEE80211_MACCMD_POLICY_RADIUS
void ieee80211_node_set_chan(struct ieee80211_node *ni, struct ieee80211_channel *chan)
struct ieee80211_node * ieee80211_dup_bss(struct ieee80211vap *vap, const uint8_t macaddr[IEEE80211_ADDR_LEN])
void ieee80211_free_node(struct ieee80211_node *ni)
void ieee80211_node_deauth(struct ieee80211_node *ni, int reason)
void ieee80211_reset_bss(struct ieee80211vap *vap)
struct ieee80211_node * ieee80211_find_vap_node(struct ieee80211_node_table *nt, const struct ieee80211vap *vap, const uint8_t macaddr[IEEE80211_ADDR_LEN])
void ieee80211_node_authorize(struct ieee80211_node *ni)
void ieee80211_node_join(struct ieee80211_node *ni, int resp)
int ieee80211_ies_init(struct ieee80211_ies *ies, const uint8_t *data, int len)
void ieee80211_node_leave(struct ieee80211_node *ni)
int ieee80211_iterate_nodes_vap(struct ieee80211_node_table *nt, struct ieee80211vap *vap, ieee80211_iter_func *f, void *arg)
void ieee80211_create_ibss(struct ieee80211vap *vap, struct ieee80211_channel *chan)
#define IEEE80211_RSSI_LPF(x, y)
static __inline int ieee80211_node_is_authorized(const struct ieee80211_node *ni)
#define IEEE80211_NODE_ASSOCID
#define IEEE80211_NODE_QOS
#define IEEE80211_NODE_STAT(ni, stat)
#define IEEE80211_NODE_PWR_MGT
#define IEEE80211_NODE_WPS
static __inline struct ieee80211_node * ieee80211_ref_node(struct ieee80211_node *ni)
#define IEEE80211_NODE_UAPSD
#define IEEE80211_NODE_HT
#define IEEE80211_NODE_AREF
#define IEEE80211_NODE_VHT
#define IEEE80211_NODE_STAT_ADD(ni, stat, v)
#define IEEE80211_NODE_TSN
int ieee80211_send_proberesp(struct ieee80211vap *vap, const uint8_t da[IEEE80211_ADDR_LEN], int legacy)
int ieee80211_send_nulldata(struct ieee80211_node *ni)
struct mbuf * ieee80211_node_psq_dequeue(struct ieee80211_node *ni, int *qlen)
const char * ieee80211_reason_to_string(uint16_t reason)
void ieee80211_print_essid(const uint8_t *essid, int len)
const char * ieee80211_state_name[IEEE80211_S_MAX]
void ieee80211_vap_update_erp_protmode(struct ieee80211vap *vap)
#define IEEE80211_SEND_LEGACY_11B
#define IEEE80211_F_DODEL
#define IEEE80211_F_DONEGO
#define IEEE80211_F_DOBRS
#define IEEE80211_F_DOSORT
static __inline uint8_t ieee80211_gettid(const struct ieee80211_frame *wh)
#define IEEE80211_F_DOFMCS
static __inline uint8_t * ieee80211_getqos(void *data)
static __inline const char * ieee80211_mgt_subtype_name(uint8_t subtype)
#define IEEE80211_SEND_MGMT(_ni, _type, _arg)
#define IEEE80211_F_DOFRATE
void ieee80211_radiotap_rx(struct ieee80211vap *vap0, struct mbuf *m)
void ieee80211_add_scan(struct ieee80211vap *vap, struct ieee80211_channel *curchan, const struct ieee80211_scanparams *sp, const struct ieee80211_frame *wh, int subtype, int rssi, int noise)
void ieee80211_cancel_scan(struct ieee80211vap *vap)
int ieee80211_check_scan(struct ieee80211vap *vap, int flags, u_int duration, u_int mindwell, u_int maxdwell, u_int nssid, const struct ieee80211_scan_ssid ssids[])
int ieee80211_check_scan_current(struct ieee80211vap *vap)
void ieee80211_probe_curchan(struct ieee80211vap *vap, int force)
@ IEEE80211_BPARSE_OFFCHAN
int ieee80211_parse_wmeie(uint8_t *frm, const struct ieee80211_frame *wh, struct ieee80211_node *ni)
void ieee80211_ff_node_cleanup(struct ieee80211_node *)
static __inline struct mbuf * ieee80211_decap_fastframe(struct ieee80211vap *vap, struct ieee80211_node *ni, struct mbuf *m)
void ieee80211_parse_ath(struct ieee80211_node *, uint8_t *)
#define IEEE80211_MSG_AUTH
static __inline int ieee80211_radiotap_active_vap(const struct ieee80211vap *vap)
#define IEEE80211_MSG_STATE
#define IEEE80211_MSG_WPA
#define IEEE80211_DISCARD_IE(_vap, _m, _wh, _type, _fmt,...)
#define IEEE80211_ADDR_COPY(dst, src)
#define IEEE80211_F_PUREG
#define IEEE80211_FEXT_PROBECHAN
static __inline int ieee80211_hdrspace(struct ieee80211com *ic, const void *data)
#define IEEE80211_NOTE_FRAME(_vap, _m, _wh, _fmt,...)
#define IEEE80211_FEXT_NONERP_PR
#define IEEE80211_MSG_CRYPTO
#define IEEE80211_MSG_ANY
#define IEEE80211_F_COUNTERM
#define IEEE80211_MSG_INACT
#define IEEE80211_MSG_ACL
#define IEEE80211_MSG_ELEMID
#define IEEE80211_FHT_PUREN
#define IEEE80211_F_NOBRIDGE
static __inline int ieee80211_htchanflags(const struct ieee80211_channel *c)
#define IEEE80211_NOTE_MAC(_vap, _m, _mac, _fmt,...)
#define IEEE80211_MSG_11N
#define IEEE80211_ADDR_EQ(a1, a2)
#define IEEE80211_FEXT_WPS
#define IEEE80211_F_PRIVACY
#define IEEE80211_F_HIDESSID
#define IEEE80211_MSG_DEBUG
#define IEEE80211_NOTE(_vap, _m, _ni, _fmt,...)
#define IEEE80211_MSG_POWER
#define IEEE80211_DISCARD_MAC(_vap, _m, _mac, _type, _fmt,...)
#define IEEE80211_FHT_HTCOMPAT
#define IEEE80211_F_USEPROT
#define IEEE80211_DPRINTF(_vap, _m, _fmt,...)
#define IEEE80211_MSG_INPUT
#define IEEE80211_MSG_WDS
#define IEEE80211_DISCARD(_vap, _m, _wh, _type, _fmt,...)
#define IEEE80211_FEXT_TSN
#define ieee80211_msg_dumppkts(_vap)
#define IEEE80211_FEXT_SCANREQ
#define IEEE80211_MSG_ASSOC
#define IEEE80211_F_DROPUNENC
void ieee80211_vht_node_init(struct ieee80211_node *ni)
void ieee80211_vht_update_cap(struct ieee80211_node *ni, const uint8_t *vhtcap_ie, const uint8_t *vhtop_ie)
void ieee80211_vht_node_cleanup(struct ieee80211_node *ni)
void ieee80211_dwds_discover(struct ieee80211_node *ni, struct mbuf *m)
void ieee80211_dwds_mcast(struct ieee80211vap *vap0, struct mbuf *m)
int(* iac_check)(struct ieee80211vap *, const struct ieee80211_frame *wh)
int(* iac_getpolicy)(struct ieee80211vap *)
int(* ia_attach)(struct ieee80211vap *)
void(* ia_detach)(struct ieee80211vap *)
uint8_t i_addr2[IEEE80211_ADDR_LEN]
uint8_t i_addr1[IEEE80211_ADDR_LEN]
uint8_t i_addr2[IEEE80211_ADDR_LEN]
uint8_t i_addr3[IEEE80211_ADDR_LEN]
struct ieee80211com * ni_ic
uint8_t ni_macaddr[IEEE80211_ADDR_LEN]
uint8_t ni_bssid[IEEE80211_ADDR_LEN]
struct ieee80211vap * ni_vap
struct ieee80211vap * ni_wdsvap
struct ieee80211_ies ni_ies
struct ieee80211_channel * ni_chan
uint8_t ni_essid[IEEE80211_NWID_LEN]
uint32_t is_rx_badversion
uint32_t is_ht_assoc_nohtcap
uint32_t is_rx_auth_unsupported
uint32_t is_rx_assoc_badwpaie
uint32_t is_rx_assoc_notauth
uint32_t is_rx_badsubtype
uint32_t is_rx_ssidmismatch
uint32_t is_rx_mgtdiscard
uint32_t is_ht_assoc_norate
uint32_t is_rx_auth_countermeasures
uint32_t is_rx_assoc_norate
uint32_t is_ht_assoc_downgrade
uint32_t is_rx_assoc_capmismatch
uint32_t is_rx_unencrypted
struct ieee80211_channel * ic_bsschan
struct ieee80211_channel * ic_csa_newchan
ieee80211vap_attach ic_vattach[IEEE80211_OPMODE_MAX]
struct ieee80211_node_table ic_sta
struct ieee80211_wme_state ic_wme
int(* ic_recv_action)(struct ieee80211_node *, const struct ieee80211_frame *, const uint8_t *frm, const uint8_t *efrm)
struct ieee80211_channel * ic_curchan
struct ieee80211com * iv_ic
struct ieee80211_node * iv_bss
enum ieee80211_opmode iv_opmode
struct ieee80211_channel * iv_des_chan
enum ieee80211_protmode iv_protmode
uint8_t iv_myaddr[IEEE80211_ADDR_LEN]
void(* iv_node_ps)(struct ieee80211_node *, int)
struct ieee80211_stats iv_stats
void(* iv_recv_mgmt)(struct ieee80211_node *, struct mbuf *, int, const struct ieee80211_rx_stats *, int, int)
int(* iv_set_tim)(struct ieee80211_node *, int)
u_int iv_scanreq_mindwell
const struct ieee80211_authenticator * iv_auth
enum ieee80211_state iv_state
u_int iv_scanreq_maxdwell
void(* iv_opdetach)(struct ieee80211vap *)
uint16_t iv_scanreq_flags
void(* iv_recv_ctl)(struct ieee80211_node *, struct mbuf *, int)
int(* iv_input)(struct ieee80211_node *, struct mbuf *, const struct ieee80211_rx_stats *, int, int)
struct ieee80211_scan_ssid iv_scanreq_ssid[IEEE80211_SCAN_MAX_SSID]
void(* iv_deliver_data)(struct ieee80211vap *, struct ieee80211_node *, struct mbuf *)
void(* iv_recv_pspoll)(struct ieee80211_node *, struct mbuf *)
u_int iv_scanreq_duration
int(* iv_newstate)(struct ieee80211vap *, enum ieee80211_state, int)
const struct ieee80211_aclator * iv_acl