X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=carlfw%2Fsrc%2Fcmd.c;h=e1dcbb07a213ff13da714d46e82696500e165cae;hb=42f3ffb244e5cabba181fe6c59042caa61b650cb;hp=5887891aa7abdb880c1e020c2acf92581af2bec8;hpb=c48e2d095d50c9aea409c3171ed1f183fe906ea6;p=carl9170fw.git diff --git a/carlfw/src/cmd.c b/carlfw/src/cmd.c index 5887891..e1dcbb0 100644 --- a/carlfw/src/cmd.c +++ b/carlfw/src/cmd.c @@ -6,7 +6,7 @@ * Copyright (c) 2000-2005 ZyDAS Technology Corporation * Copyright (c) 2007-2009 Atheros Communications, Inc. * Copyright 2009 Johannes Berg - * Copyright 2009, 2010 Christian Lamparter + * Copyright 2009-2011 Christian Lamparter * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -30,6 +30,7 @@ #include "printf.h" #include "timer.h" #include "wl.h" +#include "wol.h" void handle_cmd(struct carl9170_rsp *resp) { @@ -86,19 +87,30 @@ 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; if (cmd->bcn_ctrl.mode & CARL9170_BCN_CTRL_CAB_TRIGGER) { - wlan_cab_modify_dtim_beacon(cmd->bcn_ctrl.vif_id, + wlan_modify_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; + fw.wlan.cab_flush_trigger[cmd->bcn_ctrl.vif_id] = CARL9170_CAB_TRIGGER_EMPTY; } break; #endif /* CONFIG_CARL9170FW_CAB_QUEUE */ @@ -128,13 +140,11 @@ 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 */ default: