Linux Audio

Check our new training course

Loading...
v3.15
 
  1/*
  2 * This file is part of wl12xx
  3 *
  4 * Copyright (C) 1998-2009, 2011 Texas Instruments. All rights reserved.
  5 * Copyright (C) 2009 Nokia Corporation
  6 *
  7 * This program is free software; you can redistribute it and/or
  8 * modify it under the terms of the GNU General Public License
  9 * version 2 as published by the Free Software Foundation.
 10 *
 11 * This program is distributed in the hope that it will be useful, but
 12 * WITHOUT ANY WARRANTY; without even the implied warranty of
 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 14 * General Public License for more details.
 15 *
 16 * You should have received a copy of the GNU General Public License
 17 * along with this program; if not, write to the Free Software
 18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 19 * 02110-1301 USA
 20 *
 21 */
 22
 23#ifndef __WL12XX_CMD_H__
 24#define __WL12XX_CMD_H__
 25
 26#include "conf.h"
 27
 28#define TEST_CMD_INI_FILE_RADIO_PARAM       0x19
 29#define TEST_CMD_INI_FILE_GENERAL_PARAM     0x1E
 30
 31struct wl1271_general_parms_cmd {
 32	struct wl1271_cmd_header header;
 33
 34	struct wl1271_cmd_test_header test;
 35
 36	struct wl1271_ini_general_params general_params;
 37
 38	u8 sr_debug_table[WL1271_INI_MAX_SMART_REFLEX_PARAM];
 39	u8 sr_sen_n_p;
 40	u8 sr_sen_n_p_gain;
 41	u8 sr_sen_nrn;
 42	u8 sr_sen_prn;
 43	u8 padding[3];
 44} __packed;
 45
 46struct wl128x_general_parms_cmd {
 47	struct wl1271_cmd_header header;
 48
 49	struct wl1271_cmd_test_header test;
 50
 51	struct wl128x_ini_general_params general_params;
 52
 53	u8 sr_debug_table[WL1271_INI_MAX_SMART_REFLEX_PARAM];
 54	u8 sr_sen_n_p;
 55	u8 sr_sen_n_p_gain;
 56	u8 sr_sen_nrn;
 57	u8 sr_sen_prn;
 58	u8 padding[3];
 59} __packed;
 60
 61struct wl1271_radio_parms_cmd {
 62	struct wl1271_cmd_header header;
 63
 64	struct wl1271_cmd_test_header test;
 65
 66	/* Static radio parameters */
 67	struct wl1271_ini_band_params_2 static_params_2;
 68	struct wl1271_ini_band_params_5 static_params_5;
 69
 70	/* Dynamic radio parameters */
 71	struct wl1271_ini_fem_params_2 dyn_params_2;
 72	u8 padding2;
 73	struct wl1271_ini_fem_params_5 dyn_params_5;
 74	u8 padding3[2];
 75} __packed;
 76
 77struct wl128x_radio_parms_cmd {
 78	struct wl1271_cmd_header header;
 79
 80	struct wl1271_cmd_test_header test;
 81
 82	/* Static radio parameters */
 83	struct wl128x_ini_band_params_2 static_params_2;
 84	struct wl128x_ini_band_params_5 static_params_5;
 85
 86	u8 fem_vendor_and_options;
 87
 88	/* Dynamic radio parameters */
 89	struct wl128x_ini_fem_params_2 dyn_params_2;
 90	u8 padding2;
 91	struct wl128x_ini_fem_params_5 dyn_params_5;
 92} __packed;
 93
 94#define TEST_CMD_INI_FILE_RF_EXTENDED_PARAM 0x26
 95
 96struct wl1271_ext_radio_parms_cmd {
 97	struct wl1271_cmd_header header;
 98
 99	struct wl1271_cmd_test_header test;
100
101	u8 tx_per_channel_power_compensation_2[CONF_TX_PWR_COMPENSATION_LEN_2];
102	u8 tx_per_channel_power_compensation_5[CONF_TX_PWR_COMPENSATION_LEN_5];
103	u8 padding[3];
104} __packed;
105
106struct wl12xx_cmd_channel_switch {
107	struct wl1271_cmd_header header;
108
109	u8 role_id;
110
111	/* The new serving channel */
112	u8 channel;
113	/* Relative time of the serving channel switch in TBTT units */
114	u8 switch_time;
115	/* Stop the role TX, should expect it after radar detection */
116	u8 stop_tx;
117	/* The target channel tx status 1-stopped 0-open*/
118	u8 post_switch_tx_disable;
119
120	u8 padding[3];
121} __packed;
122
123int wl1271_cmd_general_parms(struct wl1271 *wl);
124int wl128x_cmd_general_parms(struct wl1271 *wl);
125int wl1271_cmd_radio_parms(struct wl1271 *wl);
126int wl128x_cmd_radio_parms(struct wl1271 *wl);
127int wl1271_cmd_ext_radio_parms(struct wl1271 *wl);
128int wl12xx_cmd_channel_switch(struct wl1271 *wl,
129			      struct wl12xx_vif *wlvif,
130			      struct ieee80211_channel_switch *ch_switch);
131
132#endif /* __WL12XX_CMD_H__ */
v6.8
  1/* SPDX-License-Identifier: GPL-2.0-only */
  2/*
  3 * This file is part of wl12xx
  4 *
  5 * Copyright (C) 1998-2009, 2011 Texas Instruments. All rights reserved.
  6 * Copyright (C) 2009 Nokia Corporation
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  7 */
  8
  9#ifndef __WL12XX_CMD_H__
 10#define __WL12XX_CMD_H__
 11
 12#include "conf.h"
 13
 14#define TEST_CMD_INI_FILE_RADIO_PARAM       0x19
 15#define TEST_CMD_INI_FILE_GENERAL_PARAM     0x1E
 16
 17struct wl1271_general_parms_cmd {
 18	struct wl1271_cmd_header header;
 19
 20	struct wl1271_cmd_test_header test;
 21
 22	struct wl1271_ini_general_params general_params;
 23
 24	u8 sr_debug_table[WL1271_INI_MAX_SMART_REFLEX_PARAM];
 25	u8 sr_sen_n_p;
 26	u8 sr_sen_n_p_gain;
 27	u8 sr_sen_nrn;
 28	u8 sr_sen_prn;
 29	u8 padding[3];
 30} __packed;
 31
 32struct wl128x_general_parms_cmd {
 33	struct wl1271_cmd_header header;
 34
 35	struct wl1271_cmd_test_header test;
 36
 37	struct wl128x_ini_general_params general_params;
 38
 39	u8 sr_debug_table[WL1271_INI_MAX_SMART_REFLEX_PARAM];
 40	u8 sr_sen_n_p;
 41	u8 sr_sen_n_p_gain;
 42	u8 sr_sen_nrn;
 43	u8 sr_sen_prn;
 44	u8 padding[3];
 45} __packed;
 46
 47struct wl1271_radio_parms_cmd {
 48	struct wl1271_cmd_header header;
 49
 50	struct wl1271_cmd_test_header test;
 51
 52	/* Static radio parameters */
 53	struct wl1271_ini_band_params_2 static_params_2;
 54	struct wl1271_ini_band_params_5 static_params_5;
 55
 56	/* Dynamic radio parameters */
 57	struct wl1271_ini_fem_params_2 dyn_params_2;
 58	u8 padding2;
 59	struct wl1271_ini_fem_params_5 dyn_params_5;
 60	u8 padding3[2];
 61} __packed;
 62
 63struct wl128x_radio_parms_cmd {
 64	struct wl1271_cmd_header header;
 65
 66	struct wl1271_cmd_test_header test;
 67
 68	/* Static radio parameters */
 69	struct wl128x_ini_band_params_2 static_params_2;
 70	struct wl128x_ini_band_params_5 static_params_5;
 71
 72	u8 fem_vendor_and_options;
 73
 74	/* Dynamic radio parameters */
 75	struct wl128x_ini_fem_params_2 dyn_params_2;
 76	u8 padding2;
 77	struct wl128x_ini_fem_params_5 dyn_params_5;
 78} __packed;
 79
 80#define TEST_CMD_INI_FILE_RF_EXTENDED_PARAM 0x26
 81
 82struct wl1271_ext_radio_parms_cmd {
 83	struct wl1271_cmd_header header;
 84
 85	struct wl1271_cmd_test_header test;
 86
 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];
 89	u8 padding[3];
 90} __packed;
 91
 92struct wl12xx_cmd_channel_switch {
 93	struct wl1271_cmd_header header;
 94
 95	u8 role_id;
 96
 97	/* The new serving channel */
 98	u8 channel;
 99	/* Relative time of the serving channel switch in TBTT units */
100	u8 switch_time;
101	/* Stop the role TX, should expect it after radar detection */
102	u8 stop_tx;
103	/* The target channel tx status 1-stopped 0-open*/
104	u8 post_switch_tx_disable;
105
106	u8 padding[3];
107} __packed;
108
109int wl1271_cmd_general_parms(struct wl1271 *wl);
110int wl128x_cmd_general_parms(struct wl1271 *wl);
111int wl1271_cmd_radio_parms(struct wl1271 *wl);
112int wl128x_cmd_radio_parms(struct wl1271 *wl);
113int wl1271_cmd_ext_radio_parms(struct wl1271 *wl);
114int wl12xx_cmd_channel_switch(struct wl1271 *wl,
115			      struct wl12xx_vif *wlvif,
116			      struct ieee80211_channel_switch *ch_switch);
117
118#endif /* __WL12XX_CMD_H__ */