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

Go to the source code of this file.

Data Structures

struct  wl1271_chip
 
struct  wl_fw_packet_counters
 
struct  wl_fw_status_1
 
struct  wl_fw_status_2
 
struct  wl1271_scan
 
struct  wl1271_if_operations
 
struct  wl1271_ap_key
 
struct  wl1271_link
 
struct  wl12xx_rx_filter_field
 
struct  wl12xx_rx_filter
 
struct  wl1271_station
 
struct  wl12xx_vif
 

Macros

#define WL12XX_NVS_NAME   "ti-connectivity/wl1271-nvs.bin"
 
#define WL1271_TX_SECURITY_LO16(s)   ((u16)((s) & 0xffff))
 
#define WL1271_TX_SECURITY_HI32(s)   ((u32)(((s) >> 16) & 0xffffffff))
 
#define WL1271_TX_SQN_POST_RECOVERY_PADDING   0xff
 
#define WL1271_CIPHER_SUITE_GEM   0x00147201
 
#define WL1271_BUSY_WORD_CNT   1
 
#define WL1271_BUSY_WORD_LEN   (WL1271_BUSY_WORD_CNT * sizeof(u32))
 
#define WL1271_ELP_HW_STATE_ASLEEP   0
 
#define WL1271_ELP_HW_STATE_IRQ   1
 
#define WL1271_DEFAULT_BEACON_INT   100
 
#define WL1271_DEFAULT_DTIM_PERIOD   1
 
#define WL12XX_MAX_ROLES   4
 
#define WL12XX_MAX_LINKS   12
 
#define WL12XX_INVALID_ROLE_ID   0xff
 
#define WL12XX_INVALID_LINK_ID   0xff
 
#define WLCORE_NUM_BANDS   2
 
#define WL12XX_MAX_RATE_POLICIES   16
 
#define WLCORE_MAX_KLV_TEMPLATES   4
 
#define WL12XX_SYSTEM_HLID   0
 
#define WL1271_PS_STA_MAX_PACKETS   2
 
#define WL1271_AP_BSS_INDEX   0
 
#define WL1271_AP_DEF_BEACON_EXP   20
 
#define FW_VER_CHIP_WL127X   6
 
#define FW_VER_CHIP_WL128X   7
 
#define FW_VER_IF_TYPE_STA   1
 
#define FW_VER_IF_TYPE_AP   2
 
#define FW_VER_MINOR_1_SPARE_STA_MIN   58
 
#define FW_VER_MINOR_1_SPARE_AP_MIN   47
 
#define FW_VER_MINOR_FWLOG_STA_MIN   70
 
#define NUM_TX_QUEUES   4
 
#define AP_MAX_STATIONS   8
 
#define WLCORE_FW_STATUS_1_LEN(num_rx_desc)
 
#define WL1271_MAX_CHANNELS   64
 
#define MAX_NUM_KEYS   14
 
#define MAX_KEY_SIZE   32
 
#define WL1271_MAX_RX_FILTERS   5
 
#define WL1271_RX_FILTER_MAX_FIELDS   8
 
#define WL1271_RX_FILTER_ETH_HEADER_SIZE   14
 
#define WL1271_RX_FILTER_MAX_FIELDS_SIZE   95
 
#define RX_FILTER_FIELD_OVERHEAD   (sizeof(struct wl12xx_rx_filter_field) - sizeof(u8 *))
 
#define WL1271_RX_FILTER_MAX_PATTERN_SIZE   (WL1271_RX_FILTER_MAX_FIELDS_SIZE - RX_FILTER_FIELD_OVERHEAD)
 
#define WL1271_RX_FILTER_FLAG_MASK   BIT(0)
 
#define WL1271_RX_FILTER_FLAG_IP_HEADER   0
 
#define WL1271_RX_FILTER_FLAG_ETHERNET_HEADER   BIT(1)
 
#define wl12xx_for_each_wlvif(wl, wlvif)   list_for_each_entry(wlvif, &wl->wlvif_list, list)
 
#define wl12xx_for_each_wlvif_continue(wl, wlvif)   list_for_each_entry_continue(wlvif, &wl->wlvif_list, list)
 
#define wl12xx_for_each_wlvif_bss_type(wl, wlvif, _bss_type)
 
#define wl12xx_for_each_wlvif_sta(wl, wlvif)   wl12xx_for_each_wlvif_bss_type(wl, wlvif, BSS_TYPE_STA_BSS)
 
#define wl12xx_for_each_wlvif_ap(wl, wlvif)   wl12xx_for_each_wlvif_bss_type(wl, wlvif, BSS_TYPE_AP_BSS)
 
#define JOIN_TIMEOUT   5000 /* 5000 milliseconds to join */
 
#define SESSION_COUNTER_MAX   6 /* maximum value for the session counter */
 
#define SESSION_COUNTER_INVALID   7 /* used with dummy_packet */
 
#define WL1271_DEFAULT_POWER_LEVEL   0
 
#define WL1271_TX_QUEUE_LOW_WATERMARK   32
 
#define WL1271_TX_QUEUE_HIGH_WATERMARK   256
 
#define WL1271_DEFERRED_QUEUE_LIMIT   64
 
#define WL1271_PRE_POWER_ON_SLEEP   20 /* in milliseconds */
 
#define WL1271_POWER_ON_SLEEP   200 /* in milliseconds */
 
#define HW_BG_RATES_MASK   0xffff
 
#define HW_HT_RATES_OFFSET   16
 
#define HW_MIMO_RATES_OFFSET   24
 
#define WL12XX_HW_BLOCK_SIZE   256
 

Enumerations

enum  wlcore_state { WLCORE_STATE_OFF, WLCORE_STATE_RESTARTING, WLCORE_STATE_ON }
 
enum  wl12xx_fw_type { WL12XX_FW_TYPE_NONE, WL12XX_FW_TYPE_NORMAL, WL12XX_FW_TYPE_MULTI, WL12XX_FW_TYPE_PLT }
 
enum  {
  FW_VER_CHIP, FW_VER_IF_TYPE, FW_VER_MAJOR, FW_VER_SUBTYPE,
  FW_VER_MINOR, NUM_FW_VER
}
 
enum  wl12xx_flags {
  WL1271_FLAG_GPIO_POWER, WL1271_FLAG_TX_QUEUE_STOPPED, WL1271_FLAG_TX_PENDING, WL1271_FLAG_IN_ELP,
  WL1271_FLAG_ELP_REQUESTED, WL1271_FLAG_IRQ_RUNNING, WL1271_FLAG_FW_TX_BUSY, WL1271_FLAG_DUMMY_PACKET_PENDING,
  WL1271_FLAG_SUSPENDED, WL1271_FLAG_PENDING_WORK, WL1271_FLAG_SOFT_GEMINI, WL1271_FLAG_RECOVERY_IN_PROGRESS,
  WL1271_FLAG_VIF_CHANGE_IN_PROGRESS, WL1271_FLAG_INTENDED_FW_RECOVERY, WL1271_FLAG_IO_FAILED
}
 
enum  wl12xx_vif_flags {
  WLVIF_FLAG_INITIALIZED, WLVIF_FLAG_STA_ASSOCIATED, WLVIF_FLAG_STA_AUTHORIZED, WLVIF_FLAG_IBSS_JOINED,
  WLVIF_FLAG_AP_STARTED, WLVIF_FLAG_IN_PS, WLVIF_FLAG_STA_STATE_SENT, WLVIF_FLAG_RX_STREAMING_STARTED,
  WLVIF_FLAG_PSPOLL_FAILURE, WLVIF_FLAG_CS_PROGRESS, WLVIF_FLAG_AP_PROBE_RESP_SET, WLVIF_FLAG_IN_USE
}
 
enum  rx_filter_action { FILTER_DROP = 0, FILTER_SIGNAL = 1, FILTER_FW_HANDLE = 2 }
 
enum  plt_mode { PLT_OFF = 0, PLT_ON = 1, PLT_FEM_DETECT = 2 }
 

Functions

int wl1271_plt_start (struct wl1271 *wl, const enum plt_mode plt_mode)
 
int wl1271_plt_stop (struct wl1271 *wl)
 
int wl1271_recalc_rx_streaming (struct wl1271 *wl, struct wl12xx_vif *wlvif)
 
void wl12xx_queue_recovery_work (struct wl1271 *wl)
 
size_t wl12xx_copy_fwlog (struct wl1271 *wl, u8 *memblock, size_t maxlen)
 
int wl1271_rx_filter_alloc_field (struct wl12xx_rx_filter *filter, u16 offset, u8 flags, u8 *pattern, u8 len)
 
void wl1271_rx_filter_free (struct wl12xx_rx_filter *filter)
 
struct wl12xx_rx_filterwl1271_rx_filter_alloc (void)
 
int wl1271_rx_filter_get_fields_size (struct wl12xx_rx_filter *filter)
 
void wl1271_rx_filter_flatten_fields (struct wl12xx_rx_filter *filter, u8 *buf)
 

Variables

struct wl_fw_packet_counters __packed
 

Macro Definition Documentation

#define AP_MAX_STATIONS   8

Definition at line 132 of file wlcore_i.h.

#define FW_VER_CHIP_WL127X   6

Definition at line 112 of file wlcore_i.h.

#define FW_VER_CHIP_WL128X   7

Definition at line 113 of file wlcore_i.h.

#define FW_VER_IF_TYPE_AP   2

Definition at line 116 of file wlcore_i.h.

#define FW_VER_IF_TYPE_STA   1

Definition at line 115 of file wlcore_i.h.

#define FW_VER_MINOR_1_SPARE_AP_MIN   47

Definition at line 119 of file wlcore_i.h.

#define FW_VER_MINOR_1_SPARE_STA_MIN   58

Definition at line 118 of file wlcore_i.h.

#define FW_VER_MINOR_FWLOG_STA_MIN   70

Definition at line 121 of file wlcore_i.h.

#define HW_BG_RATES_MASK   0xffff

Definition at line 503 of file wlcore_i.h.

#define HW_HT_RATES_OFFSET   16

Definition at line 504 of file wlcore_i.h.

#define HW_MIMO_RATES_OFFSET   24

Definition at line 505 of file wlcore_i.h.

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

Definition at line 485 of file wlcore_i.h.

#define MAX_KEY_SIZE   32

Definition at line 218 of file wlcore_i.h.

#define MAX_NUM_KEYS   14

Definition at line 217 of file wlcore_i.h.

#define NUM_TX_QUEUES   4

Definition at line 130 of file wlcore_i.h.

#define RX_FILTER_FIELD_OVERHEAD   (sizeof(struct wl12xx_rx_filter_field) - sizeof(u8 *))

Definition at line 282 of file wlcore_i.h.

#define SESSION_COUNTER_INVALID   7 /* used with dummy_packet */

Definition at line 488 of file wlcore_i.h.

#define SESSION_COUNTER_MAX   6 /* maximum value for the session counter */

Definition at line 487 of file wlcore_i.h.

#define WL1271_AP_BSS_INDEX   0

Definition at line 84 of file wlcore_i.h.

#define WL1271_AP_DEF_BEACON_EXP   20

Definition at line 85 of file wlcore_i.h.

#define WL1271_BUSY_WORD_CNT   1

Definition at line 51 of file wlcore_i.h.

#define WL1271_BUSY_WORD_LEN   (WL1271_BUSY_WORD_CNT * sizeof(u32))

Definition at line 52 of file wlcore_i.h.

#define WL1271_CIPHER_SUITE_GEM   0x00147201

Definition at line 49 of file wlcore_i.h.

#define WL1271_DEFAULT_BEACON_INT   100

Definition at line 57 of file wlcore_i.h.

#define WL1271_DEFAULT_DTIM_PERIOD   1

Definition at line 58 of file wlcore_i.h.

#define WL1271_DEFAULT_POWER_LEVEL   0

Definition at line 490 of file wlcore_i.h.

#define WL1271_DEFERRED_QUEUE_LIMIT   64

Definition at line 495 of file wlcore_i.h.

#define WL1271_ELP_HW_STATE_ASLEEP   0

Definition at line 54 of file wlcore_i.h.

#define WL1271_ELP_HW_STATE_IRQ   1

Definition at line 55 of file wlcore_i.h.

#define WL1271_MAX_CHANNELS   64

Definition at line 196 of file wlcore_i.h.

#define WL1271_MAX_RX_FILTERS   5

Definition at line 277 of file wlcore_i.h.

#define WL1271_POWER_ON_SLEEP   200 /* in milliseconds */

Definition at line 500 of file wlcore_i.h.

#define WL1271_PRE_POWER_ON_SLEEP   20 /* in milliseconds */

Definition at line 499 of file wlcore_i.h.

#define WL1271_PS_STA_MAX_PACKETS   2

Definition at line 82 of file wlcore_i.h.

#define WL1271_RX_FILTER_ETH_HEADER_SIZE   14

Definition at line 280 of file wlcore_i.h.

#define WL1271_RX_FILTER_FLAG_ETHERNET_HEADER   BIT(1)

Definition at line 289 of file wlcore_i.h.

#define WL1271_RX_FILTER_FLAG_IP_HEADER   0

Definition at line 288 of file wlcore_i.h.

#define WL1271_RX_FILTER_FLAG_MASK   BIT(0)

Definition at line 287 of file wlcore_i.h.

#define WL1271_RX_FILTER_MAX_FIELDS   8

Definition at line 278 of file wlcore_i.h.

#define WL1271_RX_FILTER_MAX_FIELDS_SIZE   95

Definition at line 281 of file wlcore_i.h.

#define WL1271_RX_FILTER_MAX_PATTERN_SIZE   (WL1271_RX_FILTER_MAX_FIELDS_SIZE - RX_FILTER_FIELD_OVERHEAD)

Definition at line 284 of file wlcore_i.h.

#define WL1271_TX_QUEUE_HIGH_WATERMARK   256

Definition at line 493 of file wlcore_i.h.

#define WL1271_TX_QUEUE_LOW_WATERMARK   32

Definition at line 492 of file wlcore_i.h.

#define WL1271_TX_SECURITY_HI32 (   s)    ((u32)(((s) >> 16) & 0xffffffff))

Definition at line 46 of file wlcore_i.h.

#define WL1271_TX_SECURITY_LO16 (   s)    ((u16)((s) & 0xffff))

Definition at line 45 of file wlcore_i.h.

#define WL1271_TX_SQN_POST_RECOVERY_PADDING   0xff

Definition at line 47 of file wlcore_i.h.

#define wl12xx_for_each_wlvif (   wl,
  wlvif 
)    list_for_each_entry(wlvif, &wl->wlvif_list, list)

Definition at line 455 of file wlcore_i.h.

#define wl12xx_for_each_wlvif_ap (   wl,
  wlvif 
)    wl12xx_for_each_wlvif_bss_type(wl, wlvif, BSS_TYPE_AP_BSS)

Definition at line 468 of file wlcore_i.h.

#define wl12xx_for_each_wlvif_bss_type (   wl,
  wlvif,
  _bss_type 
)
Value:
if (wlvif->bss_type == _bss_type)

Definition at line 461 of file wlcore_i.h.

#define wl12xx_for_each_wlvif_continue (   wl,
  wlvif 
)    list_for_each_entry_continue(wlvif, &wl->wlvif_list, list)

Definition at line 458 of file wlcore_i.h.

#define wl12xx_for_each_wlvif_sta (   wl,
  wlvif 
)    wl12xx_for_each_wlvif_bss_type(wl, wlvif, BSS_TYPE_STA_BSS)

Definition at line 465 of file wlcore_i.h.

#define WL12XX_HW_BLOCK_SIZE   256

Definition at line 507 of file wlcore_i.h.

#define WL12XX_INVALID_LINK_ID   0xff

Definition at line 63 of file wlcore_i.h.

#define WL12XX_INVALID_ROLE_ID   0xff

Definition at line 62 of file wlcore_i.h.

#define WL12XX_MAX_LINKS   12

Definition at line 61 of file wlcore_i.h.

#define WL12XX_MAX_RATE_POLICIES   16

Definition at line 68 of file wlcore_i.h.

#define WL12XX_MAX_ROLES   4

Definition at line 60 of file wlcore_i.h.

#define WL12XX_NVS_NAME   "ti-connectivity/wl1271-nvs.bin"

Definition at line 43 of file wlcore_i.h.

#define WL12XX_SYSTEM_HLID   0

Definition at line 72 of file wlcore_i.h.

#define WLCORE_FW_STATUS_1_LEN (   num_rx_desc)
Value:
(sizeof(struct wl_fw_status_1) + \
(sizeof(((struct wl_fw_status_1 *)0)->rx_pkt_descs[0])) * \
num_rx_desc)

Definition at line 162 of file wlcore_i.h.

#define WLCORE_MAX_KLV_TEMPLATES   4

Definition at line 69 of file wlcore_i.h.

#define WLCORE_NUM_BANDS   2

Definition at line 66 of file wlcore_i.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
FW_VER_CHIP 
FW_VER_IF_TYPE 
FW_VER_MAJOR 
FW_VER_SUBTYPE 
FW_VER_MINOR 
NUM_FW_VER 

Definition at line 102 of file wlcore_i.h.

enum plt_mode
Enumerator:
PLT_OFF 
PLT_ON 
PLT_FEM_DETECT 

Definition at line 297 of file wlcore_i.h.

Enumerator:
FILTER_DROP 
FILTER_SIGNAL 
FILTER_FW_HANDLE 

Definition at line 291 of file wlcore_i.h.

Enumerator:
WL1271_FLAG_GPIO_POWER 
WL1271_FLAG_TX_QUEUE_STOPPED 
WL1271_FLAG_TX_PENDING 
WL1271_FLAG_IN_ELP 
WL1271_FLAG_ELP_REQUESTED 
WL1271_FLAG_IRQ_RUNNING 
WL1271_FLAG_FW_TX_BUSY 
WL1271_FLAG_DUMMY_PACKET_PENDING 
WL1271_FLAG_SUSPENDED 
WL1271_FLAG_PENDING_WORK 
WL1271_FLAG_SOFT_GEMINI 
WL1271_FLAG_RECOVERY_IN_PROGRESS 
WL1271_FLAG_VIF_CHANGE_IN_PROGRESS 
WL1271_FLAG_INTENDED_FW_RECOVERY 
WL1271_FLAG_IO_FAILED 

Definition at line 230 of file wlcore_i.h.

Enumerator:
WL12XX_FW_TYPE_NONE 
WL12XX_FW_TYPE_NORMAL 
WL12XX_FW_TYPE_MULTI 
WL12XX_FW_TYPE_PLT 

Definition at line 93 of file wlcore_i.h.

Enumerator:
WLVIF_FLAG_INITIALIZED 
WLVIF_FLAG_STA_ASSOCIATED 
WLVIF_FLAG_STA_AUTHORIZED 
WLVIF_FLAG_IBSS_JOINED 
WLVIF_FLAG_AP_STARTED 
WLVIF_FLAG_IN_PS 
WLVIF_FLAG_STA_STATE_SENT 
WLVIF_FLAG_RX_STREAMING_STARTED 
WLVIF_FLAG_PSPOLL_FAILURE 
WLVIF_FLAG_CS_PROGRESS 
WLVIF_FLAG_AP_PROBE_RESP_SET 
WLVIF_FLAG_IN_USE 

Definition at line 248 of file wlcore_i.h.

Enumerator:
WLCORE_STATE_OFF 
WLCORE_STATE_RESTARTING 
WLCORE_STATE_ON 

Definition at line 87 of file wlcore_i.h.

Function Documentation

int wl1271_plt_start ( struct wl1271 wl,
const enum plt_mode  plt_mode 
)

Definition at line 1043 of file main.c.

int wl1271_plt_stop ( struct wl1271 wl)

Definition at line 1108 of file main.c.

int wl1271_recalc_rx_streaming ( struct wl1271 wl,
struct wl12xx_vif wlvif 
)

Definition at line 136 of file main.c.

struct wl12xx_rx_filter* wl1271_rx_filter_alloc ( void  )
read
int wl1271_rx_filter_alloc_field ( struct wl12xx_rx_filter filter,
u16  offset,
u8  flags,
u8 pattern,
u8  len 
)
void wl1271_rx_filter_flatten_fields ( struct wl12xx_rx_filter filter,
u8 buf 
)
void wl1271_rx_filter_free ( struct wl12xx_rx_filter filter)
int wl1271_rx_filter_get_fields_size ( struct wl12xx_rx_filter filter)
size_t wl12xx_copy_fwlog ( struct wl1271 wl,
u8 memblock,
size_t  maxlen 
)

Definition at line 760 of file main.c.

void wl12xx_queue_recovery_work ( struct wl1271 wl)

Definition at line 747 of file main.c.

Variable Documentation