File nut/include/dev/wlandrv.h

* This file is part of the WLAN-Ethernut device driver.
* Copyright (c) 2004 by Michael Fischer. All rights reserved.
* Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
* 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the author nor the names of its contributors may * be used to endorse or promote products derived from this software * without specific prior written permission.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE.
**************************************************************************** * Portions Copyright:
* Copyright (c) 2001 Atsushi Onoe * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting * Copyright (c) 2002 M Warner Losh <imp@freebsd.org>. All rights reserved. * Copyright (c) 1997, 1998, 1999 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
* Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the author nor the names of any co-contributors * may be used to endorse or promote products derived from this software * without specific prior written permission.
* THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE.
**************************************************************************** * History:
* 28.02.04 mifi First Version * This file is a mix of several FreeBSD header files. * I have put all the files together, because it was * difficult to use the original files. I have try this * but I must comment out to much to get it to work. * The other "define" file is wlandef.h, * here you will the rest of it. * 03.03.04 mifi Move debug switch to wlancfg.h


Included Files


Preprocessor definitions

#define __WLANDRV_H__

#define RESET_EN_PORT DDRD

#define RESET_PORT PORTD

#define RESET_BIT 0x20

#define WI_FLAGS_ATTACHED 0x0001

#define WI_FLAGS_INITIALIZED 0x0002

#define WI_FLAGS_OUTRANGE 0x0004

#define WI_FLAGS_HAS_MOR 0x0010

#define WI_FLAGS_HAS_ROAMING 0x0020

#define WI_FLAGS_HAS_DIVERSITY 0x0040

#define WI_FLAGS_HAS_SYSSCALE 0x0080

#define WI_FLAGS_BUG_AUTOINC 0x0100

#define WI_FLAGS_HAS_FRAGTHR 0x0200

#define WI_FLAGS_HAS_DBMADJUST 0x0400

#define WI_NTXBUF 3

#define IEEE80211_ADDR_LEN 6

#define IEEE80211_NWID_LEN 32

#define IEEE80211_WEP_KEYLEN 5

#define IEEE80211_WEP_IVLEN 3

#define IEEE80211_WEP_KIDLEN 1

#define IEEE80211_WEP_CRCLEN 4

#define IEEE80211_WEP_NKID 4

#define IEEE80211_CRC_LEN 4

#define IEEE80211_F_ASCAN 0x00000001

#define IEEE80211_F_SIBSS 0x00000002

#define IEEE80211_F_WEPON 0x00000100

#define IEEE80211_F_IBSSON 0x00000200

#define IEEE80211_F_PMGTON 0x00000400

#define IEEE80211_F_DESBSSID 0x00000800

#define IEEE80211_F_SCANAP 0x00001000

#define IEEE80211_F_ROAMING 0x00002000

#define IEEE80211_F_SWRETRY 0x00004000

#define IEEE80211_F_TXPMGT 0x00018000

#define IEEE80211_F_TXPOW_OFF 0x00000000

#define IEEE80211_F_TXPOW_FIXED 0x00008000

#define IEEE80211_F_TXPOW_AUTO 0x00010000

#define IEEE80211_F_SHSLOT 0x00020000

#define IEEE80211_F_SHPREAMBLE 0x00040000

#define IEEE80211_C_WEP 0x0001

#define IEEE80211_C_IBSS 0x0002

#define IEEE80211_C_PMGT 0x0004

#define IEEE80211_C_HOSTAP 0x0008

#define IEEE80211_C_AHDEMO 0x0010

#define IEEE80211_C_SWRETRY 0x0020

#define IEEE80211_C_TXPMGT 0x0040

#define IEEE80211_C_SHSLOT 0x0080

#define IEEE80211_C_SHPREAMBLE 0x0100

#define IEEE80211_C_MONITOR 0x0200

#define IEEE80211_C_RCVMGT 0x0400

#define IEEE80211_S_MAX

#define IEEE80211_KEYBUF_SIZE 16

#define device_t NUTDEVICE

#define device_get_softc( _a )


Type enum ieee80211_opmode

enum ieee80211_opmode
enum ieee80211_opmode  
   {  
      IEEE80211_M_STA;  
      IEEE80211_M_IBSS;  
      IEEE80211_M_AHDEMO;  
      IEEE80211_M_HOSTAP;  
      IEEE80211_M_MONITOR;  
   }  

Type enum ieee80211_state

enum ieee80211_state
enum ieee80211_state  
   {  
      IEEE80211_S_INIT;  
      IEEE80211_S_SCAN;  
      IEEE80211_S_AUTH;  
      IEEE80211_S_ASSOC;  
      IEEE80211_S_RUN;  
   }  

Type struct ieee80211_wepkey

struct ieee80211_wepkey
struct ieee80211_wepkey  
   {  
      int wk_len;  
      u_int8_t wk_key[16];  
   }  

Type struct ieee80211_rateset

struct ieee80211_rateset
struct ieee80211_rateset  
   {  
      u_int8_t rs_nrates;  
      u_int8_t rs_rates[15];  
   }  

Type struct ieee80211com

struct ieee80211com
struct ieee80211com  
   {  
      u_int8_t ic_myaddr[6];  
      struct ieee80211_rateset ic_sup_rates[(IEEE80211_MODE_TURBO+1)];  
      u_int16_t ChannelList;  
      u_int32_t ic_flags;  
      u_int32_t ic_caps;  
      enum ieee80211_opmode ic_opmode;  
      enum ieee80211_state ic_state;  
      u_int16_t ic_ibss_chan;  
      int ic_fixed_rate;  
      int ic_des_esslen;  
      u_int8_t ic_des_essid[32];  
      struct ieee80211_wepkey ic_nw_keys[4];  
      int ic_wep_txkey;  
   }  

Type struct wi_softc

struct wi_softc
struct wi_softc  
   {  
      int InterruptInitDone;  
      HANDLE volatile InterruptEvent;  
      u_int16_t EventStatus;  
      struct ieee80211com sc_ic;  
      int PromiscuousMode;  
      int wi_gone;  
      int sc_enabled;  
      int sc_reset;  
      int sc_firmware_type;  
      u_int32_t sc_pri_firmware_ver;  
      u_int32_t sc_sta_firmware_ver;  
      int wi_cmd_count;  
      int sc_flags;  
      int sc_bap_id;  
      int sc_bap_off;  
      u_int16_t sc_portnum;  
      u_int16_t sc_min_rssi;  
      u_int16_t sc_max_rssi;  
      u_int16_t sc_dbm_offset;  
      u_int16_t sc_max_datalen;  
      u_int16_t sc_system_scale;  
      u_int16_t sc_cnfauthmode;  
      u_int16_t sc_roaming_mode;  
      u_int16_t sc_microwave_oven;  
      u_int16_t sc_authtype;  
      int sc_buflen;  
      int sc_ntxbuf;  
      struct  
        {  
            int d_fid;  
            int d_len;  
        }  
     sc_txd[3];  
      int sc_txnext;  
      int sc_txcur;  
      int sc_tx_timer;  
      int sc_scan_timer;  
      u_int16_t sc_ibss_port;  
   }  

Typedef WI_SOFTC

typedef struct wi_softc WI_SOFTC
See: Type struct wi_softc