wifi: iwlwifi: mvm: don't send the smart fifo command if not needed
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Tue, 6 Feb 2024 16:02:07 +0000 (18:02 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 8 Feb 2024 14:00:48 +0000 (15:00 +0100)
Newer firmware versions no longer needs this command. Don't send it if
the firmware advertises it does not need it.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240206175739.527595995aa0.I0381bef1dc815945f2ec194fecc657e5c75bb2ec@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/fw/file.h
drivers/net/wireless/intel/iwlwifi/mvm/sf.c

index b7ef0882dbadc00c3ae857c75258cff088f022f3..08d9aeaedd993394fb3ee0a1f8d3bbc0a0986035 100644 (file)
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
 /*
- * Copyright (C) 2008-2014, 2018-2023 Intel Corporation
+ * Copyright (C) 2008-2014, 2018-2024 Intel Corporation
  * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
  * Copyright (C) 2016-2017 Intel Deutschland GmbH
  */
@@ -247,6 +247,8 @@ typedef unsigned int __bitwise iwl_ucode_tlv_api_t;
  *     logic.
  * @IWL_UCODE_TLV_API_INT_DBG_BUF_CLEAR: Firmware supports clearing the debug
  *     internal buffer
+ * @IWL_UCODE_TLV_API_SMART_FIFO_OFFLOAD: Firmware doesn't need the host to
+ *     configure the smart fifo
  *
  * @NUM_IWL_UCODE_TLV_API: number of bits used
  */
@@ -287,6 +289,7 @@ enum iwl_ucode_tlv_api {
        /* API Set 2 */
        IWL_UCODE_TLV_API_NO_HOST_DISABLE_TX    = (__force iwl_ucode_tlv_api_t)66,
        IWL_UCODE_TLV_API_INT_DBG_BUF_CLEAR     = (__force iwl_ucode_tlv_api_t)67,
+       IWL_UCODE_TLV_API_SMART_FIFO_OFFLOAD    = (__force iwl_ucode_tlv_api_t)68,
 
        NUM_IWL_UCODE_TLV_API
 /*
index 30d4233595e889fce6bd7b3bf08aff07d97adf7b..16285ae7cae95b5bbca983d58c47a5293b7f7ccd 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
 /*
- * Copyright (C) 2013-2014, 2018-2019, 2022-2023 Intel Corporation
+ * Copyright (C) 2013-2014, 2018-2019, 2022-2024 Intel Corporation
  * Copyright (C) 2013-2014 Intel Mobile Communications GmbH
  */
 #include "mvm.h"
@@ -232,6 +232,9 @@ int iwl_mvm_sf_update(struct iwl_mvm *mvm, struct ieee80211_vif *changed_vif,
        };
        struct ieee80211_sta *sta = NULL;
 
+       if (fw_has_api(&mvm->fw->ucode_capa,
+                      IWL_UCODE_TLV_API_SMART_FIFO_OFFLOAD))
+               return 0;
        /*
         * Ignore the call if we are in HW Restart flow, or if the handled
         * vif is a p2p device.