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