37#include <sys/malloc.h>
38#include <sys/kernel.h>
40#include <sys/socket.h>
43#include <net/if_var.h>
44#include <net/if_media.h>
45#include <net/ethernet.h>
49#ifdef IEEE80211_SUPPORT_SUPERG
52#ifdef IEEE80211_SUPPORT_TDMA
70#define IEEE80211_AID_SET(_vap, b) \
71 ((_vap)->iv_aid_bitmap[IEEE80211_AID(b) / 32] |= \
72 (1 << (IEEE80211_AID(b) % 32)))
73#define IEEE80211_AID_CLR(_vap, b) \
74 ((_vap)->iv_aid_bitmap[IEEE80211_AID(b) / 32] &= \
75 ~(1 << (IEEE80211_AID(b) % 32)))
76#define IEEE80211_AID_ISSET(_vap, b) \
77 ((_vap)->iv_aid_bitmap[IEEE80211_AID(b) / 32] & (1 << (IEEE80211_AID(b) % 32)))
98 int inact,
int keymaxix);
159 "%s: init %u auth %u run %u probe %u\n", __func__,
172 "WARNING: max aid too small, changed to %d\n",
176 howmany(vap->
iv_max_aid, 32) *
sizeof(uint32_t),
181 printf(
"%s: no memory for AID bitmap, max aid %d!\n",
198 if (vap->
iv_bss != NULL) {
230 ni->
ni_flags &= ~IEEE80211_NODE_AUTH;
236 "%s: inact_reload %u inact %u", __func__,
338 "%s: creating %s on channel %u%c flags 0x%08x\n", __func__,
375#ifdef IEEE80211_SUPPORT_TDMA
379#ifdef IEEE80211_SUPPORT_MESH
455 KASSERT(ni != NULL, (
"unable to setup initial BSS node"));
472 for (i = 0; i < nssid; i++) {
519#ifdef IEEE80211_DEBUG
559 printf(
" %c %s", fail ?
'-' :
'+', ether_sprintf(ni->
ni_macaddr));
560 printf(
" %s%c", ether_sprintf(ni->
ni_bssid), fail & 0x20 ?
'!' :
' ');
564 fail & 0x08 ?
'!' :
' ');
569 fail & 0x02 ?
'!' :
' ');
572 fail & 0x04 ?
'!' :
' ');
574 printf(
"%s\n", fail & 0x10 ?
"!" :
"");
592 "%s: merge failed, capabilities mismatch\n", __func__);
593#ifdef IEEE80211_DEBUG
594 if (ieee80211_msg_assoc(vap))
595 check_bss_debug(vap, ni);
636 if (scan->
ssid == NULL)
674#ifdef IEEE80211_DEBUG
682 "%s: new bssid %s: %s preamble, %s slot time%s\n", __func__,
703 TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) {
734 TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) {
854 canreassoc = (obss != NULL &&
899 "%s %p<%s> -> AUTH, FC0_SUBTYPE_DEAUTH\n",
900 __func__, selbs, ether_sprintf(selbs->
ni_macaddr));
947#ifdef IEEE80211_SUPPORT_SUPERG
955#ifdef IEEE80211_SUPPORT_MESH
959#ifdef IEEE80211_SUPPORT_TDMA
1010 printf(
"%s: BSS %6D: 2GHz channel, VHT info; ignoring\n",
1097 if (ies->
data != NULL && ies->
len != len) {
1102 if (ies->
data == NULL) {
1105 if (ies->
data == NULL) {
1122 if (ies->
data != NULL)
1146#ifdef IEEE80211_SUPPORT_SUPERG
1150#ifdef IEEE80211_SUPPORT_TDMA
1164#ifdef IEEE80211_SUPPORT_MESH
1207 ni->
ni_flags &= ~IEEE80211_NODE_PWR_MGT;
1209 "power save mode off, %u sta's in ps mode", vap->
iv_ps_sta);
1218#ifdef IEEE80211_SUPPORT_SUPERG
1222#ifdef IEEE80211_SUPPORT_MESH
1267 for (i = 0; i < nitems(ni->
ni_rxfrag); i++)
1318 return rssi < 0 ? 0 : rssi > 127 ? 127 : rssi;
1336 bzero(info,
sizeof(*info));
1345 info->
ch[i].
rssi[0] = rssi < 0 ? 0 : rssi > 127 ? 127 : rssi;
1366 TAILQ_INSERT_TAIL(&nt->nt_node, ni, ni_list);
1367 LIST_INSERT_HEAD(&nt->nt_hash[hash], ni, ni_hash);
1379 TAILQ_REMOVE(&nt->nt_node, ni, ni_list);
1380 LIST_REMOVE(ni, ni_hash);
1383 (
"nt_count is negative (%d)!\n", nt->
nt_count));
1401 "%s %p<%s> in %s table\n", __func__, ni,
1402 ether_sprintf(macaddr), nt->
nt_name);
1416#ifdef IEEE80211_SUPPORT_MESH
1459 "%s %p<%s>\n", __func__, ni, ether_sprintf(macaddr));
1549#ifdef IEEE80211_SUPPORT_SUPERG
1563 printf(
"%s: TODO: vht_wds_init\n", __func__);
1572 KASSERT(c != NULL, (
"no legacy channel, %u/%x",
1581#ifdef IEEE80211_DEBUG_REFCNT
1595 LIST_FOREACH(ni, &nt->nt_hash[hash], ni_hash) {
1598#ifdef IEEE80211_DEBUG_REFCNT
1600 "%s (%s:%u) %p<%s> refcnt %d\n", __func__,
1612#ifdef IEEE80211_DEBUG_REFCNT
1629#ifdef IEEE80211_DEBUG_REFCNT
1645 LIST_FOREACH(ni, &nt->nt_hash[hash], ni_hash) {
1649#ifdef IEEE80211_DEBUG_REFCNT
1651 "%s (%s:%u) %p<%s> refcnt %d\n", __func__,
1663#ifdef IEEE80211_DEBUG_REFCNT
1694 "%s: mac<%s>\n", __func__, ether_sprintf(macaddr));
1716#ifdef IEEE80211_SUPPORT_SUPERG
1772 int do_ht_setup = 0, do_vht_setup = 0;
1785#ifdef IEEE80211_SUPPORT_MESH
1794 ni->
ni_flags &= ~IEEE80211_NODE_QOS;
1795#ifdef IEEE80211_SUPPORT_SUPERG
1832 "%s: doing HT setup\n", __func__);
1840 printf(
"%s: BSS %6D: 2GHz channel, VHT info; ignoring\n",
1901 "%s: mac<%s>\n", __func__, ether_sprintf(wh->
i_addr2));
1919#define IS_PROBEREQ(wh) \
1920 ((wh->i_fc[0] & (IEEE80211_FC0_TYPE_MASK|IEEE80211_FC0_SUBTYPE_MASK)) \
1921 == (IEEE80211_FC0_TYPE_MGT | IEEE80211_FC0_SUBTYPE_PROBE_REQ))
1922#define IS_BCAST_PROBEREQ(wh) \
1923 (IS_PROBEREQ(wh) && IEEE80211_IS_MULTICAST( \
1924 ((const struct ieee80211_frame *)(wh))->i_addr3))
1941#ifdef IEEE80211_DEBUG_REFCNT
1969#ifdef IEEE80211_DEBUG_REFCNT
1970ieee80211_find_rxnode_withkey_debug(
struct ieee80211com *ic,
1972 const char *func,
int line)
1983 if (nt->
nt_keyixmap != NULL && keyix < nt->nt_keyixmax)
1996 if (keyix < nt->nt_keyixmax &&
2000 "%s: add key map entry %p<%s> refcnt %d\n",
2016#undef IS_BCAST_PROBEREQ
2024#ifdef IEEE80211_DEBUG_REFCNT
2027 const char *func,
int line)
2070 "no node, discard frame (%s)", __func__);
2090 "%s %p<%s> in %s table\n", __func__, ni,
2092 nt != NULL ? nt->
nt_name :
"<gone>");
2113 if (nt->
nt_keyixmap != NULL && keyix < nt->nt_keyixmax &&
2116 "%s: %p<%s> clear key map entry %u\n",
2117 __func__, ni, ether_sprintf(ni->
ni_macaddr), keyix);
2127#ifdef IEEE80211_DEBUG_REFCNT
2128ieee80211_free_node_debug(
struct ieee80211_node *ni,
const char *func,
int line)
2135#ifdef IEEE80211_DEBUG_REFCNT
2137 "%s (%s:%u) %p<%s> refcnt %d\n", __func__, func, line, ni,
2167 int isowned, status;
2189 if (nt->
nt_keyixmap != NULL && keyix < nt->nt_keyixmax) {
2197 if (nikey != NULL) {
2198 KASSERT(nikey == ni,
2199 (
"key map out of sync, ni %p nikey %p", ni, nikey));
2201 "%s: delete key map entry %p<%s> refcnt %d\n",
2221 "%s: remove %p<%s> from %s table, refcnt %d\n",
2251 const char *name,
int inact,
int keyixmax)
2256 TAILQ_INIT(&nt->nt_node);
2268 "Cannot allocate key index map with %u entries\n",
2281 TAILQ_FOREACH_SAFE(ni, &nt->nt_node, ni_list, next) {
2282 if (match != NULL && ni->
ni_vap != match)
2304 TAILQ_FOREACH_SAFE(ni, &nt->nt_node, ni_list, next)
2321 printf(
"%s: %s[%u] still active\n", __func__,
2368 "%s: inact %u inact_reload %u nrates %u",
2406 "probe station due to inactivity");
2426 "station timed out due to inactivity "
2472 TAILQ_FOREACH(ni, &nt->nt_node, ni_list) {
2548 TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next)
2579 if (ni_arr == NULL) {
2585 TAILQ_FOREACH(ni, &nt->nt_node, ni_list) {
2586 if (vap != NULL && ni->
ni_vap != vap)
2589 (
"node array overflow (vap %p, i %d, count %d)\n",
2596 for (i = 0; i < count; i++) {
2597 if (ni_arr[i] == NULL)
2599 (*f)(arg, ni_arr[i]);
2625 printf(
"%p: mac %s refcnt %d\n", ni,
2627 printf(
"\tauthmode %u flags 0x%x\n",
2629 printf(
"\tassocid 0x%x txpower %u vlan %u\n",
2631 printf(
"\ttxseq %u rxseq %u fragno %u rxfragstamp %u\n",
2636 printf(
"\trssi %d noise %d intval %u capinfo 0x%x\n",
2639 printf(
"\tbssid %s essid \"%.*s\" channel %u:0x%x\n",
2643 printf(
"\tinact %u inact_reload %u txrate %u\n",
2645 printf(
"\thtcap %x htparam %x htctlchan %u ht2ndchan %u\n",
2648 printf(
"\thtopmode %x htstbc %x htchw %u\n",
2650 printf(
"\tvhtcap %x freq1 %d freq2 %d vhtbasicmcs %x\n",
2675 TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next)
2701 "station needs long slot time, count %d",
2723 "station is !ERP, %d non-ERP stations associated",
2731 "%s",
"station needs long preamble");
2733 vap->
iv_flags &= ~IEEE80211_F_SHPREAMBLE;
2744 "%s: enable use of protection\n", __func__);
2767 for (aid = 1; aid < vap->
iv_max_aid; aid++) {
2799 "station associated at aid %d: %s preamble, %s slot time%s%s%s%s%s%s%s%s%s",
2807 (ni->
ni_chw == 40 ?
", HT40" :
", HT20") :
"",
2814 ", fast-frames" :
"",
2842 vap->
iv_flags &= ~IEEE80211_F_USEPROT;
2846 vap->
iv_flags &= ~IEEE80211_F_USEBARKER;
2875 "long slot time station leaves, count now %d",
2889 "%s: re-enable use of short slot time\n",
2900 (
"bogus non-ERP station count %d", vap->
iv_nonerpsta));
2903 "non-ERP station leaves, count now %d%s", vap->
iv_nonerpsta,
2905 " (non-ERP sta present)" :
"");
2909 "%s: disable use of protection\n", __func__);
2932 "%s",
"age out non-ERP sta present on channel");
2954 (
"unexpected operating mode %u", vap->
iv_opmode));
3045#ifdef IEEE80211_SUPPORT_MESH
3067#define NZ(x) ((x) == 0 ? 1 : (x))
3083#ifdef IEEE80211_SUPPORT_MESH
@ IEEE80211_MODE_STURBO_A
@ IEEE80211_MODE_VHT_2GHZ
@ IEEE80211_MODE_VHT_5GHZ
#define IEEE80211_IS_CHAN_108G(_c)
#define IEEE80211_C_SHSLOT
#define IEEE80211_IS_CHAN_HT(_c)
#define IEEE80211_IS_CHAN_CACDONE(_c)
#define IEEE80211_CHAN_HT
#define IEEE80211_IS_CHAN_A(_c)
#define IEEE80211_IS_CHAN_B(_c)
#define IEEE80211_AID_MIN
#define IEEE80211_IS_CHAN_HALF(_c)
#define IEEE80211_MAX_CHAINS
#define IEEE80211_NONQOS_TID
#define IEEE80211_CHAN_ANYC
#define IEEE80211_IS_CHAN_2GHZ(_c)
#define IEEE80211_AID_DEF
#define IEEE80211_IS_CHAN_FULL(_c)
#define IEEE80211_IS_CHAN_QUARTER(_c)
#define IEEE80211_IS_CHAN_ST(_c)
#define IEEE80211_IS_CHAN_VHT(_c)
#define IEEE80211_C_SHPREAMBLE
#define IEEE80211_IS_CHAN_5GHZ(_c)
#define IEEE80211_IS_CHAN_ANYG(_c)
int ic_printf(struct ieee80211com *ic, const char *fmt,...)
int ieee80211_chan2ieee(struct ieee80211com *ic, const struct ieee80211_channel *c)
const struct ieee80211_rateset * ieee80211_get_suprates(struct ieee80211com *ic, const struct ieee80211_channel *c)
enum ieee80211_phymode ieee80211_chan2mode(const struct ieee80211_channel *chan)
struct ieee80211_channel * ieee80211_find_channel(struct ieee80211com *ic, int freq, int flags)
char ieee80211_channel_type_char(const struct ieee80211_channel *c)
const struct ieee80211_htrateset * ieee80211_get_suphtrates(struct ieee80211com *ic, const struct ieee80211_channel *c)
#define IEEE80211_CAPINFO_PRIVACY
#define IEEE80211_CAPINFO_ESS
#define IEEE80211_SEQ_SEQ_SHIFT
#define IEEE80211_ADDR_LEN
#define IEEE80211_CAPINFO_SHORT_SLOTTIME
#define IEEE80211_FC0_SUBTYPE_ASSOC_RESP
#define IEEE80211_FC0_SUBTYPE_DEAUTH
#define IEEE80211_RATE_VAL
#define IEEE80211_SEQ_FRAG_MASK
#define IEEE80211_RATE_BASIC
#define IEEE80211_IS_MULTICAST(_a)
#define IEEE80211_CAPINFO_SHORT_PREAMBLE
@ IEEE80211_STATUS_TOOMANY
@ IEEE80211_STATUS_SUCCESS
@ IEEE80211_REASON_AUTH_EXPIRE
@ IEEE80211_ELEMID_VENDOR
@ IEEE80211_ELEMID_BSSLOAD
@ IEEE80211_ELEMID_VHT_OPMODE
@ IEEE80211_ELEMID_VHT_PWR_ENV
@ IEEE80211_ELEMID_APCHANREP
@ IEEE80211_ELEMID_HTINFO
@ IEEE80211_ELEMID_VHT_CAP
@ IEEE80211_ELEMID_MESHID
#define IEEE80211_CAPINFO_IBSS
void ieee80211_ageq_cleanup(struct ieee80211_ageq *aq)
struct mbuf * ieee80211_ageq_age(struct ieee80211_ageq *aq, int quanta)
void ieee80211_ageq_init(struct ieee80211_ageq *aq, int maxlen, const char *name)
void ieee80211_ageq_drain_node(struct ieee80211_ageq *aq, struct ieee80211_node *ni)
void ieee80211_ageq_drain(struct ieee80211_ageq *aq)
int ieee80211_crypto_delkey(struct ieee80211vap *vap, struct ieee80211_key *key)
static __inline void ieee80211_crypto_resetkey(struct ieee80211vap *vap, struct ieee80211_key *k, ieee80211_keyix ix)
#define IEEE80211_KEYIX_NONE
void ieee80211_dfs_cac_clear(struct ieee80211com *ic, const struct ieee80211_channel *chan)
int ieee80211_node_dectestref(struct ieee80211_node *ni)
void ieee80211_notify_node_join(struct ieee80211_node *ni, int newassoc)
void net80211_get_random_bytes(void *p, size_t n)
void ieee80211_notify_node_leave(struct ieee80211_node *ni)
#define ieee80211_node_decref(_ni)
#define ieee80211_node_initref(_ni)
#define ieee80211_time_after(a, b)
#define IEEE80211_NODE_LOCK_DESTROY(_nt)
#define IEEE80211_M_NOWAIT
#define IEEE80211_UNLOCK(_ic)
#define IEEE80211_NODE_LOCK_INIT(_nt, _name)
#define ieee80211_node_refcnt(_ni)
#define IEEE80211_LOCK_ASSERT(_ic)
#define IEEE80211_LOCK(_ic)
#define IEEE80211_NODE_IS_LOCKED(_nt)
#define IEEE80211_NODE_LOCK(_nt)
#define IEEE80211_NODE_UNLOCK(_nt)
#define IEEE80211_NODE_LOCK_ASSERT(_nt)
struct ieee80211_channel * ieee80211_ht_adjust_channel(struct ieee80211com *ic, struct ieee80211_channel *chan, int flags)
void ieee80211_parse_htcap(struct ieee80211_node *ni, const uint8_t *ie)
int ieee80211_ht_updateparams_final(struct ieee80211_node *ni, const uint8_t *htcapie, const uint8_t *htinfoie)
void ieee80211_ht_node_age(struct ieee80211_node *ni)
void ieee80211_ht_node_cleanup(struct ieee80211_node *ni)
void ieee80211_parse_htinfo(struct ieee80211_node *ni, const uint8_t *ie)
void ieee80211_ht_node_init(struct ieee80211_node *ni)
void ieee80211_ht_timeout(struct ieee80211vap *vap)
int ieee80211_setup_htrates(struct ieee80211_node *ni, const uint8_t *ie, int flags)
void ieee80211_setup_basic_htrates(struct ieee80211_node *ni, const uint8_t *ie)
void ieee80211_ht_node_join(struct ieee80211_node *ni)
void ieee80211_ht_updateparams(struct ieee80211_node *ni, const uint8_t *htcapie, const uint8_t *htinfoie)
void ieee80211_ht_wds_init(struct ieee80211_node *ni)
void ieee80211_ht_node_leave(struct ieee80211_node *ni)
void ieee80211_mesh_node_init(struct ieee80211vap *vap, struct ieee80211_node *ni)
void ieee80211_mesh_node_cleanup(struct ieee80211_node *ni)
void ieee80211_parse_meshid(struct ieee80211_node *ni, const uint8_t *ie)
void ieee80211_mesh_init_neighbor(struct ieee80211_node *ni, const struct ieee80211_frame *wh, const struct ieee80211_scanparams *sp)
int ieee80211_ibss_merge(struct ieee80211_node *ni)
void ieee80211_node_latevattach(struct ieee80211vap *vap)
#define IEEE80211_AID_SET(_vap, b)
static void node_reclaim(struct ieee80211_node_table *nt, struct ieee80211_node *ni)
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)
static void ieee80211_node_table_reset(struct ieee80211_node_table *, struct ieee80211vap *)
struct ieee80211_node * ieee80211_fakeup_adhoc_node(struct ieee80211vap *vap, const uint8_t macaddr[IEEE80211_ADDR_LEN])
void ieee80211_node_vdetach(struct ieee80211vap *vap)
void ieee80211_node_vattach(struct ieee80211vap *vap)
static void ieee80211_node_table_cleanup(struct ieee80211_node_table *nt)
static void get_adhoc_rssi(void *arg, struct ieee80211_node *ni)
void ieee80211_node_deauth(struct ieee80211_node *ni, int reason)
void ieee80211_iterate_nodes(struct ieee80211_node_table *nt, ieee80211_iter_func *f, void *arg)
CTASSERT((IEEE80211_NODE_HASHSIZE &(IEEE80211_NODE_HASHSIZE-1))==0)
void ieee80211_reset_bss(struct ieee80211vap *vap)
void ieee80211_node_detach(struct ieee80211com *ic)
int8_t ieee80211_getrssi(struct ieee80211vap *vap)
void ieee80211_node_unauthorize(struct ieee80211_node *ni)
static int node_clear_keyixmap(struct ieee80211_node_table *nt, struct ieee80211_node *ni)
int ieee80211_ibss_merge_check(struct ieee80211_node *ni)
void ieee80211_node_attach(struct ieee80211com *ic)
struct ieee80211_node * ieee80211_find_vap_node(struct ieee80211_node_table *nt, const struct ieee80211vap *vap, const uint8_t macaddr[IEEE80211_ADDR_LEN])
static int check_bss(struct ieee80211vap *vap, struct ieee80211_node *ni)
static int8_t node_getrssi(const struct ieee80211_node *)
#define IEEE80211_AID_ISSET(_vap, b)
void ieee80211_node_timeout(void *arg)
static int node_init(struct ieee80211_node *)
static void node_getsignal(const struct ieee80211_node *, int8_t *, int8_t *)
static void timeout_stations(void *arg __unused, struct ieee80211_node *ni)
static int gethtadjustflags(struct ieee80211com *ic)
void ieee80211_node_setuptxparms(struct ieee80211_node *ni)
void ieee80211_node_authorize(struct ieee80211_node *ni)
void ieee80211_node_join(struct ieee80211_node *ni, int resp)
void ieee80211_init_neighbor(struct ieee80211_node *ni, const struct ieee80211_frame *wh, const struct ieee80211_scanparams *sp)
struct ieee80211_node * ieee80211_find_node_locked(struct ieee80211_node_table *nt, const uint8_t macaddr[IEEE80211_ADDR_LEN])
void ieee80211_ies_cleanup(struct ieee80211_ies *ies)
static void ieee80211_node_join_11g(struct ieee80211_node *ni)
void ieee80211_dump_node(struct ieee80211_node_table *nt __unused, struct ieee80211_node *ni)
static void node_cleanup(struct ieee80211_node *)
static void ieee80211_node_table_init(struct ieee80211com *ic, struct ieee80211_node_table *nt, const char *name, int inact, int keymaxix)
void ieee80211_dump_nodes(struct ieee80211_node_table *nt)
struct ieee80211_node * ieee80211_alloc_node(struct ieee80211_node_table *nt, struct ieee80211vap *vap, const uint8_t macaddr[IEEE80211_ADDR_LEN])
static int match_ssid(const struct ieee80211_node *ni, int nssid, const struct ieee80211_scan_ssid ssids[])
void ieee80211_ies_expand(struct ieee80211_ies *ies)
void ieee80211_sta_leave(struct ieee80211_node *ni)
static void ieee80211_node_leave_11g(struct ieee80211_node *ni)
struct ieee80211_node * ieee80211_find_rxnode(struct ieee80211com *ic, const struct ieee80211_frame_min *wh)
static void ieee80211_vap_erp_timeout(struct ieee80211vap *)
int ieee80211_ies_init(struct ieee80211_ies *ies, const uint8_t *data, int len)
void ieee80211_setcurchan(struct ieee80211com *ic, struct ieee80211_channel *c)
static struct ieee80211_node * node_alloc(struct ieee80211vap *, const uint8_t[IEEE80211_ADDR_LEN])
#define IS_BCAST_PROBEREQ(wh)
void ieee80211_update_chw(struct ieee80211com *ic)
void ieee80211_notify_erp_locked(struct ieee80211com *ic)
static void node_free(struct ieee80211_node *)
void ieee80211_node_leave(struct ieee80211_node *ni)
static __inline struct ieee80211_node * _find_rxnode(struct ieee80211_node_table *nt, const struct ieee80211_frame_min *wh)
struct ieee80211_node * ieee80211_add_neighbor(struct ieee80211vap *vap, const struct ieee80211_frame *wh, const struct ieee80211_scanparams *sp)
int ieee80211_node_delucastkey(struct ieee80211_node *ni)
static void ieee80211_del_node_nt(struct ieee80211_node_table *nt, struct ieee80211_node *ni)
static __inline void copy_bss(struct ieee80211_node *nbss, const struct ieee80211_node *obss)
void ieee80211_setupcurchan(struct ieee80211com *ic, struct ieee80211_channel *c)
void ieee80211_getsignal(struct ieee80211vap *vap, int8_t *rssi, int8_t *noise)
void ieee80211_drain(struct ieee80211com *ic)
static void node_getmimoinfo(const struct ieee80211_node *, struct ieee80211_mimo_info *)
struct ieee80211_node * ieee80211_find_txnode(struct ieee80211vap *vap, const uint8_t macaddr[IEEE80211_ADDR_LEN])
int ieee80211_ibss_node_check_new(struct ieee80211_node *ni, const struct ieee80211_scanparams *scan)
struct ieee80211_node * ieee80211_find_node(struct ieee80211_node_table *nt, const uint8_t macaddr[IEEE80211_ADDR_LEN])
static void ieee80211_timeout_stations(struct ieee80211com *ic)
int ieee80211_iterate_nodes_vap(struct ieee80211_node_table *nt, struct ieee80211vap *vap, ieee80211_iter_func *f, void *arg)
struct ieee80211_node * ieee80211_find_rxnode_withkey(struct ieee80211com *ic, const struct ieee80211_frame_min *wh, ieee80211_keyix keyix)
struct ieee80211_node * ieee80211_tmp_node(struct ieee80211vap *vap, const uint8_t macaddr[IEEE80211_ADDR_LEN])
void ieee80211_create_ibss(struct ieee80211vap *vap, struct ieee80211_channel *chan)
static void node_age(struct ieee80211_node *)
int ieee80211_sta_join(struct ieee80211vap *vap, struct ieee80211_channel *chan, const struct ieee80211_scan_entry *se)
void ieee80211_sync_curchan(struct ieee80211com *ic)
struct ieee80211_node * ieee80211_node_create_wds(struct ieee80211vap *vap, const uint8_t bssid[IEEE80211_ADDR_LEN], struct ieee80211_channel *chan)
static void get_hostap_rssi(void *arg, struct ieee80211_node *ni)
#define IEEE80211_AID_CLR(_vap, b)
static void _ieee80211_free_node(struct ieee80211_node *)
static void ieee80211_vap_timeout(struct ieee80211vap *vap)
MALLOC_DEFINE(M_80211_NODE, "80211node", "802.11 node state")
static int ieee80211_sta_join1(struct ieee80211_node *)
struct ieee80211_node * ieee80211_find_vap_node_locked(struct ieee80211_node_table *nt, const struct ieee80211vap *vap, const uint8_t macaddr[IEEE80211_ADDR_LEN])
static void disable_protection(struct ieee80211vap *vap)
static void ieee80211_add_node_nt(struct ieee80211_node_table *nt, struct ieee80211_node *ni)
static int getvhtadjustflags(struct ieee80211com *ic)
#define IEEE80211_NODE_HASH(ic, addr)
#define IEEE80211_INACT_RUN
#define IEEE80211_INACT_AUTH
#define IEEE80211_RSSI_LPF(x, y)
#define IEEE80211_NODE_TURBOP
void ieee80211_iter_func(void *, struct ieee80211_node *)
#define IEEE80211_NODE_HASHSIZE
#define IEEE80211_INACT_PROBE
#define IEEE80211_INACT_WAIT
#define IEEE80211_NODE_ASSOCID
#define IEEE80211_NODE_FF
#define IEEE80211_NODE_AUTH
#define IEEE80211_NODE_MIMO_RTS
#define IEEE80211_NODE_AMSDU
#define IEEE80211_NODE_QOS
#define IEEE80211_NODE_PWR_MGT
#define IEEE80211_NODE_AID(ni)
#define IEEE80211_NODE_MIMO_PS
#define IEEE80211_RSSI_DUMMY_MARKER
#define IEEE80211_NODE_RIFS
static __inline struct ieee80211_node * ieee80211_ref_node(struct ieee80211_node *ni)
@ IEEE80211_NODE_MESH_ESTABLISHED
#define IEEE80211_NODE_ERP
#define IEEE80211_NONERP_PRESENT_AGE
#define IEEE80211_NODE_AMPDU
#define IEEE80211_NODE_HT
#define IEEE80211_NODE_AREF
#define IEEE80211_NODE_VHT
#define IEEE80211_INACT_INIT
#define IEEE80211_RSSI_GET(x)
int ieee80211_send_probereq(struct ieee80211_node *ni, const uint8_t sa[IEEE80211_ADDR_LEN], const uint8_t da[IEEE80211_ADDR_LEN], const uint8_t bssid[IEEE80211_ADDR_LEN], const uint8_t *ssid, size_t ssidlen)
int ieee80211_send_nulldata(struct ieee80211_node *ni)
const struct ieee80211_rate_table * ieee80211_get_ratetable(struct ieee80211_channel *c)
void ieee80211_psq_cleanup(struct ieee80211_psq *psq)
int ieee80211_node_psq_drain(struct ieee80211_node *ni)
void ieee80211_psq_init(struct ieee80211_psq *psq, const char *name)
int ieee80211_node_psq_age(struct ieee80211_node *ni)
const struct ieee80211_authenticator * ieee80211_authenticator_get(int auth)
void ieee80211_addbasicrates(struct ieee80211_rateset *rs, enum ieee80211_phymode mode)
void ieee80211_setbasicrates(struct ieee80211_rateset *rs, enum ieee80211_phymode mode)
void ieee80211_vap_update_preamble(struct ieee80211vap *vap)
void ieee80211_print_essid(const uint8_t *essid, int len)
int ieee80211_iserp_rateset(const struct ieee80211_rateset *rs)
int ieee80211_new_state(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg)
void ieee80211_vap_update_erp_protmode(struct ieee80211vap *vap)
int ieee80211_fix_rate(struct ieee80211_node *ni, struct ieee80211_rateset *nrs, int flags)
void ieee80211_vap_reset_erp(struct ieee80211vap *vap)
void ieee80211_vap_set_shortslottime(struct ieee80211vap *vap, int onoff)
void ieee80211_wme_initparams(struct ieee80211vap *vap)
const char * ieee80211_opmode_name[IEEE80211_OPMODE_MAX]
#define IEEE80211_F_DODEL
#define IEEE80211_F_DONEGO
#define IEEE80211_F_DOBRS
#define IEEE80211_F_DOSORT
#define IEEE80211_SEND_MGMT(_ni, _type, _arg)
#define IEEE80211_F_DOFRATE
void ieee80211_radiotap_chan_change(struct ieee80211com *ic)
static __inline void ieee80211_ratectl_node_deinit(struct ieee80211_node *ni)
static __inline void ieee80211_ratectl_node_init(struct ieee80211_node *ni)
void ieee80211_scan_timeout(struct ieee80211com *ic)
void ieee80211_ff_node_cleanup(struct ieee80211_node *)
void ieee80211_parse_ath(struct ieee80211_node *, uint8_t *)
void ieee80211_parse_tdma(struct ieee80211_node *ni, const uint8_t *ie)
#define IEEE80211_MSG_AUTH
#define IEEE80211_ADDR_COPY(dst, src)
#define IEEE80211_F_PUREG
#define IEEE80211_F_DESBSSID
#define IEEE80211_MSG_OUTPUT
#define IEEE80211_FEXT_NONERP_PR
#define IEEE80211_MSG_SCAN
#define IEEE80211_MSG_INACT
#define IEEE80211_F_USEBARKER
#define IEEE80211_F_SHPREAMBLE
#define IEEE80211_FHT_PUREN
static __inline int ieee80211_htchanflags(const struct ieee80211_channel *c)
#define IEEE80211_NOTE_MAC(_vap, _m, _mac, _fmt,...)
#define IEEE80211_F_CSAPENDING
static __inline int ieee80211_vhtchanflags(const struct ieee80211_channel *c)
#define IEEE80211_MSG_NODE
#define IEEE80211_ADDR_EQ(a1, a2)
#define IEEE80211_F_PRIVACY
#define IEEE80211_FEXT_INACT
#define IEEE80211_MSG_DEBUG
#define IEEE80211_NOTE(_vap, _m, _ni, _fmt,...)
#define IEEE80211_FVHT_VHT
#define IEEE80211_MSG_POWER
#define IEEE80211_F_USEPROT
static __inline void ieee80211_runtask(struct ieee80211com *ic, struct task *task)
#define IEEE80211_DPRINTF(_vap, _m, _fmt,...)
#define IEEE80211_ATH_CAP(vap, ni, bit)
#define IEEE80211_F_SHSLOT
static __inline void ieee80211_beacon_notify(struct ieee80211vap *vap, int what)
#define IEEE80211_MSG_ASSOC
void ieee80211_vht_node_init(struct ieee80211_node *ni)
void ieee80211_vht_timeout(struct ieee80211vap *vap)
void ieee80211_vht_node_join(struct ieee80211_node *ni)
void ieee80211_setup_vht_rates(struct ieee80211_node *ni, const uint8_t *vhtcap_ie, const uint8_t *vhtop_ie)
void ieee80211_parse_vhtopmode(struct ieee80211_node *ni, const uint8_t *ie)
int ieee80211_vht_updateparams(struct ieee80211_node *ni, const uint8_t *vhtcap_ie, const uint8_t *vhtop_ie)
void ieee80211_parse_vhtcap(struct ieee80211_node *ni, const uint8_t *ie)
void ieee80211_vht_node_leave(struct ieee80211_node *ni)
void ieee80211_vht_node_cleanup(struct ieee80211_node *ni)
struct ieee80211_channel * ieee80211_vht_adjust_channel(struct ieee80211com *ic, struct ieee80211_channel *chan, int flags)
void(* ia_node_join)(struct ieee80211_node *)
void(* ia_node_leave)(struct ieee80211_node *)
uint8_t i_addr2[IEEE80211_ADDR_LEN]
uint8_t i_addr2[IEEE80211_ADDR_LEN]
uint8_t i_addr3[IEEE80211_ADDR_LEN]
ieee80211_keyix wk_rxkeyix
uint8_t ms_id[IEEE80211_MESHID_LEN]
int8_t rssi[IEEE80211_MAX_CHAIN_PRISEC]
int8_t noise[IEEE80211_MAX_CHAIN_PRISEC]
struct ieee80211_mimo_chan_info ch[IEEE80211_MAX_CHAINS]
struct ieee80211com * nt_ic
struct ieee80211_node ** nt_keyixmap
struct ieee80211_psq ni_psq
uint8_t ni_meshid[IEEE80211_MESHID_LEN]
uint8_t ni_mimo_noise_ctl[IEEE80211_MAX_CHAINS]
struct ieee80211_rateset ni_rates
struct ieee80211com * ni_ic
uint8_t ni_macaddr[IEEE80211_ADDR_LEN]
struct ieee80211_node_table * ni_table
struct ieee80211_htrateset ni_htrates
uint8_t ni_bssid[IEEE80211_ADDR_LEN]
struct ieee80211_key ni_ucastkey
struct ieee80211vap * ni_vap
const struct ieee80211_txparam * ni_txparms
ieee80211_seq ni_rxseqs[IEEE80211_TID_SIZE]
enum ieee80211_mesh_mlstate ni_mlstate
struct ieee80211vap * ni_wdsvap
union ieee80211_node::@24 ni_tstamp
struct mbuf * ni_rxfrag[3]
ieee80211_seq ni_txseqs[IEEE80211_TID_SIZE]
struct ieee80211_ies ni_ies
uint32_t ni_mimo_rssi_ctl[IEEE80211_MAX_CHAINS]
struct ieee80211_channel * ni_chan
uint8_t ni_essid[IEEE80211_NWID_LEN]
uint8_t se_xrates[2+IEEE80211_RATE_MAXSIZE]
struct ieee80211_ies se_ies
uint8_t se_ssid[2+IEEE80211_NWID_LEN]
uint8_t se_bssid[IEEE80211_ADDR_LEN]
uint8_t se_macaddr[IEEE80211_ADDR_LEN]
union ieee80211_scan_entry::@29 se_tstamp
uint8_t se_rates[2+IEEE80211_RATE_MAXSIZE]
uint8_t ssid[IEEE80211_NWID_LEN]
uint32_t is_ibss_capmismatch
struct ieee80211_channel * ic_bsschan
void(* ic_node_getsignal)(const struct ieee80211_node *, int8_t *, int8_t *)
void(* ic_node_age)(struct ieee80211_node *)
enum ieee80211_opmode ic_opmode
void(* ic_node_cleanup)(struct ieee80211_node *)
int(* ic_node_init)(struct ieee80211_node *)
void(* ic_node_drain)(struct ieee80211_node *)
struct ieee80211_node *(* ic_node_alloc)(struct ieee80211vap *, const uint8_t[IEEE80211_ADDR_LEN])
struct ieee80211_node_table ic_sta
int8_t(* ic_node_getrssi)(const struct ieee80211_node *)
struct ieee80211_ageq ic_stageq
void(* ic_node_free)(struct ieee80211_node *)
const struct ieee80211_rate_table * ic_rt
enum ieee80211_phytype ic_phytype
void(* ic_node_getmimoinfo)(const struct ieee80211_node *, struct ieee80211_mimo_info *)
uint8_t ic_chan_active[IEEE80211_CHAN_BYTES]
void(* ic_set_channel)(struct ieee80211com *)
struct ieee80211_channel * ic_curchan
void(* ic_newassoc)(struct ieee80211_node *, int)
struct ieee80211com * iv_ic
struct ieee80211_node * iv_bss
enum ieee80211_opmode iv_opmode
enum ieee80211_protmode iv_protmode
uint8_t iv_myaddr[IEEE80211_ADDR_LEN]
struct ieee80211_stats iv_stats
struct ieee80211_mesh_state * iv_mesh
int(* iv_set_tim)(struct ieee80211_node *, int)
const struct ieee80211_authenticator * iv_auth
uint8_t iv_des_bssid[IEEE80211_ADDR_LEN]
enum ieee80211_state iv_state
struct ieee80211_txparam iv_txparms[IEEE80211_MODE_MAX]
struct ieee80211_scan_ssid iv_des_ssid[1]