aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>2010-08-16 22:09:34 -0400
committerLuciano Coelho <luciano.coelho@nokia.com>2010-09-28 05:15:09 -0400
commit18c311b71899803de91f1ed41b9d87eb81017a91 (patch)
tree31ac0131a3f3c5a2491ed0ab49991320d55544b2
parent4e23b11b08ed116664cce6114546d5a96eb94e8b (diff)
wl1271: Remove function cmd_read_memory
The function is not used anywhere. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_cmd.c35
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_cmd.h37
2 files changed, 0 insertions, 72 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.c b/drivers/net/wireless/wl12xx/wl1271_cmd.c
index a516035350d5..42e7d2f236c4 100644
--- a/drivers/net/wireless/wl12xx/wl1271_cmd.c
+++ b/drivers/net/wireless/wl12xx/wl1271_cmd.c
@@ -421,41 +421,6 @@ out:
421 return ret; 421 return ret;
422} 422}
423 423
424int wl1271_cmd_read_memory(struct wl1271 *wl, u32 addr, void *answer,
425 size_t len)
426{
427 struct cmd_read_write_memory *cmd;
428 int ret = 0;
429
430 wl1271_debug(DEBUG_CMD, "cmd read memory");
431
432 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
433 if (!cmd) {
434 ret = -ENOMEM;
435 goto out;
436 }
437
438 WARN_ON(len > MAX_READ_SIZE);
439 len = min_t(size_t, len, MAX_READ_SIZE);
440
441 cmd->addr = cpu_to_le32(addr);
442 cmd->size = cpu_to_le32(len);
443
444 ret = wl1271_cmd_send(wl, CMD_READ_MEMORY, cmd, sizeof(*cmd),
445 sizeof(*cmd));
446 if (ret < 0) {
447 wl1271_error("read memory command failed: %d", ret);
448 goto out;
449 }
450
451 /* the read command got in */
452 memcpy(answer, cmd->value, len);
453
454out:
455 kfree(cmd);
456 return ret;
457}
458
459int wl1271_cmd_template_set(struct wl1271 *wl, u16 template_id, 424int wl1271_cmd_template_set(struct wl1271 *wl, u16 template_id,
460 void *buf, size_t buf_len, int index, u32 rates) 425 void *buf, size_t buf_len, int index, u32 rates)
461{ 426{
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.h b/drivers/net/wireless/wl12xx/wl1271_cmd.h
index ce0476ceb84a..92747cece15e 100644
--- a/drivers/net/wireless/wl12xx/wl1271_cmd.h
+++ b/drivers/net/wireless/wl12xx/wl1271_cmd.h
@@ -39,8 +39,6 @@ int 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); 39int wl1271_cmd_configure(struct wl1271 *wl, u16 id, void *buf, size_t len);
40int wl1271_cmd_data_path(struct wl1271 *wl, bool enable); 40int wl1271_cmd_data_path(struct wl1271 *wl, bool enable);
41int wl1271_cmd_ps_mode(struct wl1271 *wl, u8 ps_mode, bool send); 41int wl1271_cmd_ps_mode(struct wl1271 *wl, u8 ps_mode, bool send);
42int wl1271_cmd_read_memory(struct wl1271 *wl, u32 addr, void *answer,
43 size_t len);
44int wl1271_cmd_template_set(struct wl1271 *wl, u16 template_id, 42int wl1271_cmd_template_set(struct wl1271 *wl, u16 template_id,
45 void *buf, size_t buf_len, int index, u32 rates); 43 void *buf, size_t buf_len, int index, u32 rates);
46int wl1271_cmd_build_null_data(struct wl1271 *wl); 44int wl1271_cmd_build_null_data(struct wl1271 *wl);
@@ -161,41 +159,6 @@ enum {
161 MAX_COMMAND_STATUS = 0xff 159 MAX_COMMAND_STATUS = 0xff
162}; 160};
163 161
164
165/*
166 * CMD_READ_MEMORY
167 *
168 * The host issues this command to read the WiLink device memory/registers.
169 *
170 * Note: The Base Band address has special handling (16 bits registers and
171 * addresses). For more information, see the hardware specification.
172 */
173/*
174 * CMD_WRITE_MEMORY
175 *
176 * The host issues this command to write the WiLink device memory/registers.
177 *
178 * The Base Band address has special handling (16 bits registers and
179 * addresses). For more information, see the hardware specification.
180 */
181#define MAX_READ_SIZE 256
182
183struct cmd_read_write_memory {
184 struct wl1271_cmd_header header;
185
186 /* The address of the memory to read from or write to.*/
187 __le32 addr;
188
189 /* The amount of data in bytes to read from or write to the WiLink
190 * device.*/
191 __le32 size;
192
193 /* The actual value read from or written to the Wilink. The source
194 of this field is the Host in WRITE command or the Wilink in READ
195 command. */
196 u8 value[MAX_READ_SIZE];
197} __packed;
198
199#define CMDMBOX_HEADER_LEN 4 162#define CMDMBOX_HEADER_LEN 4
200#define CMDMBOX_INFO_ELEM_HEADER_LEN 4 163#define CMDMBOX_INFO_ELEM_HEADER_LEN 4
201 164