~ubuntu-branches/ubuntu/trusty/linux-linaro-omap/trusty

« back to all changes in this revision

Viewing changes to drivers/net/wireless/libertas/defs.h

  • Committer: Package Import Robot
  • Author(s): John Rigby, John Rigby
  • Date: 2011-09-26 10:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20110926104423-57i0gl3v99b3lkfg
Tags: 3.0.0-1007.9
[ John Rigby ]

Enable crypto modules and remove crypto-modules from
exclude-module files
LP: #826021

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/**
2
 
  * This header file contains global constant/enum definitions,
3
 
  * global variable declaration.
4
 
  */
 
1
/*
 
2
 * This header file contains global constant/enum definitions,
 
3
 * global variable declaration.
 
4
 */
5
5
#ifndef _LBS_DEFS_H_
6
6
#define _LBS_DEFS_H_
7
7
 
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)
91
91
 
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)
98
 
 
99
92
#ifdef DEBUG
100
93
static inline void lbs_deb_hex(unsigned int grp, const char *prompt, u8 *buf, int len)
101
94
{
123
116
 
124
117
 
125
118
 
126
 
/** Buffer Constants */
 
119
/* Buffer Constants */
127
120
 
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.
133
 
*
134
 
*       Current version of MAC has a 32x6 multicast address buffer.
135
 
*
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.
138
 
*/
 
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.
 
126
 *
 
127
 *      Current version of MAC has a 32x6 multicast address buffer.
 
128
 *
 
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.
 
131
 */
139
132
 
140
133
#define MRVDRV_MAX_MULTICAST_LIST_SIZE  32
141
134
#define LBS_NUM_CMD_BUFFERS             10
166
159
#define WOL_RESULT_NOSPC_ERR            1
167
160
#define WOL_RESULT_EEXIST_ERR           2
168
161
 
169
 
/** Misc constants */
 
162
/* Misc constants */
170
163
/* This section defines 802.11 specific contants */
171
164
 
172
165
#define MRVDRV_MAX_BSS_DESCRIPTS                16
183
176
 
184
177
#define MARVELL_MESH_IE_LENGTH          9
185
178
 
186
 
/* Values used to populate the struct mrvl_mesh_ie.  The only time you need this
 
179
/*
 
180
 * Values used to populate the struct mrvl_mesh_ie.  The only time you need this
187
181
 * is when enabling the mesh using CMD_MESH_CONFIG.
188
182
 */
189
183
#define MARVELL_MESH_IE_TYPE            4
193
187
#define MARVELL_MESH_METRIC_ID          0
194
188
#define MARVELL_MESH_CAPABILITY         0
195
189
 
196
 
/** INT status Bit Definition*/
 
190
/* INT status Bit Definition */
197
191
#define MRVDRV_TX_DNLD_RDY              0x0001
198
192
#define MRVDRV_RX_UPLD_RDY              0x0002
199
193
#define MRVDRV_CMD_DNLD_RDY             0x0004
208
202
#define TPC_DEFAULT_P1 10
209
203
#define TPC_DEFAULT_P2 13
210
204
 
211
 
/** TxPD status */
 
205
/* TxPD status */
212
206
 
213
 
/*      Station firmware use TxPD status field to report final Tx transmit
214
 
*       result, Bit masks are used to present combined situations.
215
 
*/
 
207
/*
 
208
 *      Station firmware use TxPD status field to report final Tx transmit
 
209
 *      result, Bit masks are used to present combined situations.
 
210
 */
216
211
 
217
212
#define MRVDRV_TxPD_POWER_MGMT_NULL_PACKET 0x01
218
213
#define MRVDRV_TxPD_POWER_MGMT_LAST_PACKET 0x08
219
214
 
220
 
/** Tx mesh flag */
221
 
/* Currently we are using normal WDS flag as mesh flag.
 
215
/* Tx mesh flag */
 
216
/*
 
217
 * Currently we are using normal WDS flag as mesh flag.
222
218
 * TODO: change to proper mesh flag when MAC understands it.
223
219
 */
224
220
#define TxPD_CONTROL_WDS_FRAME (1<<17)
225
221
#define TxPD_MESH_FRAME TxPD_CONTROL_WDS_FRAME
226
222
 
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)
233
229
 
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)
242
238
 
243
 
/** RxPD status */
 
239
/* RxPD status */
244
240
 
245
241
#define MRVDRV_RXPD_STATUS_OK                0x0001
246
242
 
247
 
/** RxPD status - Received packet types */
248
 
/** Rx mesh flag */
249
 
/* Currently we are using normal WDS flag as mesh flag.
 
243
/* RxPD status - Received packet types */
 
244
/* Rx mesh flag */
 
245
/*
 
246
 * Currently we are using normal WDS flag as mesh flag.
250
247
 * TODO: change to proper mesh flag when MAC understands it.
251
248
 */
252
249
#define RxPD_CONTROL_WDS_FRAME (0x40)
253
250
#define RxPD_MESH_FRAME RxPD_CONTROL_WDS_FRAME
254
251
 
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
259
 
*/
 
252
/* RSSI-related defines */
 
253
/*
 
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
 
257
 */
260
258
 
261
259
#define MRVDRV_NF_DEFAULT_SCAN_VALUE            (-96)
262
260
 
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
300
298
 
301
299
#define MAX_LEDS                        8
302
300
 
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];
306
304
 
307
305
 
308
 
/** ENUM definition*/
309
 
/** SNRNF_TYPE */
 
306
/* ENUM definition */
 
307
/* SNRNF_TYPE */
310
308
enum SNRNF_TYPE {
311
309
        TYPE_BEACON = 0,
312
310
        TYPE_RXPD,
313
311
        MAX_TYPE_B
314
312
};
315
313
 
316
 
/** SNRNF_DATA*/
 
314
/* SNRNF_DATA */
317
315
enum SNRNF_DATA {
318
316
        TYPE_NOAVG = 0,
319
317
        TYPE_AVG,
320
318
        MAX_TYPE_AVG
321
319
};
322
320
 
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
330
328
};
331
329
 
332
 
/** PS_STATE */
 
330
/* PS_STATE */
333
331
enum PS_STATE {
334
332
        PS_STATE_FULL_POWER,
335
333
        PS_STATE_AWAKE,
337
335
        PS_STATE_SLEEP
338
336
};
339
337
 
340
 
/** DNLD_STATE */
 
338
/* DNLD_STATE */
341
339
enum DNLD_STATE {
342
340
        DNLD_RES_RECEIVED,
343
341
        DNLD_DATA_SENT,
345
343
        DNLD_BOOTCMD_SENT,
346
344
};
347
345
 
348
 
/** LBS_MEDIA_STATE */
 
346
/* LBS_MEDIA_STATE */
349
347
enum LBS_MEDIA_STATE {
350
348
        LBS_CONNECTED,
351
349
        LBS_DISCONNECTED
352
350
};
353
351
 
354
 
/** LBS_802_11_PRIVACY_FILTER */
 
352
/* LBS_802_11_PRIVACY_FILTER */
355
353
enum LBS_802_11_PRIVACY_FILTER {
356
354
        LBS802_11PRIVFILTERACCEPTALL,
357
355
        LBS802_11PRIVFILTER8021XWEP
358
356
};
359
357
 
360
 
/** mv_ms_type */
 
358
/* mv_ms_type */
361
359
enum mv_ms_type {
362
360
        MVMS_DAT = 0,
363
361
        MVMS_CMD = 1,
365
363
        MVMS_EVENT
366
364
};
367
365
 
368
 
/** KEY_TYPE_ID */
 
366
/* KEY_TYPE_ID */
369
367
enum KEY_TYPE_ID {
370
368
        KEY_TYPE_ID_WEP = 0,
371
369
        KEY_TYPE_ID_TKIP,
372
370
        KEY_TYPE_ID_AES
373
371
};
374
372
 
375
 
/** KEY_INFO_WPA (applies to both TKIP and AES/CCMP) */
 
373
/* KEY_INFO_WPA (applies to both TKIP and AES/CCMP) */
376
374
enum KEY_INFO_WPA {
377
375
        KEY_INFO_WPA_MCAST = 0x01,
378
376
        KEY_INFO_WPA_UNICAST = 0x02,