ARM: mm: Recreate kernel mappings in early_paging_init()
[linux/fpc-iii.git] / drivers / net / wireless / ti / wl18xx / wl18xx.h
blob9204e07ee432fe483a343f008ee1ce91f2752149
1 /*
2 * This file is part of wl18xx
4 * Copyright (C) 2011 Texas Instruments Inc.
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * version 2 as published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18 * 02110-1301 USA
22 #ifndef __WL18XX_PRIV_H__
23 #define __WL18XX_PRIV_H__
25 #include "conf.h"
27 /* minimum FW required for driver */
28 #define WL18XX_CHIP_VER 8
29 #define WL18XX_IFTYPE_VER 5
30 #define WL18XX_MAJOR_VER WLCORE_FW_VER_IGNORE
31 #define WL18XX_SUBTYPE_VER WLCORE_FW_VER_IGNORE
32 #define WL18XX_MINOR_VER 39
34 #define WL18XX_CMD_MAX_SIZE 740
36 #define WL18XX_AGGR_BUFFER_SIZE (13 * PAGE_SIZE)
38 #define WL18XX_NUM_TX_DESCRIPTORS 32
39 #define WL18XX_NUM_RX_DESCRIPTORS 32
41 #define WL18XX_NUM_MAC_ADDRESSES 3
43 #define WL18XX_RX_BA_MAX_SESSIONS 5
45 struct wl18xx_priv {
46 /* buffer for sending commands to FW */
47 u8 cmd_buf[WL18XX_CMD_MAX_SIZE];
49 struct wl18xx_priv_conf conf;
51 /* Index of last released Tx desc in FW */
52 u8 last_fw_rls_idx;
54 /* number of keys requiring extra spare mem-blocks */
55 int extra_spare_key_count;
58 #define WL18XX_FW_MAX_TX_STATUS_DESC 33
60 struct wl18xx_fw_status_priv {
62 * Index in released_tx_desc for first byte that holds
63 * released tx host desc
65 u8 fw_release_idx;
68 * Array of host Tx descriptors, where fw_release_idx
69 * indicated the first released idx.
71 u8 released_tx_desc[WL18XX_FW_MAX_TX_STATUS_DESC];
73 /* A bitmap representing the currently suspended links. The suspend
74 * is short lived, for multi-channel Tx requirements.
76 __le32 link_suspend_bitmap;
78 /* packet threshold for an "almost empty" AC,
79 * for Tx schedulng purposes
81 u8 tx_ac_threshold;
83 /* number of packets to queue up for a link in PS */
84 u8 tx_ps_threshold;
86 /* number of packet to queue up for a suspended link */
87 u8 tx_suspend_threshold;
89 /* Should have less than this number of packets in queue of a slow
90 * link to qualify as high priority link
92 u8 tx_slow_link_prio_threshold;
94 /* Should have less than this number of packets in queue of a fast
95 * link to qualify as high priority link
97 u8 tx_fast_link_prio_threshold;
99 /* Should have less than this number of packets in queue of a slow
100 * link before we stop queuing up packets for it.
102 u8 tx_slow_stop_threshold;
104 /* Should have less than this number of packets in queue of a fast
105 * link before we stop queuing up packets for it.
107 u8 tx_fast_stop_threshold;
109 u8 padding[3];
112 #define WL18XX_PHY_VERSION_MAX_LEN 20
114 struct wl18xx_static_data_priv {
115 char phy_version[WL18XX_PHY_VERSION_MAX_LEN];
118 struct wl18xx_clk_cfg {
119 u32 n;
120 u32 m;
121 u32 p;
122 u32 q;
123 bool swallow;
126 enum {
127 CLOCK_CONFIG_16_2_M = 1,
128 CLOCK_CONFIG_16_368_M,
129 CLOCK_CONFIG_16_8_M,
130 CLOCK_CONFIG_19_2_M,
131 CLOCK_CONFIG_26_M,
132 CLOCK_CONFIG_32_736_M,
133 CLOCK_CONFIG_33_6_M,
134 CLOCK_CONFIG_38_468_M,
135 CLOCK_CONFIG_52_M,
137 NUM_CLOCK_CONFIGS,
140 #endif /* __WL18XX_PRIV_H__ */