Correct the endianness-handling of the firmware command result status handling
code.
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>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
unsigned long timeout;
u32 intr;
int ret = 0;
+ u16 status;
cmd = buf;
cmd->id = cpu_to_le16(id);
wl1271_spi_read(wl, wl->cmd_box_addr, cmd,
sizeof(struct wl1271_cmd_header), false);
- if (cmd->status != CMD_STATUS_SUCCESS) {
- wl1271_error("command execute failure %d", cmd->status);
+ status = le16_to_cpu(cmd->status);
+ if (status != CMD_STATUS_SUCCESS) {
+ wl1271_error("command execute failure %d", status);
ret = -EIO;
}