Go to the documentation of this file.
29 #include <linux/module.h>
30 #include <linux/kernel.h>
33 #include <linux/sched.h>
34 #include <linux/types.h>
36 #include <linux/slab.h>
37 #include <linux/netdevice.h>
38 #include <linux/pci.h>
41 #include <linux/rtnetlink.h>
42 #include <linux/wireless.h>
45 #include <linux/if_arp.h>
46 #include <linux/random.h>
50 #define DRV_NAME "rtl819xE"
52 #include "../rtllib.h"
54 #include "../dot11d.h"
67 #define DRV_COPYRIGHT \
68 "Copyright(c) 2008 - 2010 Realsil Semiconductor Corporation"
70 #define DRV_VERSION "0014.0401.2010"
72 #define IS_HARDWARE_TYPE_819xP(_priv) \
73 ((((struct r8192_priv *)rtllib_priv(dev))->card_8192 == NIC_8190P) || \
74 (((struct r8192_priv *)rtllib_priv(dev))->card_8192 == NIC_8192E))
75 #define IS_HARDWARE_TYPE_8192SE(_priv) \
76 (((struct r8192_priv *)rtllib_priv(dev))->card_8192 == NIC_8192SE)
77 #define IS_HARDWARE_TYPE_8192CE(_priv) \
78 (((struct r8192_priv *)rtllib_priv(dev))->card_8192 == NIC_8192CE)
79 #define IS_HARDWARE_TYPE_8192CU(_priv) \
80 (((struct r8192_priv *)rtllib_priv(dev))->card_8192 == NIC_8192CU)
81 #define IS_HARDWARE_TYPE_8192DE(_priv) \
82 (((struct r8192_priv *)rtllib_priv(dev))->card_8192 == NIC_8192DE)
83 #define IS_HARDWARE_TYPE_8192DU(_priv) \
84 (((struct r8192_priv *)rtllib_priv(dev))->card_8192 == NIC_8192DU)
86 #define RTL_PCI_DEVICE(vend, dev, cfg) \
87 .vendor = (vend), .device = (dev), \
88 .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID , \
89 .driver_data = (kernel_ulong_t)&(cfg)
91 #define irqreturn_type irqreturn_t
93 #define rtl8192_interrupt(x, y, z) rtl8192_interrupt_rsl(x, y)
95 #define RTL_MAX_SCAN_SIZE 128
97 #define RTL_RATE_MAX 30
99 #define TOTAL_CAM_ENTRY 32
100 #define CAM_CONTENT_COUNT 8
103 #define BIT(_i) (1<<(_i))
106 #define IS_NIC_DOWN(priv) (!(priv)->up)
108 #define IS_ADAPTER_SENDS_BEACON(dev) 0
110 #define IS_UNDER_11N_AES_MODE(_rtllib) \
111 ((_rtllib->pHTInfo->bCurrentHTSupport == true) && \
112 (_rtllib->pairwise_key_type == KEY_TYPE_CCMP))
114 #define HAL_MEMORY_MAPPED_IO_RANGE_8190PCI 0x1000
115 #define HAL_HW_PCI_REVISION_ID_8190PCI 0x00
116 #define HAL_MEMORY_MAPPED_IO_RANGE_8192PCIE 0x4000
117 #define HAL_HW_PCI_REVISION_ID_8192PCIE 0x01
118 #define HAL_MEMORY_MAPPED_IO_RANGE_8192SE 0x4000
119 #define HAL_HW_PCI_REVISION_ID_8192SE 0x10
120 #define HAL_HW_PCI_REVISION_ID_8192CE 0x1
121 #define HAL_MEMORY_MAPPED_IO_RANGE_8192CE 0x4000
122 #define HAL_HW_PCI_REVISION_ID_8192DE 0x0
123 #define HAL_MEMORY_MAPPED_IO_RANGE_8192DE 0x4000
125 #define HAL_HW_PCI_8180_DEVICE_ID 0x8180
126 #define HAL_HW_PCI_8185_DEVICE_ID 0x8185
127 #define HAL_HW_PCI_8188_DEVICE_ID 0x8188
128 #define HAL_HW_PCI_8198_DEVICE_ID 0x8198
129 #define HAL_HW_PCI_8190_DEVICE_ID 0x8190
130 #define HAL_HW_PCI_8192_DEVICE_ID 0x8192
131 #define HAL_HW_PCI_8192SE_DEVICE_ID 0x8192
132 #define HAL_HW_PCI_8174_DEVICE_ID 0x8174
133 #define HAL_HW_PCI_8173_DEVICE_ID 0x8173
134 #define HAL_HW_PCI_8172_DEVICE_ID 0x8172
135 #define HAL_HW_PCI_8171_DEVICE_ID 0x8171
136 #define HAL_HW_PCI_0045_DEVICE_ID 0x0045
137 #define HAL_HW_PCI_0046_DEVICE_ID 0x0046
138 #define HAL_HW_PCI_0044_DEVICE_ID 0x0044
139 #define HAL_HW_PCI_0047_DEVICE_ID 0x0047
140 #define HAL_HW_PCI_700F_DEVICE_ID 0x700F
141 #define HAL_HW_PCI_701F_DEVICE_ID 0x701F
142 #define HAL_HW_PCI_DLINK_DEVICE_ID 0x3304
143 #define HAL_HW_PCI_8192CET_DEVICE_ID 0x8191
144 #define HAL_HW_PCI_8192CE_DEVICE_ID 0x8178
145 #define HAL_HW_PCI_8191CE_DEVICE_ID 0x8177
146 #define HAL_HW_PCI_8188CE_DEVICE_ID 0x8176
147 #define HAL_HW_PCI_8192CU_DEVICE_ID 0x8191
148 #define HAL_HW_PCI_8192DE_DEVICE_ID 0x092D
149 #define HAL_HW_PCI_8192DU_DEVICE_ID 0x092D
151 #define RTL819X_DEFAULT_RF_TYPE RF_1T2R
153 #define RTLLIB_WATCH_DOG_TIME 2000
155 #define MAX_DEV_ADDR_SIZE 8
156 #define MAX_FIRMWARE_INFORMATION_SIZE 32
157 #define MAX_802_11_HEADER_LENGTH (40 + MAX_FIRMWARE_INFORMATION_SIZE)
158 #define ENCRYPTION_MAX_OVERHEAD 128
159 #define MAX_FRAGMENT_COUNT 8
160 #define MAX_TRANSMIT_BUFFER_SIZE \
161 (1600 + (MAX_802_11_HEADER_LENGTH + ENCRYPTION_MAX_OVERHEAD) * \
166 #define DEFAULT_FRAG_THRESHOLD 2342U
167 #define MIN_FRAG_THRESHOLD 256U
168 #define DEFAULT_BEACONINTERVAL 0x64U
170 #define DEFAULT_SSID ""
171 #define DEFAULT_RETRY_RTS 7
172 #define DEFAULT_RETRY_DATA 7
173 #define PRISM_HDR_SIZE 64
175 #define PHY_RSSI_SLID_WIN_MAX 100
177 #define RTL_IOCTL_WPA_SUPPLICANT (SIOCIWFIRSTPRIV + 30)
179 #define TxBBGainTableLength 37
180 #define CCKTxBBGainTableLength 23
182 #define CHANNEL_PLAN_LEN 10
185 #define NIC_SEND_HANG_THRESHOLD_NORMAL 4
186 #define NIC_SEND_HANG_THRESHOLD_POWERSAVE 8
188 #define MAX_TX_QUEUE 9
190 #define MAX_RX_QUEUE 1
192 #define MAX_RX_COUNT 64
193 #define MAX_TX_QUEUE_COUNT 9
527 u32 *p_inta,
u32 *p_intb);