Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
wl1251.h File Reference
#include <linux/mutex.h>
#include <linux/list.h>
#include <linux/bitops.h>
#include <net/mac80211.h>

Go to the source code of this file.

Data Structures

struct  boot_attr
 
struct  wl1251_partition
 
struct  wl1251_partition_set
 
struct  wl1251_stats
 
struct  wl1251_debugfs
 
struct  wl1251_if_operations
 
struct  wl1251
 

Macros

#define DRIVER_NAME   "wl1251"
 
#define DRIVER_PREFIX   DRIVER_NAME ": "
 
#define DEBUG_LEVEL   (DEBUG_NONE)
 
#define DEBUG_DUMP_LIMIT   1024
 
#define wl1251_error(fmt, arg...)   printk(KERN_ERR DRIVER_PREFIX "ERROR " fmt "\n", ##arg)
 
#define wl1251_warning(fmt, arg...)   printk(KERN_WARNING DRIVER_PREFIX "WARNING " fmt "\n", ##arg)
 
#define wl1251_notice(fmt, arg...)   printk(KERN_INFO DRIVER_PREFIX fmt "\n", ##arg)
 
#define wl1251_info(fmt, arg...)   printk(KERN_DEBUG DRIVER_PREFIX fmt "\n", ##arg)
 
#define wl1251_debug(level, fmt, arg...)
 
#define wl1251_dump(level, prefix, buf, len)
 
#define wl1251_dump_ascii(level, prefix, buf, len)
 
#define WL1251_DEFAULT_RX_CONFIG
 
#define WL1251_DEFAULT_RX_FILTER
 
#define WL1251_BUSY_WORD_LEN   8
 
#define DEFAULT_HW_GEN_MODULATION_TYPE   CCK_LONG /* Long Preamble */
 
#define DEFAULT_HW_GEN_TX_RATE   RATE_2MBPS
 
#define JOIN_TIMEOUT   5000 /* 5000 milliseconds to join */
 
#define WL1251_DEFAULT_POWER_LEVEL   20
 
#define WL1251_TX_QUEUE_LOW_WATERMARK   10
 
#define WL1251_TX_QUEUE_HIGH_WATERMARK   25
 
#define WL1251_DEFAULT_BEACON_INT   100
 
#define WL1251_DEFAULT_DTIM_PERIOD   1
 
#define WL1251_DEFAULT_CHANNEL   0
 
#define WL1251_DEFAULT_BET_CONSECUTIVE   10
 
#define CHIP_ID_1251_PG10   (0x7010101)
 
#define CHIP_ID_1251_PG11   (0x7020101)
 
#define CHIP_ID_1251_PG12   (0x7030101)
 
#define CHIP_ID_1271_PG10   (0x4030101)
 
#define CHIP_ID_1271_PG20   (0x4030111)
 
#define WL1251_FW_NAME   "wl1251-fw.bin"
 
#define WL1251_NVS_NAME   "wl1251-nvs.bin"
 
#define WL1251_POWER_ON_SLEEP   10 /* in milliseconds */
 
#define WL1251_PART_DOWN_MEM_START   0x0
 
#define WL1251_PART_DOWN_MEM_SIZE   0x16800
 
#define WL1251_PART_DOWN_REG_START   REGISTERS_BASE
 
#define WL1251_PART_DOWN_REG_SIZE   REGISTERS_DOWN_SIZE
 
#define WL1251_PART_WORK_MEM_START   0x28000
 
#define WL1251_PART_WORK_MEM_SIZE   0x14000
 
#define WL1251_PART_WORK_REG_START   REGISTERS_BASE
 
#define WL1251_PART_WORK_REG_SIZE   REGISTERS_WORK_SIZE
 
#define WL1251_DEFAULT_LOW_RSSI_WEIGHT   10
 
#define WL1251_DEFAULT_LOW_RSSI_DEPTH   10
 

Enumerations

enum  {
  DEBUG_NONE = 0, DEBUG_IRQ = BIT(0), DEBUG_SPI = BIT(1), DEBUG_BOOT = BIT(2),
  DEBUG_MAILBOX = BIT(3), DEBUG_NETLINK = BIT(4), DEBUG_EVENT = BIT(5), DEBUG_TX = BIT(6),
  DEBUG_RX = BIT(7), DEBUG_SCAN = BIT(8), DEBUG_CRYPT = BIT(9), DEBUG_PSM = BIT(10),
  DEBUG_MAC80211 = BIT(11), DEBUG_CMD = BIT(12), DEBUG_ACX = BIT(13), DEBUG_ALL = ~0
}
 
enum  wl1251_state { WL1251_STATE_OFF, WL1251_STATE_ON, WL1251_STATE_PLT }
 
enum  wl1251_partition_type { PART_DOWN, PART_WORK, PART_DRPW, PART_TABLE_LEN }
 
enum  wl1251_station_mode { STATION_ACTIVE_MODE, STATION_POWER_SAVE_MODE, STATION_IDLE }
 

Functions

int wl1251_plt_start (struct wl1251 *wl)
 
int wl1251_plt_stop (struct wl1251 *wl)
 
struct ieee80211_hwwl1251_alloc_hw (void)
 
int wl1251_free_hw (struct wl1251 *wl)
 
int wl1251_init_ieee80211 (struct wl1251 *wl)
 
void wl1251_enable_interrupts (struct wl1251 *wl)
 
void wl1251_disable_interrupts (struct wl1251 *wl)
 

Macro Definition Documentation

#define CHIP_ID_1251_PG10   (0x7010101)

Definition at line 421 of file wl1251.h.

#define CHIP_ID_1251_PG11   (0x7020101)

Definition at line 422 of file wl1251.h.

#define CHIP_ID_1251_PG12   (0x7030101)

Definition at line 423 of file wl1251.h.

#define CHIP_ID_1271_PG10   (0x4030101)

Definition at line 424 of file wl1251.h.

#define CHIP_ID_1271_PG20   (0x4030111)

Definition at line 425 of file wl1251.h.

#define DEBUG_DUMP_LIMIT   1024

Definition at line 55 of file wl1251.h.

#define DEBUG_LEVEL   (DEBUG_NONE)

Definition at line 53 of file wl1251.h.

#define DEFAULT_HW_GEN_MODULATION_TYPE   CCK_LONG /* Long Preamble */

Definition at line 405 of file wl1251.h.

#define DEFAULT_HW_GEN_TX_RATE   RATE_2MBPS

Definition at line 406 of file wl1251.h.

#define DRIVER_NAME   "wl1251"

Definition at line 31 of file wl1251.h.

#define DRIVER_PREFIX   DRIVER_NAME ": "

Definition at line 32 of file wl1251.h.

#define JOIN_TIMEOUT   5000 /* 5000 milliseconds to join */

Definition at line 407 of file wl1251.h.

#define WL1251_BUSY_WORD_LEN   8

Definition at line 106 of file wl1251.h.

#define wl1251_debug (   level,
  fmt,
  arg... 
)
Value:
do { \
if (level & DEBUG_LEVEL) \
printk(KERN_DEBUG DRIVER_PREFIX fmt "\n", ##arg); \
} while (0)

Definition at line 69 of file wl1251.h.

#define WL1251_DEFAULT_BEACON_INT   100

Definition at line 414 of file wl1251.h.

#define WL1251_DEFAULT_BET_CONSECUTIVE   10

Definition at line 419 of file wl1251.h.

#define WL1251_DEFAULT_CHANNEL   0

Definition at line 417 of file wl1251.h.

#define WL1251_DEFAULT_DTIM_PERIOD   1

Definition at line 415 of file wl1251.h.

#define WL1251_DEFAULT_LOW_RSSI_DEPTH   10

Definition at line 443 of file wl1251.h.

#define WL1251_DEFAULT_LOW_RSSI_WEIGHT   10

Definition at line 442 of file wl1251.h.

#define WL1251_DEFAULT_POWER_LEVEL   20

Definition at line 409 of file wl1251.h.

#define WL1251_DEFAULT_RX_CONFIG
Value:
CFG_BSSID_FILTER_EN)

Definition at line 95 of file wl1251.h.

#define WL1251_DEFAULT_RX_FILTER
Value:
CFG_RX_MGMT_EN | \
CFG_RX_DATA_EN | \
CFG_RX_CTL_EN | \
CFG_RX_BCN_EN | \
CFG_RX_AUTH_EN | \
CFG_RX_ASSOC_EN)

Definition at line 98 of file wl1251.h.

#define wl1251_dump (   level,
  prefix,
  buf,
  len 
)
Value:
do { \
if (level & DEBUG_LEVEL) \
print_hex_dump(KERN_DEBUG, DRIVER_PREFIX prefix, \
buf, \
min_t(size_t, len, DEBUG_DUMP_LIMIT), \
0); \
} while (0)

Definition at line 75 of file wl1251.h.

#define wl1251_dump_ascii (   level,
  prefix,
  buf,
  len 
)
Value:
do { \
if (level & DEBUG_LEVEL) \
print_hex_dump(KERN_DEBUG, DRIVER_PREFIX prefix, \
buf, \
min_t(size_t, len, DEBUG_DUMP_LIMIT), \
true); \
} while (0)

Definition at line 85 of file wl1251.h.

#define wl1251_error (   fmt,
  arg... 
)    printk(KERN_ERR DRIVER_PREFIX "ERROR " fmt "\n", ##arg)

Definition at line 57 of file wl1251.h.

#define WL1251_FW_NAME   "wl1251-fw.bin"

Definition at line 427 of file wl1251.h.

#define wl1251_info (   fmt,
  arg... 
)    printk(KERN_DEBUG DRIVER_PREFIX fmt "\n", ##arg)

Definition at line 66 of file wl1251.h.

#define wl1251_notice (   fmt,
  arg... 
)    printk(KERN_INFO DRIVER_PREFIX fmt "\n", ##arg)

Definition at line 63 of file wl1251.h.

#define WL1251_NVS_NAME   "wl1251-nvs.bin"

Definition at line 428 of file wl1251.h.

#define WL1251_PART_DOWN_MEM_SIZE   0x16800

Definition at line 433 of file wl1251.h.

#define WL1251_PART_DOWN_MEM_START   0x0

Definition at line 432 of file wl1251.h.

#define WL1251_PART_DOWN_REG_SIZE   REGISTERS_DOWN_SIZE

Definition at line 435 of file wl1251.h.

#define WL1251_PART_DOWN_REG_START   REGISTERS_BASE

Definition at line 434 of file wl1251.h.

#define WL1251_PART_WORK_MEM_SIZE   0x14000

Definition at line 438 of file wl1251.h.

#define WL1251_PART_WORK_MEM_START   0x28000

Definition at line 437 of file wl1251.h.

#define WL1251_PART_WORK_REG_SIZE   REGISTERS_WORK_SIZE

Definition at line 440 of file wl1251.h.

#define WL1251_PART_WORK_REG_START   REGISTERS_BASE

Definition at line 439 of file wl1251.h.

#define WL1251_POWER_ON_SLEEP   10 /* in milliseconds */

Definition at line 430 of file wl1251.h.

#define WL1251_TX_QUEUE_HIGH_WATERMARK   25

Definition at line 412 of file wl1251.h.

#define WL1251_TX_QUEUE_LOW_WATERMARK   10

Definition at line 411 of file wl1251.h.

#define wl1251_warning (   fmt,
  arg... 
)    printk(KERN_WARNING DRIVER_PREFIX "WARNING " fmt "\n", ##arg)

Definition at line 60 of file wl1251.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
DEBUG_NONE 
DEBUG_IRQ 
DEBUG_SPI 
DEBUG_BOOT 
DEBUG_MAILBOX 
DEBUG_NETLINK 
DEBUG_EVENT 
DEBUG_TX 
DEBUG_RX 
DEBUG_SCAN 
DEBUG_CRYPT 
DEBUG_PSM 
DEBUG_MAC80211 
DEBUG_CMD 
DEBUG_ACX 
DEBUG_ALL 

Definition at line 34 of file wl1251.h.

Enumerator:
PART_DOWN 
PART_WORK 
PART_DRPW 
PART_TABLE_LEN 

Definition at line 124 of file wl1251.h.

Enumerator:
WL1251_STATE_OFF 
WL1251_STATE_ON 
WL1251_STATE_PLT 

Definition at line 118 of file wl1251.h.

Enumerator:
STATION_ACTIVE_MODE 
STATION_POWER_SAVE_MODE 
STATION_IDLE 

Definition at line 132 of file wl1251.h.

Function Documentation

struct ieee80211_hw* wl1251_alloc_hw ( void  )
read

Definition at line 1363 of file main.c.

void wl1251_disable_interrupts ( struct wl1251 wl)

Definition at line 50 of file main.c.

void wl1251_enable_interrupts ( struct wl1251 wl)

Definition at line 45 of file main.c.

int wl1251_free_hw ( struct wl1251 wl)

Definition at line 1438 of file main.c.

int wl1251_init_ieee80211 ( struct wl1251 wl)

Definition at line 1323 of file main.c.

int wl1251_plt_start ( struct wl1251 wl)
int wl1251_plt_stop ( struct wl1251 wl)