carl9170 firmware: refactor timer functions
[carl9170fw.git] / carlfw / src / cmd.c
index 9e37f5429e2bef6d7956556f23d17855e96daa38..5382083c0b6dae7415962e47683bf474e63385ec 100644 (file)
@@ -30,6 +30,7 @@
 #include "printf.h"
 #include "timer.h"
 #include "wl.h"
+#include "wol.h"
 
 void handle_cmd(struct carl9170_rsp *resp)
 {
@@ -86,11 +87,9 @@ void handle_cmd(struct carl9170_rsp *resp)
                fw.wlan.rx_filter = cmd->rx_filter.rx_filter;
                break;
 
-#ifdef CONFIG_CARL9170FW_WOL
        case CARL9170_CMD_WOL:
-               memcpy(&fw.wlan.wol.cmd, &cmd->wol, sizeof(cmd->wol));
+               wol_cmd(&cmd->wol);
                break;
-#endif /* CONFIG_CARL9170FW_WOL */
 
        case CARL9170_CMD_TALLY:
                resp->hdr.len = sizeof(struct carl9170_tally_rsp);
@@ -126,7 +125,7 @@ void handle_cmd(struct carl9170_rsp *resp)
                resp->hdr.len = 0;
                disable_key(&cmd->disablekey);
                break;
-#endif /* CONFIG_CARL9170FW_SECURIT_ENGINE */
+#endif /* CONFIG_CARL9170FW_SECURITY_ENGINE */
 
 #ifdef CONFIG_CARL9170FW_RADIO_FUNCTIONS
        case CARL9170_CMD_FREQUENCY:
@@ -146,7 +145,7 @@ void handle_cmd(struct carl9170_rsp *resp)
                fw.phy.psm.state = le32_to_cpu(cmd->psm.state);
                rf_psm();
                break;
-#endif /* CONFIG_CARL9170FW_RADIO_FUNCTIOS */
+#endif /* CONFIG_CARL9170FW_RADIO_FUNCTIONS */
 
        default:
                BUG("Unknown command %x\n", cmd->hdr.cmd);