1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * This file is part of wl12xx
5 * Copyright (C) 1998-2009, 2011 Texas Instruments. All rights reserved.
6 * Copyright (C) 2009 Nokia Corporation
9 #ifndef __WL12XX_CMD_H__
10 #define __WL12XX_CMD_H__
14 #define TEST_CMD_INI_FILE_RADIO_PARAM 0x19
15 #define TEST_CMD_INI_FILE_GENERAL_PARAM 0x1E
17 struct wl1271_general_parms_cmd {
18 struct wl1271_cmd_header header;
20 struct wl1271_cmd_test_header test;
22 struct wl1271_ini_general_params general_params;
24 u8 sr_debug_table[WL1271_INI_MAX_SMART_REFLEX_PARAM];
32 struct wl128x_general_parms_cmd {
33 struct wl1271_cmd_header header;
35 struct wl1271_cmd_test_header test;
37 struct wl128x_ini_general_params general_params;
39 u8 sr_debug_table[WL1271_INI_MAX_SMART_REFLEX_PARAM];
47 struct wl1271_radio_parms_cmd {
48 struct wl1271_cmd_header header;
50 struct wl1271_cmd_test_header test;
52 /* Static radio parameters */
53 struct wl1271_ini_band_params_2 static_params_2;
54 struct wl1271_ini_band_params_5 static_params_5;
56 /* Dynamic radio parameters */
57 struct wl1271_ini_fem_params_2 dyn_params_2;
59 struct wl1271_ini_fem_params_5 dyn_params_5;
63 struct wl128x_radio_parms_cmd {
64 struct wl1271_cmd_header header;
66 struct wl1271_cmd_test_header test;
68 /* Static radio parameters */
69 struct wl128x_ini_band_params_2 static_params_2;
70 struct wl128x_ini_band_params_5 static_params_5;
72 u8 fem_vendor_and_options;
74 /* Dynamic radio parameters */
75 struct wl128x_ini_fem_params_2 dyn_params_2;
77 struct wl128x_ini_fem_params_5 dyn_params_5;
80 #define TEST_CMD_INI_FILE_RF_EXTENDED_PARAM 0x26
82 struct wl1271_ext_radio_parms_cmd {
83 struct wl1271_cmd_header header;
85 struct wl1271_cmd_test_header test;
87 u8 tx_per_channel_power_compensation_2[CONF_TX_PWR_COMPENSATION_LEN_2];
88 u8 tx_per_channel_power_compensation_5[CONF_TX_PWR_COMPENSATION_LEN_5];
92 struct wl12xx_cmd_channel_switch {
93 struct wl1271_cmd_header header;
97 /* The new serving channel */
99 /* Relative time of the serving channel switch in TBTT units */
101 /* Stop the role TX, should expect it after radar detection */
103 /* The target channel tx status 1-stopped 0-open*/
104 u8 post_switch_tx_disable;
109 int wl1271_cmd_general_parms(struct wl1271 *wl);
110 int wl128x_cmd_general_parms(struct wl1271 *wl);
111 int wl1271_cmd_radio_parms(struct wl1271 *wl);
112 int wl128x_cmd_radio_parms(struct wl1271 *wl);
113 int wl1271_cmd_ext_radio_parms(struct wl1271 *wl);
114 int wl12xx_cmd_channel_switch(struct wl1271 *wl,
115 struct wl12xx_vif *wlvif,
116 struct ieee80211_channel_switch *ch_switch);
118 #endif /* __WL12XX_CMD_H__ */