mirror of https://gitee.com/openkylin/linux.git
iwlwifi: mvm: configure WOWLAN_CONFIGURATION on D0i3 entry
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>
This commit is contained in:
parent
70d6babbc9
commit
b77f06d9ec
|
@ -231,8 +231,12 @@ enum iwl_wowlan_wakeup_filters {
|
||||||
IWL_WOWLAN_WAKEUP_RF_KILL_DEASSERT = BIT(8),
|
IWL_WOWLAN_WAKEUP_RF_KILL_DEASSERT = BIT(8),
|
||||||
IWL_WOWLAN_WAKEUP_REMOTE_LINK_LOSS = BIT(9),
|
IWL_WOWLAN_WAKEUP_REMOTE_LINK_LOSS = BIT(9),
|
||||||
IWL_WOWLAN_WAKEUP_REMOTE_SIGNATURE_TABLE = BIT(10),
|
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_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 */
|
}; /* WOWLAN_WAKEUP_FILTER_API_E_VER_4 */
|
||||||
|
|
||||||
struct iwl_wowlan_config_cmd {
|
struct iwl_wowlan_config_cmd {
|
||||||
|
|
|
@ -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);
|
struct iwl_mvm *mvm = IWL_OP_MODE_GET_MVM(op_mode);
|
||||||
u32 flags = CMD_ASYNC | CMD_HIGH_PRIO | CMD_SEND_IN_IDLE;
|
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 = {
|
struct iwl_d3_manager_config d3_cfg_cmd = {
|
||||||
.min_sleep_time = cpu_to_le32(1000),
|
.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,
|
iwl_mvm_enter_d0i3_iterator,
|
||||||
mvm);
|
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,
|
return iwl_mvm_send_cmd_pdu(mvm, D3_CONFIG_CMD,
|
||||||
flags | CMD_MAKE_TRANS_IDLE,
|
flags | CMD_MAKE_TRANS_IDLE,
|
||||||
sizeof(d3_cfg_cmd), &d3_cfg_cmd);
|
sizeof(d3_cfg_cmd), &d3_cfg_cmd);
|
||||||
|
|
Loading…
Reference in New Issue