fea817d6a9be32a17dc94750a7ffe6aaf35543e6
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / iwlwifi / mvm / fw-api-coex.h
1 /******************************************************************************
2  *
3  * This file is provided under a dual BSD/GPLv2 license.  When using or
4  * redistributing this file, you may do so under either license.
5  *
6  * GPL LICENSE SUMMARY
7  *
8  * Copyright(c) 2013 - 2014 Intel Corporation. All rights reserved.
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of version 2 of the GNU General Public License as
12  * published by the Free Software Foundation.
13  *
14  * This program is distributed in the hope that it will be useful, but
15  * WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
22  * USA
23  *
24  * The full GNU General Public License is included in this distribution
25  * in the file called COPYING.
26  *
27  * Contact Information:
28  *  Intel Linux Wireless <ilw@linux.intel.com>
29  * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
30  *
31  * BSD LICENSE
32  *
33  * Copyright(c) 2013 - 2014 Intel Corporation. All rights reserved.
34  * All rights reserved.
35  *
36  * Redistribution and use in source and binary forms, with or without
37  * modification, are permitted provided that the following conditions
38  * are met:
39  *
40  *  * Redistributions of source code must retain the above copyright
41  *    notice, this list of conditions and the following disclaimer.
42  *  * Redistributions in binary form must reproduce the above copyright
43  *    notice, this list of conditions and the following disclaimer in
44  *    the documentation and/or other materials provided with the
45  *    distribution.
46  *  * Neither the name Intel Corporation nor the names of its
47  *    contributors may be used to endorse or promote products derived
48  *    from this software without specific prior written permission.
49  *
50  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
51  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
52  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
53  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
54  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
55  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
56  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
57  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
58  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
59  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
60  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
61  *****************************************************************************/
62
63 #ifndef __fw_api_bt_coex_h__
64 #define __fw_api_bt_coex_h__
65
66 #include <linux/types.h>
67 #include <linux/bitops.h>
68
69 #define BITS(nb) (BIT(nb) - 1)
70
71 /**
72  * enum iwl_bt_coex_flags - flags for BT_COEX command
73  * @BT_COEX_MODE_POS:
74  * @BT_COEX_MODE_MSK:
75  * @BT_COEX_DISABLE_OLD:
76  * @BT_COEX_2W_OLD:
77  * @BT_COEX_3W_OLD:
78  * @BT_COEX_NW_OLD:
79  * @BT_COEX_AUTO_OLD:
80  * @BT_COEX_BT_OLD: Antenna is for BT (manufacuring tests)
81  * @BT_COEX_WIFI_OLD: Antenna is for BT (manufacuring tests)
82  * @BT_COEX_SYNC2SCO:
83  * @BT_COEX_CORUNNING:
84  * @BT_COEX_MPLUT:
85  *
86  * The COEX_MODE must be set for each command. Even if it is not changed.
87  */
88 enum iwl_bt_coex_flags {
89         BT_COEX_MODE_POS                = 3,
90         BT_COEX_MODE_MSK                = BITS(3) << BT_COEX_MODE_POS,
91         BT_COEX_DISABLE_OLD             = 0x0 << BT_COEX_MODE_POS,
92         BT_COEX_2W_OLD                  = 0x1 << BT_COEX_MODE_POS,
93         BT_COEX_3W_OLD                  = 0x2 << BT_COEX_MODE_POS,
94         BT_COEX_NW_OLD                  = 0x3 << BT_COEX_MODE_POS,
95         BT_COEX_AUTO_OLD                = 0x5 << BT_COEX_MODE_POS,
96         BT_COEX_BT_OLD                  = 0x6 << BT_COEX_MODE_POS,
97         BT_COEX_WIFI_OLD                = 0x7 << BT_COEX_MODE_POS,
98         BT_COEX_SYNC2SCO                = BIT(7),
99         BT_COEX_CORUNNING               = BIT(8),
100         BT_COEX_MPLUT                   = BIT(9),
101 };
102
103 /*
104  * indicates what has changed in the BT_COEX command.
105  * BT_VALID_ENABLE must be set for each command. Commands without this bit will
106  * discarded by the firmware
107  */
108 enum iwl_bt_coex_valid_bit_msk {
109         BT_VALID_ENABLE                 = BIT(0),
110         BT_VALID_BT_PRIO_BOOST          = BIT(1),
111         BT_VALID_MAX_KILL               = BIT(2),
112         BT_VALID_3W_TMRS                = BIT(3),
113         BT_VALID_KILL_ACK               = BIT(4),
114         BT_VALID_KILL_CTS               = BIT(5),
115         BT_VALID_REDUCED_TX_POWER       = BIT(6),
116         BT_VALID_LUT                    = BIT(7),
117         BT_VALID_WIFI_RX_SW_PRIO_BOOST  = BIT(8),
118         BT_VALID_WIFI_TX_SW_PRIO_BOOST  = BIT(9),
119         BT_VALID_MULTI_PRIO_LUT         = BIT(10),
120         BT_VALID_TRM_KICK_FILTER        = BIT(11),
121         BT_VALID_CORUN_LUT_20           = BIT(12),
122         BT_VALID_CORUN_LUT_40           = BIT(13),
123         BT_VALID_ANT_ISOLATION          = BIT(14),
124         BT_VALID_ANT_ISOLATION_THRS     = BIT(15),
125         BT_VALID_TXTX_DELTA_FREQ_THRS   = BIT(16),
126         BT_VALID_TXRX_MAX_FREQ_0        = BIT(17),
127         BT_VALID_SYNC_TO_SCO            = BIT(18),
128 };
129
130 /**
131  * enum iwl_bt_reduced_tx_power - allows to reduce txpower for WiFi frames.
132  * @BT_REDUCED_TX_POWER_CTL: reduce Tx power for control frames
133  * @BT_REDUCED_TX_POWER_DATA: reduce Tx power for data frames
134  *
135  * This mechanism allows to have BT and WiFi run concurrently. Since WiFi
136  * reduces its Tx power, it can work along with BT, hence reducing the amount
137  * of WiFi frames being killed by BT.
138  */
139 enum iwl_bt_reduced_tx_power {
140         BT_REDUCED_TX_POWER_CTL         = BIT(0),
141         BT_REDUCED_TX_POWER_DATA        = BIT(1),
142 };
143
144 enum iwl_bt_coex_lut_type {
145         BT_COEX_TIGHT_LUT = 0,
146         BT_COEX_LOOSE_LUT,
147         BT_COEX_TX_DIS_LUT,
148
149         BT_COEX_MAX_LUT,
150         BT_COEX_INVALID_LUT = 0xff,
151 }; /* BT_COEX_DECISION_LUT_INDEX_API_E_VER_1 */
152
153 #define BT_COEX_LUT_SIZE (12)
154 #define BT_COEX_CORUN_LUT_SIZE (32)
155 #define BT_COEX_MULTI_PRIO_LUT_SIZE (2)
156 #define BT_COEX_BOOST_SIZE (4)
157 #define BT_REDUCED_TX_POWER_BIT BIT(7)
158
159 /**
160  * struct iwl_bt_coex_cmd_old - bt coex configuration command
161  * @flags:&enum iwl_bt_coex_flags
162  * @max_kill:
163  * @bt_reduced_tx_power: enum %iwl_bt_reduced_tx_power
164  * @override_primary_lut: enum %iwl_bt_coex_lut_type: BT_COEX_INVALID_LUT
165  *      should be set by default
166  * @override_secondary_lut: enum %iwl_bt_coex_lut_type: BT_COEX_INVALID_LUT
167  *      should be set by default
168  * @bt4_antenna_isolation: antenna isolation
169  * @bt4_antenna_isolation_thr: antenna threshold value
170  * @bt4_tx_tx_delta_freq_thr: TxTx delta frequency
171  * @bt4_tx_rx_max_freq0: TxRx max frequency
172  * @bt_prio_boost: BT priority boost registers
173  * @wifi_tx_prio_boost: SW boost of wifi tx priority
174  * @wifi_rx_prio_boost: SW boost of wifi rx priority
175  * @kill_ack_msk: kill ACK mask. 1 - Tx ACK, 0 - kill Tx of ACK.
176  * @kill_cts_msk: kill CTS mask. 1 - Tx CTS, 0 - kill Tx of CTS.
177  * @decision_lut: PTA decision LUT, per Prio-Ch
178  * @bt4_multiprio_lut: multi priority LUT configuration
179  * @bt4_corun_lut20: co-running 20 MHz LUT configuration
180  * @bt4_corun_lut40: co-running 40 MHz LUT configuration
181  * @valid_bit_msk: enum %iwl_bt_coex_valid_bit_msk
182  *
183  * The structure is used for the BT_COEX command.
184  */
185 struct iwl_bt_coex_cmd_old {
186         __le32 flags;
187         u8 max_kill;
188         u8 bt_reduced_tx_power;
189         u8 override_primary_lut;
190         u8 override_secondary_lut;
191
192         u8 bt4_antenna_isolation;
193         u8 bt4_antenna_isolation_thr;
194         u8 bt4_tx_tx_delta_freq_thr;
195         u8 bt4_tx_rx_max_freq0;
196
197         __le32 bt_prio_boost[BT_COEX_BOOST_SIZE];
198         __le32 wifi_tx_prio_boost;
199         __le32 wifi_rx_prio_boost;
200         __le32 kill_ack_msk;
201         __le32 kill_cts_msk;
202
203         __le32 decision_lut[BT_COEX_MAX_LUT][BT_COEX_LUT_SIZE];
204         __le32 bt4_multiprio_lut[BT_COEX_MULTI_PRIO_LUT_SIZE];
205         __le32 bt4_corun_lut20[BT_COEX_CORUN_LUT_SIZE];
206         __le32 bt4_corun_lut40[BT_COEX_CORUN_LUT_SIZE];
207
208         __le32 valid_bit_msk;
209 } __packed; /* BT_COEX_CMD_API_S_VER_5 */
210
211 enum iwl_bt_coex_mode {
212         BT_COEX_DISABLE                 = 0x0,
213         BT_COEX_NW                      = 0x1,
214         BT_COEX_BT                      = 0x2,
215         BT_COEX_WIFI                    = 0x3,
216 }; /* BT_COEX_MODES_E */
217
218 enum iwl_bt_coex_enabled_modules {
219         BT_COEX_MPLUT_ENABLED           = BIT(0),
220         BT_COEX_MPLUT_BOOST_ENABLED     = BIT(1),
221         BT_COEX_SYNC2SCO_ENABLED        = BIT(2),
222         BT_COEX_CORUN_ENABLED           = BIT(3),
223         BT_COEX_HIGH_BAND_RET           = BIT(4),
224 }; /* BT_COEX_MODULES_ENABLE_E_VER_1 */
225
226 /**
227  * struct iwl_bt_coex_cmd - bt coex configuration command
228  * @mode: enum %iwl_bt_coex_mode
229  * @enabled_modules: enum %iwl_bt_coex_enabled_modules
230  * @max_kill: max count of Tx retries due to kill from PTA
231  * @override_primary_lut: enum %iwl_bt_coex_lut_type: BT_COEX_INVALID_LUT
232  *      should be set by default
233  * @override_secondary_lut: enum %iwl_bt_coex_lut_type: BT_COEX_INVALID_LUT
234  *      should be set by default
235  * @bt4_antenna_isolation_thr: antenna threshold value
236  * @bt4_tx_tx_delta_freq_thr: TxTx delta frequency
237  * @bt4_tx_rx_max_freq0: TxRx max frequency
238  * @multiprio_lut: multi priority LUT configuration
239  * @mplut_prio_boost: BT priority boost registers
240  * @decision_lut: PTA decision LUT, per Prio-Ch
241  *
242  * The structure is used for the BT_COEX command.
243  */
244 struct iwl_bt_coex_cmd {
245         __le32 mode;
246         __le32 enabled_modules;
247
248         __le32 max_kill;
249         __le32 override_primary_lut;
250         __le32 override_secondary_lut;
251         __le32 bt4_antenna_isolation_thr;
252
253         __le32 bt4_tx_tx_delta_freq_thr;
254         __le32 bt4_tx_rx_max_freq0;
255
256         __le32 multiprio_lut[BT_COEX_MULTI_PRIO_LUT_SIZE];
257         __le32 mplut_prio_boost[BT_COEX_BOOST_SIZE];
258
259         __le32 decision_lut[BT_COEX_MAX_LUT][BT_COEX_LUT_SIZE];
260 } __packed; /* BT_COEX_CMD_API_S_VER_6 */
261
262 /**
263  * struct iwl_bt_coex_corun_lut_update - bt coex update the corun lut
264  * @corun_lut20: co-running 20 MHz LUT configuration
265  * @corun_lut40: co-running 40 MHz LUT configuration
266  *
267  * The structure is used for the BT_COEX_UPDATE_CORUN_LUT command.
268  */
269 struct iwl_bt_coex_corun_lut_update_cmd {
270         __le32 corun_lut20[BT_COEX_CORUN_LUT_SIZE];
271         __le32 corun_lut40[BT_COEX_CORUN_LUT_SIZE];
272 } __packed; /* BT_COEX_UPDATE_CORUN_LUT_API_S_VER_1 */
273
274 /**
275  * struct iwl_bt_coex_sw_boost - SW boost values
276  * @wifi_tx_prio_boost: SW boost of wifi tx priority
277  * @wifi_rx_prio_boost: SW boost of wifi rx priority
278  * @kill_ack_msk: kill ACK mask. 1 - Tx ACK, 0 - kill Tx of ACK.
279  * @kill_cts_msk: kill CTS mask. 1 - Tx CTS, 0 - kill Tx of CTS.
280  */
281 struct iwl_bt_coex_sw_boost {
282         __le32 wifi_tx_prio_boost;
283         __le32 wifi_rx_prio_boost;
284         __le32 kill_ack_msk;
285         __le32 kill_cts_msk;
286 };
287
288 /**
289  * struct iwl_bt_coex_sw_boost_update_cmd - command to update the SW boost
290  * @boost_values: check struct  %iwl_bt_coex_sw_boost - one for each channel
291  *      primary / secondary / low priority
292  */
293 struct iwl_bt_coex_sw_boost_update_cmd {
294         struct iwl_bt_coex_sw_boost boost_values[3];
295 } __packed; /* BT_COEX_UPDATE_SW_BOOST_S_VER_1 */
296
297 /**
298  * struct iwl_bt_coex_reduced_txp_update_cmd
299  * @reduced_txp: bit BT_REDUCED_TX_POWER_BIT to enable / disable, rest of the
300  *      bits are the sta_id (value)
301  */
302 struct iwl_bt_coex_reduced_txp_update_cmd {
303         __le32 reduced_txp;
304 } __packed; /* BT_COEX_UPDATE_REDUCED_TX_POWER_API_S_VER_1 */
305
306 /**
307  * struct iwl_bt_coex_ci_cmd - bt coex channel inhibition command
308  * @bt_primary_ci:
309  * @primary_ch_phy_id:
310  * @bt_secondary_ci:
311  * @secondary_ch_phy_id:
312  *
313  * Used for BT_COEX_CI command
314  */
315 struct iwl_bt_coex_ci_cmd {
316         __le64 bt_primary_ci;
317         __le32 primary_ch_phy_id;
318
319         __le64 bt_secondary_ci;
320         __le32 secondary_ch_phy_id;
321 } __packed; /* BT_CI_MSG_API_S_VER_2 */
322
323 #define BT_MBOX(n_dw, _msg, _pos, _nbits)       \
324         BT_MBOX##n_dw##_##_msg##_POS = (_pos),  \
325         BT_MBOX##n_dw##_##_msg = BITS(_nbits) << BT_MBOX##n_dw##_##_msg##_POS
326
327 enum iwl_bt_mxbox_dw0 {
328         BT_MBOX(0, LE_SLAVE_LAT, 0, 3),
329         BT_MBOX(0, LE_PROF1, 3, 1),
330         BT_MBOX(0, LE_PROF2, 4, 1),
331         BT_MBOX(0, LE_PROF_OTHER, 5, 1),
332         BT_MBOX(0, CHL_SEQ_N, 8, 4),
333         BT_MBOX(0, INBAND_S, 13, 1),
334         BT_MBOX(0, LE_MIN_RSSI, 16, 4),
335         BT_MBOX(0, LE_SCAN, 20, 1),
336         BT_MBOX(0, LE_ADV, 21, 1),
337         BT_MBOX(0, LE_MAX_TX_POWER, 24, 4),
338         BT_MBOX(0, OPEN_CON_1, 28, 2),
339 };
340
341 enum iwl_bt_mxbox_dw1 {
342         BT_MBOX(1, BR_MAX_TX_POWER, 0, 4),
343         BT_MBOX(1, IP_SR, 4, 1),
344         BT_MBOX(1, LE_MSTR, 5, 1),
345         BT_MBOX(1, AGGR_TRFC_LD, 8, 6),
346         BT_MBOX(1, MSG_TYPE, 16, 3),
347         BT_MBOX(1, SSN, 19, 2),
348 };
349
350 enum iwl_bt_mxbox_dw2 {
351         BT_MBOX(2, SNIFF_ACT, 0, 3),
352         BT_MBOX(2, PAG, 3, 1),
353         BT_MBOX(2, INQUIRY, 4, 1),
354         BT_MBOX(2, CONN, 5, 1),
355         BT_MBOX(2, SNIFF_INTERVAL, 8, 5),
356         BT_MBOX(2, DISC, 13, 1),
357         BT_MBOX(2, SCO_TX_ACT, 16, 2),
358         BT_MBOX(2, SCO_RX_ACT, 18, 2),
359         BT_MBOX(2, ESCO_RE_TX, 20, 2),
360         BT_MBOX(2, SCO_DURATION, 24, 6),
361 };
362
363 enum iwl_bt_mxbox_dw3 {
364         BT_MBOX(3, SCO_STATE, 0, 1),
365         BT_MBOX(3, SNIFF_STATE, 1, 1),
366         BT_MBOX(3, A2DP_STATE, 2, 1),
367         BT_MBOX(3, ACL_STATE, 3, 1),
368         BT_MBOX(3, MSTR_STATE, 4, 1),
369         BT_MBOX(3, OBX_STATE, 5, 1),
370         BT_MBOX(3, OPEN_CON_2, 8, 2),
371         BT_MBOX(3, TRAFFIC_LOAD, 10, 2),
372         BT_MBOX(3, CHL_SEQN_LSB, 12, 1),
373         BT_MBOX(3, INBAND_P, 13, 1),
374         BT_MBOX(3, MSG_TYPE_2, 16, 3),
375         BT_MBOX(3, SSN_2, 19, 2),
376         BT_MBOX(3, UPDATE_REQUEST, 21, 1),
377 };
378
379 #define BT_MBOX_MSG(_notif, _num, _field)                                    \
380         ((le32_to_cpu((_notif)->mbox_msg[(_num)]) & BT_MBOX##_num##_##_field)\
381         >> BT_MBOX##_num##_##_field##_POS)
382
383 enum iwl_bt_activity_grading {
384         BT_OFF                  = 0,
385         BT_ON_NO_CONNECTION     = 1,
386         BT_LOW_TRAFFIC          = 2,
387         BT_HIGH_TRAFFIC         = 3,
388 }; /* BT_COEX_BT_ACTIVITY_GRADING_API_E_VER_1 */
389
390 enum iwl_bt_ci_compliance {
391         BT_CI_COMPLIANCE_NONE           = 0,
392         BT_CI_COMPLIANCE_PRIMARY        = 1,
393         BT_CI_COMPLIANCE_SECONDARY      = 2,
394         BT_CI_COMPLIANCE_BOTH           = 3,
395 }; /* BT_COEX_CI_COMPLIENCE_E_VER_1 */
396
397 /**
398  * struct iwl_bt_coex_profile_notif - notification about BT coex
399  * @mbox_msg: message from BT to WiFi
400  * @msg_idx: the index of the message
401  * @bt_ci_compliance: enum %iwl_bt_ci_compliance
402  * @primary_ch_lut: LUT used for primary channel enum %iwl_bt_coex_lut_type
403  * @secondary_ch_lut: LUT used for secondary channel enume %iwl_bt_coex_lut_type
404  * @bt_activity_grading: the activity of BT enum %iwl_bt_activity_grading
405  * @ttc_rrc_status: is TTC or RRC enabled - one bit per PHY
406  */
407 struct iwl_bt_coex_profile_notif {
408         __le32 mbox_msg[4];
409         __le32 msg_idx;
410         __le32 bt_ci_compliance;
411
412         __le32 primary_ch_lut;
413         __le32 secondary_ch_lut;
414         __le32 bt_activity_grading;
415         u8 ttc_rrc_status;
416         u8 reserved[3];
417 } __packed; /* BT_COEX_PROFILE_NTFY_API_S_VER_4 */
418
419 enum iwl_bt_coex_prio_table_event {
420         BT_COEX_PRIO_TBL_EVT_INIT_CALIB1                = 0,
421         BT_COEX_PRIO_TBL_EVT_INIT_CALIB2                = 1,
422         BT_COEX_PRIO_TBL_EVT_PERIODIC_CALIB_LOW1        = 2,
423         BT_COEX_PRIO_TBL_EVT_PERIODIC_CALIB_LOW2        = 3,
424         BT_COEX_PRIO_TBL_EVT_PERIODIC_CALIB_HIGH1       = 4,
425         BT_COEX_PRIO_TBL_EVT_PERIODIC_CALIB_HIGH2       = 5,
426         BT_COEX_PRIO_TBL_EVT_DTIM                       = 6,
427         BT_COEX_PRIO_TBL_EVT_SCAN52                     = 7,
428         BT_COEX_PRIO_TBL_EVT_SCAN24                     = 8,
429         BT_COEX_PRIO_TBL_EVT_IDLE                       = 9,
430         BT_COEX_PRIO_TBL_EVT_MAX                        = 16,
431 }; /* BT_COEX_PRIO_TABLE_EVENTS_API_E_VER_1 */
432
433 enum iwl_bt_coex_prio_table_prio {
434         BT_COEX_PRIO_TBL_DISABLED       = 0,
435         BT_COEX_PRIO_TBL_PRIO_LOW       = 1,
436         BT_COEX_PRIO_TBL_PRIO_HIGH      = 2,
437         BT_COEX_PRIO_TBL_PRIO_BYPASS    = 3,
438         BT_COEX_PRIO_TBL_PRIO_COEX_OFF  = 4,
439         BT_COEX_PRIO_TBL_PRIO_COEX_ON   = 5,
440         BT_COEX_PRIO_TBL_PRIO_COEX_IDLE = 6,
441         BT_COEX_PRIO_TBL_MAX            = 8,
442 }; /* BT_COEX_PRIO_TABLE_PRIORITIES_API_E_VER_1 */
443
444 #define BT_COEX_PRIO_TBL_SHRD_ANT_POS     (0)
445 #define BT_COEX_PRIO_TBL_PRIO_POS         (1)
446 #define BT_COEX_PRIO_TBL_RESERVED_POS     (4)
447
448 /**
449  * struct iwl_bt_coex_prio_tbl_cmd - priority table for BT coex
450  * @prio_tbl:
451  */
452 struct iwl_bt_coex_prio_tbl_cmd {
453         u8 prio_tbl[BT_COEX_PRIO_TBL_EVT_MAX];
454 } __packed;
455
456 /**
457  * struct iwl_bt_coex_ci_cmd_old - bt coex channel inhibition command
458  * @bt_primary_ci:
459  * @bt_secondary_ci:
460  * @co_run_bw_primary:
461  * @co_run_bw_secondary:
462  * @primary_ch_phy_id:
463  * @secondary_ch_phy_id:
464  *
465  * Used for BT_COEX_CI command
466  */
467 struct iwl_bt_coex_ci_cmd_old {
468         __le64 bt_primary_ci;
469         __le64 bt_secondary_ci;
470
471         u8 co_run_bw_primary;
472         u8 co_run_bw_secondary;
473         u8 primary_ch_phy_id;
474         u8 secondary_ch_phy_id;
475 } __packed; /* BT_CI_MSG_API_S_VER_1 */
476
477 /**
478  * struct iwl_bt_coex_profile_notif_old - notification about BT coex
479  * @mbox_msg: message from BT to WiFi
480  * @msg_idx: the index of the message
481  * @bt_status: 0 - off, 1 - on
482  * @bt_open_conn: number of BT connections open
483  * @bt_traffic_load: load of BT traffic
484  * @bt_agg_traffic_load: aggregated load of BT traffic
485  * @bt_ci_compliance: 0 - no CI compliance, 1 - CI compliant
486  * @primary_ch_lut: LUT used for primary channel
487  * @secondary_ch_lut: LUT used for secondary channel
488  * @bt_activity_grading: the activity of BT enum %iwl_bt_activity_grading
489  */
490 struct iwl_bt_coex_profile_notif_old {
491         __le32 mbox_msg[4];
492         __le32 msg_idx;
493         u8 bt_status;
494         u8 bt_open_conn;
495         u8 bt_traffic_load;
496         u8 bt_agg_traffic_load;
497         u8 bt_ci_compliance;
498         u8 ttc_enabled;
499         __le16 reserved;
500
501         __le32 primary_ch_lut;
502         __le32 secondary_ch_lut;
503         __le32 bt_activity_grading;
504 } __packed; /* BT_COEX_PROFILE_NTFY_API_S_VER_3 */
505
506 #endif /* __fw_api_bt_coex_h__ */