ARM: mm: Recreate kernel mappings in early_paging_init()
[linux/fpc-iii.git] / drivers / net / wireless / ti / wl12xx / cmd.h
blob32cbad54e993ea402647ef945bcf55ac517f4283
1 /*
2 * This file is part of wl12xx
4 * Copyright (C) 1998-2009, 2011 Texas Instruments. All rights reserved.
5 * Copyright (C) 2009 Nokia Corporation
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.
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.
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
23 #ifndef __WL12XX_CMD_H__
24 #define __WL12XX_CMD_H__
26 #include "conf.h"
28 #define TEST_CMD_INI_FILE_RADIO_PARAM 0x19
29 #define TEST_CMD_INI_FILE_GENERAL_PARAM 0x1E
31 struct wl1271_general_parms_cmd {
32 struct wl1271_cmd_header header;
34 struct wl1271_cmd_test_header test;
36 struct wl1271_ini_general_params general_params;
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;
46 struct wl128x_general_parms_cmd {
47 struct wl1271_cmd_header header;
49 struct wl1271_cmd_test_header test;
51 struct wl128x_ini_general_params general_params;
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;
61 struct wl1271_radio_parms_cmd {
62 struct wl1271_cmd_header header;
64 struct wl1271_cmd_test_header test;
66 /* Static radio parameters */
67 struct wl1271_ini_band_params_2 static_params_2;
68 struct wl1271_ini_band_params_5 static_params_5;
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;
77 struct wl128x_radio_parms_cmd {
78 struct wl1271_cmd_header header;
80 struct wl1271_cmd_test_header test;
82 /* Static radio parameters */
83 struct wl128x_ini_band_params_2 static_params_2;
84 struct wl128x_ini_band_params_5 static_params_5;
86 u8 fem_vendor_and_options;
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;
94 #define TEST_CMD_INI_FILE_RF_EXTENDED_PARAM 0x26
96 struct wl1271_ext_radio_parms_cmd {
97 struct wl1271_cmd_header header;
99 struct wl1271_cmd_test_header test;
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;
106 struct wl12xx_cmd_channel_switch {
107 struct wl1271_cmd_header header;
109 u8 role_id;
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;
120 u8 padding[3];
121 } __packed;
123 int wl1271_cmd_general_parms(struct wl1271 *wl);
124 int wl128x_cmd_general_parms(struct wl1271 *wl);
125 int wl1271_cmd_radio_parms(struct wl1271 *wl);
126 int wl128x_cmd_radio_parms(struct wl1271 *wl);
127 int wl1271_cmd_ext_radio_parms(struct wl1271 *wl);
128 int wl12xx_cmd_channel_switch(struct wl1271 *wl,
129 struct wl12xx_vif *wlvif,
130 struct ieee80211_channel_switch *ch_switch);
132 #endif /* __WL12XX_CMD_H__ */