diff options
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_cmd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.c b/drivers/net/wireless/wl12xx/wl1271_cmd.c index 46e5ea48651b..8acee5cf0e61 100644 --- a/drivers/net/wireless/wl12xx/wl1271_cmd.c +++ b/drivers/net/wireless/wl12xx/wl1271_cmd.c | |||
@@ -48,6 +48,7 @@ int wl1271_cmd_send(struct wl1271 *wl, u16 id, void *buf, size_t len) | |||
48 | unsigned long timeout; | 48 | unsigned long timeout; |
49 | u32 intr; | 49 | u32 intr; |
50 | int ret = 0; | 50 | int ret = 0; |
51 | u16 status; | ||
51 | 52 | ||
52 | cmd = buf; | 53 | cmd = buf; |
53 | cmd->id = cpu_to_le16(id); | 54 | cmd->id = cpu_to_le16(id); |
@@ -78,8 +79,9 @@ int wl1271_cmd_send(struct wl1271 *wl, u16 id, void *buf, size_t len) | |||
78 | wl1271_spi_read(wl, wl->cmd_box_addr, cmd, | 79 | wl1271_spi_read(wl, wl->cmd_box_addr, cmd, |
79 | sizeof(struct wl1271_cmd_header), false); | 80 | sizeof(struct wl1271_cmd_header), false); |
80 | 81 | ||
81 | if (cmd->status != CMD_STATUS_SUCCESS) { | 82 | status = le16_to_cpu(cmd->status); |
82 | wl1271_error("command execute failure %d", cmd->status); | 83 | if (status != CMD_STATUS_SUCCESS) { |
84 | wl1271_error("command execute failure %d", status); | ||
83 | ret = -EIO; | 85 | ret = -EIO; |
84 | } | 86 | } |
85 | 87 | ||