1 /* $OpenBSD: ieee80211_node.h,v 1.88 2021/04/25 15:32:21 stsp Exp $ */ 2 /* $NetBSD: ieee80211_node.h,v 1.9 2004/04/30 22:57:32 dyoung Exp $ */ 3 4 /*- 5 * Copyright (c) 2001 Atsushi Onoe 6 * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions 11 * are met: 12 * 1. Redistributions of source code must retain the above copyright 13 * notice, this list of conditions and the following disclaimer. 14 * 2. Redistributions in binary form must reproduce the above copyright 15 * notice, this list of conditions and the following disclaimer in the 16 * documentation and/or other materials provided with the distribution. 17 * 3. The name of the author may not be used to endorse or promote products 18 * derived from this software without specific prior written permission. 19 * 20 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 21 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 22 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 23 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 * 31 * $FreeBSD: src/sys/net80211/ieee80211_node.h,v 1.10 2004/04/05 22:10:26 sam Exp $ 32 */ 33 #ifndef _NET80211_IEEE80211_NODE_H_ 34 #define _NET80211_IEEE80211_NODE_H_ 35 36 #include <sys/tree.h> 37 38 #define IEEE80211_PSCAN_WAIT 5 /* passive scan wait */ 39 #define IEEE80211_TRANS_WAIT 5 /* transition wait */ 40 #define IEEE80211_INACT_WAIT 5 /* inactivity timer interval */ 41 #define IEEE80211_INACT_MAX (300/IEEE80211_INACT_WAIT) 42 #define IEEE80211_CACHE_SIZE 512 43 #define IEEE80211_CACHE_WAIT 30 44 #define IEEE80211_INACT_SCAN 10 /* for station mode */ 45 46 struct ieee80211_rateset { 47 u_int8_t rs_nrates; 48 u_int8_t rs_rates[IEEE80211_RATE_MAXSIZE]; 49 }; 50 51 extern const struct ieee80211_rateset ieee80211_std_rateset_11a; 52 extern const struct ieee80211_rateset ieee80211_std_rateset_11b; 53 extern const struct ieee80211_rateset ieee80211_std_rateset_11g; 54 55 /* Index into ieee80211_std_rateset_11n[] array. */ 56 #define IEEE80211_HT_RATESET_SISO 0 57 #define IEEE80211_HT_RATESET_SISO_SGI 1 58 #define IEEE80211_HT_RATESET_MIMO2 2 59 #define IEEE80211_HT_RATESET_MIMO2_SGI 3 60 #define IEEE80211_HT_RATESET_MIMO3 4 61 #define IEEE80211_HT_RATESET_MIMO3_SGI 5 62 #define IEEE80211_HT_RATESET_MIMO4 6 63 #define IEEE80211_HT_RATESET_MIMO4_SGI 7 64 #define IEEE80211_HT_NUM_RATESETS 8 65 66 /* Maximum number of rates in a HT rateset. */ 67 #define IEEE80211_HT_RATESET_MAX_NRATES 8 68 69 /* Number of MCS indices represented by struct ieee80211_ht_rateset. */ 70 #define IEEE80211_HT_RATESET_NUM_MCS 32 71 72 struct ieee80211_ht_rateset { 73 uint32_t nrates; 74 uint32_t rates[IEEE80211_HT_RATESET_MAX_NRATES]; /* 500 kbit/s units */ 75 76 /* 77 * This bitmask can only express MCS 0 - MCS 31. 78 * IEEE 802.11 defined 77 HT MCS in total but common hardware 79 * implementations tend to support MCS index 0 through 31 only. 80 */ 81 uint32_t mcs_mask; 82 83 /* Range of MCS indices represented in this rateset. */ 84 int min_mcs; 85 int max_mcs; 86 87 int sgi; 88 }; 89 90 extern const struct ieee80211_ht_rateset ieee80211_std_ratesets_11n[]; 91 92 /* Index into ieee80211_std_rateset_11ac[] array. */ 93 #define IEEE80211_VHT_RATESET_SISO 0 94 #define IEEE80211_VHT_RATESET_SISO_SGI 1 95 #define IEEE80211_VHT_RATESET_MIMO2 2 96 #define IEEE80211_VHT_RATESET_MIMO2_SGI 3 97 #define IEEE80211_VHT_RATESET_SISO_40 4 98 #define IEEE80211_VHT_RATESET_SISO_40_SGI 5 99 #define IEEE80211_VHT_RATESET_MIMO2_40 6 100 #define IEEE80211_VHT_RATESET_MIMO2_40_SGI 7 101 #define IEEE80211_VHT_RATESET_SISO_80 8 102 #define IEEE80211_VHT_RATESET_SISO_80_SGI 9 103 #define IEEE80211_VHT_RATESET_MIMO2_80 10 104 #define IEEE80211_VHT_RATESET_MIMO2_80_SGI 11 105 #define IEEE80211_VHT_NUM_RATESETS 12 106 107 /* Maximum number of rates in a HT rateset. */ 108 #define IEEE80211_VHT_RATESET_MAX_NRATES 10 109 110 struct ieee80211_vht_rateset { 111 uint32_t nrates; 112 uint32_t rates[IEEE80211_VHT_RATESET_MAX_NRATES]; /* 500 kbit/s units */ 113 114 /* Number of spatial streams used by rates in this rateset. */ 115 int num_ss; 116 117 int sgi; 118 }; 119 120 extern const struct ieee80211_vht_rateset ieee80211_std_ratesets_11ac[]; 121 122 enum ieee80211_node_state { 123 IEEE80211_STA_CACHE, /* cached node */ 124 IEEE80211_STA_BSS, /* ic->ic_bss, the network we joined */ 125 IEEE80211_STA_AUTH, /* successfully authenticated */ 126 IEEE80211_STA_ASSOC, /* successfully associated */ 127 IEEE80211_STA_COLLECT /* This node remains in the cache while 128 * the driver sends a de-auth message; 129 * afterward it should be freed to make room 130 * for a new node. 131 */ 132 }; 133 134 #define ieee80211_node_newstate(__ni, __state) \ 135 do { \ 136 (__ni)->ni_state = (__state); \ 137 } while (0) 138 139 enum ieee80211_node_psstate { 140 IEEE80211_PS_AWAKE, 141 IEEE80211_PS_DOZE 142 }; 143 144 #define IEEE80211_PS_MAX_QUEUE 50 /* maximum saved packets */ 145 146 /* Authenticator state machine: 4-Way Handshake (see 8.5.6.1.1) */ 147 enum { 148 RSNA_INITIALIZE, 149 RSNA_AUTHENTICATION, 150 RSNA_AUTHENTICATION_2, 151 RSNA_INITPMK, 152 RSNA_INITPSK, 153 RSNA_PTKSTART, 154 RSNA_PTKCALCNEGOTIATING, 155 RSNA_PTKCALCNEGOTIATING_2, 156 RSNA_PTKINITNEGOTIATING, 157 RSNA_PTKINITDONE, 158 RSNA_DISCONNECT, 159 RSNA_DISCONNECTED 160 }; 161 162 /* Authenticator state machine: Group Key Handshake (see 8.5.6.1.2) */ 163 enum { 164 RSNA_IDLE, 165 RSNA_REKEYNEGOTIATING, 166 RSNA_REKEYESTABLISHED, 167 RSNA_KEYERROR 168 }; 169 170 /* Supplicant state machine: 4-Way Handshake (not documented in standard) */ 171 enum { 172 RSNA_SUPP_INITIALIZE, /* not expecting any messages */ 173 RSNA_SUPP_PTKSTART, /* awaiting handshake message 1 */ 174 RSNA_SUPP_PTKNEGOTIATING, /* got message 1 and derived PTK */ 175 RSNA_SUPP_PTKDONE /* got message 3 and authenticated AP */ 176 }; 177 178 struct ieee80211_rxinfo { 179 u_int32_t rxi_flags; 180 u_int32_t rxi_tstamp; 181 int rxi_rssi; 182 }; 183 #define IEEE80211_RXI_HWDEC 0x00000001 184 #define IEEE80211_RXI_AMPDU_DONE 0x00000002 185 #define IEEE80211_RXI_HWDEC_SAME_PN 0x00000004 186 #define IEEE80211_RXI_SAME_SEQ 0x00000008 187 188 /* Block Acknowledgement Record */ 189 struct ieee80211_tx_ba { 190 struct ieee80211_node *ba_ni; /* backpointer for callbacks */ 191 struct timeout ba_to; 192 int ba_timeout_val; 193 int ba_state; 194 #define IEEE80211_BA_INIT 0 195 #define IEEE80211_BA_REQUESTED 1 196 #define IEEE80211_BA_AGREED 2 197 198 /* ADDBA parameter set field for this BA agreement. */ 199 u_int16_t ba_params; 200 201 /* These values are IEEE802.11 frame sequence numbers (0x0-0xfff) */ 202 u_int16_t ba_winstart; 203 u_int16_t ba_winend; 204 205 /* Number of A-MPDU subframes in reorder buffer. */ 206 u_int16_t ba_winsize; 207 #define IEEE80211_BA_MAX_WINSZ 64 /* corresponds to maximum ADDBA BUFSZ */ 208 209 u_int8_t ba_token; 210 211 /* Bitmap for ACK'd frames in the current BA window. */ 212 uint64_t ba_bitmap; 213 }; 214 215 struct ieee80211_rx_ba { 216 struct ieee80211_node *ba_ni; /* backpointer for callbacks */ 217 struct { 218 struct mbuf *m; 219 struct ieee80211_rxinfo rxi; 220 } *ba_buf; 221 struct timeout ba_to; 222 int ba_timeout_val; 223 int ba_state; 224 u_int16_t ba_params; 225 u_int16_t ba_winstart; 226 u_int16_t ba_winend; 227 u_int16_t ba_winsize; 228 u_int16_t ba_head; 229 struct timeout ba_gap_to; 230 #define IEEE80211_BA_GAP_TIMEOUT 300 /* msec */ 231 232 /* 233 * Counter for frames forced to wait in the reordering buffer 234 * due to a leading gap caused by one or more missing frames. 235 */ 236 int ba_gapwait; 237 238 /* Counter for consecutive frames which missed the BA window. */ 239 int ba_winmiss; 240 /* Sequence number of previous frame which missed the BA window. */ 241 uint16_t ba_missedsn; 242 /* Window moves forward after this many frames have missed it. */ 243 #define IEEE80211_BA_MAX_WINMISS 8 244 245 uint8_t ba_token; 246 }; 247 248 /* 249 * Node specific information. Note that drivers are expected 250 * to derive from this structure to add device-specific per-node 251 * state. This is done by overriding the ic_node_* methods in 252 * the ieee80211com structure. 253 */ 254 struct ieee80211_node { 255 RBT_ENTRY(ieee80211_node) ni_node; 256 257 struct ieee80211com *ni_ic; /* back-pointer */ 258 259 u_int ni_refcnt; 260 u_int ni_scangen; /* gen# for timeout scan */ 261 262 /* hardware */ 263 u_int32_t ni_rstamp; /* recv timestamp */ 264 u_int8_t ni_rssi; /* recv ssi */ 265 266 /* header */ 267 u_int8_t ni_macaddr[IEEE80211_ADDR_LEN]; 268 u_int8_t ni_bssid[IEEE80211_ADDR_LEN]; 269 270 /* beacon, probe response */ 271 u_int8_t ni_tstamp[8]; /* from last rcv'd beacon */ 272 u_int16_t ni_intval; /* beacon interval */ 273 u_int16_t ni_capinfo; /* capabilities */ 274 u_int8_t ni_esslen; 275 u_int8_t ni_essid[IEEE80211_NWID_LEN]; 276 struct ieee80211_rateset ni_rates; /* negotiated rate set */ 277 u_int8_t *ni_country; /* country information XXX */ 278 struct ieee80211_channel *ni_chan; 279 u_int8_t ni_erp; /* 11g only */ 280 281 /* DTIM and contention free period (CFP) */ 282 u_int8_t ni_dtimcount; 283 u_int8_t ni_dtimperiod; 284 #ifdef notyet 285 u_int8_t ni_cfpperiod; /* # of DTIMs between CFPs */ 286 u_int16_t ni_cfpduremain; /* remaining cfp duration */ 287 u_int16_t ni_cfpmaxduration;/* max CFP duration in TU */ 288 u_int16_t ni_nextdtim; /* time to next DTIM */ 289 u_int16_t ni_timoffset; 290 #endif 291 292 /* power saving mode */ 293 u_int8_t ni_pwrsave; 294 struct mbuf_queue ni_savedq; /* packets queued for pspoll */ 295 296 /* RSN */ 297 struct timeout ni_eapol_to; 298 u_int ni_rsn_state; 299 u_int ni_rsn_supp_state; 300 u_int ni_rsn_gstate; 301 u_int ni_rsn_retries; 302 u_int ni_supported_rsnprotos; 303 u_int ni_rsnprotos; 304 u_int ni_supported_rsnakms; 305 u_int ni_rsnakms; 306 u_int ni_rsnciphers; 307 enum ieee80211_cipher ni_rsngroupcipher; 308 enum ieee80211_cipher ni_rsngroupmgmtcipher; 309 u_int16_t ni_rsncaps; 310 enum ieee80211_cipher ni_rsncipher; 311 u_int8_t ni_nonce[EAPOL_KEY_NONCE_LEN]; 312 u_int8_t ni_pmk[IEEE80211_PMK_LEN]; 313 u_int8_t ni_pmkid[IEEE80211_PMKID_LEN]; 314 u_int64_t ni_replaycnt; 315 u_int8_t ni_replaycnt_ok; 316 u_int64_t ni_reqreplaycnt; 317 u_int8_t ni_reqreplaycnt_ok; 318 u_int8_t *ni_rsnie; 319 struct ieee80211_key ni_pairwise_key; 320 struct ieee80211_ptk ni_ptk; 321 u_int8_t ni_key_count; 322 int ni_port_valid; 323 324 /* SA Query */ 325 u_int16_t ni_sa_query_trid; 326 struct timeout ni_sa_query_to; 327 int ni_sa_query_count; 328 329 /* HT capabilities */ 330 uint16_t ni_htcaps; 331 uint8_t ni_ampdu_param; 332 uint8_t ni_rxmcs[howmany(80,NBBY)]; 333 uint16_t ni_max_rxrate; /* in Mb/s, 0 <= rate <= 1023 */ 334 uint8_t ni_tx_mcs_set; 335 uint16_t ni_htxcaps; 336 uint32_t ni_txbfcaps; 337 uint8_t ni_aselcaps; 338 339 /* HT operation */ 340 uint8_t ni_primary_chan; /* XXX corresponds to ni_chan */ 341 uint8_t ni_htop0; 342 uint16_t ni_htop1; 343 uint16_t ni_htop2; 344 uint8_t ni_basic_mcs[howmany(128,NBBY)]; 345 346 /* Timeout handlers which trigger Tx Block Ack negotiation. */ 347 struct timeout ni_addba_req_to[IEEE80211_NUM_TID]; 348 int ni_addba_req_intval[IEEE80211_NUM_TID]; 349 #define IEEE80211_ADDBA_REQ_INTVAL_MAX 30 /* in seconds */ 350 351 /* Block Ack records */ 352 struct ieee80211_tx_ba ni_tx_ba[IEEE80211_NUM_TID]; 353 struct ieee80211_rx_ba ni_rx_ba[IEEE80211_NUM_TID]; 354 355 int ni_txmcs; /* current MCS used for TX */ 356 int ni_vht_ss; /* VHT # spatial streams */ 357 358 /* others */ 359 u_int16_t ni_associd; /* assoc response */ 360 u_int16_t ni_txseq; /* seq to be transmitted */ 361 u_int16_t ni_rxseq; /* seq previous received */ 362 u_int16_t ni_qos_txseqs[IEEE80211_NUM_TID]; 363 u_int16_t ni_qos_rxseqs[IEEE80211_NUM_TID]; 364 int ni_fails; /* failure count to associate */ 365 uint32_t ni_assoc_fail; /* assoc failure reasons */ 366 #define IEEE80211_NODE_ASSOCFAIL_CHAN 0x01 367 #define IEEE80211_NODE_ASSOCFAIL_IBSS 0x02 368 #define IEEE80211_NODE_ASSOCFAIL_PRIVACY 0x04 369 #define IEEE80211_NODE_ASSOCFAIL_BASIC_RATE 0x08 370 #define IEEE80211_NODE_ASSOCFAIL_ESSID 0x10 371 #define IEEE80211_NODE_ASSOCFAIL_BSSID 0x20 372 #define IEEE80211_NODE_ASSOCFAIL_WPA_PROTO 0x40 373 #define IEEE80211_NODE_ASSOCFAIL_WPA_KEY 0x80 374 375 int ni_inact; /* inactivity mark count */ 376 int ni_txrate; /* index to ni_rates[] */ 377 int ni_state; 378 379 u_int32_t ni_flags; /* special-purpose state */ 380 #define IEEE80211_NODE_ERP 0x0001 381 #define IEEE80211_NODE_QOS 0x0002 382 #define IEEE80211_NODE_REKEY 0x0004 /* GTK rekeying in progress */ 383 #define IEEE80211_NODE_RXPROT 0x0008 /* RX protection ON */ 384 #define IEEE80211_NODE_TXPROT 0x0010 /* TX protection ON */ 385 #define IEEE80211_NODE_TXRXPROT \ 386 (IEEE80211_NODE_TXPROT | IEEE80211_NODE_RXPROT) 387 #define IEEE80211_NODE_RXMGMTPROT 0x0020 /* RX MMPDU protection ON */ 388 #define IEEE80211_NODE_TXMGMTPROT 0x0040 /* TX MMPDU protection ON */ 389 #define IEEE80211_NODE_MFP 0x0080 /* MFP negotiated */ 390 #define IEEE80211_NODE_PMK 0x0100 /* ni_pmk set */ 391 #define IEEE80211_NODE_PMKID 0x0200 /* ni_pmkid set */ 392 #define IEEE80211_NODE_HT 0x0400 /* HT negotiated */ 393 #define IEEE80211_NODE_SA_QUERY 0x0800 /* SA Query in progress */ 394 #define IEEE80211_NODE_SA_QUERY_FAILED 0x1000 /* last SA Query failed */ 395 #define IEEE80211_NODE_RSN_NEW_PTK 0x2000 /* expecting a new PTK */ 396 #define IEEE80211_NODE_HT_SGI20 0x4000 /* SGI on 20 MHz negotiated */ 397 #define IEEE80211_NODE_HT_SGI40 0x8000 /* SGI on 40 MHz negotiated */ 398 #define IEEE80211_NODE_VHT 0x10000 /* VHT negotiated */ 399 #define IEEE80211_NODE_HTCAP 0x20000 /* claims to support HT */ 400 401 /* If not NULL, this function gets called when ni_refcnt hits zero. */ 402 void (*ni_unref_cb)(struct ieee80211com *, 403 struct ieee80211_node *); 404 void * ni_unref_arg; 405 size_t ni_unref_arg_size; 406 }; 407 408 RBT_HEAD(ieee80211_tree, ieee80211_node); 409 410 struct ieee80211_ess_rbt { 411 RBT_ENTRY(ieee80211_ess_rbt) ess_rbt; 412 u_int8_t esslen; 413 u_int8_t essid[IEEE80211_NWID_LEN]; 414 struct ieee80211_node *ni2; 415 struct ieee80211_node *ni5; 416 struct ieee80211_node *ni; 417 }; 418 419 RBT_HEAD(ieee80211_ess_tree, ieee80211_ess_rbt); 420 421 static inline void 422 ieee80211_node_incref(struct ieee80211_node *ni) 423 { 424 int s; 425 426 s = splnet(); 427 ni->ni_refcnt++; 428 splx(s); 429 } 430 431 static inline u_int 432 ieee80211_node_decref(struct ieee80211_node *ni) 433 { 434 u_int refcnt; 435 int s; 436 437 s = splnet(); 438 refcnt = --ni->ni_refcnt; 439 splx(s); 440 return refcnt; 441 } 442 443 static inline struct ieee80211_node * 444 ieee80211_ref_node(struct ieee80211_node *ni) 445 { 446 ieee80211_node_incref(ni); 447 return ni; 448 } 449 450 static inline void 451 ieee80211_unref_node(struct ieee80211_node **ni) 452 { 453 ieee80211_node_decref(*ni); 454 *ni = NULL; /* guard against use */ 455 } 456 457 /* 458 * Check if the peer supports HT. 459 * Require a HT capabilities IE and at least one of the mandatory MCS. 460 * MCS 0-7 are mandatory but some APs have particular MCS disabled. 461 */ 462 static inline int 463 ieee80211_node_supports_ht(struct ieee80211_node *ni) 464 { 465 return ((ni->ni_flags & IEEE80211_NODE_HTCAP) && 466 ni->ni_rxmcs[0] & 0xff); 467 } 468 469 /* Check if the peer supports HT short guard interval (SGI) on 20 MHz. */ 470 static inline int 471 ieee80211_node_supports_ht_sgi20(struct ieee80211_node *ni) 472 { 473 return ieee80211_node_supports_ht(ni) && 474 (ni->ni_htcaps & IEEE80211_HTCAP_SGI20); 475 } 476 477 /* Check if the peer supports HT short guard interval (SGI) on 40 MHz. */ 478 static inline int 479 ieee80211_node_supports_ht_sgi40(struct ieee80211_node *ni) 480 { 481 return ieee80211_node_supports_ht(ni) && 482 (ni->ni_htcaps & IEEE80211_HTCAP_SGI40); 483 } 484 485 struct ieee80211com; 486 487 typedef void ieee80211_iter_func(void *, struct ieee80211_node *); 488 489 void ieee80211_node_attach(struct ifnet *); 490 void ieee80211_node_lateattach(struct ifnet *); 491 void ieee80211_node_detach(struct ifnet *); 492 493 void ieee80211_begin_scan(struct ifnet *); 494 void ieee80211_next_scan(struct ifnet *); 495 void ieee80211_end_scan(struct ifnet *); 496 void ieee80211_reset_scan(struct ifnet *); 497 struct ieee80211_node *ieee80211_alloc_node(struct ieee80211com *, 498 const u_int8_t *); 499 struct ieee80211_node *ieee80211_dup_bss(struct ieee80211com *, 500 const u_int8_t *); 501 struct ieee80211_node *ieee80211_find_node(struct ieee80211com *, 502 const u_int8_t *); 503 void ieee80211_ba_del(struct ieee80211_node *); 504 struct ieee80211_node *ieee80211_find_rxnode(struct ieee80211com *, 505 const struct ieee80211_frame *); 506 struct ieee80211_node *ieee80211_find_txnode(struct ieee80211com *, 507 const u_int8_t *); 508 struct ieee80211_node * 509 ieee80211_find_node_for_beacon(struct ieee80211com *, 510 const u_int8_t *, const struct ieee80211_channel *, 511 const char *, u_int8_t); 512 void ieee80211_release_node(struct ieee80211com *, 513 struct ieee80211_node *); 514 void ieee80211_node_cleanup(struct ieee80211com *, struct ieee80211_node *); 515 void ieee80211_free_allnodes(struct ieee80211com *, int); 516 void ieee80211_iterate_nodes(struct ieee80211com *, 517 ieee80211_iter_func *, void *); 518 void ieee80211_clean_cached(struct ieee80211com *); 519 void ieee80211_clean_nodes(struct ieee80211com *, int); 520 void ieee80211_setup_htcaps(struct ieee80211_node *, const uint8_t *, 521 uint8_t); 522 void ieee80211_clear_htcaps(struct ieee80211_node *); 523 int ieee80211_setup_htop(struct ieee80211_node *, const uint8_t *, 524 uint8_t, int); 525 int ieee80211_setup_rates(struct ieee80211com *, 526 struct ieee80211_node *, const u_int8_t *, const u_int8_t *, int); 527 void ieee80211_node_trigger_addba_req(struct ieee80211_node *, int); 528 int ieee80211_iserp_sta(const struct ieee80211_node *); 529 void ieee80211_count_longslotsta(void *, struct ieee80211_node *); 530 void ieee80211_count_nonerpsta(void *, struct ieee80211_node *); 531 void ieee80211_count_pssta(void *, struct ieee80211_node *); 532 void ieee80211_count_rekeysta(void *, struct ieee80211_node *); 533 void ieee80211_node_join(struct ieee80211com *, 534 struct ieee80211_node *, int); 535 void ieee80211_node_leave(struct ieee80211com *, 536 struct ieee80211_node *); 537 int ieee80211_match_bss(struct ieee80211com *, struct ieee80211_node *, int); 538 struct ieee80211_node *ieee80211_node_choose_bss(struct ieee80211com *, int, 539 struct ieee80211_node **); 540 void ieee80211_node_join_bss(struct ieee80211com *, struct ieee80211_node *); 541 void ieee80211_create_ibss(struct ieee80211com* , 542 struct ieee80211_channel *); 543 void ieee80211_notify_dtim(struct ieee80211com *); 544 void ieee80211_set_tim(struct ieee80211com *, int, int); 545 void ieee80211_free_node(struct ieee80211com *, struct ieee80211_node *); 546 547 int ieee80211_node_cmp(const struct ieee80211_node *, 548 const struct ieee80211_node *); 549 int ieee80211_ess_cmp(const struct ieee80211_ess_rbt *, 550 const struct ieee80211_ess_rbt *); 551 RBT_PROTOTYPE(ieee80211_tree, ieee80211_node, ni_node, ieee80211_node_cmp); 552 RBT_PROTOTYPE(ieee80211_ess_tree, ieee80211_ess_rbt, ess_rbt, ieee80211_ess_cmp); 553 554 #endif /* _NET80211_IEEE80211_NODE_H_ */ 555