aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/wl1271_cmd.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_cmd.h')
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_cmd.h73
1 files changed, 30 insertions, 43 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.h b/drivers/net/wireless/wl12xx/wl1271_cmd.h
index af577ee8eb0..a0caf4fc37b 100644
--- a/drivers/net/wireless/wl12xx/wl1271_cmd.h
+++ b/drivers/net/wireless/wl12xx/wl1271_cmd.h
@@ -33,12 +33,13 @@ int wl1271_cmd_send(struct wl1271 *wl, u16 id, void *buf, size_t len,
33 size_t res_len); 33 size_t res_len);
34int wl1271_cmd_general_parms(struct wl1271 *wl); 34int wl1271_cmd_general_parms(struct wl1271 *wl);
35int wl1271_cmd_radio_parms(struct wl1271 *wl); 35int wl1271_cmd_radio_parms(struct wl1271 *wl);
36int wl1271_cmd_ext_radio_parms(struct wl1271 *wl);
36int wl1271_cmd_join(struct wl1271 *wl, u8 bss_type); 37int wl1271_cmd_join(struct wl1271 *wl, u8 bss_type);
37int wl1271_cmd_test(struct wl1271 *wl, void *buf, size_t buf_len, u8 answer); 38int wl1271_cmd_test(struct wl1271 *wl, void *buf, size_t buf_len, u8 answer);
38int wl1271_cmd_interrogate(struct wl1271 *wl, u16 id, void *buf, size_t len); 39int wl1271_cmd_interrogate(struct wl1271 *wl, u16 id, void *buf, size_t len);
39int wl1271_cmd_configure(struct wl1271 *wl, u16 id, void *buf, size_t len); 40int wl1271_cmd_configure(struct wl1271 *wl, u16 id, void *buf, size_t len);
40int wl1271_cmd_data_path(struct wl1271 *wl, bool enable); 41int wl1271_cmd_data_path(struct wl1271 *wl, bool enable);
41int wl1271_cmd_ps_mode(struct wl1271 *wl, u8 ps_mode, bool send); 42int wl1271_cmd_ps_mode(struct wl1271 *wl, u8 ps_mode, u32 rates, bool send);
42int wl1271_cmd_read_memory(struct wl1271 *wl, u32 addr, void *answer, 43int wl1271_cmd_read_memory(struct wl1271 *wl, u32 addr, void *answer,
43 size_t len); 44 size_t len);
44int wl1271_cmd_template_set(struct wl1271 *wl, u16 template_id, 45int wl1271_cmd_template_set(struct wl1271 *wl, u16 template_id,
@@ -55,6 +56,7 @@ int wl1271_cmd_set_key(struct wl1271 *wl, u16 action, u8 id, u8 key_type,
55 u8 key_size, const u8 *key, const u8 *addr, 56 u8 key_size, const u8 *key, const u8 *addr,
56 u32 tx_seq_32, u16 tx_seq_16); 57 u32 tx_seq_32, u16 tx_seq_16);
57int wl1271_cmd_disconnect(struct wl1271 *wl); 58int wl1271_cmd_disconnect(struct wl1271 *wl);
59int wl1271_cmd_set_sta_state(struct wl1271 *wl);
58 60
59enum wl1271_commands { 61enum wl1271_commands {
60 CMD_INTERROGATE = 1, /*use this to read information elements*/ 62 CMD_INTERROGATE = 1, /*use this to read information elements*/
@@ -160,41 +162,6 @@ enum {
160 MAX_COMMAND_STATUS = 0xff 162 MAX_COMMAND_STATUS = 0xff
161}; 163};
162 164
163
164/*
165 * CMD_READ_MEMORY
166 *
167 * The host issues this command to read the WiLink device memory/registers.
168 *
169 * Note: The Base Band address has special handling (16 bits registers and
170 * addresses). For more information, see the hardware specification.
171 */
172/*
173 * CMD_WRITE_MEMORY
174 *
175 * The host issues this command to write the WiLink device memory/registers.
176 *
177 * The Base Band address has special handling (16 bits registers and
178 * addresses). For more information, see the hardware specification.
179 */
180#define MAX_READ_SIZE 256
181
182struct cmd_read_write_memory {
183 struct wl1271_cmd_header header;
184
185 /* The address of the memory to read from or write to.*/
186 __le32 addr;
187
188 /* The amount of data in bytes to read from or write to the WiLink
189 * device.*/
190 __le32 size;
191
192 /* The actual value read from or written to the Wilink. The source
193 of this field is the Host in WRITE command or the Wilink in READ
194 command. */
195 u8 value[MAX_READ_SIZE];
196} __packed;
197
198#define CMDMBOX_HEADER_LEN 4 165#define CMDMBOX_HEADER_LEN 4
199#define CMDMBOX_INFO_ELEM_HEADER_LEN 4 166#define CMDMBOX_INFO_ELEM_HEADER_LEN 4
200 167
@@ -313,7 +280,7 @@ enum wl1271_cmd_key_type {
313 KEY_WEP = 1, 280 KEY_WEP = 1,
314 KEY_TKIP = 2, 281 KEY_TKIP = 2,
315 KEY_AES = 3, 282 KEY_AES = 3,
316 KEY_GEM = 4 283 KEY_GEM = 4,
317}; 284};
318 285
319/* FIXME: Add description for key-types */ 286/* FIXME: Add description for key-types */
@@ -358,13 +325,14 @@ enum wl1271_channel_tune_bands {
358 WL1271_CHANNEL_TUNE_BAND_4_9 325 WL1271_CHANNEL_TUNE_BAND_4_9
359}; 326};
360 327
361#define WL1271_PD_REFERENCE_POINT_BAND_B_G 0 328#define WL1271_PD_REFERENCE_POINT_BAND_B_G 0
362 329
363#define TEST_CMD_P2G_CAL 0x02 330#define TEST_CMD_P2G_CAL 0x02
364#define TEST_CMD_CHANNEL_TUNE 0x0d 331#define TEST_CMD_CHANNEL_TUNE 0x0d
365#define TEST_CMD_UPDATE_PD_REFERENCE_POINT 0x1d 332#define TEST_CMD_UPDATE_PD_REFERENCE_POINT 0x1d
366#define TEST_CMD_INI_FILE_RADIO_PARAM 0x19 333#define TEST_CMD_INI_FILE_RADIO_PARAM 0x19
367#define TEST_CMD_INI_FILE_GENERAL_PARAM 0x1E 334#define TEST_CMD_INI_FILE_GENERAL_PARAM 0x1E
335#define TEST_CMD_INI_FILE_RF_EXTENDED_PARAM 0x26
368 336
369struct wl1271_general_parms_cmd { 337struct wl1271_general_parms_cmd {
370 struct wl1271_cmd_header header; 338 struct wl1271_cmd_header header;
@@ -397,6 +365,16 @@ struct wl1271_radio_parms_cmd {
397 u8 padding3[2]; 365 u8 padding3[2];
398} __packed; 366} __packed;
399 367
368struct wl1271_ext_radio_parms_cmd {
369 struct wl1271_cmd_header header;
370
371 struct wl1271_cmd_test_header test;
372
373 u8 tx_per_channel_power_compensation_2[CONF_TX_PWR_COMPENSATION_LEN_2];
374 u8 tx_per_channel_power_compensation_5[CONF_TX_PWR_COMPENSATION_LEN_5];
375 u8 padding[3];
376} __packed;
377
400struct wl1271_cmd_cal_channel_tune { 378struct wl1271_cmd_cal_channel_tune {
401 struct wl1271_cmd_header header; 379 struct wl1271_cmd_header header;
402 380
@@ -469,4 +447,13 @@ struct wl1271_cmd_disconnect {
469 u8 padding; 447 u8 padding;
470} __packed; 448} __packed;
471 449
450#define WL1271_CMD_STA_STATE_CONNECTED 1
451
452struct wl1271_cmd_set_sta_state {
453 struct wl1271_cmd_header header;
454
455 u8 state;
456 u8 padding[3];
457} __packed;
458
472#endif /* __WL1271_CMD_H__ */ 459#endif /* __WL1271_CMD_H__ */