X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=carlfw%2Fsrc%2Fcmd.c;h=5382083c0b6dae7415962e47683bf474e63385ec;hb=dbb81597c39e9ecf9a76420ac374a179d5b94c91;hp=fd8faf588e66c957915f2c95ef92d0df92195f24;hpb=12d3f1ba6ba522cd1ef11483d813fe2c2e64f04b;p=carl9170fw.git diff --git a/carlfw/src/cmd.c b/carlfw/src/cmd.c index fd8faf5..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,6 +87,17 @@ void handle_cmd(struct carl9170_rsp *resp) fw.wlan.rx_filter = cmd->rx_filter.rx_filter; break; + case CARL9170_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; + #ifdef CONFIG_CARL9170FW_CAB_QUEUE case CARL9170_CMD_BCN_CTRL: resp->hdr.len = 0; @@ -98,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 */ @@ -113,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: @@ -128,14 +140,12 @@ void handle_cmd(struct carl9170_rsp *resp) rf_notify_set_channel(); break; -# ifdef CONFIG_CARL9170FW_PSM case CARL9170_CMD_PSM: resp->hdr.len = 0; fw.phy.psm.state = le32_to_cpu(cmd->psm.state); rf_psm(); break; -# endif /* CONFIG_CARL9170FW_PSM */ -#endif /* CONFIG_CARL9170FW_RADIO_FUNCTIOS */ +#endif /* CONFIG_CARL9170FW_RADIO_FUNCTIONS */ default: BUG("Unknown command %x\n", cmd->hdr.cmd);