From: Christian Lamparter Date: Thu, 29 Jul 2010 16:21:11 +0000 (+0200) Subject: carl9170 firmware: add flag for asynchronous commands X-Git-Tag: 1.7.4~1 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=b8f7132bb9cc3eb1b0fdeab865493b08e096b47a;p=carl9170fw.git carl9170 firmware: add flag for asynchronous commands This flag can be used by the application to tell _same_ application that it does not have to wait for the command response, or it does not need to parse the received response if the flag is set. NOTE: The firmware does not care about this flag and processes any received command in the same way. Signed-off-by: Christian Lamparter --- diff --git a/carlfw/src/cmd.c b/carlfw/src/cmd.c index 7652214..90aa214 100644 --- a/carlfw/src/cmd.c +++ b/carlfw/src/cmd.c @@ -42,7 +42,7 @@ void handle_cmd(struct carl9170_rsp *resp) resp->hdr.ext = cmd->hdr.ext; resp->hdr.seq |= cmd->hdr.seq; - switch (cmd->hdr.cmd) { + switch (cmd->hdr.cmd & ~CARL9170_CMD_ASYNC_FLAG) { case CARL9170_CMD_RREG: for (i = 0; i < (cmd->hdr.len / 4); i++) resp->rreg_res.vals[i] = get(cmd->rreg.regs[i]); diff --git a/include/shared/fwcmd.h b/include/shared/fwcmd.h index ec8f810..fb5ab3f 100644 --- a/include/shared/fwcmd.h +++ b/include/shared/fwcmd.h @@ -66,7 +66,17 @@ enum carl9170_cmd_oids { CARL9170_CMD_FREQ_START = 0x23, CARL9170_CMD_PSM = 0x24, + /* Asychronous command flag */ + CARL9170_CMD_ASYNC_FLAG = 0x40, + CARL9170_CMD_WREG_ASYNC = (CARL9170_CMD_WREG | + CARL9170_CMD_ASYNC_FLAG), + CARL9170_CMD_REBOOT_ASYNC = (CARL9170_CMD_REBOOT | + CARL9170_CMD_ASYNC_FLAG), + CARL9170_CMD_FLUSH_CAB_ASYNC = (CARL9170_CMD_FLUSH_CAB | + CARL9170_CMD_ASYNC_FLAG), + /* responses and traps */ + CARL9170_RSP_FLAG = 0xc0, CARL9170_RSP_PRETBTT = 0xc0, CARL9170_RSP_TXCOMP = 0xc1, CARL9170_RSP_BEACON_CONFIG = 0xc2,