X-Git-Url: https://jxself.org/git/?p=carl9170fw.git;a=blobdiff_plain;f=carlfw%2Fsrc%2Fcmd.c;h=058f9674677752763bd20bb456b119ab6fdaa44a;hp=f5bbad86f8e5393083881f3b5c7f5129c9a56e72;hb=refs%2Ftags%2F1.7.4;hpb=e72388a0aa23da8bc8e24a0cbe9d523c5a9ce294 diff --git a/carlfw/src/cmd.c b/carlfw/src/cmd.c index f5bbad8..058f967 100644 --- a/carlfw/src/cmd.c +++ b/carlfw/src/cmd.c @@ -37,9 +37,12 @@ void handle_cmd(struct carl9170_rsp *resp) unsigned int i; /* copies cmd, len and extra fields */ - resp->hdr.hdr_data = cmd->hdr.hdr_data; + resp->hdr.len = cmd->hdr.len; + resp->hdr.cmd = cmd->hdr.cmd; + 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]); @@ -56,7 +59,11 @@ void handle_cmd(struct carl9170_rsp *resp) break; case CARL9170_CMD_SWRST: - resp->hdr.len = 0; + /* + * Command has no payload, so the response + * has no payload either. + * resp->hdr.len = 0; + */ fw.wlan.mac_reset = CARL9170_MAC_RESET_FORCE; break; @@ -103,7 +110,9 @@ void handle_cmd(struct carl9170_rsp *resp) break; case CARL9170_CMD_FREQ_START: - resp->hdr.len = 0; + /* + * resp->hdr.len = 0; + */ rf_notify_set_channel(); break;