89
89
#define lbs_deb_spi(fmt, args...) LBS_DEB_LL(LBS_DEB_SPI, " spi", fmt, ##args)
90
90
#define lbs_deb_cfg80211(fmt, args...) LBS_DEB_LL(LBS_DEB_CFG80211, " cfg80211", fmt, ##args)
92
#define lbs_pr_info(format, args...) \
93
printk(KERN_INFO DRV_NAME": " format, ## args)
94
#define lbs_pr_err(format, args...) \
95
printk(KERN_ERR DRV_NAME": " format, ## args)
96
#define lbs_pr_alert(format, args...) \
97
printk(KERN_ALERT DRV_NAME": " format, ## args)
100
93
static inline void lbs_deb_hex(unsigned int grp, const char *prompt, u8 *buf, int len)
126
/** Buffer Constants */
119
/* Buffer Constants */
128
121
/* The size of SQ memory PPA, DPA are 8 DWORDs, that keep the physical
129
* addresses of TxPD buffers. Station has only 8 TxPD available, Whereas
130
* driver has more local TxPDs. Each TxPD on the host memory is associated
131
* with a Tx control node. The driver maintains 8 RxPD descriptors for
132
* station firmware to store Rx packet information.
134
* Current version of MAC has a 32x6 multicast address buffer.
136
* 802.11b can have up to 14 channels, the driver keeps the
137
* BSSID(MAC address) of each APs or Ad hoc stations it has sensed.
122
* addresses of TxPD buffers. Station has only 8 TxPD available, Whereas
123
* driver has more local TxPDs. Each TxPD on the host memory is associated
124
* with a Tx control node. The driver maintains 8 RxPD descriptors for
125
* station firmware to store Rx packet information.
127
* Current version of MAC has a 32x6 multicast address buffer.
129
* 802.11b can have up to 14 channels, the driver keeps the
130
* BSSID(MAC address) of each APs or Ad hoc stations it has sensed.
140
133
#define MRVDRV_MAX_MULTICAST_LIST_SIZE 32
141
134
#define LBS_NUM_CMD_BUFFERS 10
208
202
#define TPC_DEFAULT_P1 10
209
203
#define TPC_DEFAULT_P2 13
213
/* Station firmware use TxPD status field to report final Tx transmit
214
* result, Bit masks are used to present combined situations.
208
* Station firmware use TxPD status field to report final Tx transmit
209
* result, Bit masks are used to present combined situations.
217
212
#define MRVDRV_TxPD_POWER_MGMT_NULL_PACKET 0x01
218
213
#define MRVDRV_TxPD_POWER_MGMT_LAST_PACKET 0x08
221
/* Currently we are using normal WDS flag as mesh flag.
217
* Currently we are using normal WDS flag as mesh flag.
222
218
* TODO: change to proper mesh flag when MAC understands it.
224
220
#define TxPD_CONTROL_WDS_FRAME (1<<17)
225
221
#define TxPD_MESH_FRAME TxPD_CONTROL_WDS_FRAME
227
/** Mesh interface ID */
223
/* Mesh interface ID */
228
224
#define MESH_IFACE_ID 0x0001
229
/** Mesh id should be in bits 14-13-12 */
225
/* Mesh id should be in bits 14-13-12 */
230
226
#define MESH_IFACE_BIT_OFFSET 0x000c
231
/** Mesh enable bit in FW capability */
227
/* Mesh enable bit in FW capability */
232
228
#define MESH_CAPINFO_ENABLE_MASK (1<<16)
234
/** FW definition from Marvell v4 */
230
/* FW definition from Marvell v4 */
235
231
#define MRVL_FW_V4 (0x04)
236
/** FW definition from Marvell v5 */
232
/* FW definition from Marvell v5 */
237
233
#define MRVL_FW_V5 (0x05)
238
/** FW definition from Marvell v10 */
234
/* FW definition from Marvell v10 */
239
235
#define MRVL_FW_V10 (0x0a)
240
/** FW major revision definition */
236
/* FW major revision definition */
241
237
#define MRVL_FW_MAJOR_REV(x) ((x)>>24)
245
241
#define MRVDRV_RXPD_STATUS_OK 0x0001
247
/** RxPD status - Received packet types */
249
/* Currently we are using normal WDS flag as mesh flag.
243
/* RxPD status - Received packet types */
246
* Currently we are using normal WDS flag as mesh flag.
250
247
* TODO: change to proper mesh flag when MAC understands it.
252
249
#define RxPD_CONTROL_WDS_FRAME (0x40)
253
250
#define RxPD_MESH_FRAME RxPD_CONTROL_WDS_FRAME
255
/** RSSI-related defines */
256
/* RSSI constants are used to implement 802.11 RSSI threshold
257
* indication. if the Rx packet signal got too weak for 5 consecutive
258
* times, miniport driver (driver) will report this event to wrapper
252
/* RSSI-related defines */
254
* RSSI constants are used to implement 802.11 RSSI threshold
255
* indication. if the Rx packet signal got too weak for 5 consecutive
256
* times, miniport driver (driver) will report this event to wrapper
261
259
#define MRVDRV_NF_DEFAULT_SCAN_VALUE (-96)
263
/** RTS/FRAG related defines */
261
/* RTS/FRAG related defines */
264
262
#define MRVDRV_RTS_MIN_VALUE 0
265
263
#define MRVDRV_RTS_MAX_VALUE 2347
266
264
#define MRVDRV_FRAG_MIN_VALUE 256
301
299
#define MAX_LEDS 8
303
/** Global Variable Declaration */
301
/* Global Variable Declaration */
304
302
extern const char lbs_driver_version[];
305
303
extern u16 lbs_region_code_to_index[MRVDRV_MAX_REGION_CODE];
308
/** ENUM definition*/
306
/* ENUM definition */
310
308
enum SNRNF_TYPE {
317
315
enum SNRNF_DATA {
323
/** LBS_802_11_POWER_MODE */
321
/* LBS_802_11_POWER_MODE */
324
322
enum LBS_802_11_POWER_MODE {
325
323
LBS802_11POWERMODECAM,
326
324
LBS802_11POWERMODEMAX_PSP,
327
325
LBS802_11POWERMODEFAST_PSP,
328
/*not a real mode, defined as an upper bound */
326
/* not a real mode, defined as an upper bound */
329
327
LBS802_11POWEMODEMAX
334
332
PS_STATE_FULL_POWER,