Nut/OS  4.10.3
API Reference
wlandrv.h File Reference
#include <compiler.h>
#include <dev/wlantypes.h>
#include <dev/wlan.h>
#include <dev/wlandef.h>
Include dependency graph for wlandrv.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ieee80211_wepkey
struct  ieee80211_rateset
struct  ieee80211com
struct  wi_softc

Defines

#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   (IEEE80211_S_RUN+1)
#define IEEE80211_KEYBUF_SIZE   16
#define device_t   NUTDEVICE*
#define device_get_softc(_a)   (struct wi_softc*)_a->dev_dcb

Typedefs

typedef struct wi_softc WI_SOFTC

Enumerations

enum  ieee80211_opmode {
  IEEE80211_M_STA = 1, IEEE80211_M_IBSS = 0, IEEE80211_M_AHDEMO = 3, IEEE80211_M_HOSTAP = 6,
  IEEE80211_M_MONITOR = 8
}
enum  ieee80211_state {
  IEEE80211_S_INIT = 0, IEEE80211_S_SCAN = 1, IEEE80211_S_AUTH = 2, IEEE80211_S_ASSOC = 3,
  IEEE80211_S_RUN = 4
}

Functions

int wlandrv_ProbeDevice (void)
int wlandrv_Attach (device_t dev)
void wlandrv_Init (device_t dev)
int wlandrv_PutPacket (NUTDEVICE *dev, NETBUF *nb)
int wlandrv_IOCTL (NUTDEVICE *dev, int req, void *conf)

Define Documentation

#define RESET_EN_PORT   DDRD

Definition at line 92 of file wlandrv.h.

Referenced by wlandrv_ProbeDevice().

#define RESET_PORT   PORTD

Definition at line 93 of file wlandrv.h.

Referenced by wlandrv_ProbeDevice().

#define RESET_BIT   0x20

Definition at line 94 of file wlandrv.h.

Referenced by wlandrv_ProbeDevice().

#define WI_FLAGS_ATTACHED   0x0001

Definition at line 103 of file wlandrv.h.

#define WI_FLAGS_INITIALIZED   0x0002

Definition at line 104 of file wlandrv.h.

#define WI_FLAGS_OUTRANGE   0x0004

Definition at line 105 of file wlandrv.h.

Referenced by wlandrv_Init().

#define WI_FLAGS_HAS_MOR   0x0010

Definition at line 106 of file wlandrv.h.

Referenced by wlandrv_Attach(), and wlandrv_Init().

#define WI_FLAGS_HAS_ROAMING   0x0020

Definition at line 107 of file wlandrv.h.

Referenced by wlandrv_Attach(), and wlandrv_Init().

#define WI_FLAGS_HAS_DIVERSITY   0x0040

Definition at line 108 of file wlandrv.h.

Referenced by wlandrv_Attach().

#define WI_FLAGS_HAS_SYSSCALE   0x0080

Definition at line 109 of file wlandrv.h.

Referenced by wlandrv_Attach(), and wlandrv_Init().

#define WI_FLAGS_BUG_AUTOINC   0x0100

Definition at line 110 of file wlandrv.h.

Referenced by wlandrv_Attach().

#define WI_FLAGS_HAS_FRAGTHR   0x0200

Definition at line 111 of file wlandrv.h.

Referenced by wlandrv_Attach(), and wlandrv_Init().

#define WI_FLAGS_HAS_DBMADJUST   0x0400

Definition at line 112 of file wlandrv.h.

Referenced by wlandrv_Attach().

#define WI_NTXBUF   3

Definition at line 117 of file wlandrv.h.

Referenced by wlandrv_Attach().

#define IEEE80211_ADDR_LEN   6

Definition at line 123 of file wlandrv.h.

Referenced by wlandrv_Attach(), wlandrv_Init(), wlandrv_IOCTL(), and wlandrv_PutPacket().

#define IEEE80211_NWID_LEN   32

Definition at line 124 of file wlandrv.h.

#define IEEE80211_WEP_KEYLEN   5

Definition at line 127 of file wlandrv.h.

#define IEEE80211_WEP_IVLEN   3

Definition at line 128 of file wlandrv.h.

#define IEEE80211_WEP_KIDLEN   1

Definition at line 129 of file wlandrv.h.

#define IEEE80211_WEP_CRCLEN   4

Definition at line 130 of file wlandrv.h.

#define IEEE80211_WEP_NKID   4

Definition at line 131 of file wlandrv.h.

#define IEEE80211_CRC_LEN   4

Definition at line 133 of file wlandrv.h.

#define IEEE80211_F_ASCAN   0x00000001

Definition at line 143 of file wlandrv.h.

#define IEEE80211_F_SIBSS   0x00000002

Definition at line 144 of file wlandrv.h.

#define IEEE80211_F_WEPON   0x00000100

Definition at line 145 of file wlandrv.h.

Referenced by wlandrv_IOCTL().

#define IEEE80211_F_IBSSON   0x00000200

Definition at line 146 of file wlandrv.h.

Referenced by wlandrv_Init().

#define IEEE80211_F_PMGTON   0x00000400

Definition at line 147 of file wlandrv.h.

Referenced by wlandrv_Init().

#define IEEE80211_F_DESBSSID   0x00000800

Definition at line 148 of file wlandrv.h.

Referenced by wlandrv_Init().

#define IEEE80211_F_SCANAP   0x00001000

Definition at line 149 of file wlandrv.h.

#define IEEE80211_F_ROAMING   0x00002000

Definition at line 150 of file wlandrv.h.

#define IEEE80211_F_SWRETRY   0x00004000

Definition at line 151 of file wlandrv.h.

#define IEEE80211_F_TXPMGT   0x00018000

Definition at line 152 of file wlandrv.h.

#define IEEE80211_F_TXPOW_OFF   0x00000000

Definition at line 153 of file wlandrv.h.

#define IEEE80211_F_TXPOW_FIXED   0x00008000

Definition at line 154 of file wlandrv.h.

#define IEEE80211_F_TXPOW_AUTO   0x00010000

Definition at line 155 of file wlandrv.h.

#define IEEE80211_F_SHSLOT   0x00020000

Definition at line 156 of file wlandrv.h.

#define IEEE80211_F_SHPREAMBLE   0x00040000

Definition at line 157 of file wlandrv.h.

#define IEEE80211_C_WEP   0x0001

Definition at line 162 of file wlandrv.h.

Referenced by wlandrv_Attach(), and wlandrv_Init().

#define IEEE80211_C_IBSS   0x0002

Definition at line 163 of file wlandrv.h.

Referenced by wlandrv_Attach().

#define IEEE80211_C_PMGT   0x0004

Definition at line 164 of file wlandrv.h.

Referenced by wlandrv_Attach().

#define IEEE80211_C_HOSTAP   0x0008

Definition at line 165 of file wlandrv.h.

Referenced by wlandrv_Attach().

#define IEEE80211_C_AHDEMO   0x0010

Definition at line 166 of file wlandrv.h.

Referenced by wlandrv_Attach().

#define IEEE80211_C_SWRETRY   0x0020

Definition at line 167 of file wlandrv.h.

#define IEEE80211_C_TXPMGT   0x0040

Definition at line 168 of file wlandrv.h.

#define IEEE80211_C_SHSLOT   0x0080

Definition at line 169 of file wlandrv.h.

#define IEEE80211_C_SHPREAMBLE   0x0100

Definition at line 170 of file wlandrv.h.

#define IEEE80211_C_MONITOR   0x0200

Definition at line 171 of file wlandrv.h.

Referenced by wlandrv_Attach().

#define IEEE80211_C_RCVMGT   0x0400

Definition at line 172 of file wlandrv.h.

#define IEEE80211_S_MAX   (IEEE80211_S_RUN+1)

Definition at line 196 of file wlandrv.h.

#define IEEE80211_KEYBUF_SIZE   16

Definition at line 205 of file wlandrv.h.

#define device_t   NUTDEVICE*

Definition at line 313 of file wlandrv.h.

#define device_get_softc (   _a)    (struct wi_softc*)_a->dev_dcb

Definition at line 314 of file wlandrv.h.

Referenced by wlandrv_Attach(), and wlandrv_Init().


Typedef Documentation

typedef struct wi_softc WI_SOFTC

Definition at line 308 of file wlandrv.h.


Enumeration Type Documentation

Enumerator:
IEEE80211_M_STA 
IEEE80211_M_IBSS 
IEEE80211_M_AHDEMO 
IEEE80211_M_HOSTAP 
IEEE80211_M_MONITOR 

Definition at line 174 of file wlandrv.h.

Enumerator:
IEEE80211_S_INIT 
IEEE80211_S_SCAN 
IEEE80211_S_AUTH 
IEEE80211_S_ASSOC 
IEEE80211_S_RUN 

Definition at line 189 of file wlandrv.h.


Function Documentation

int wlandrv_ProbeDevice ( void  )

Definition at line 1385 of file wlandrv.c.

References NutSleep(), pcmcia_ReadReg(), pcmcia_WriteMem(), pcmcia_WriteReg(), RESET_BIT, RESET_EN_PORT, RESET_PORT, WI_COR_OFFSET, WI_COR_VALUE, WI_HFA384X_SWSUPPORT0_OFF, and WI_PRISM2STA_MAGIC.

Referenced by WlanInit().

Here is the call graph for this function:

int wlandrv_Attach ( device_t  dev)

Definition at line 1434 of file wlandrv.c.

References ieee80211com::ChannelList, Debug, device_get_softc, ENXIO, htole16, ieee80211com::ic_caps, ieee80211com::ic_fixed_rate, ieee80211com::ic_ibss_chan, ieee80211com::ic_myaddr, ieee80211com::ic_opmode, ieee80211com::ic_state, ieee80211com::ic_sup_rates, IEEE80211_ADDR_LEN, IEEE80211_AUTH_OPEN, IEEE80211_C_AHDEMO, IEEE80211_C_HOSTAP, IEEE80211_C_IBSS, IEEE80211_C_MONITOR, IEEE80211_C_PMGT, IEEE80211_C_WEP, IEEE80211_M_STA, IEEE80211_MODE_11B, IEEE80211_RATE_MAXSIZE, IEEE80211_RATE_SIZE, IEEE80211_S_INIT, le16toh, NutEventPost(), ieee80211_rateset::rs_nrates, ieee80211_rateset::rs_rates, wi_softc::sc_authtype, wi_softc::sc_cnfauthmode, wi_softc::sc_dbm_offset, wi_softc::sc_firmware_type, wi_softc::sc_flags, wi_softc::sc_ibss_port, wi_softc::sc_ic, wi_softc::sc_max_datalen, wi_softc::sc_max_rssi, wi_softc::sc_min_rssi, wi_softc::sc_ntxbuf, wi_softc::sc_portnum, wi_softc::sc_roaming_mode, wi_softc::sc_sta_firmware_ver, wi_softc::sc_system_scale, wi_softc::wi_cmd_count, WI_DEFAULT_AUTHTYPE, WI_DEFAULT_PORT, WI_DEFAULT_ROAMING, WI_FLAGS_BUG_AUTOINC, WI_FLAGS_HAS_DBMADJUST, WI_FLAGS_HAS_DIVERSITY, WI_FLAGS_HAS_FRAGTHR, WI_FLAGS_HAS_MOR, WI_FLAGS_HAS_ROAMING, WI_FLAGS_HAS_SYSSCALE, WI_INTERSIL, WI_LUCENT, WI_LUCENT_DBM_OFFSET, WI_LUCENT_MAX_RSSI, WI_LUCENT_MIN_RSSI, WI_NTXBUF, WI_PRISM_DBM_OFFSET, WI_PRISM_MAX_RSSI, WI_PRISM_MIN_RSSI, WI_RID_CHANNEL_LIST, WI_RID_DATA_RATES, WI_RID_DBM_ADJUST, WI_RID_MAC_NODE, WI_RID_OWN_CHNL, WI_RID_WEP_AVAIL, and WI_SYMBOL.

Referenced by WlanInit().

Here is the call graph for this function:

void wlandrv_Init ( device_t  dev)

Definition at line 1660 of file wlandrv.c.

References CSR_WRITE_2, wi_softc::d_fid, wi_softc::d_len, Debug, device_get_softc, EICR, FALSE, htole16, ieee80211com::ic_caps, ieee80211com::ic_des_essid, ieee80211com::ic_des_esslen, ieee80211com::ic_flags, ieee80211com::ic_ibss_chan, ieee80211com::ic_myaddr, ieee80211com::ic_opmode, IEEE80211_ADDR_LEN, IEEE80211_C_WEP, IEEE80211_CHAN_ANYC, IEEE80211_F_DESBSSID, IEEE80211_F_IBSSON, IEEE80211_F_PMGTON, IEEE80211_M_AHDEMO, IEEE80211_M_HOSTAP, IEEE80211_M_IBSS, IEEE80211_M_MONITOR, IEEE80211_M_STA, IEEE80211_MAX_LEN, ieee80211_new_state, IEEE80211_S_RUN, INT7, wi_softc::InterruptInitDone, memset(), NutRegisterIrqHandler(), NutThreadCreate(), wi_softc::PromiscuousMode, RxThread(), sbi, wi_softc::sc_buflen, wi_softc::sc_enabled, wi_softc::sc_firmware_type, wi_softc::sc_flags, wi_softc::sc_ibss_port, wi_softc::sc_ic, wi_softc::sc_max_datalen, wi_softc::sc_microwave_oven, wi_softc::sc_ntxbuf, wi_softc::sc_portnum, wi_softc::sc_roaming_mode, wi_softc::sc_system_scale, wi_softc::sc_txcur, wi_softc::sc_txd, wi_softc::sc_txnext, sig_INTERRUPT7, WI_CMD_DEBUG, WI_CMD_DISABLE, WI_CMD_ENABLE, WI_FLAGS_HAS_FRAGTHR, WI_FLAGS_HAS_MOR, WI_FLAGS_HAS_ROAMING, WI_FLAGS_HAS_SYSSCALE, WI_FLAGS_OUTRANGE, wi_softc::wi_gone, WI_INT_EN, WI_INTERSIL, WI_INTRS, WI_LOCK, WI_LUCENT, WI_PORT0, WI_PORTTYPE_ADHOC, WI_PORTTYPE_BSS, WI_PORTTYPE_HOSTAP, WI_RID_BASIC_RATE, WI_RID_CREATE_IBSS, WI_RID_DESIRED_SSID, WI_RID_DTIM_PERIOD, WI_RID_FRAG_THRESH, WI_RID_MAC_NODE, WI_RID_MAX_DATALEN, WI_RID_MAX_SLEEP, WI_RID_MICROWAVE_OVEN, WI_RID_NODENAME, WI_RID_OWN_BEACON_INT, WI_RID_OWN_CHNL, WI_RID_OWN_SSID, WI_RID_PM_ENABLED, WI_RID_PORTTYPE, WI_RID_PROMISC, WI_RID_ROAMING_MODE, WI_RID_RTS_THRESH, WI_RID_SUPPORT_RATE, WI_RID_SYSTEM_SCALE, wi_stop(), WI_SYMBOL, WI_TEST_MONITOR, and WI_UNLOCK.

Referenced by RxThread(), wlandrv_IOCTL(), and WlanInit().

Here is the call graph for this function: