carl9170 firmware: initial WoWLAN support
[carl9170fw.git] / carlfw / src / cmd.c
index 5887891aa7abdb880c1e020c2acf92581af2bec8..13081c24cf37c7de245859a78ece1026ffafcbdf 100644 (file)
@@ -6,7 +6,7 @@
  * Copyright (c) 2000-2005 ZyDAS Technology Corporation
  * Copyright (c) 2007-2009 Atheros Communications, Inc.
  * Copyright   2009    Johannes Berg <johannes@sipsolutions.net>
- * Copyright 2009, 2010 Christian Lamparter <chunkeey@googlemail.com>
+ * Copyright 2009-2011 Christian Lamparter <chunkeey@googlemail.com>
  *
  * 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
@@ -86,12 +86,18 @@ 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));
+               break;
+#endif /* CONFIG_CARL9170FW_WOL */
+
 #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);
@@ -128,13 +134,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: