Nut/OS  5.0.5
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

Referenced by wlandrv_ProbeDevice().

#define RESET_PORT   PORTD

Referenced by wlandrv_ProbeDevice().

#define RESET_BIT   0x20

Referenced by wlandrv_ProbeDevice().

#define WI_FLAGS_ATTACHED   0x0001
#define WI_FLAGS_INITIALIZED   0x0002
#define WI_FLAGS_OUTRANGE   0x0004

Referenced by wlandrv_Init().

#define WI_FLAGS_HAS_MOR   0x0010

Referenced by wlandrv_Attach(), and wlandrv_Init().

#define WI_FLAGS_HAS_ROAMING   0x0020

Referenced by wlandrv_Attach(), and wlandrv_Init().

#define WI_FLAGS_HAS_DIVERSITY   0x0040

Referenced by wlandrv_Attach().

#define WI_FLAGS_HAS_SYSSCALE   0x0080

Referenced by wlandrv_Attach(), and wlandrv_Init().

#define WI_FLAGS_BUG_AUTOINC   0x0100

Referenced by wlandrv_Attach().

#define WI_FLAGS_HAS_FRAGTHR   0x0200

Referenced by wlandrv_Attach(), and wlandrv_Init().

#define WI_FLAGS_HAS_DBMADJUST   0x0400

Referenced by wlandrv_Attach().

#define WI_NTXBUF   3

Referenced by wlandrv_Attach().

#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

Referenced by wlandrv_IOCTL().

#define IEEE80211_F_IBSSON   0x00000200

Referenced by wlandrv_Init().

#define IEEE80211_F_PMGTON   0x00000400

Referenced by wlandrv_Init().

#define IEEE80211_F_DESBSSID   0x00000800

Referenced by wlandrv_Init().

#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

Referenced by wlandrv_Attach(), and wlandrv_Init().

#define IEEE80211_C_IBSS   0x0002

Referenced by wlandrv_Attach().

#define IEEE80211_C_PMGT   0x0004

Referenced by wlandrv_Attach().

#define IEEE80211_C_HOSTAP   0x0008

Referenced by wlandrv_Attach().

#define IEEE80211_C_AHDEMO   0x0010

Referenced by wlandrv_Attach().

#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

Referenced by wlandrv_Attach().

#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

Referenced by wlandrv_Attach(), and wlandrv_Init().


Typedef Documentation

typedef struct wi_softc WI_SOFTC

Enumeration Type Documentation

Enumerator:
IEEE80211_M_STA 
IEEE80211_M_IBSS 
IEEE80211_M_AHDEMO 
IEEE80211_M_HOSTAP 
IEEE80211_M_MONITOR 
Enumerator:
IEEE80211_S_INIT 
IEEE80211_S_SCAN 
IEEE80211_S_AUTH 
IEEE80211_S_ASSOC 
IEEE80211_S_RUN 

Function Documentation

int wlandrv_ProbeDevice ( void  )

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)

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)

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:

int wlandrv_PutPacket ( NUTDEVICE dev,
NETBUF nb 
)

References wi_softc::d_fid, wi_softc::d_len, Debug, _NUTDEVICE::dev_dcb, DumpWlanData(), IEEE80211_ADDR_LEN, memcpy(), memset(), _NETBUF::nb_ap, _NETBUF::nb_dl, _NETBUF::nb_nw, _NETBUF::nb_tp, wi_softc::sc_ntxbuf, wi_softc::sc_txcur, wi_softc::sc_txd, wi_softc::sc_txnext, SWAP, _NBDATA::sz, _NBDATA::vp, WI_CMD_TX, wi_softc::wi_gone, WI_LOCK, WI_RECLAIM, and WI_UNLOCK.

Referenced by WlanOutput().

Here is the call graph for this function: