Commit 87f5b5f2 authored by Johannes Berg's avatar Johannes Berg

wifi: iwlwifi: mvm: remove flags for enable/disable beacon filter

The flags argument to enable/disable beacon filtering functions
is unused and always zero, so just remove it.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarMiri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240206175739.2c739c1034a5.I8619949ad4ebd31593d10ece371ebdc6c48db98f@changeidSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent d5bd4041
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
/* /*
* Copyright (C) 2012-2014, 2018-2023 Intel Corporation * Copyright (C) 2012-2014, 2018-2024 Intel Corporation
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
* Copyright (C) 2016-2017 Intel Deutschland GmbH * Copyright (C) 2016-2017 Intel Deutschland GmbH
*/ */
...@@ -381,9 +381,9 @@ static ssize_t iwl_dbgfs_bf_params_write(struct ieee80211_vif *vif, char *buf, ...@@ -381,9 +381,9 @@ static ssize_t iwl_dbgfs_bf_params_write(struct ieee80211_vif *vif, char *buf,
mutex_lock(&mvm->mutex); mutex_lock(&mvm->mutex);
iwl_dbgfs_update_bf(vif, param, value); iwl_dbgfs_update_bf(vif, param, value);
if (param == MVM_DEBUGFS_BF_ENABLE_BEACON_FILTER && !value) if (param == MVM_DEBUGFS_BF_ENABLE_BEACON_FILTER && !value)
ret = iwl_mvm_disable_beacon_filter(mvm, vif, 0); ret = iwl_mvm_disable_beacon_filter(mvm, vif);
else else
ret = iwl_mvm_enable_beacon_filter(mvm, vif, 0); ret = iwl_mvm_enable_beacon_filter(mvm, vif);
mutex_unlock(&mvm->mutex); mutex_unlock(&mvm->mutex);
return ret ?: count; return ret ?: count;
......
...@@ -1448,7 +1448,7 @@ int iwl_mvm_post_channel_switch(struct ieee80211_hw *hw, ...@@ -1448,7 +1448,7 @@ int iwl_mvm_post_channel_switch(struct ieee80211_hw *hw,
if (!fw_has_capa(&mvm->fw->ucode_capa, if (!fw_has_capa(&mvm->fw->ucode_capa,
IWL_UCODE_TLV_CAPA_CHANNEL_SWITCH_CMD)) { IWL_UCODE_TLV_CAPA_CHANNEL_SWITCH_CMD)) {
ret = iwl_mvm_enable_beacon_filter(mvm, vif, 0); ret = iwl_mvm_enable_beacon_filter(mvm, vif);
if (ret) if (ret)
goto out_unlock; goto out_unlock;
...@@ -1632,7 +1632,7 @@ static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw, ...@@ -1632,7 +1632,7 @@ static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw,
goto out_remove_mac; goto out_remove_mac;
/* beacon filtering */ /* beacon filtering */
ret = iwl_mvm_disable_beacon_filter(mvm, vif, 0); ret = iwl_mvm_disable_beacon_filter(mvm, vif);
if (ret) if (ret)
goto out_remove_mac; goto out_remove_mac;
...@@ -2575,7 +2575,7 @@ iwl_mvm_bss_info_changed_station_common(struct iwl_mvm *mvm, ...@@ -2575,7 +2575,7 @@ iwl_mvm_bss_info_changed_station_common(struct iwl_mvm *mvm,
iwl_mvm_stop_session_protection(mvm, vif); iwl_mvm_stop_session_protection(mvm, vif);
iwl_mvm_sf_update(mvm, vif, false); iwl_mvm_sf_update(mvm, vif, false);
WARN_ON(iwl_mvm_enable_beacon_filter(mvm, vif, 0)); WARN_ON(iwl_mvm_enable_beacon_filter(mvm, vif));
} }
if (changes & (BSS_CHANGED_PS | BSS_CHANGED_P2P_PS | BSS_CHANGED_QOS | if (changes & (BSS_CHANGED_PS | BSS_CHANGED_P2P_PS | BSS_CHANGED_QOS |
...@@ -2596,7 +2596,7 @@ iwl_mvm_bss_info_changed_station_common(struct iwl_mvm *mvm, ...@@ -2596,7 +2596,7 @@ iwl_mvm_bss_info_changed_station_common(struct iwl_mvm *mvm,
/* FIXME: need to update per link when FW API will /* FIXME: need to update per link when FW API will
* support it * support it
*/ */
ret = iwl_mvm_enable_beacon_filter(mvm, vif, 0); ret = iwl_mvm_enable_beacon_filter(mvm, vif);
if (ret) if (ret)
IWL_ERR(mvm, IWL_ERR(mvm,
"failed to update CQM thresholds\n"); "failed to update CQM thresholds\n");
...@@ -3797,7 +3797,7 @@ iwl_mvm_sta_state_assoc_to_authorized(struct iwl_mvm *mvm, ...@@ -3797,7 +3797,7 @@ iwl_mvm_sta_state_assoc_to_authorized(struct iwl_mvm *mvm,
NL80211_TDLS_ENABLE_LINK); NL80211_TDLS_ENABLE_LINK);
} else { } else {
/* enable beacon filtering */ /* enable beacon filtering */
WARN_ON(iwl_mvm_enable_beacon_filter(mvm, vif, 0)); WARN_ON(iwl_mvm_enable_beacon_filter(mvm, vif));
mvmvif->authorized = 1; mvmvif->authorized = 1;
...@@ -3855,7 +3855,7 @@ iwl_mvm_sta_state_authorized_to_assoc(struct iwl_mvm *mvm, ...@@ -3855,7 +3855,7 @@ iwl_mvm_sta_state_authorized_to_assoc(struct iwl_mvm *mvm,
mvmvif->authorized = 0; mvmvif->authorized = 0;
/* disable beacon filtering */ /* disable beacon filtering */
iwl_mvm_disable_beacon_filter(mvm, vif, 0); iwl_mvm_disable_beacon_filter(mvm, vif);
} }
return 0; return 0;
...@@ -5299,8 +5299,8 @@ static int __iwl_mvm_mac_testmode_cmd(struct iwl_mvm *mvm, ...@@ -5299,8 +5299,8 @@ static int __iwl_mvm_mac_testmode_cmd(struct iwl_mvm *mvm,
return -EINVAL; return -EINVAL;
if (nla_get_u32(tb[IWL_MVM_TM_ATTR_BEACON_FILTER_STATE])) if (nla_get_u32(tb[IWL_MVM_TM_ATTR_BEACON_FILTER_STATE]))
return iwl_mvm_enable_beacon_filter(mvm, vif, 0); return iwl_mvm_enable_beacon_filter(mvm, vif);
return iwl_mvm_disable_beacon_filter(mvm, vif, 0); return iwl_mvm_disable_beacon_filter(mvm, vif);
} }
return -EOPNOTSUPP; return -EOPNOTSUPP;
...@@ -5384,7 +5384,7 @@ static int iwl_mvm_old_pre_chan_sw_sta(struct iwl_mvm *mvm, ...@@ -5384,7 +5384,7 @@ static int iwl_mvm_old_pre_chan_sw_sta(struct iwl_mvm *mvm,
iwl_mvm_csa_client_absent(mvm, vif); iwl_mvm_csa_client_absent(mvm, vif);
if (mvmvif->bf_data.bf_enabled) { if (mvmvif->bf_data.bf_enabled) {
int ret = iwl_mvm_disable_beacon_filter(mvm, vif, 0); int ret = iwl_mvm_disable_beacon_filter(mvm, vif);
if (ret) if (ret)
return ret; return ret;
......
...@@ -47,7 +47,7 @@ static int iwl_mvm_mld_mac_add_interface(struct ieee80211_hw *hw, ...@@ -47,7 +47,7 @@ static int iwl_mvm_mld_mac_add_interface(struct ieee80211_hw *hw,
goto out_unlock; goto out_unlock;
/* beacon filtering */ /* beacon filtering */
ret = iwl_mvm_disable_beacon_filter(mvm, vif, 0); ret = iwl_mvm_disable_beacon_filter(mvm, vif);
if (ret) if (ret)
goto out_remove_mac; goto out_remove_mac;
......
...@@ -2145,11 +2145,9 @@ iwl_mvm_beacon_filter_debugfs_parameters(struct ieee80211_vif *vif, ...@@ -2145,11 +2145,9 @@ iwl_mvm_beacon_filter_debugfs_parameters(struct ieee80211_vif *vif,
{} {}
#endif #endif
int iwl_mvm_enable_beacon_filter(struct iwl_mvm *mvm, int iwl_mvm_enable_beacon_filter(struct iwl_mvm *mvm,
struct ieee80211_vif *vif, struct ieee80211_vif *vif);
u32 flags);
int iwl_mvm_disable_beacon_filter(struct iwl_mvm *mvm, int iwl_mvm_disable_beacon_filter(struct iwl_mvm *mvm,
struct ieee80211_vif *vif, struct ieee80211_vif *vif);
u32 flags);
/* SMPS */ /* SMPS */
void iwl_mvm_update_smps(struct iwl_mvm *mvm, struct ieee80211_vif *vif, void iwl_mvm_update_smps(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
enum iwl_mvm_smps_type_request req_type, enum iwl_mvm_smps_type_request req_type,
......
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
/* /*
* Copyright (C) 2012-2014, 2018-2019, 2021-2023 Intel Corporation * Copyright (C) 2012-2014, 2018-2019, 2021-2024 Intel Corporation
* Copyright (C) 2013-2014 Intel Mobile Communications GmbH * Copyright (C) 2013-2014 Intel Mobile Communications GmbH
* Copyright (C) 2015-2017 Intel Deutschland GmbH * Copyright (C) 2015-2017 Intel Deutschland GmbH
*/ */
...@@ -20,8 +20,7 @@ ...@@ -20,8 +20,7 @@
static static
int iwl_mvm_beacon_filter_send_cmd(struct iwl_mvm *mvm, int iwl_mvm_beacon_filter_send_cmd(struct iwl_mvm *mvm,
struct iwl_beacon_filter_cmd *cmd, struct iwl_beacon_filter_cmd *cmd)
u32 flags)
{ {
u16 len; u16 len;
...@@ -62,7 +61,7 @@ int iwl_mvm_beacon_filter_send_cmd(struct iwl_mvm *mvm, ...@@ -62,7 +61,7 @@ int iwl_mvm_beacon_filter_send_cmd(struct iwl_mvm *mvm,
len = offsetof(struct iwl_beacon_filter_cmd, len = offsetof(struct iwl_beacon_filter_cmd,
bf_threshold_absolute_low); bf_threshold_absolute_low);
return iwl_mvm_send_cmd_pdu(mvm, REPLY_BEACON_FILTERING_CMD, flags, return iwl_mvm_send_cmd_pdu(mvm, REPLY_BEACON_FILTERING_CMD, 0,
len, cmd); len, cmd);
} }
...@@ -813,8 +812,7 @@ iwl_mvm_beacon_filter_debugfs_parameters(struct ieee80211_vif *vif, ...@@ -813,8 +812,7 @@ iwl_mvm_beacon_filter_debugfs_parameters(struct ieee80211_vif *vif,
static int _iwl_mvm_enable_beacon_filter(struct iwl_mvm *mvm, static int _iwl_mvm_enable_beacon_filter(struct iwl_mvm *mvm,
struct ieee80211_vif *vif, struct ieee80211_vif *vif,
struct iwl_beacon_filter_cmd *cmd, struct iwl_beacon_filter_cmd *cmd)
u32 cmd_flags)
{ {
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
int ret; int ret;
...@@ -825,7 +823,7 @@ static int _iwl_mvm_enable_beacon_filter(struct iwl_mvm *mvm, ...@@ -825,7 +823,7 @@ static int _iwl_mvm_enable_beacon_filter(struct iwl_mvm *mvm,
iwl_mvm_beacon_filter_set_cqm_params(mvm, vif, cmd); iwl_mvm_beacon_filter_set_cqm_params(mvm, vif, cmd);
iwl_mvm_beacon_filter_debugfs_parameters(vif, cmd); iwl_mvm_beacon_filter_debugfs_parameters(vif, cmd);
ret = iwl_mvm_beacon_filter_send_cmd(mvm, cmd, cmd_flags); ret = iwl_mvm_beacon_filter_send_cmd(mvm, cmd);
if (!ret) if (!ret)
mvmvif->bf_data.bf_enabled = true; mvmvif->bf_data.bf_enabled = true;
...@@ -834,20 +832,18 @@ static int _iwl_mvm_enable_beacon_filter(struct iwl_mvm *mvm, ...@@ -834,20 +832,18 @@ static int _iwl_mvm_enable_beacon_filter(struct iwl_mvm *mvm,
} }
int iwl_mvm_enable_beacon_filter(struct iwl_mvm *mvm, int iwl_mvm_enable_beacon_filter(struct iwl_mvm *mvm,
struct ieee80211_vif *vif, struct ieee80211_vif *vif)
u32 flags)
{ {
struct iwl_beacon_filter_cmd cmd = { struct iwl_beacon_filter_cmd cmd = {
IWL_BF_CMD_CONFIG_DEFAULTS, IWL_BF_CMD_CONFIG_DEFAULTS,
.bf_enable_beacon_filter = cpu_to_le32(1), .bf_enable_beacon_filter = cpu_to_le32(1),
}; };
return _iwl_mvm_enable_beacon_filter(mvm, vif, &cmd, flags); return _iwl_mvm_enable_beacon_filter(mvm, vif, &cmd);
} }
static int _iwl_mvm_disable_beacon_filter(struct iwl_mvm *mvm, static int _iwl_mvm_disable_beacon_filter(struct iwl_mvm *mvm,
struct ieee80211_vif *vif, struct ieee80211_vif *vif)
u32 flags)
{ {
struct iwl_beacon_filter_cmd cmd = {}; struct iwl_beacon_filter_cmd cmd = {};
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
...@@ -856,7 +852,7 @@ static int _iwl_mvm_disable_beacon_filter(struct iwl_mvm *mvm, ...@@ -856,7 +852,7 @@ static int _iwl_mvm_disable_beacon_filter(struct iwl_mvm *mvm,
if (vif->type != NL80211_IFTYPE_STATION || vif->p2p) if (vif->type != NL80211_IFTYPE_STATION || vif->p2p)
return 0; return 0;
ret = iwl_mvm_beacon_filter_send_cmd(mvm, &cmd, flags); ret = iwl_mvm_beacon_filter_send_cmd(mvm, &cmd);
if (!ret) if (!ret)
mvmvif->bf_data.bf_enabled = false; mvmvif->bf_data.bf_enabled = false;
...@@ -865,10 +861,9 @@ static int _iwl_mvm_disable_beacon_filter(struct iwl_mvm *mvm, ...@@ -865,10 +861,9 @@ static int _iwl_mvm_disable_beacon_filter(struct iwl_mvm *mvm,
} }
int iwl_mvm_disable_beacon_filter(struct iwl_mvm *mvm, int iwl_mvm_disable_beacon_filter(struct iwl_mvm *mvm,
struct ieee80211_vif *vif, struct ieee80211_vif *vif)
u32 flags)
{ {
return _iwl_mvm_disable_beacon_filter(mvm, vif, flags); return _iwl_mvm_disable_beacon_filter(mvm, vif);
} }
static int iwl_mvm_power_set_ps(struct iwl_mvm *mvm) static int iwl_mvm_power_set_ps(struct iwl_mvm *mvm)
...@@ -919,7 +914,7 @@ static int iwl_mvm_power_set_ba(struct iwl_mvm *mvm, ...@@ -919,7 +914,7 @@ static int iwl_mvm_power_set_ba(struct iwl_mvm *mvm,
!vif->cfg.ps || !vif->cfg.ps ||
iwl_mvm_vif_low_latency(mvmvif)); iwl_mvm_vif_low_latency(mvmvif));
return _iwl_mvm_enable_beacon_filter(mvm, vif, &cmd, 0); return _iwl_mvm_enable_beacon_filter(mvm, vif, &cmd);
} }
int iwl_mvm_power_update_ps(struct iwl_mvm *mvm) int iwl_mvm_power_update_ps(struct iwl_mvm *mvm)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment