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/dev/owi/if_wivar.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) 2002
    3  *      M Warner Losh <imp@freebsd.org>.  All rights reserved.
    4  * Copyright (c) 1997, 1998, 1999
    5  *      Bill Paul <wpaul@ctr.columbia.edu>.  All rights reserved.
    6  *
    7  * Redistribution and use in source and binary forms, with or without
    8  * modification, are permitted provided that the following conditions
    9  * are met:
   10  * 1. Redistributions of source code must retain the above copyright
   11  *    notice, this list of conditions and the following disclaimer.
   12  * 2. Redistributions in binary form must reproduce the above copyright
   13  *    notice, this list of conditions and the following disclaimer in the
   14  *    documentation and/or other materials provided with the distribution.
   15  * 3. All advertising materials mentioning features or use of this software
   16  *    must display the following acknowledgement:
   17  *      This product includes software developed by Bill Paul.
   18  * 4. Neither the name of the author nor the names of any co-contributors
   19  *    may be used to endorse or promote products derived from this software
   20  *    without specific prior written permission.
   21  *
   22  * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
   23  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   24  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   25  * ARE DISCLAIMED.  IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
   26  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   27  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   28  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   29  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   30  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   31  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
   32  * THE POSSIBILITY OF SUCH DAMAGE.
   33  *
   34  * $FreeBSD: releng/5.3/sys/dev/owi/if_wivar.h 122689 2003-11-14 19:00:32Z sam $
   35  */
   36 
   37 #define WICACHE                 /* turn on signal strength cache code */  
   38 #define MAXWICACHE      10
   39 
   40 /*
   41  * Encryption controls. We can enable or disable encryption as
   42  * well as specify up to 4 encryption keys. We can also specify
   43  * which of the four keys will be used for transmit encryption.
   44  */
   45 #define WI_RID_ENCRYPTION       0xFC20
   46 #define WI_RID_AUTHTYPE         0xFC21
   47 #define WI_RID_DEFLT_CRYPT_KEYS 0xFCB0
   48 #define WI_RID_TX_CRYPT_KEY     0xFCB1
   49 #define WI_RID_WEP_AVAIL        0xFD4F
   50 #define WI_RID_P2_TX_CRYPT_KEY  0xFC23
   51 #define WI_RID_P2_CRYPT_KEY0    0xFC24
   52 #define WI_RID_P2_CRYPT_KEY1    0xFC25
   53 #define WI_RID_MICROWAVE_OVEN   0xFC25
   54 #define WI_RID_P2_CRYPT_KEY2    0xFC26
   55 #define WI_RID_P2_CRYPT_KEY3    0xFC27
   56 #define WI_RID_P2_ENCRYPTION    0xFC28
   57 #define WI_RID_ROAMING_MODE     0xFC2D
   58 #define WI_RID_CUR_TX_RATE      0xFD44 /* current TX rate */
   59 
   60 struct wi_softc {
   61         struct arpcom           arpcom;
   62         struct ifmedia          ifmedia;
   63         device_t                dev;
   64         int                     wi_unit;
   65         struct resource *       local;
   66         int                                     local_rid;
   67         struct resource *       iobase;
   68         int                                     iobase_rid;
   69         struct resource *       irq;
   70         int                                     irq_rid;
   71         struct resource *       mem;
   72         int                                     mem_rid;
   73         bus_space_handle_t      wi_localhandle;
   74         bus_space_tag_t         wi_localtag;
   75         bus_space_handle_t      wi_bhandle;
   76         bus_space_tag_t         wi_btag;
   77         bus_space_handle_t      wi_bmemhandle;
   78         bus_space_tag_t         wi_bmemtag;
   79         void *                  wi_intrhand;
   80         int                     sc_firmware_type;
   81 #define WI_NOTYPE       0
   82 #define WI_LUCENT       1
   83         int                     sc_pri_firmware_ver;    /* Primary firmware */
   84         int                     sc_sta_firmware_ver;    /* Station firmware */
   85         int                     sc_enabled;
   86         int                     wi_io_addr;
   87         int                     wi_tx_data_id;
   88         int                     wi_tx_mgmt_id;
   89         int                     wi_gone;
   90         int                     wi_flags;
   91 #define WI_FLAGS_ATTACHED               0x01
   92 #define WI_FLAGS_INITIALIZED            0x02
   93 #define WI_FLAGS_HAS_WEP                0x04
   94 #define WI_FLAGS_HAS_IBSS               0x08
   95 #define WI_FLAGS_HAS_CREATE_IBSS        0x10
   96 #define WI_FLAGS_HAS_MOR                0x20
   97 #define WI_FLAGS_HAS_ROAMING            0x30
   98         int                     wi_if_flags;
   99         u_int16_t               wi_procframe;
  100         u_int16_t               wi_ptype;
  101         u_int16_t               wi_portnum;
  102         u_int16_t               wi_max_data_len;
  103         u_int16_t               wi_rts_thresh;
  104         u_int16_t               wi_ap_density;
  105         u_int16_t               wi_tx_rate;
  106         u_int16_t               wi_create_ibss;
  107         u_int16_t               wi_channel;
  108         u_int16_t               wi_pm_enabled;
  109         u_int16_t               wi_mor_enabled;
  110         u_int16_t               wi_max_sleep;
  111         u_int16_t               wi_supprates;
  112         u_int16_t               wi_authtype;
  113         u_int16_t               wi_roaming;
  114         char                    wi_node_name[32];
  115         char                    wi_net_name[32];
  116         char                    wi_ibss_name[32];
  117         u_int8_t                wi_txbuf[1596];
  118         u_int8_t                wi_scanbuf[1596];
  119         int                     wi_scanbuf_len;
  120         struct wi_counters      wi_stats;
  121         int                     wi_has_wep;
  122         int                     wi_use_wep;
  123         int                     wi_authmode;
  124         int                     wi_tx_key;
  125         struct wi_ltv_keys      wi_keys;
  126 #ifdef WICACHE
  127         int                     wi_sigitems;
  128         struct wi_sigcache      wi_sigcache[MAXWICACHE];
  129         int                     wi_nextitem;
  130 #endif
  131         u_int32_t               wi_icv;
  132         int                     wi_icv_flag;
  133         int                     wi_ibss_port;
  134         struct callout_handle   wi_stat_ch;
  135 #if __FreeBSD_version >= 500000
  136         struct mtx              wi_mtx;
  137 #endif
  138         int                     wi_nic_type;
  139         int                     wi_bus_type;    /* Bus attachment type */
  140         struct {
  141                 u_int16_t               wi_sleep;
  142                 u_int16_t               wi_delaysupp;
  143                 u_int16_t               wi_txsupp;
  144                 u_int16_t               wi_monitor;
  145                 u_int16_t               wi_ledtest;
  146                 u_int16_t               wi_ledtest_param0;
  147                 u_int16_t               wi_ledtest_param1;
  148                 u_int16_t               wi_conttx;
  149                 u_int16_t               wi_conttx_param0;
  150                 u_int16_t               wi_contrx;
  151                 u_int16_t               wi_sigstate;
  152                 u_int16_t               wi_sigstate_param0;
  153                 u_int16_t               wi_confbits;
  154                 u_int16_t               wi_confbits_param0;
  155         } wi_debug;
  156 
  157 };
  158 
  159 struct wi_card_ident {
  160         u_int16_t       card_id;
  161         char            *card_name;
  162         u_int8_t        firm_type;
  163 };
  164 
  165 #if __FreeBSD_version < 500000
  166 /*
  167  * Various compat hacks/kludges
  168  */
  169 #define le16toh(x) (x)
  170 #define htole16(x) (x)
  171 #define ifaddr_byindex(idx) ifnet_addrs[(idx) - 1];
  172 #define WI_LOCK(_sc, _s)        s = splimp()
  173 #define WI_UNLOCK(_sc, _s)      splx(s)
  174 #define WI_LOCK_ASSERT(_sc)
  175 #else
  176 #define WI_LOCK(_sc, _s) _s = 1
  177 #define WI_UNLOCK(_sc, _s)
  178 #define WI_LOCK_ASSERT(_sc)
  179 #endif
  180 
  181 int owi_generic_attach(device_t);
  182 int owi_generic_detach(device_t);
  183 void owi_shutdown(device_t);
  184 int owi_alloc(device_t, int);
  185 void owi_free(device_t);
  186 void owi_stop(struct wi_softc *);
  187 void owi_get_id(struct wi_softc *);
  188 extern devclass_t owi_devclass;

Cache object: 24efe071e4085fcd14f87791894cb8ce


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