1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22#ifndef __WL18XX_PRIV_H__
23#define __WL18XX_PRIV_H__
24
25#include "conf.h"
26
27
28#define WL18XX_CHIP_VER 8
29#define WL18XX_IFTYPE_VER 9
30#define WL18XX_MAJOR_VER WLCORE_FW_VER_IGNORE
31#define WL18XX_SUBTYPE_VER WLCORE_FW_VER_IGNORE
32#define WL18XX_MINOR_VER 58
33
34#define WL18XX_CMD_MAX_SIZE 740
35
36#define WL18XX_AGGR_BUFFER_SIZE (13 * PAGE_SIZE)
37
38#define WL18XX_NUM_TX_DESCRIPTORS 32
39#define WL18XX_NUM_RX_DESCRIPTORS 32
40
41#define WL18XX_NUM_MAC_ADDRESSES 2
42
43#define WL18XX_RX_BA_MAX_SESSIONS 13
44
45#define WL18XX_MAX_AP_STATIONS 10
46#define WL18XX_MAX_LINKS 16
47
48struct wl18xx_priv {
49
50 u8 cmd_buf[WL18XX_CMD_MAX_SIZE];
51
52 struct wl18xx_priv_conf conf;
53
54
55 u8 last_fw_rls_idx;
56
57
58 int extra_spare_key_count;
59};
60
61#define WL18XX_FW_MAX_TX_STATUS_DESC 33
62
63struct wl18xx_fw_status_priv {
64
65
66
67
68 u8 fw_release_idx;
69
70
71
72
73
74 u8 released_tx_desc[WL18XX_FW_MAX_TX_STATUS_DESC];
75
76
77
78
79 __le32 link_suspend_bitmap;
80
81
82
83
84 u8 tx_ac_threshold;
85
86
87 u8 tx_ps_threshold;
88
89
90 u8 tx_suspend_threshold;
91
92
93
94
95 u8 tx_slow_link_prio_threshold;
96
97
98
99
100 u8 tx_fast_link_prio_threshold;
101
102
103
104
105 u8 tx_slow_stop_threshold;
106
107
108
109
110 u8 tx_fast_stop_threshold;
111
112 u8 padding[3];
113};
114
115struct wl18xx_fw_packet_counters {
116
117 u8 tx_released_pkts[NUM_TX_QUEUES];
118
119
120 u8 tx_lnk_free_pkts[WL18XX_MAX_LINKS];
121
122
123 u8 tx_voice_released_blks;
124
125
126 u8 tx_last_rate;
127
128
129 u8 tx_last_rate_mbps;
130
131
132 u8 hlid;
133} __packed;
134
135
136struct wl18xx_fw_status {
137 __le32 intr;
138 u8 fw_rx_counter;
139 u8 drv_rx_counter;
140 u8 reserved;
141 u8 tx_results_counter;
142 __le32 rx_pkt_descs[WL18XX_NUM_RX_DESCRIPTORS];
143
144 __le32 fw_localtime;
145
146
147
148
149
150 __le32 link_ps_bitmap;
151
152
153
154
155
156 __le32 link_fast_bitmap;
157
158
159 __le32 total_released_blks;
160
161
162 __le32 tx_total;
163
164 struct wl18xx_fw_packet_counters counters;
165
166 __le32 log_start_addr;
167
168
169 struct wl18xx_fw_status_priv priv;
170} __packed;
171
172#define WL18XX_PHY_VERSION_MAX_LEN 20
173
174struct wl18xx_static_data_priv {
175 char phy_version[WL18XX_PHY_VERSION_MAX_LEN];
176};
177
178struct wl18xx_clk_cfg {
179 u32 n;
180 u32 m;
181 u32 p;
182 u32 q;
183 bool swallow;
184};
185
186enum {
187 CLOCK_CONFIG_16_2_M = 1,
188 CLOCK_CONFIG_16_368_M,
189 CLOCK_CONFIG_16_8_M,
190 CLOCK_CONFIG_19_2_M,
191 CLOCK_CONFIG_26_M,
192 CLOCK_CONFIG_32_736_M,
193 CLOCK_CONFIG_33_6_M,
194 CLOCK_CONFIG_38_468_M,
195 CLOCK_CONFIG_52_M,
196
197 NUM_CLOCK_CONFIGS,
198};
199
200#endif
201