wifi: iwlwifi: mvm: remove flags for enable/disable beacon filter
authorJohannes Berg <johannes.berg@intel.com>
Tue, 6 Feb 2024 16:02:10 +0000 (18:02 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 8 Feb 2024 14:00:49 +0000 (15:00 +0100)
The flags argument to enable/disable beacon filtering functions
is unused and always zero, so just remove it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240206175739.2c739c1034a5.I8619949ad4ebd31593d10ece371ebdc6c48db98f@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
drivers/net/wireless/intel/iwlwifi/mvm/power.c

index 2b96cf9eac72b8d75b5a84e1d6265507fcbab778..aa3c9c2cbd7fc620636a089a711a52a867979412 100644 (file)
@@ -1,6 +1,6 @@
 // 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) 2016-2017 Intel Deutschland GmbH
  */
@@ -381,9 +381,9 @@ static ssize_t iwl_dbgfs_bf_params_write(struct ieee80211_vif *vif, char *buf,
        mutex_lock(&mvm->mutex);
        iwl_dbgfs_update_bf(vif, param, 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
-               ret = iwl_mvm_enable_beacon_filter(mvm, vif, 0);
+               ret = iwl_mvm_enable_beacon_filter(mvm, vif);
        mutex_unlock(&mvm->mutex);
 
        return ret ?: count;
index ab1219f4a5dcb234c7ca549f4f6386b0e3e68b60..576b90da94ff2ebc8817d4c042066ce58f64df85 100644 (file)
@@ -1448,7 +1448,7 @@ int iwl_mvm_post_channel_switch(struct ieee80211_hw *hw,
 
                if (!fw_has_capa(&mvm->fw->ucode_capa,
                                 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)
                                goto out_unlock;
 
@@ -1632,7 +1632,7 @@ static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw,
                goto out_remove_mac;
 
        /* beacon filtering */
-       ret = iwl_mvm_disable_beacon_filter(mvm, vif, 0);
+       ret = iwl_mvm_disable_beacon_filter(mvm, vif);
        if (ret)
                goto out_remove_mac;
 
@@ -2575,7 +2575,7 @@ iwl_mvm_bss_info_changed_station_common(struct iwl_mvm *mvm,
                iwl_mvm_stop_session_protection(mvm, vif);
 
                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 |
@@ -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
                         * support it
                         */
-                       ret = iwl_mvm_enable_beacon_filter(mvm, vif, 0);
+                       ret = iwl_mvm_enable_beacon_filter(mvm, vif);
                        if (ret)
                                IWL_ERR(mvm,
                                        "failed to update CQM thresholds\n");
@@ -3797,7 +3797,7 @@ iwl_mvm_sta_state_assoc_to_authorized(struct iwl_mvm *mvm,
                                           NL80211_TDLS_ENABLE_LINK);
        } else {
                /* 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;
 
@@ -3855,7 +3855,7 @@ iwl_mvm_sta_state_authorized_to_assoc(struct iwl_mvm *mvm,
                mvmvif->authorized = 0;
 
                /* disable beacon filtering */
-               iwl_mvm_disable_beacon_filter(mvm, vif, 0);
+               iwl_mvm_disable_beacon_filter(mvm, vif);
        }
 
        return 0;
@@ -5299,8 +5299,8 @@ static int __iwl_mvm_mac_testmode_cmd(struct iwl_mvm *mvm,
                        return -EINVAL;
 
                if (nla_get_u32(tb[IWL_MVM_TM_ATTR_BEACON_FILTER_STATE]))
-                       return iwl_mvm_enable_beacon_filter(mvm, vif, 0);
-               return iwl_mvm_disable_beacon_filter(mvm, vif, 0);
+                       return iwl_mvm_enable_beacon_filter(mvm, vif);
+               return iwl_mvm_disable_beacon_filter(mvm, vif);
        }
 
        return -EOPNOTSUPP;
@@ -5384,7 +5384,7 @@ static int iwl_mvm_old_pre_chan_sw_sta(struct iwl_mvm *mvm,
                iwl_mvm_csa_client_absent(mvm, vif);
 
        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)
                        return ret;
index 7d89f50fbb1010db0e07fbeb3025aa83add36c65..021592f69f38b8874d9071c6ce1553f77ddcdd09 100644 (file)
@@ -47,7 +47,7 @@ static int iwl_mvm_mld_mac_add_interface(struct ieee80211_hw *hw,
                goto out_unlock;
 
        /* beacon filtering */
-       ret = iwl_mvm_disable_beacon_filter(mvm, vif, 0);
+       ret = iwl_mvm_disable_beacon_filter(mvm, vif);
        if (ret)
                goto out_remove_mac;
 
index 937d0bd9c531d2ee97a0e065615c655327397fa6..6000c79ce4a548beb704f1598391f589e5aa7645 100644 (file)
@@ -2145,11 +2145,9 @@ iwl_mvm_beacon_filter_debugfs_parameters(struct ieee80211_vif *vif,
 {}
 #endif
 int iwl_mvm_enable_beacon_filter(struct iwl_mvm *mvm,
-                                struct ieee80211_vif *vif,
-                                u32 flags);
+                                struct ieee80211_vif *vif);
 int iwl_mvm_disable_beacon_filter(struct iwl_mvm *mvm,
-                                 struct ieee80211_vif *vif,
-                                 u32 flags);
+                                 struct ieee80211_vif *vif);
 /* SMPS */
 void iwl_mvm_update_smps(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
                                enum iwl_mvm_smps_type_request req_type,
index 1b9b06e0443ffbaf2f0f6d08bb756eb4a0976604..41e68aa6bec8b2adebfb60a986d4cb306ed2d4fe 100644 (file)
@@ -1,6 +1,6 @@
 // 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) 2015-2017 Intel Deutschland GmbH
  */
@@ -20,8 +20,7 @@
 
 static
 int iwl_mvm_beacon_filter_send_cmd(struct iwl_mvm *mvm,
-                                  struct iwl_beacon_filter_cmd *cmd,
-                                  u32 flags)
+                                  struct iwl_beacon_filter_cmd *cmd)
 {
        u16 len;
 
@@ -62,7 +61,7 @@ int iwl_mvm_beacon_filter_send_cmd(struct iwl_mvm *mvm,
                len = offsetof(struct iwl_beacon_filter_cmd,
                               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);
 }
 
@@ -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,
                                         struct ieee80211_vif *vif,
-                                        struct iwl_beacon_filter_cmd *cmd,
-                                        u32 cmd_flags)
+                                        struct iwl_beacon_filter_cmd *cmd)
 {
        struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
        int ret;
@@ -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_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)
                mvmvif->bf_data.bf_enabled = true;
@@ -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,
-                                struct ieee80211_vif *vif,
-                                u32 flags)
+                                struct ieee80211_vif *vif)
 {
        struct iwl_beacon_filter_cmd cmd = {
                IWL_BF_CMD_CONFIG_DEFAULTS,
                .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,
-                                         struct ieee80211_vif *vif,
-                                         u32 flags)
+                                         struct ieee80211_vif *vif)
 {
        struct iwl_beacon_filter_cmd cmd = {};
        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,
        if (vif->type != NL80211_IFTYPE_STATION || vif->p2p)
                return 0;
 
-       ret = iwl_mvm_beacon_filter_send_cmd(mvm, &cmd, flags);
+       ret = iwl_mvm_beacon_filter_send_cmd(mvm, &cmd);
 
        if (!ret)
                mvmvif->bf_data.bf_enabled = false;
@@ -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,
-                                 struct ieee80211_vif *vif,
-                                 u32 flags)
+                                 struct ieee80211_vif *vif)
 {
-       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)
@@ -919,7 +914,7 @@ static int iwl_mvm_power_set_ba(struct iwl_mvm *mvm,
                                       !vif->cfg.ps ||
                                       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)