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/i386/include/if_wavelan_ieee.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) 1997, 1998, 1999
    3  *      Bill Paul <wpaul@ctr.columbia.edu>.  All rights reserved.
    4  *
    5  * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
    8  * 1. Redistributions of source code must retain the above copyright
    9  *    notice, this list of conditions and the following disclaimer.
   10  * 2. Redistributions in binary form must reproduce the above copyright
   11  *    notice, this list of conditions and the following disclaimer in the
   12  *    documentation and/or other materials provided with the distribution.
   13  * 3. All advertising materials mentioning features or use of this software
   14  *    must display the following acknowledgement:
   15  *      This product includes software developed by Bill Paul.
   16  * 4. Neither the name of the author nor the names of any co-contributors
   17  *    may be used to endorse or promote products derived from this software
   18  *    without specific prior written permission.
   19  *
   20  * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
   21  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   22  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   23  * ARE DISCLAIMED.  IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
   24  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   25  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   26  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   27  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   28  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   29  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
   30  * THE POSSIBILITY OF SUCH DAMAGE.
   31  *
   32  * $FreeBSD$
   33  */
   34 
   35 #ifndef _IF_WAVELAN_IEEE_H
   36 #define _IF_WAVELAN_IEEE_H
   37 
   38 /*
   39  * This header defines a simple command interface to the FreeBSD
   40  * WaveLAN/IEEE driver (wi) driver, which is used to set certain
   41  * device-specific parameters which can't be easily managed through
   42  * ifconfig(8). No, sysctl(2) is not the answer. I said a _simple_
   43  * interface, didn't I.
   44  */
   45 
   46 #ifndef SIOCSWAVELAN
   47 #define SIOCSWAVELAN    SIOCSIFGENERIC
   48 #endif
   49 
   50 #ifndef SIOCGWAVELAN
   51 #define SIOCGWAVELAN    SIOCGIFGENERIC
   52 #endif
   53 
   54 /*
   55  * Technically I don't think there's a limit to a record
   56  * length. The largest record is the one that contains the CIS
   57  * data, which is 240 words long, so 256 should be a safe
   58  * value.
   59  */
   60 #define WI_MAX_DATALEN  512
   61 
   62 struct wi_req {
   63         u_int16_t       wi_len;
   64         u_int16_t       wi_type;
   65         u_int16_t       wi_val[WI_MAX_DATALEN];
   66 };
   67 
   68 /*
   69  * Private LTV records (interpreted only by the driver). This is
   70  * a minor kludge to allow reading the interface statistics from
   71  * the driver.
   72  */
   73 #define WI_RID_IFACE_STATS      0x0100
   74 #define WI_RID_MGMT_XMIT        0x0200
   75 
   76 struct wi_80211_hdr {
   77         u_int16_t               frame_ctl;
   78         u_int16_t               dur_id;
   79         u_int8_t                addr1[6];
   80         u_int8_t                addr2[6];
   81         u_int8_t                addr3[6];
   82         u_int16_t               seq_ctl;
   83         u_int8_t                addr4[6];
   84 };
   85 
   86 #define WI_FCTL_VERS            0x0002
   87 #define WI_FCTL_FTYPE           0x000C
   88 #define WI_FCTL_STYPE           0x00F0
   89 #define WI_FCTL_TODS            0x0100
   90 #define WI_FCTL_FROMDS          0x0200
   91 #define WI_FCTL_MOREFRAGS       0x0400
   92 #define WI_FCTL_RETRY           0x0800
   93 #define WI_FCTL_PM              0x1000
   94 #define WI_FCTL_MOREDATA        0x2000
   95 #define WI_FCTL_WEP             0x4000
   96 #define WI_FCTL_ORDER           0x8000
   97 
   98 #define WI_FTYPE_MGMT           0x0000
   99 #define WI_FTYPE_CTL            0x0004
  100 #define WI_FTYPE_DATA           0x0008
  101 
  102 #define WI_STYPE_MGMT_ASREQ     0x0000  /* association request */
  103 #define WI_STYPE_MGMT_ASRESP    0x0010  /* association response */
  104 #define WI_STYPE_MGMT_REASREQ   0x0020  /* reassociation request */
  105 #define WI_STYPE_MGMT_REASRESP  0x0030  /* reassociation response */
  106 #define WI_STYPE_MGMT_PROBEREQ  0x0040  /* probe request */
  107 #define WI_STYPE_MGMT_PROBERESP 0x0050  /* probe response */
  108 #define WI_STYPE_MGMT_BEACON    0x0080  /* beacon */
  109 #define WI_STYPE_MGMT_ATIM      0x0090  /* announcement traffic ind msg */
  110 #define WI_STYPE_MGMT_DISAS     0x00A0  /* disassociation */
  111 #define WI_STYPE_MGMT_AUTH      0x00B0  /* authentication */
  112 #define WI_STYPE_MGMT_DEAUTH    0x00C0  /* deauthentication */
  113 
  114 struct wi_mgmt_hdr {
  115         u_int16_t               frame_ctl;
  116         u_int16_t               duration;
  117         u_int8_t                dst_addr[6];
  118         u_int8_t                src_addr[6];
  119         u_int8_t                bssid[6];
  120         u_int16_t               seq_ctl;
  121 };
  122 
  123 #ifndef KERNEL
  124 struct wi_counters {
  125         u_int32_t               wi_tx_unicast_frames;
  126         u_int32_t               wi_tx_multicast_frames;
  127         u_int32_t               wi_tx_fragments;
  128         u_int32_t               wi_tx_unicast_octets;
  129         u_int32_t               wi_tx_multicast_octets;
  130         u_int32_t               wi_tx_deferred_xmits;
  131         u_int32_t               wi_tx_single_retries;
  132         u_int32_t               wi_tx_multi_retries;
  133         u_int32_t               wi_tx_retry_limit;
  134         u_int32_t               wi_tx_discards;
  135         u_int32_t               wi_rx_unicast_frames;
  136         u_int32_t               wi_rx_multicast_frames;
  137         u_int32_t               wi_rx_fragments;
  138         u_int32_t               wi_rx_unicast_octets;
  139         u_int32_t               wi_rx_multicast_octets;
  140         u_int32_t               wi_rx_fcs_errors;
  141         u_int32_t               wi_rx_discards_nobuf;
  142         u_int32_t               wi_tx_discards_wrong_sa;
  143         u_int32_t               wi_rx_WEP_cant_decrypt;
  144         u_int32_t               wi_rx_msg_in_msg_frags;
  145         u_int32_t               wi_rx_msg_in_bad_msg_frags;
  146 };
  147 
  148 /*
  149  * These are all the LTV record types that we can read or write
  150  * from the WaveLAN. Not all of them are temendously useful, but I
  151  * list as many as I know about here for completeness.
  152  */
  153 
  154 #define WI_RID_DNLD_BUF         0xFD01
  155 #define WI_RID_MEMSZ            0xFD02
  156 #define WI_RID_DOMAINS          0xFD11
  157 #define WI_RID_CIS              0xFD13
  158 #define WI_RID_COMMQUAL         0xFD43
  159 #define WI_RID_SCALETHRESH      0xFD46
  160 #define WI_RID_PCF              0xFD87
  161 
  162 /*
  163  * Network parameters, static configuration entities.
  164  */
  165 #define WI_RID_PORTTYPE         0xFC00 /* Connection control characteristics */
  166 #define WI_RID_MAC_NODE         0xFC01 /* MAC address of this station */
  167 #define WI_RID_DESIRED_SSID     0xFC02 /* Service Set ID for connection */
  168 #define WI_RID_OWN_CHNL         0xFC03 /* Comm channel for BSS creation */
  169 #define WI_RID_OWN_SSID         0xFC04 /* IBSS creation ID */
  170 #define WI_RID_OWN_ATIM_WIN     0xFC05 /* ATIM window time for IBSS creation */
  171 #define WI_RID_SYSTEM_SCALE     0xFC06 /* scale that specifies AP density */
  172 #define WI_RID_MAX_DATALEN      0xFC07 /* Max len of MAC frame body data */
  173 #define WI_RID_MAC_WDS          0xFC08 /* MAC addr of corresponding WDS node */
  174 #define WI_RID_PM_ENABLED       0xFC09 /* ESS power management enable */
  175 #define WI_RID_PM_EPS           0xFC0A /* PM EPS/PS mode */
  176 #define WI_RID_MCAST_RX         0xFC0B /* ESS PM mcast reception */
  177 #define WI_RID_MAX_SLEEP        0xFC0C /* max sleep time for ESS PM */
  178 #define WI_RID_HOLDOVER         0xFC0D /* holdover time for ESS PM */
  179 #define WI_RID_NODENAME         0xFC0E /* ID name of this node for diag */
  180 #define WI_RID_DTIM_PERIOD      0xFC10 /* beacon interval between DTIMs */
  181 #define WI_RID_WDS_ADDR1        0xFC11 /* port 1 MAC of WDS link node */
  182 #define WI_RID_WDS_ADDR2        0xFC12 /* port 1 MAC of WDS link node */
  183 #define WI_RID_WDS_ADDR3        0xFC13 /* port 1 MAC of WDS link node */
  184 #define WI_RID_WDS_ADDR4        0xFC14 /* port 1 MAC of WDS link node */
  185 #define WI_RID_WDS_ADDR5        0xFC15 /* port 1 MAC of WDS link node */
  186 #define WI_RID_WDS_ADDR6        0xFC16 /* port 1 MAC of WDS link node */
  187 #define WI_RID_MCAST_PM_BUF     0xFC17 /* PM buffering of mcast */
  188 
  189 /*
  190  * Network parameters, dynamic configuration entities
  191  */
  192 #define WI_RID_MCAST_LIST       0xFC80 /* list of multicast addrs */
  193 #define WI_RID_CREATE_IBSS      0xFC81 /* create IBSS */
  194 #define WI_RID_FRAG_THRESH      0xFC82 /* frag len, unicast msg xmit */
  195 #define WI_RID_RTS_THRESH       0xFC83 /* frame len for RTS/CTS handshake */
  196 #define WI_RID_TX_RATE          0xFC84 /* data rate for message xmit */
  197 #define WI_RID_PROMISC          0xFC85 /* enable promisc mode */
  198 #define WI_RID_FRAG_THRESH0     0xFC90
  199 #define WI_RID_FRAG_THRESH1     0xFC91
  200 #define WI_RID_FRAG_THRESH2     0xFC92
  201 #define WI_RID_FRAG_THRESH3     0xFC93
  202 #define WI_RID_FRAG_THRESH4     0xFC94
  203 #define WI_RID_FRAG_THRESH5     0xFC95
  204 #define WI_RID_FRAG_THRESH6     0xFC96
  205 #define WI_RID_RTS_THRESH0      0xFC97
  206 #define WI_RID_RTS_THRESH1      0xFC98
  207 #define WI_RID_RTS_THRESH2      0xFC99
  208 #define WI_RID_RTS_THRESH3      0xFC9A
  209 #define WI_RID_RTS_THRESH4      0xFC9B
  210 #define WI_RID_RTS_THRESH5      0xFC9C
  211 #define WI_RID_RTS_THRESH6      0xFC9D
  212 #define WI_RID_TX_RATE0         0xFC9E
  213 #define WI_RID_TX_RATE1         0xFC9F
  214 #define WI_RID_TX_RATE2         0xFCA0
  215 #define WI_RID_TX_RATE3         0xFCA1
  216 #define WI_RID_TX_RATE4         0xFCA2
  217 #define WI_RID_TX_RATE5         0xFCA3
  218 #define WI_RID_TX_RATE6         0xFCA4
  219 #define WI_RID_TICK_TIME        0xFCE0
  220 
  221 /*
  222  * NIC information
  223  */
  224 #define WI_RID_FIRM_ID          0xFD02 /* Primary func firmware ID. */
  225 #define WI_RID_PRI_SUP_RANGE    0xFD03 /* primary supplier compatibility */
  226 #define WI_RID_CIF_ACT_RANGE    0xFD04 /* controller sup. compatibility */
  227 #define WI_RID_SERIALNO         0xFD0A /* card serial number */
  228 #define WI_RID_CARD_ID          0xFD0B /* card identification */
  229 #define WI_RID_MFI_SUP_RANGE    0xFD0C /* modem supplier compatibility */
  230 #define WI_RID_CFI_SUP_RANGE    0xFD0D /* controller sup. compatibility */
  231 #define WI_RID_CHANNEL_LIST     0xFD10 /* allowd comm. frequencies. */
  232 #define WI_RID_REG_DOMAINS      0xFD11 /* list of intendted regulatory doms */
  233 #define WI_RID_TEMP_TYPE        0xFD12 /* hw temp range code */
  234 #define WI_RID_CIS              0xFD13 /* PC card info struct */
  235 #define WI_RID_STA_IDENEITY     0xFD20 /* station funcs firmware ident */
  236 #define WI_RID_STA_SUP_RANGE    0xFD21 /* station supplier compat */
  237 #define WI_RID_MFI_ACT_RANGE    0xFD22
  238 #define WI_RID_CFI_ACT_RANGE    0xFD33
  239 
  240 /*
  241  * MAC information
  242  */
  243 #define WI_RID_PORT_STAT        0xFD40 /* actual MAC port con control stat */
  244 #define WI_RID_CURRENT_SSID     0xFD41 /* ID of actually connected SS */
  245 #define WI_RID_CURRENT_BSSID    0xFD42 /* ID of actually connected BSS */
  246 #define WI_RID_COMMS_QUALITY    0xFD43 /* quality of BSS connection */
  247 #define WI_RID_CUR_TX_RATE      0xFD44 /* current TX rate */
  248 #define WI_RID_OWN_BEACON_INT   0xFD45 /* beacon xmit time for BSS creation */
  249 #define WI_RID_CUR_SCALE_THRESH 0xFD46 /* actual system scane thresh setting */
  250 #define WI_RID_PROT_RESP_TIME   0xFD47 /* time to wait for resp to req msg */
  251 #define WI_RID_SHORT_RTR_LIM    0xFD48 /* max tx attempts for short frames */
  252 #define WI_RID_LONG_RTS_LIM     0xFD49 /* max tx attempts for long frames */
  253 #define WI_RID_MAX_TX_LIFE      0xFD4A /* max tx frame handling duration */
  254 #define WI_RID_MAX_RX_LIFE      0xFD4B /* max rx frame handling duration */
  255 #define WI_RID_CF_POLL          0xFD4C /* contention free pollable ind */
  256 #define WI_RID_AUTH_ALGS        0xFD4D /* auth algorithms available */
  257 #define WI_RID_AUTH_TYPE        0xFD4E /* availanle auth types */
  258 #define WI_RID_WEP_AVAIL        0xFD4F /* WEP privacy option available */
  259 #define WI_RID_CUR_TX_RATE1     0xFD80
  260 #define WI_RID_CUR_TX_RATE2     0xFD81
  261 #define WI_RID_CUR_TX_RATE3     0xFD82
  262 #define WI_RID_CUR_TX_RATE4     0xFD83
  263 #define WI_RID_CUR_TX_RATE5     0xFD84
  264 #define WI_RID_CUR_TX_RATE6     0xFD85
  265 #define WI_RID_OWN_MAC          0xFD86 /* unique local MAC addr */
  266 #define WI_RID_PCI_INFO         0xFD87 /* point coordination func cap */
  267 
  268 /*
  269  * Modem information
  270  */
  271 #define WI_RID_PHY_TYPE         0xFDC0 /* phys layer type indication */
  272 #define WI_RID_CURRENT_CHAN     0xFDC1 /* current frequency */
  273 #define WI_RID_PWR_STATE        0xFDC2 /* pwr consumption status */
  274 #define WI_RID_CCA_MODE         0xFDC3 /* clear chan assess mode indication */
  275 #define WI_RID_CCA_TIME         0xFDC4 /* clear chan assess time */
  276 #define WI_RID_MAC_PROC_DELAY   0xFDC5 /* MAC processing delay time */
  277 #define WI_RID_DATA_RATES       0xFDC6 /* supported data rates */
  278 #endif
  279 
  280 
  281 #endif

Cache object: 0d61ef8fc0a35f70c6d512eb14682499


[ 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.