The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/net80211/ieee80211_node.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*-
    2  * Copyright (c) 2001 Atsushi Onoe
    3  * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
    4  * All rights reserved.
    5  *
    6  * Redistribution and use in source and binary forms, with or without
    7  * modification, are permitted provided that the following conditions
    8  * are met:
    9  * 1. Redistributions of source code must retain the above copyright
   10  *    notice, this list of conditions and the following disclaimer.
   11  * 2. Redistributions in binary form must reproduce the above copyright
   12  *    notice, this list of conditions and the following disclaimer in the
   13  *    documentation and/or other materials provided with the distribution.
   14  *
   15  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
   16  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   17  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
   18  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
   19  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
   20  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
   21  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
   22  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   23  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
   24  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   25  *
   26  * $FreeBSD: releng/11.0/sys/net80211/ieee80211_node.h 302018 2016-06-19 07:31:02Z adrian $
   27  */
   28 #ifndef _NET80211_IEEE80211_NODE_H_
   29 #define _NET80211_IEEE80211_NODE_H_
   30 
   31 #include <net80211/ieee80211_ioctl.h>           /* for ieee80211_nodestats */
   32 #include <net80211/ieee80211_ht.h>              /* for aggregation state */
   33 
   34 /*
   35  * Each ieee80211com instance has a single timer that fires every
   36  * IEEE80211_INACT_WAIT seconds to handle "inactivity processing".
   37  * This is used to do node inactivity processing when operating
   38  * as an AP, adhoc or mesh mode.  For inactivity processing each node
   39  * has a timeout set in it's ni_inact field that is decremented
   40  * on each timeout and the node is reclaimed when the counter goes
   41  * to zero.  We use different inactivity timeout values depending
   42  * on whether the node is associated and authorized (either by
   43  * 802.1x or open/shared key authentication) or associated but yet
   44  * to be authorized.  The latter timeout is shorter to more aggressively
   45  * reclaim nodes that leave part way through the 802.1x exchange.
   46  */
   47 #define IEEE80211_INACT_WAIT    15              /* inactivity interval (secs) */
   48 #define IEEE80211_INACT_INIT    (30/IEEE80211_INACT_WAIT)       /* initial */
   49 #define IEEE80211_INACT_AUTH    (180/IEEE80211_INACT_WAIT)      /* associated but not authorized */
   50 #define IEEE80211_INACT_RUN     (300/IEEE80211_INACT_WAIT)      /* authorized */
   51 #define IEEE80211_INACT_PROBE   (30/IEEE80211_INACT_WAIT)       /* probe */
   52 #define IEEE80211_INACT_SCAN    (300/IEEE80211_INACT_WAIT)      /* scanned */
   53 
   54 #define IEEE80211_TRANS_WAIT    2               /* mgt frame tx timer (secs) */
   55 
   56 /* threshold for aging overlapping non-ERP bss */
   57 #define IEEE80211_NONERP_PRESENT_AGE    msecs_to_ticks(60*1000)
   58 
   59 #define IEEE80211_NODE_HASHSIZE 32              /* NB: hash size must be pow2 */
   60 /* simple hash is enough for variation of macaddr */
   61 #define IEEE80211_NODE_HASH(ic, addr)   \
   62         (((const uint8_t *)(addr))[IEEE80211_ADDR_LEN - 1] % \
   63                 IEEE80211_NODE_HASHSIZE)
   64 
   65 struct ieee80211_node_table;
   66 struct ieee80211com;
   67 struct ieee80211vap;
   68 
   69 /*
   70  * Information element ``blob''.  We use this structure
   71  * to capture management frame payloads that need to be
   72  * retained.  Information elements within the payload that
   73  * we need to consult have references recorded.
   74  */
   75 struct ieee80211_ies {
   76         /* the following are either NULL or point within data */
   77         uint8_t *wpa_ie;        /* captured WPA ie */
   78         uint8_t *rsn_ie;        /* captured RSN ie */
   79         uint8_t *wme_ie;        /* captured WME ie */
   80         uint8_t *ath_ie;        /* captured Atheros ie */
   81         uint8_t *htcap_ie;      /* captured HTCAP ie */
   82         uint8_t *htinfo_ie;     /* captured HTINFO ie */
   83         uint8_t *tdma_ie;       /* captured TDMA ie */
   84         uint8_t *meshid_ie;     /* captured MESH ID ie */
   85         uint8_t *spare[4];
   86         /* NB: these must be the last members of this structure */
   87         uint8_t *data;          /* frame data > 802.11 header */
   88         int     len;            /* data size in bytes */
   89 };
   90 
   91 /*
   92  * 802.11s (Mesh) Peer Link FSM state.
   93  */
   94 enum ieee80211_mesh_mlstate {
   95         IEEE80211_NODE_MESH_IDLE        = 0,
   96         IEEE80211_NODE_MESH_OPENSNT     = 1,    /* open frame sent */
   97         IEEE80211_NODE_MESH_OPENRCV     = 2,    /* open frame received */
   98         IEEE80211_NODE_MESH_CONFIRMRCV  = 3,    /* confirm frame received */
   99         IEEE80211_NODE_MESH_ESTABLISHED = 4,    /* link established */
  100         IEEE80211_NODE_MESH_HOLDING     = 5,    /* link closing */
  101 };
  102 #define IEEE80211_MESH_MLSTATE_BITS \
  103         "\2\1IDLE\2OPENSNT\2OPENRCV\3CONFIRMRCV\4ESTABLISHED\5HOLDING"
  104 
  105 /*
  106  * Node specific information.  Note that drivers are expected
  107  * to derive from this structure to add device-specific per-node
  108  * state.  This is done by overriding the ic_node_* methods in
  109  * the ieee80211com structure.
  110  */
  111 struct ieee80211_node {
  112         struct ieee80211vap     *ni_vap;        /* associated vap */
  113         struct ieee80211com     *ni_ic;         /* copy from vap to save deref*/
  114         struct ieee80211_node_table *ni_table;  /* NB: may be NULL */
  115         TAILQ_ENTRY(ieee80211_node) ni_list;    /* list of all nodes */
  116         LIST_ENTRY(ieee80211_node) ni_hash;     /* hash collision list */
  117         u_int                   ni_refcnt;      /* count of held references */
  118         u_int                   ni_flags;
  119 #define IEEE80211_NODE_AUTH     0x000001        /* authorized for data */
  120 #define IEEE80211_NODE_QOS      0x000002        /* QoS enabled */
  121 #define IEEE80211_NODE_ERP      0x000004        /* ERP enabled */
  122 /* NB: this must have the same value as IEEE80211_FC1_PWR_MGT */
  123 #define IEEE80211_NODE_PWR_MGT  0x000010        /* power save mode enabled */
  124 #define IEEE80211_NODE_AREF     0x000020        /* authentication ref held */
  125 #define IEEE80211_NODE_HT       0x000040        /* HT enabled */
  126 #define IEEE80211_NODE_HTCOMPAT 0x000080        /* HT setup w/ vendor OUI's */
  127 #define IEEE80211_NODE_WPS      0x000100        /* WPS association */
  128 #define IEEE80211_NODE_TSN      0x000200        /* TSN association */
  129 #define IEEE80211_NODE_AMPDU_RX 0x000400        /* AMPDU rx enabled */
  130 #define IEEE80211_NODE_AMPDU_TX 0x000800        /* AMPDU tx enabled */
  131 #define IEEE80211_NODE_MIMO_PS  0x001000        /* MIMO power save enabled */
  132 #define IEEE80211_NODE_MIMO_RTS 0x002000        /* send RTS in MIMO PS */
  133 #define IEEE80211_NODE_RIFS     0x004000        /* RIFS enabled */
  134 #define IEEE80211_NODE_SGI20    0x008000        /* Short GI in HT20 enabled */
  135 #define IEEE80211_NODE_SGI40    0x010000        /* Short GI in HT40 enabled */
  136 #define IEEE80211_NODE_ASSOCID  0x020000        /* xmit requires associd */
  137 #define IEEE80211_NODE_AMSDU_RX 0x040000        /* AMSDU rx enabled */
  138 #define IEEE80211_NODE_AMSDU_TX 0x080000        /* AMSDU tx enabled */
  139         uint16_t                ni_associd;     /* association ID */
  140         uint16_t                ni_vlan;        /* vlan tag */
  141         uint16_t                ni_txpower;     /* current transmit power */
  142         uint8_t                 ni_authmode;    /* authentication algorithm */
  143         uint8_t                 ni_ath_flags;   /* Atheros feature flags */
  144         /* NB: These must have the same values as IEEE80211_ATHC_* */
  145 #define IEEE80211_NODE_TURBOP   0x0001          /* Turbo prime enable */
  146 #define IEEE80211_NODE_COMP     0x0002          /* Compresssion enable */
  147 #define IEEE80211_NODE_FF       0x0004          /* Fast Frame capable */
  148 #define IEEE80211_NODE_XR       0x0008          /* Atheros WME enable */
  149 #define IEEE80211_NODE_AR       0x0010          /* AR capable */
  150 #define IEEE80211_NODE_BOOST    0x0080          /* Dynamic Turbo boosted */
  151         uint16_t                ni_ath_defkeyix;/* Atheros def key index */
  152         const struct ieee80211_txparam *ni_txparms;
  153         uint32_t                ni_jointime;    /* time of join (secs) */
  154         uint32_t                *ni_challenge;  /* shared-key challenge */
  155         struct ieee80211_ies    ni_ies;         /* captured ie's */
  156                                                 /* tx seq per-tid */
  157         ieee80211_seq           ni_txseqs[IEEE80211_TID_SIZE];
  158                                                 /* rx seq previous per-tid*/
  159         ieee80211_seq           ni_rxseqs[IEEE80211_TID_SIZE];
  160         uint32_t                ni_rxfragstamp; /* time stamp of last rx frag */
  161         struct mbuf             *ni_rxfrag[3];  /* rx frag reassembly */
  162         struct ieee80211_key    ni_ucastkey;    /* unicast key */
  163 
  164         /* hardware */
  165         uint32_t                ni_avgrssi;     /* recv ssi state */
  166         int8_t                  ni_noise;       /* noise floor */
  167 
  168         /* mimo statistics */
  169         uint32_t                ni_mimo_rssi_ctl[IEEE80211_MAX_CHAINS];
  170         uint32_t                ni_mimo_rssi_ext[IEEE80211_MAX_CHAINS];
  171         uint8_t                 ni_mimo_noise_ctl[IEEE80211_MAX_CHAINS];
  172         uint8_t                 ni_mimo_noise_ext[IEEE80211_MAX_CHAINS];
  173         uint8_t                 ni_mimo_chains;
  174 
  175         /* header */
  176         uint8_t                 ni_macaddr[IEEE80211_ADDR_LEN];
  177         uint8_t                 ni_bssid[IEEE80211_ADDR_LEN];
  178 
  179         /* beacon, probe response */
  180         union {
  181                 uint8_t         data[8];
  182                 u_int64_t       tsf;
  183         } ni_tstamp;                            /* from last rcv'd beacon */
  184         uint16_t                ni_intval;      /* beacon interval */
  185         uint16_t                ni_capinfo;     /* capabilities */
  186         uint8_t                 ni_esslen;
  187         uint8_t                 ni_essid[IEEE80211_NWID_LEN];
  188         struct ieee80211_rateset ni_rates;      /* negotiated rate set */
  189         struct ieee80211_channel *ni_chan;
  190         uint16_t                ni_fhdwell;     /* FH only */
  191         uint8_t                 ni_fhindex;     /* FH only */
  192         uint16_t                ni_erp;         /* ERP from beacon/probe resp */
  193         uint16_t                ni_timoff;      /* byte offset to TIM ie */
  194         uint8_t                 ni_dtim_period; /* DTIM period */
  195         uint8_t                 ni_dtim_count;  /* DTIM count for last bcn */
  196 
  197         /* 11s state */
  198         uint8_t                 ni_meshidlen;
  199         uint8_t                 ni_meshid[IEEE80211_MESHID_LEN];
  200         enum ieee80211_mesh_mlstate ni_mlstate; /* peering management state */
  201         uint16_t                ni_mllid;       /* link local ID */
  202         uint16_t                ni_mlpid;       /* link peer ID */
  203         struct callout          ni_mltimer;     /* link mesh timer */
  204         uint8_t                 ni_mlrcnt;      /* link mesh retry counter */
  205         uint8_t                 ni_mltval;      /* link mesh timer value */
  206         struct callout          ni_mlhtimer;    /* link mesh backoff timer */
  207         uint8_t                 ni_mlhcnt;      /* link mesh holding counter */
  208 
  209         /* 11n state */
  210         uint16_t                ni_htcap;       /* HT capabilities */
  211         uint8_t                 ni_htparam;     /* HT params */
  212         uint8_t                 ni_htctlchan;   /* HT control channel */
  213         uint8_t                 ni_ht2ndchan;   /* HT 2nd channel */
  214         uint8_t                 ni_htopmode;    /* HT operating mode */
  215         uint8_t                 ni_htstbc;      /* HT */
  216         uint8_t                 ni_chw;         /* negotiated channel width */
  217         struct ieee80211_htrateset ni_htrates;  /* negotiated ht rate set */
  218         struct ieee80211_tx_ampdu ni_tx_ampdu[WME_NUM_TID];
  219         struct ieee80211_rx_ampdu ni_rx_ampdu[WME_NUM_TID];
  220 
  221         /* fast-frames state */
  222         struct mbuf *           ni_tx_superg[WME_NUM_TID];
  223 
  224         /* others */
  225         short                   ni_inact;       /* inactivity mark count */
  226         short                   ni_inact_reload;/* inactivity reload value */
  227         int                     ni_txrate;      /* legacy rate/MCS */
  228         struct ieee80211_psq    ni_psq;         /* power save queue */
  229         struct ieee80211_nodestats ni_stats;    /* per-node statistics */
  230 
  231         struct ieee80211vap     *ni_wdsvap;     /* associated WDS vap */
  232         void                    *ni_rctls;      /* private ratectl state */
  233         uint64_t                ni_spare[3];
  234 };
  235 MALLOC_DECLARE(M_80211_NODE);
  236 MALLOC_DECLARE(M_80211_NODE_IE);
  237 
  238 #define IEEE80211_NODE_ATH      (IEEE80211_NODE_FF | IEEE80211_NODE_TURBOP)
  239 #define IEEE80211_NODE_AMPDU \
  240         (IEEE80211_NODE_AMPDU_RX | IEEE80211_NODE_AMPDU_TX)
  241 #define IEEE80211_NODE_AMSDU \
  242         (IEEE80211_NODE_AMSDU_RX | IEEE80211_NODE_AMSDU_TX)
  243 #define IEEE80211_NODE_HT_ALL \
  244         (IEEE80211_NODE_HT | IEEE80211_NODE_HTCOMPAT | \
  245          IEEE80211_NODE_AMPDU | IEEE80211_NODE_AMSDU | \
  246          IEEE80211_NODE_MIMO_PS | IEEE80211_NODE_MIMO_RTS | \
  247          IEEE80211_NODE_RIFS | IEEE80211_NODE_SGI20 | IEEE80211_NODE_SGI40)
  248 
  249 #define IEEE80211_NODE_BITS \
  250         "\2\1AUTH\2QOS\3ERP\5PWR_MGT\6AREF\7HT\10HTCOMPAT\11WPS\12TSN" \
  251         "\13AMPDU_RX\14AMPDU_TX\15MIMO_PS\16MIMO_RTS\17RIFS\20SGI20\21SGI40" \
  252         "\22ASSOCID"
  253 
  254 #define IEEE80211_NODE_AID(ni)  IEEE80211_AID(ni->ni_associd)
  255 
  256 #define IEEE80211_NODE_STAT(ni,stat)    (ni->ni_stats.ns_##stat++)
  257 #define IEEE80211_NODE_STAT_ADD(ni,stat,v)      (ni->ni_stats.ns_##stat += v)
  258 #define IEEE80211_NODE_STAT_SET(ni,stat,v)      (ni->ni_stats.ns_##stat = v)
  259 
  260 /*
  261  * Filtered rssi calculation support.  The receive rssi is maintained
  262  * as an average over the last 10 frames received using a low pass filter
  263  * (all frames for now, possibly need to be more selective).  Calculations
  264  * are designed such that a good compiler can optimize them.  The avg
  265  * rssi state should be initialized to IEEE80211_RSSI_DUMMY_MARKER and
  266  * each sample incorporated with IEEE80211_RSSI_LPF.  Use IEEE80211_RSSI_GET
  267  * to extract the current value.
  268  *
  269  * Note that we assume rssi data are in the range [-127..127] and we
  270  * discard values <-20.  This is consistent with assumptions throughout
  271  * net80211 that signal strength data are in .5 dBm units relative to
  272  * the current noise floor (linear, not log).
  273  */
  274 #define IEEE80211_RSSI_LPF_LEN          10
  275 #define IEEE80211_RSSI_DUMMY_MARKER     127
  276 /* NB: pow2 to optimize out * and / */
  277 #define IEEE80211_RSSI_EP_MULTIPLIER    (1<<7)
  278 #define IEEE80211_RSSI_IN(x)            ((x) * IEEE80211_RSSI_EP_MULTIPLIER)
  279 #define _IEEE80211_RSSI_LPF(x, y, len) \
  280     (((x) != IEEE80211_RSSI_DUMMY_MARKER) ? (((x) * ((len) - 1) + (y)) / (len)) : (y))
  281 #define IEEE80211_RSSI_LPF(x, y) do {                                   \
  282     if ((y) >= -20) {                                                   \
  283         x = _IEEE80211_RSSI_LPF((x), IEEE80211_RSSI_IN((y)),            \
  284                 IEEE80211_RSSI_LPF_LEN);                                \
  285     }                                                                   \
  286 } while (0)
  287 #define IEEE80211_RSSI_EP_RND(x, mul) \
  288         ((((x) % (mul)) >= ((mul)/2)) ? ((x) + ((mul) - 1)) / (mul) : (x)/(mul))
  289 #define IEEE80211_RSSI_GET(x) \
  290         IEEE80211_RSSI_EP_RND(x, IEEE80211_RSSI_EP_MULTIPLIER)
  291 
  292 static __inline struct ieee80211_node *
  293 ieee80211_ref_node(struct ieee80211_node *ni)
  294 {
  295         ieee80211_node_incref(ni);
  296         return ni;
  297 }
  298 
  299 static __inline void
  300 ieee80211_unref_node(struct ieee80211_node **ni)
  301 {
  302         ieee80211_node_decref(*ni);
  303         *ni = NULL;                     /* guard against use */
  304 }
  305 
  306 void    ieee80211_node_attach(struct ieee80211com *);
  307 void    ieee80211_node_lateattach(struct ieee80211com *);
  308 void    ieee80211_node_detach(struct ieee80211com *);
  309 void    ieee80211_node_vattach(struct ieee80211vap *);
  310 void    ieee80211_node_latevattach(struct ieee80211vap *);
  311 void    ieee80211_node_vdetach(struct ieee80211vap *);
  312 
  313 static __inline int
  314 ieee80211_node_is_authorized(const struct ieee80211_node *ni)
  315 {
  316         return (ni->ni_flags & IEEE80211_NODE_AUTH);
  317 }
  318 
  319 void    ieee80211_node_authorize(struct ieee80211_node *);
  320 void    ieee80211_node_unauthorize(struct ieee80211_node *);
  321 
  322 void    ieee80211_node_setuptxparms(struct ieee80211_node *);
  323 void    ieee80211_node_set_chan(struct ieee80211_node *,
  324                 struct ieee80211_channel *);
  325 void    ieee80211_create_ibss(struct ieee80211vap*, struct ieee80211_channel *);
  326 void    ieee80211_reset_bss(struct ieee80211vap *);
  327 void    ieee80211_sync_curchan(struct ieee80211com *);
  328 void    ieee80211_setupcurchan(struct ieee80211com *,
  329             struct ieee80211_channel *);
  330 void    ieee80211_setcurchan(struct ieee80211com *, struct ieee80211_channel *);
  331 void    ieee80211_update_chw(struct ieee80211com *);
  332 int     ieee80211_ibss_merge_check(struct ieee80211_node *);
  333 int     ieee80211_ibss_merge(struct ieee80211_node *);
  334 struct ieee80211_scan_entry;
  335 int     ieee80211_sta_join(struct ieee80211vap *, struct ieee80211_channel *,
  336                 const struct ieee80211_scan_entry *);
  337 void    ieee80211_sta_leave(struct ieee80211_node *);
  338 void    ieee80211_node_deauth(struct ieee80211_node *, int);
  339 
  340 int     ieee80211_ies_init(struct ieee80211_ies *, const uint8_t *, int);
  341 void    ieee80211_ies_cleanup(struct ieee80211_ies *);
  342 void    ieee80211_ies_expand(struct ieee80211_ies *);
  343 #define ieee80211_ies_setie(_ies, _ie, _off) do {               \
  344         (_ies)._ie = (_ies).data + (_off);                      \
  345 } while (0)
  346 
  347 /*
  348  * Table of ieee80211_node instances.  Each ieee80211com
  349  * has one that holds association stations (when operating
  350  * as an ap) or neighbors (in ibss mode).
  351  *
  352  * XXX embed this in ieee80211com instead of indirect?
  353  */
  354 struct ieee80211_node_table {
  355         struct ieee80211com     *nt_ic;         /* back reference */
  356         ieee80211_node_lock_t   nt_nodelock;    /* on node table */
  357         TAILQ_HEAD(, ieee80211_node) nt_node;   /* information of all nodes */
  358         LIST_HEAD(, ieee80211_node) nt_hash[IEEE80211_NODE_HASHSIZE];
  359         struct ieee80211_node   **nt_keyixmap;  /* key ix -> node map */
  360         int                     nt_keyixmax;    /* keyixmap size */
  361         const char              *nt_name;       /* table name for debug msgs */
  362         int                     nt_inact_init;  /* initial node inact setting */
  363 };
  364 
  365 struct ieee80211_node *ieee80211_alloc_node(struct ieee80211_node_table *,
  366                 struct ieee80211vap *,
  367                 const uint8_t macaddr[IEEE80211_ADDR_LEN]);
  368 struct ieee80211_node *ieee80211_tmp_node(struct ieee80211vap *,
  369                 const uint8_t macaddr[IEEE80211_ADDR_LEN]);
  370 struct ieee80211_node *ieee80211_dup_bss(struct ieee80211vap *,
  371                 const uint8_t macaddr[IEEE80211_ADDR_LEN]);
  372 struct ieee80211_node *ieee80211_node_create_wds(struct ieee80211vap *,
  373                 const uint8_t bssid[IEEE80211_ADDR_LEN],
  374                 struct ieee80211_channel *);
  375 #ifdef IEEE80211_DEBUG_REFCNT
  376 void    ieee80211_free_node_debug(struct ieee80211_node *,
  377                 const char *func, int line);
  378 struct ieee80211_node *ieee80211_find_node_locked_debug(
  379                 struct ieee80211_node_table *,
  380                 const uint8_t macaddr[IEEE80211_ADDR_LEN],
  381                 const char *func, int line);
  382 struct ieee80211_node *ieee80211_find_node_debug(struct ieee80211_node_table *,
  383                 const uint8_t macaddr[IEEE80211_ADDR_LEN],
  384                 const char *func, int line);
  385 struct ieee80211_node *ieee80211_find_vap_node_locked_debug(
  386                 struct ieee80211_node_table *,
  387                 const struct ieee80211vap *vap,
  388                 const uint8_t macaddr[IEEE80211_ADDR_LEN],
  389                 const char *func, int line);
  390 struct ieee80211_node *ieee80211_find_vap_node_debug(
  391                 struct ieee80211_node_table *,
  392                 const struct ieee80211vap *vap,
  393                 const uint8_t macaddr[IEEE80211_ADDR_LEN],
  394                 const char *func, int line);
  395 struct ieee80211_node * ieee80211_find_rxnode_debug(struct ieee80211com *,
  396                 const struct ieee80211_frame_min *,
  397                 const char *func, int line);
  398 struct ieee80211_node * ieee80211_find_rxnode_withkey_debug(
  399                 struct ieee80211com *,
  400                 const struct ieee80211_frame_min *, uint16_t keyix,
  401                 const char *func, int line);
  402 struct ieee80211_node *ieee80211_find_txnode_debug(struct ieee80211vap *,
  403                 const uint8_t *,
  404                 const char *func, int line);
  405 #define ieee80211_free_node(ni) \
  406         ieee80211_free_node_debug(ni, __func__, __LINE__)
  407 #define ieee80211_find_node_locked(nt, mac) \
  408         ieee80211_find_node_locked_debug(nt, mac, __func__, __LINE__)
  409 #define ieee80211_find_node(nt, mac) \
  410         ieee80211_find_node_debug(nt, mac, __func__, __LINE__)
  411 #define ieee80211_find_vap_node_locked(nt, vap, mac) \
  412         ieee80211_find_vap_node_locked_debug(nt, vap, mac, __func__, __LINE__)
  413 #define ieee80211_find_vap_node(nt, vap, mac) \
  414         ieee80211_find_vap_node_debug(nt, vap, mac, __func__, __LINE__)
  415 #define ieee80211_find_rxnode(ic, wh) \
  416         ieee80211_find_rxnode_debug(ic, wh, __func__, __LINE__)
  417 #define ieee80211_find_rxnode_withkey(ic, wh, keyix) \
  418         ieee80211_find_rxnode_withkey_debug(ic, wh, keyix, __func__, __LINE__)
  419 #define ieee80211_find_txnode(vap, mac) \
  420         ieee80211_find_txnode_debug(vap, mac, __func__, __LINE__)
  421 #else
  422 void    ieee80211_free_node(struct ieee80211_node *);
  423 struct ieee80211_node *ieee80211_find_node_locked(struct ieee80211_node_table *,
  424                 const uint8_t macaddr[IEEE80211_ADDR_LEN]);
  425 struct ieee80211_node *ieee80211_find_node(struct ieee80211_node_table *,
  426                 const uint8_t macaddr[IEEE80211_ADDR_LEN]);
  427 struct ieee80211_node *ieee80211_find_vap_node_locked(
  428                 struct ieee80211_node_table *, const struct ieee80211vap *,
  429                 const uint8_t macaddr[IEEE80211_ADDR_LEN]);
  430 struct ieee80211_node *ieee80211_find_vap_node(
  431                 struct ieee80211_node_table *, const struct ieee80211vap *,
  432                 const uint8_t macaddr[IEEE80211_ADDR_LEN]);
  433 struct ieee80211_node * ieee80211_find_rxnode(struct ieee80211com *,
  434                 const struct ieee80211_frame_min *);
  435 struct ieee80211_node * ieee80211_find_rxnode_withkey(struct ieee80211com *,
  436                 const struct ieee80211_frame_min *, uint16_t keyix);
  437 struct ieee80211_node *ieee80211_find_txnode(struct ieee80211vap *,
  438                 const uint8_t macaddr[IEEE80211_ADDR_LEN]);
  439 #endif
  440 int     ieee80211_node_delucastkey(struct ieee80211_node *);
  441 void    ieee80211_node_timeout(void *arg);
  442 
  443 typedef void ieee80211_iter_func(void *, struct ieee80211_node *);
  444 int     ieee80211_iterate_nt(struct ieee80211_node_table *,
  445                 struct ieee80211_node **, uint16_t);
  446 void    ieee80211_iterate_nodes(struct ieee80211_node_table *,
  447                 ieee80211_iter_func *, void *);
  448 
  449 void    ieee80211_notify_erp(struct ieee80211com *);
  450 void    ieee80211_dump_node(struct ieee80211_node_table *,
  451                 struct ieee80211_node *);
  452 void    ieee80211_dump_nodes(struct ieee80211_node_table *);
  453 
  454 struct ieee80211_node *ieee80211_fakeup_adhoc_node(struct ieee80211vap *,
  455                 const uint8_t macaddr[IEEE80211_ADDR_LEN]);
  456 struct ieee80211_scanparams;
  457 void    ieee80211_init_neighbor(struct ieee80211_node *,
  458                 const struct ieee80211_frame *,
  459                 const struct ieee80211_scanparams *);
  460 struct ieee80211_node *ieee80211_add_neighbor(struct ieee80211vap *,
  461                 const struct ieee80211_frame *,
  462                 const struct ieee80211_scanparams *);
  463 void    ieee80211_node_join(struct ieee80211_node *,int);
  464 void    ieee80211_node_leave(struct ieee80211_node *);
  465 int8_t  ieee80211_getrssi(struct ieee80211vap *);
  466 void    ieee80211_getsignal(struct ieee80211vap *, int8_t *, int8_t *);
  467 #endif /* _NET80211_IEEE80211_NODE_H_ */

Cache object: 76a6b9baf9224ecc77e0b343955d6a51


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.