carl9170 firmware: remove usb transport watchdog
[carl9170fw.git] / carlfw / src / cmd.c
index 7652214f476a5d4a0df9298bc80889c626c78e3a..e04e8da486b44dfac8eafe62374cb4cd595a6831 100644 (file)
@@ -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]);
@@ -59,17 +59,19 @@ 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;
 
        case CARL9170_CMD_REBOOT:
                /*
-                * reboot does not return and generates no response
                 * resp->len = 0;
                 */
-
-               reboot();
+               fw.reboot = 1;
                break;
 
        case CARL9170_CMD_READ_TSF:
@@ -106,7 +108,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;
 
@@ -119,14 +123,6 @@ void handle_cmd(struct carl9170_rsp *resp)
 # endif /* CONFIG_CARL9170FW_PSM */
 #endif /* CONFIG_CARL9170FW_RADIO_FUNCTIOS */
 
-#ifdef CONFIG_CARL9170FW_USB_WATCHDOG
-       case CARL9170_CMD_USB_WD:
-               resp->hdr.len = 4;
-               fw.usb.watchdog.state = le32_to_cpu(cmd->watchdog.state);
-               break;
-
-#endif /* CONFIG_CARL9170FW_USB_WATCHDOG */
-
        default:
                break;
        }