Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions
device.h File Reference
#include <linux/module.h>
#include <linux/types.h>
#include <linux/init.h>
#include <linux/mm.h>
#include <linux/errno.h>
#include <linux/ioport.h>
#include <linux/pci.h>
#include <linux/kernel.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <linux/delay.h>
#include <linux/timer.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/string.h>
#include <linux/wait.h>
#include <linux/if_arp.h>
#include <linux/sched.h>
#include <linux/io.h>
#include <linux/if.h>
#include <linux/uaccess.h>
#include <linux/proc_fs.h>
#include <linux/inetdevice.h>
#include <linux/reboot.h>
#include <linux/wireless.h>
#include <net/iw_handler.h>
#include "device_cfg.h"
#include "ttype.h"
#include "80211hdr.h"
#include "tether.h"
#include "wmgr.h"
#include "wcmd.h"
#include "mib.h"
#include "srom.h"
#include "rc4.h"
#include "desc.h"
#include "key.h"
#include "mac.h"

Go to the source code of this file.

Data Structures

struct  _PMKID_CANDIDATE
 
struct  _BSSID_INFO
 
struct  tagSPMKID
 
struct  tagSPMKIDCandidateEvent
 
struct  tagSQuietControl
 
struct  __chip_info_tbl
 
struct  tagSCacheEntry
 
struct  tagSCache
 
struct  tagSDeFragControlBlock
 
struct  _RxManagementQueue
 
struct  __device_opt
 
struct  __device_info
 

Macros

#define WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
 
#define MAC_MAX_CONTEXT_REG   (256+128)
 
#define MAX_MULTICAST_ADDRESS_NUM   32
 
#define MULTICAST_ADDRESS_LIST_SIZE   (MAX_MULTICAST_ADDRESS_NUM * ETH_ALEN)
 
#define DUPLICATE_RX_CACHE_LENGTH   5
 
#define NUM_KEY_ENTRY   11
 
#define TX_WEP_NONE   0
 
#define TX_WEP_OTF   1
 
#define TX_WEP_SW   2
 
#define TX_WEP_SWOTP   3
 
#define TX_WEP_OTPSW   4
 
#define TX_WEP_SW232   5
 
#define KEYSEL_WEP40   0
 
#define KEYSEL_WEP104   1
 
#define KEYSEL_TKIP   2
 
#define KEYSEL_CCMP   3
 
#define AUTO_FB_NONE   0
 
#define AUTO_FB_0   1
 
#define AUTO_FB_1   2
 
#define FB_RATE0   0
 
#define FB_RATE1   1
 
#define ANT_A   0
 
#define ANT_B   1
 
#define ANT_DIVERSITY   2
 
#define ANT_RXD_TXA   3
 
#define ANT_RXD_TXB   4
 
#define ANT_UNKNOWN   0xFF
 
#define MAXCHECKHANGCNT   4
 
#define BB_VGA_LEVEL   4
 
#define BB_VGA_CHANGE_THRESHOLD   16
 
#define RESERV_AC0DMA   4
 
#define AVAIL_TD(p, q)   ((p)->sOpts.nTxDescs[(q)]-((p)->iTDUsed[(q)]))
 
#define NUM   64
 
#define PRIVATE_Message   0
 
#define DBG_PRT(l, p, args...)   {if (l<=msglevel) printk( p ,##args);}
 
#define PRINT_K(p, args...)   {if (PRIVATE_Message) printk( p ,##args);}
 
#define MAX_BSSIDINFO_4_PMKID   16
 
#define MAX_PMKIDLIST   5
 
#define NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED   0x01
 
#define MAX_QUIET_COUNT   8
 
#define CB_MAX_RX_FRAG   64
 
#define DEVICE_FLAGS_IP_ALIGN   0x00000001UL
 
#define DEVICE_FLAGS_PREAMBLE_TYPE   0x00000002UL
 
#define DEVICE_FLAGS_OP_MODE   0x00000004UL
 
#define DEVICE_FLAGS_PS_MODE   0x00000008UL
 
#define DEVICE_FLAGS_80211h_MODE   0x00000010UL
 
#define DEVICE_FLAGS_DiversityANT   0x00000020UL
 
#define DEVICE_FLAGS_OPENED   0x00010000UL
 
#define DEVICE_FLAGS_WOL_ENABLED   0x00080000UL
 
#define DEVICE_FLAGS_TX_ALIGN   0x01000000UL
 
#define DEVICE_FLAGS_HAVE_CAM   0x02000000UL
 
#define DEVICE_FLAGS_FLOW_CTRL   0x04000000UL
 
#define DEVICE_LINK_FAIL   0x00000001UL
 
#define DEVICE_SPEED_10   0x00000002UL
 
#define DEVICE_SPEED_100   0x00000004UL
 
#define DEVICE_SPEED_1000   0x00000008UL
 
#define DEVICE_DUPLEX_FULL   0x00000010UL
 
#define DEVICE_AUTONEG_ENABLE   0x00000020UL
 
#define DEVICE_FORCED_BY_EEPROM   0x00000040UL
 
#define DEVICE_LINK_CHANGE   0x00000001UL
 

Typedefs

typedef enum _VIA_BB_TYPE VIA_BB_TYPE
 
typedef enum _VIA_BB_TYPEPVIA_BB_TYPE
 
typedef enum _VIA_PKT_TYPE VIA_PKT_TYPE
 
typedef enum _VIA_PKT_TYPEPVIA_PKT_TYPE
 
typedef enum __device_msg_level DEVICE_MSG_LEVEL
 
typedef enum __device_msg_levelPDEVICE_MSG_LEVEL
 
typedef enum __device_init_type DEVICE_INIT_TYPE
 
typedef enum __device_init_typePDEVICE_INIT_TYPE
 
typedef unsigned char NDIS_802_11_PMKID_VALUE [16]
 
typedef enum
_NDIS_802_11_WEP_STATUS 
NDIS_802_11_WEP_STATUS
 
typedef enum
_NDIS_802_11_WEP_STATUS
PNDIS_802_11_WEP_STATUS
 
typedef enum
_NDIS_802_11_WEP_STATUS 
NDIS_802_11_ENCRYPTION_STATUS
 
typedef enum
_NDIS_802_11_WEP_STATUS
PNDIS_802_11_ENCRYPTION_STATUS
 
typedef enum
_NDIS_802_11_STATUS_TYPE 
NDIS_802_11_STATUS_TYPE
 
typedef enum
_NDIS_802_11_STATUS_TYPE
PNDIS_802_11_STATUS_TYPE
 
typedef struct _PMKID_CANDIDATE PMKID_CANDIDATE
 
typedef struct _PMKID_CANDIDATEPPMKID_CANDIDATE
 
typedef struct _BSSID_INFO BSSID_INFO
 
typedef struct _BSSID_INFOPBSSID_INFO
 
typedef struct tagSPMKID SPMKID
 
typedef struct tagSPMKIDPSPMKID
 
typedef struct
tagSPMKIDCandidateEvent 
SPMKIDCandidateEvent
 
typedef struct
tagSPMKIDCandidateEvent
PSPMKIDCandidateEvent
 
typedef struct tagSQuietControl SQuietControl
 
typedef struct tagSQuietControlPSQuietControl
 
typedef struct __chip_info_tbl CHIP_INFO
 
typedef struct __chip_info_tblPCHIP_INFO
 
typedef enum DEVICE_OWNER_TYPEPDEVICE_OWNER_TYPE
 
typedef struct tagSCacheEntry SCacheEntry
 
typedef struct tagSCacheEntryPSCacheEntry
 
typedef struct tagSCache SCache
 
typedef struct tagSCachePSCache
 
typedef struct
tagSDeFragControlBlock 
SDeFragControlBlock
 
typedef struct
tagSDeFragControlBlock
PSDeFragControlBlock
 
typedef struct _RxManagementQueue RxManagementQueue
 
typedef struct _RxManagementQueuePSRxManagementQueue
 
typedef struct __device_opt OPTIONS
 
typedef struct __device_optPOPTIONS
 
typedef struct __device_info DEVICE_INFO
 
typedef struct __device_infoPSDevice
 

Enumerations

enum  _VIA_BB_TYPE {
  BB_TYPE_11A =0, BB_TYPE_11B, BB_TYPE_11G, BB_TYPE_11A = 0,
  BB_TYPE_11B, BB_TYPE_11G
}
 
enum  _VIA_PKT_TYPE {
  PK_TYPE_11A =0, PK_TYPE_11B, PK_TYPE_11GB, PK_TYPE_11GA,
  PK_TYPE_11A = 0, PK_TYPE_11B, PK_TYPE_11GB, PK_TYPE_11GA
}
 
enum  __device_msg_level {
  MSG_LEVEL_ERR =0, MSG_LEVEL_NOTICE =1, MSG_LEVEL_INFO =2, MSG_LEVEL_VERBOSE =3,
  MSG_LEVEL_DEBUG =4, MSG_LEVEL_ERR = 0, MSG_LEVEL_NOTICE = 1, MSG_LEVEL_INFO = 2,
  MSG_LEVEL_VERBOSE = 3, MSG_LEVEL_DEBUG = 4
}
 
enum  __device_init_type {
  DEVICE_INIT_COLD =0, DEVICE_INIT_RESET, DEVICE_INIT_DXPL, DEVICE_INIT_COLD = 0,
  DEVICE_INIT_RESET, DEVICE_INIT_DXPL
}
 
enum  _NDIS_802_11_WEP_STATUS {
  Ndis802_11WEPEnabled, Ndis802_11Encryption1Enabled = Ndis802_11WEPEnabled, Ndis802_11WEPDisabled, Ndis802_11EncryptionDisabled = Ndis802_11WEPDisabled,
  Ndis802_11WEPKeyAbsent, Ndis802_11Encryption1KeyAbsent = Ndis802_11WEPKeyAbsent, Ndis802_11WEPNotSupported, Ndis802_11EncryptionNotSupported = Ndis802_11WEPNotSupported,
  Ndis802_11Encryption2Enabled, Ndis802_11Encryption2KeyAbsent, Ndis802_11Encryption3Enabled, Ndis802_11Encryption3KeyAbsent,
  Ndis802_11WEPEnabled, Ndis802_11Encryption1Enabled = Ndis802_11WEPEnabled, Ndis802_11WEPDisabled, Ndis802_11EncryptionDisabled = Ndis802_11WEPDisabled,
  Ndis802_11WEPKeyAbsent, Ndis802_11Encryption1KeyAbsent = Ndis802_11WEPKeyAbsent, Ndis802_11WEPNotSupported, Ndis802_11EncryptionNotSupported = Ndis802_11WEPNotSupported,
  Ndis802_11Encryption2Enabled, Ndis802_11Encryption2KeyAbsent, Ndis802_11Encryption3Enabled, Ndis802_11Encryption3KeyAbsent
}
 
enum  _NDIS_802_11_STATUS_TYPE {
  Ndis802_11StatusType_Authentication, Ndis802_11StatusType_MediaStreamMode, Ndis802_11StatusType_PMKID_CandidateList, Ndis802_11StatusTypeMax,
  Ndis802_11StatusType_Authentication, Ndis802_11StatusType_MediaStreamMode, Ndis802_11StatusType_PMKID_CandidateList, Ndis802_11StatusTypeMax
}
 
enum  DEVICE_OWNER_TYPE { OWNED_BY_HOST =0, OWNED_BY_NIC =1 }
 

Functions

void InitRxManagementQueue (PSDevice pDevice)
 
bool device_dma0_xmit (PSDevice pDevice, struct sk_buff *skb, unsigned int uNodeIndex)
 
bool device_alloc_frag_buf (PSDevice pDevice, PSDeFragControlBlock pDeF)
 
int Config_FileOperation (PSDevice pDevice, bool fwrite, unsigned char *Parameter)
 

Macro Definition Documentation

#define ANT_A   0

Definition at line 124 of file device.h.

#define ANT_B   1

Definition at line 125 of file device.h.

#define ANT_DIVERSITY   2

Definition at line 126 of file device.h.

#define ANT_RXD_TXA   3

Definition at line 127 of file device.h.

#define ANT_RXD_TXB   4

Definition at line 128 of file device.h.

#define ANT_UNKNOWN   0xFF

Definition at line 129 of file device.h.

#define AUTO_FB_0   1

Definition at line 117 of file device.h.

#define AUTO_FB_1   2

Definition at line 118 of file device.h.

#define AUTO_FB_NONE   0

Definition at line 116 of file device.h.

#define AVAIL_TD (   p,
  q 
)    ((p)->sOpts.nTxDescs[(q)]-((p)->iTDUsed[(q)]))

Definition at line 149 of file device.h.

#define BB_VGA_CHANGE_THRESHOLD   16

Definition at line 134 of file device.h.

#define BB_VGA_LEVEL   4

Definition at line 133 of file device.h.

#define CB_MAX_RX_FRAG   64

Definition at line 303 of file device.h.

#define DBG_PRT (   l,
  p,
  args... 
)    {if (l<=msglevel) printk( p ,##args);}

Definition at line 162 of file device.h.

#define DEVICE_AUTONEG_ENABLE   0x00000020UL

Definition at line 341 of file device.h.

#define DEVICE_DUPLEX_FULL   0x00000010UL

Definition at line 340 of file device.h.

#define DEVICE_FLAGS_80211h_MODE   0x00000010UL

Definition at line 324 of file device.h.

#define DEVICE_FLAGS_DiversityANT   0x00000020UL

Definition at line 325 of file device.h.

#define DEVICE_FLAGS_FLOW_CTRL   0x04000000UL

Definition at line 333 of file device.h.

#define DEVICE_FLAGS_HAVE_CAM   0x02000000UL

Definition at line 332 of file device.h.

#define DEVICE_FLAGS_IP_ALIGN   0x00000001UL

Definition at line 320 of file device.h.

#define DEVICE_FLAGS_OP_MODE   0x00000004UL

Definition at line 322 of file device.h.

#define DEVICE_FLAGS_OPENED   0x00010000UL

Definition at line 328 of file device.h.

#define DEVICE_FLAGS_PREAMBLE_TYPE   0x00000002UL

Definition at line 321 of file device.h.

#define DEVICE_FLAGS_PS_MODE   0x00000008UL

Definition at line 323 of file device.h.

#define DEVICE_FLAGS_TX_ALIGN   0x01000000UL

Definition at line 331 of file device.h.

#define DEVICE_FLAGS_WOL_ENABLED   0x00080000UL

Definition at line 329 of file device.h.

#define DEVICE_FORCED_BY_EEPROM   0x00000040UL

Definition at line 342 of file device.h.

#define DEVICE_LINK_CHANGE   0x00000001UL

Definition at line 344 of file device.h.

#define DEVICE_LINK_FAIL   0x00000001UL

Definition at line 336 of file device.h.

#define DEVICE_SPEED_10   0x00000002UL

Definition at line 337 of file device.h.

#define DEVICE_SPEED_100   0x00000004UL

Definition at line 338 of file device.h.

#define DEVICE_SPEED_1000   0x00000008UL

Definition at line 339 of file device.h.

#define DUPLICATE_RX_CACHE_LENGTH   5

Definition at line 98 of file device.h.

#define FB_RATE0   0

Definition at line 120 of file device.h.

#define FB_RATE1   1

Definition at line 121 of file device.h.

#define KEYSEL_CCMP   3

Definition at line 112 of file device.h.

#define KEYSEL_TKIP   2

Definition at line 111 of file device.h.

#define KEYSEL_WEP104   1

Definition at line 110 of file device.h.

#define KEYSEL_WEP40   0

Definition at line 109 of file device.h.

#define MAC_MAX_CONTEXT_REG   (256+128)

Definition at line 93 of file device.h.

#define MAX_BSSIDINFO_4_PMKID   16

Definition at line 200 of file device.h.

#define MAX_MULTICAST_ADDRESS_NUM   32

Definition at line 95 of file device.h.

#define MAX_PMKIDLIST   5

Definition at line 201 of file device.h.

#define MAX_QUIET_COUNT   8

Definition at line 264 of file device.h.

#define MAXCHECKHANGCNT   4

Definition at line 131 of file device.h.

#define MULTICAST_ADDRESS_LIST_SIZE   (MAX_MULTICAST_ADDRESS_NUM * ETH_ALEN)

Definition at line 96 of file device.h.

#define NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED   0x01

Definition at line 203 of file device.h.

#define NUM   64

Definition at line 152 of file device.h.

#define NUM_KEY_ENTRY   11

Definition at line 100 of file device.h.

#define PRINT_K (   p,
  args... 
)    {if (PRIVATE_Message) printk( p ,##args);}

Definition at line 163 of file device.h.

#define PRIVATE_Message   0

Definition at line 157 of file device.h.

#define RESERV_AC0DMA   4

Definition at line 143 of file device.h.

#define TX_WEP_NONE   0

Definition at line 102 of file device.h.

#define TX_WEP_OTF   1

Definition at line 103 of file device.h.

#define TX_WEP_OTPSW   4

Definition at line 106 of file device.h.

#define TX_WEP_SW   2

Definition at line 104 of file device.h.

#define TX_WEP_SW232   5

Definition at line 107 of file device.h.

#define TX_WEP_SWOTP   3

Definition at line 105 of file device.h.

#define WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT

Definition at line 70 of file device.h.

Typedef Documentation

typedef unsigned char NDIS_802_11_PMKID_VALUE[16]

Definition at line 206 of file device.h.

typedef enum _VIA_BB_TYPE * PVIA_BB_TYPE
typedef enum _VIA_PKT_TYPE * PVIA_PKT_TYPE
typedef enum _VIA_BB_TYPE VIA_BB_TYPE

Enumeration Type Documentation

Enumerator:
DEVICE_INIT_COLD 
DEVICE_INIT_RESET 
DEVICE_INIT_DXPL 
DEVICE_INIT_COLD 
DEVICE_INIT_RESET 
DEVICE_INIT_DXPL 

Definition at line 191 of file device.h.

Enumerator:
MSG_LEVEL_ERR 
MSG_LEVEL_NOTICE 
MSG_LEVEL_INFO 
MSG_LEVEL_VERBOSE 
MSG_LEVEL_DEBUG 
MSG_LEVEL_ERR 
MSG_LEVEL_NOTICE 
MSG_LEVEL_INFO 
MSG_LEVEL_VERBOSE 
MSG_LEVEL_DEBUG 

Definition at line 183 of file device.h.

Enumerator:
Ndis802_11StatusType_Authentication 
Ndis802_11StatusType_MediaStreamMode 
Ndis802_11StatusType_PMKID_CandidateList 
Ndis802_11StatusTypeMax 
Ndis802_11StatusType_Authentication 
Ndis802_11StatusType_MediaStreamMode 
Ndis802_11StatusType_PMKID_CandidateList 
Ndis802_11StatusTypeMax 

Definition at line 227 of file device.h.

Enumerator:
Ndis802_11WEPEnabled 
Ndis802_11Encryption1Enabled 
Ndis802_11WEPDisabled 
Ndis802_11EncryptionDisabled 
Ndis802_11WEPKeyAbsent 
Ndis802_11Encryption1KeyAbsent 
Ndis802_11WEPNotSupported 
Ndis802_11EncryptionNotSupported 
Ndis802_11Encryption2Enabled 
Ndis802_11Encryption2KeyAbsent 
Ndis802_11Encryption3Enabled 
Ndis802_11Encryption3KeyAbsent 
Ndis802_11WEPEnabled 
Ndis802_11Encryption1Enabled 
Ndis802_11WEPDisabled 
Ndis802_11EncryptionDisabled 
Ndis802_11WEPKeyAbsent 
Ndis802_11Encryption1KeyAbsent 
Ndis802_11WEPNotSupported 
Ndis802_11EncryptionNotSupported 
Ndis802_11Encryption2Enabled 
Ndis802_11Encryption2KeyAbsent 
Ndis802_11Encryption3Enabled 
Ndis802_11Encryption3KeyAbsent 

Definition at line 209 of file device.h.

Enumerator:
BB_TYPE_11A 
BB_TYPE_11B 
BB_TYPE_11G 
BB_TYPE_11A 
BB_TYPE_11B 
BB_TYPE_11G 

Definition at line 166 of file device.h.

Enumerator:
PK_TYPE_11A 
PK_TYPE_11B 
PK_TYPE_11GB 
PK_TYPE_11GA 
PK_TYPE_11A 
PK_TYPE_11B 
PK_TYPE_11GB 
PK_TYPE_11GA 

Definition at line 174 of file device.h.

Enumerator:
OWNED_BY_HOST 
OWNED_BY_NIC 

Definition at line 283 of file device.h.

Function Documentation

int Config_FileOperation ( PSDevice  pDevice,
bool  fwrite,
unsigned char Parameter 
)

Definition at line 2949 of file device_main.c.

bool device_alloc_frag_buf ( PSDevice  pDevice,
PSDeFragControlBlock  pDeF 
)

Definition at line 1628 of file device_main.c.

bool device_dma0_xmit ( PSDevice  pDevice,
struct sk_buff skb,
unsigned int  uNodeIndex 
)

Definition at line 2086 of file device_main.c.

void InitRxManagementQueue ( PSDevice  pDevice)

Definition at line 1812 of file device_main.c.