Go to the documentation of this file.
25 #ifndef __WLCORE_I_H__
26 #define __WLCORE_I_H__
31 #include <linux/list.h>
32 #include <linux/bitops.h>
43 #define WL12XX_NVS_NAME "ti-connectivity/wl1271-nvs.bin"
45 #define WL1271_TX_SECURITY_LO16(s) ((u16)((s) & 0xffff))
46 #define WL1271_TX_SECURITY_HI32(s) ((u32)(((s) >> 16) & 0xffffffff))
47 #define WL1271_TX_SQN_POST_RECOVERY_PADDING 0xff
49 #define WL1271_CIPHER_SUITE_GEM 0x00147201
51 #define WL1271_BUSY_WORD_CNT 1
52 #define WL1271_BUSY_WORD_LEN (WL1271_BUSY_WORD_CNT * sizeof(u32))
54 #define WL1271_ELP_HW_STATE_ASLEEP 0
55 #define WL1271_ELP_HW_STATE_IRQ 1
57 #define WL1271_DEFAULT_BEACON_INT 100
58 #define WL1271_DEFAULT_DTIM_PERIOD 1
60 #define WL12XX_MAX_ROLES 4
61 #define WL12XX_MAX_LINKS 12
62 #define WL12XX_INVALID_ROLE_ID 0xff
63 #define WL12XX_INVALID_LINK_ID 0xff
66 #define WLCORE_NUM_BANDS 2
68 #define WL12XX_MAX_RATE_POLICIES 16
69 #define WLCORE_MAX_KLV_TEMPLATES 4
72 #define WL12XX_SYSTEM_HLID 0
82 #define WL1271_PS_STA_MAX_PACKETS 2
84 #define WL1271_AP_BSS_INDEX 0
85 #define WL1271_AP_DEF_BEACON_EXP 20
112 #define FW_VER_CHIP_WL127X 6
113 #define FW_VER_CHIP_WL128X 7
115 #define FW_VER_IF_TYPE_STA 1
116 #define FW_VER_IF_TYPE_AP 2
118 #define FW_VER_MINOR_1_SPARE_STA_MIN 58
119 #define FW_VER_MINOR_1_SPARE_AP_MIN 47
121 #define FW_VER_MINOR_FWLOG_STA_MIN 70
130 #define NUM_TX_QUEUES 4
132 #define AP_MAX_STATIONS 8
162 #define WLCORE_FW_STATUS_1_LEN(num_rx_desc) \
163 (sizeof(struct wl_fw_status_1) + \
164 (sizeof(((struct wl_fw_status_1 *)0)->rx_pkt_descs[0])) * \
196 #define WL1271_MAX_CHANNELS 64
217 #define MAX_NUM_KEYS 14
218 #define MAX_KEY_SIZE 32
277 #define WL1271_MAX_RX_FILTERS 5
278 #define WL1271_RX_FILTER_MAX_FIELDS 8
280 #define WL1271_RX_FILTER_ETH_HEADER_SIZE 14
281 #define WL1271_RX_FILTER_MAX_FIELDS_SIZE 95
282 #define RX_FILTER_FIELD_OVERHEAD \
283 (sizeof(struct wl12xx_rx_filter_field) - sizeof(u8 *))
284 #define WL1271_RX_FILTER_MAX_PATTERN_SIZE \
285 (WL1271_RX_FILTER_MAX_FIELDS_SIZE - RX_FILTER_FIELD_OVERHEAD)
287 #define WL1271_RX_FILTER_FLAG_MASK BIT(0)
288 #define WL1271_RX_FILTER_FLAG_IP_HEADER 0
289 #define WL1271_RX_FILTER_FLAG_ETHERNET_HEADER BIT(1)
455 #define wl12xx_for_each_wlvif(wl, wlvif) \
456 list_for_each_entry(wlvif, &wl->wlvif_list, list)
458 #define wl12xx_for_each_wlvif_continue(wl, wlvif) \
459 list_for_each_entry_continue(wlvif, &wl->wlvif_list, list)
461 #define wl12xx_for_each_wlvif_bss_type(wl, wlvif, _bss_type) \
462 wl12xx_for_each_wlvif(wl, wlvif) \
463 if (wlvif->bss_type == _bss_type)
465 #define wl12xx_for_each_wlvif_sta(wl, wlvif) \
466 wl12xx_for_each_wlvif_bss_type(wl, wlvif, BSS_TYPE_STA_BSS)
468 #define wl12xx_for_each_wlvif_ap(wl, wlvif) \
469 wl12xx_for_each_wlvif_bss_type(wl, wlvif, BSS_TYPE_AP_BSS)
485 #define JOIN_TIMEOUT 5000
487 #define SESSION_COUNTER_MAX 6
488 #define SESSION_COUNTER_INVALID 7
490 #define WL1271_DEFAULT_POWER_LEVEL 0
492 #define WL1271_TX_QUEUE_LOW_WATERMARK 32
493 #define WL1271_TX_QUEUE_HIGH_WATERMARK 256
495 #define WL1271_DEFERRED_QUEUE_LIMIT 64
499 #define WL1271_PRE_POWER_ON_SLEEP 20
500 #define WL1271_POWER_ON_SLEEP 200
503 #define HW_BG_RATES_MASK 0xffff
504 #define HW_HT_RATES_OFFSET 16
505 #define HW_MIMO_RATES_OFFSET 24
507 #define WL12XX_HW_BLOCK_SIZE 256