X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=carlfw%2Fsrc%2Fcmd.c;h=b63f9262012aae3afbf3f4e8fa97f8780b7b86db;hb=c97d09577cb82ffc5deda208163ecbee12f76037;hp=e04e8da486b44dfac8eafe62374cb4cd595a6831;hpb=95e0b3d5f76e191546422c4dbb7afd2ad679ff8d;p=carl9170fw.git diff --git a/carlfw/src/cmd.c b/carlfw/src/cmd.c index e04e8da..b63f926 100644 --- a/carlfw/src/cmd.c +++ b/carlfw/src/cmd.c @@ -59,12 +59,14 @@ void handle_cmd(struct carl9170_rsp *resp) break; case CARL9170_CMD_SWRST: +#ifdef CONFIG_CARL9170FW_FW_MAC_RESET /* * Command has no payload, so the response * has no payload either. * resp->hdr.len = 0; */ fw.wlan.mac_reset = CARL9170_MAC_RESET_FORCE; +#endif /* CONFIG_CARL9170FW_FW_MAC_RESET */ break; case CARL9170_CMD_REBOOT: @@ -80,23 +82,30 @@ void handle_cmd(struct carl9170_rsp *resp) break; #ifdef CONFIG_CARL9170FW_CAB_QUEUE - case CARL9170_CMD_FLUSH_CAB: + case CARL9170_CMD_BCN_CTRL: resp->hdr.len = 0; - fw.wlan.cab_flush_trigger = CARL9170_CAB_TRIGGER_ARMED; - fw.wlan.cab_flush_time = get_clock_counter() + - CARL9170_TBTT_DELTA; + + if (cmd->bcn_ctrl.mode & CARL9170_BCN_CTRL_CAB_TRIGGER) { + wlan_cab_modify_dtim_beacon(cmd->bcn_ctrl.vif_id, + cmd->bcn_ctrl.bcn_addr, cmd->bcn_ctrl.bcn_len); + set(AR9170_MAC_REG_BCN_ADDR, cmd->bcn_ctrl.bcn_addr); + set(AR9170_MAC_REG_BCN_LENGTH, cmd->bcn_ctrl.bcn_len); + 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; + } break; #endif /* CONFIG_CARL9170FW_CAB_QUEUE */ #ifdef CONFIG_CARL9170FW_SECURITY_ENGINE case CARL9170_CMD_EKEY: - resp->hdr.len = 1; + resp->hdr.len = 0; set_key(&cmd->setkey); break; case CARL9170_CMD_DKEY: - /* Disable Key */ - resp->hdr.len = 1; + resp->hdr.len = 0; disable_key(&cmd->disablekey); break; #endif /* CONFIG_CARL9170FW_SECURIT_ENGINE */ @@ -124,6 +133,7 @@ void handle_cmd(struct carl9170_rsp *resp) #endif /* CONFIG_CARL9170FW_RADIO_FUNCTIOS */ default: + BUG("Unknown command %x\n", cmd->hdr.cmd); break; } }