X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=carlfw%2Fsrc%2Fcmd.c;h=5382083c0b6dae7415962e47683bf474e63385ec;hb=dbb81597c39e9ecf9a76420ac374a179d5b94c91;hp=13081c24cf37c7de245859a78ece1026ffafcbdf;hpb=35cac8dcfa9d01fff0c929f0e2b9cc38fc919589;p=carl9170fw.git diff --git a/carlfw/src/cmd.c b/carlfw/src/cmd.c index 13081c2..5382083 100644 --- a/carlfw/src/cmd.c +++ b/carlfw/src/cmd.c @@ -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,16 @@ 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; + + case CARL9170_CMD_TALLY: + resp->hdr.len = sizeof(struct carl9170_tally_rsp); + memcpy(&resp->tally, &fw.tally, sizeof(struct carl9170_tally_rsp)); + resp->tally.tick = fw.ticks_per_usec; + memset(&fw.tally, 0, sizeof(struct carl9170_tally_rsp)); break; -#endif /* CONFIG_CARL9170FW_WOL */ #ifdef CONFIG_CARL9170FW_CAB_QUEUE case CARL9170_CMD_BCN_CTRL: @@ -104,7 +110,7 @@ void handle_cmd(struct carl9170_rsp *resp) set(AR9170_MAC_REG_BCN_CTRL, AR9170_BCN_CTRL_READY); } else { wlan_cab_flush_queue(cmd->bcn_ctrl.vif_id); - fw.wlan.cab_flush_trigger[i] = CARL9170_CAB_TRIGGER_EMPTY; + fw.wlan.cab_flush_trigger[cmd->bcn_ctrl.vif_id] = CARL9170_CAB_TRIGGER_EMPTY; } break; #endif /* CONFIG_CARL9170FW_CAB_QUEUE */ @@ -119,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: @@ -139,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);