]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wl1251: Remove unused wl1251_cmd_*
authorDr. David Alan Gilbert <linux@treblig.org>
Sun, 22 Jun 2025 17:28:04 +0000 (18:28 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 24 Jun 2025 07:24:35 +0000 (09:24 +0200)
wl1251_cmd_read_memory() and wl1251_cmd_test() last use was removed in
2009 by
commit f298c282a523 ("wl1251: remove accidentally added wl1251_netlink.c")

Remove them.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Link: https://patch.msgid.link/20250622172804.116396-3-linux@treblig.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/ti/wl1251/cmd.c
drivers/net/wireless/ti/wl1251/cmd.h

index c3be81dc7970f4ee7fd4750d3520427def300cdf..c33ee0d4d323f48ab3177a33c7d9a52eae46de1b 100644 (file)
@@ -58,47 +58,6 @@ out:
        return ret;
 }
 
-/**
- * wl1251_cmd_test - Send test command to firmware
- *
- * @wl: wl struct
- * @buf: buffer containing the command, with all headers, must work with dma
- * @buf_len: length of the buffer
- * @answer: is answer needed
- */
-int wl1251_cmd_test(struct wl1251 *wl, void *buf, size_t buf_len, u8 answer)
-{
-       int ret;
-
-       wl1251_debug(DEBUG_CMD, "cmd test");
-
-       ret = wl1251_cmd_send(wl, CMD_TEST, buf, buf_len);
-
-       if (ret < 0) {
-               wl1251_warning("TEST command failed");
-               return ret;
-       }
-
-       if (answer) {
-               struct wl1251_command *cmd_answer;
-
-               /*
-                * The test command got in, we can read the answer.
-                * The answer would be a wl1251_command, where the
-                * parameter array contains the actual answer.
-                */
-               wl1251_mem_read(wl, wl->cmd_box_addr, buf, buf_len);
-
-               cmd_answer = buf;
-
-               if (cmd_answer->header.status != CMD_STATUS_SUCCESS)
-                       wl1251_error("TEST command answer error: %d",
-                                    cmd_answer->header.status);
-       }
-
-       return 0;
-}
-
 /**
  * wl1251_cmd_interrogate - Read acx from firmware
  *
@@ -339,44 +298,6 @@ out:
        return ret;
 }
 
-int wl1251_cmd_read_memory(struct wl1251 *wl, u32 addr, void *answer,
-                          size_t len)
-{
-       struct cmd_read_write_memory *cmd;
-       int ret = 0;
-
-       wl1251_debug(DEBUG_CMD, "cmd read memory");
-
-       cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
-       if (!cmd)
-               return -ENOMEM;
-
-       WARN_ON(len > MAX_READ_SIZE);
-       len = min_t(size_t, len, MAX_READ_SIZE);
-
-       cmd->addr = addr;
-       cmd->size = len;
-
-       ret = wl1251_cmd_send(wl, CMD_READ_MEMORY, cmd, sizeof(*cmd));
-       if (ret < 0) {
-               wl1251_error("read memory command failed: %d", ret);
-               goto out;
-       }
-
-       /* the read command got in, we can now read the answer */
-       wl1251_mem_read(wl, wl->cmd_box_addr, cmd, sizeof(*cmd));
-
-       if (cmd->header.status != CMD_STATUS_SUCCESS)
-               wl1251_error("error in read command result: %d",
-                            cmd->header.status);
-
-       memcpy(answer, cmd->value, len);
-
-out:
-       kfree(cmd);
-       return ret;
-}
-
 int wl1251_cmd_template_set(struct wl1251 *wl, u16 cmd_id,
                            void *buf, size_t buf_len)
 {
index 39159201b97e4e3e57404732aa7ca5e1cc61cdf6..3474b45af3b12530bb5c74ba8d67973e23ad4aa9 100644 (file)
@@ -16,7 +16,6 @@
 struct acx_header;
 
 int wl1251_cmd_send(struct wl1251 *wl, u16 type, void *buf, size_t buf_len);
-int wl1251_cmd_test(struct wl1251 *wl, void *buf, size_t buf_len, u8 answer);
 int wl1251_cmd_interrogate(struct wl1251 *wl, u16 id, void *buf, size_t len);
 int wl1251_cmd_configure(struct wl1251 *wl, u16 id, void *buf, size_t len);
 int wl1251_cmd_vbm(struct wl1251 *wl, u8 identity,
@@ -26,8 +25,6 @@ int wl1251_cmd_data_path_tx(struct wl1251 *wl, u8 channel, bool enable);
 int wl1251_cmd_join(struct wl1251 *wl, u8 bss_type, u8 channel,
                    u16 beacon_interval, u8 dtim_interval);
 int wl1251_cmd_ps_mode(struct wl1251 *wl, u8 ps_mode);
-int wl1251_cmd_read_memory(struct wl1251 *wl, u32 addr, void *answer,
-                          size_t len);
 int wl1251_cmd_template_set(struct wl1251 *wl, u16 cmd_id,
                            void *buf, size_t buf_len);
 int wl1251_cmd_scan(struct wl1251 *wl, u8 *ssid, size_t ssid_len,