iwlwifi: mvm: configure WOWLAN_CONFIGURATION on D0i3 entry
authorEliad Peller <eliad@wizery.com>
Wed, 6 Nov 2013 08:49:32 +0000 (10:49 +0200)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Mon, 3 Feb 2014 20:23:41 +0000 (22:23 +0200)
We need to ask the fw to wake up on incoming packets (that
pass the filters).

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/mvm/fw-api-d3.h
drivers/net/wireless/iwlwifi/mvm/ops.c

index 8415ff312d0eec8139bae02fcdb1e45e1ee49284..521997669c999cdd989899ea84bc3ac535327c28 100644 (file)
@@ -231,8 +231,12 @@ enum iwl_wowlan_wakeup_filters {
        IWL_WOWLAN_WAKEUP_RF_KILL_DEASSERT              = BIT(8),
        IWL_WOWLAN_WAKEUP_REMOTE_LINK_LOSS              = BIT(9),
        IWL_WOWLAN_WAKEUP_REMOTE_SIGNATURE_TABLE        = BIT(10),
-       /* BIT(11) reserved */
+       IWL_WOWLAN_WAKEUP_REMOTE_TCP_EXTERNAL           = BIT(11),
        IWL_WOWLAN_WAKEUP_REMOTE_WAKEUP_PACKET          = BIT(12),
+       IWL_WOWLAN_WAKEUP_IOAC_MAGIC_PACKET             = BIT(13),
+       IWL_WOWLAN_WAKEUP_HOST_TIMER                    = BIT(14),
+       IWL_WOWLAN_WAKEUP_RX_FRAME                      = BIT(15),
+       IWL_WOWLAN_WAKEUP_BCN_FILTERING                 = BIT(16),
 }; /* WOWLAN_WAKEUP_FILTER_API_E_VER_4 */
 
 struct iwl_wowlan_config_cmd {
index 5bc44395fa96072ce70591e405b3504960808fab..12b81ca9195445c90555ef1d54f947e81c74eb28 100644 (file)
@@ -844,6 +844,13 @@ static int iwl_mvm_enter_d0i3(struct iwl_op_mode *op_mode)
 {
        struct iwl_mvm *mvm = IWL_OP_MODE_GET_MVM(op_mode);
        u32 flags = CMD_ASYNC | CMD_HIGH_PRIO | CMD_SEND_IN_IDLE;
+       int ret;
+       struct iwl_wowlan_config_cmd wowlan_config_cmd = {
+               .wakeup_filter = cpu_to_le32(IWL_WOWLAN_WAKEUP_RX_FRAME |
+                                            IWL_WOWLAN_WAKEUP_BEACON_MISS |
+                                            IWL_WOWLAN_WAKEUP_LINK_CHANGE |
+                                            IWL_WOWLAN_WAKEUP_BCN_FILTERING),
+       };
        struct iwl_d3_manager_config d3_cfg_cmd = {
                .min_sleep_time = cpu_to_le32(1000),
        };
@@ -855,6 +862,12 @@ static int iwl_mvm_enter_d0i3(struct iwl_op_mode *op_mode)
                                                   iwl_mvm_enter_d0i3_iterator,
                                                   mvm);
 
+       ret = iwl_mvm_send_cmd_pdu(mvm, WOWLAN_CONFIGURATION, flags,
+                                  sizeof(wowlan_config_cmd),
+                                  &wowlan_config_cmd);
+       if (ret)
+               return ret;
+
        return iwl_mvm_send_cmd_pdu(mvm, D3_CONFIG_CMD,
                                    flags | CMD_MAKE_TRANS_IDLE,
                                    sizeof(d3_cfg_cmd), &d3_cfg_cmd);