wifi: iwlwifi: mvm: enable new MLD FW API
authorMiri Korenblit <miriam.rachel.korenblit@intel.com>
Fri, 14 Apr 2023 10:11:54 +0000 (13:11 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 14 Apr 2023 11:15:26 +0000 (13:15 +0200)
Enable the new FW API with MLD based on FW TLV.

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230414130637.5dc66b08539e.I1c65024c879346b0349e1e431d36ec2b5fd85dd7@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/fw/file.h
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h

index 34ef106a2274b1e2b7ab50562793273f1e76ec1c..b00174c9ebcec91958cc940ec1ca668852fc6821 100644 (file)
@@ -459,6 +459,7 @@ enum iwl_ucode_tlv_capa {
        IWL_UCODE_TLV_CAPA_SYNCED_TIME                  = (__force iwl_ucode_tlv_capa_t)106,
        IWL_UCODE_TLV_CAPA_TIME_SYNC_BOTH_FTM_TM        = (__force iwl_ucode_tlv_capa_t)108,
        IWL_UCODE_TLV_CAPA_BIGTK_TX_SUPPORT             = (__force iwl_ucode_tlv_capa_t)109,
+       IWL_UCODE_TLV_CAPA_MLD_API_SUPPORT              = (__force iwl_ucode_tlv_capa_t)110,
        IWL_UCODE_TLV_CAPA_SCAN_DONT_TOGGLE_ANT         = (__force iwl_ucode_tlv_capa_t)111,
 
 #ifdef __CHECKER__
index 76ac8a48071208ffc99e381d51d1b76281df57d0..42e67df13a1e2bc9031c183e4a8f0ce266741e0b 100644 (file)
@@ -1401,24 +1401,8 @@ static inline bool iwl_mvm_has_new_rx_api(struct iwl_mvm *mvm)
 
 static inline bool iwl_mvm_has_mld_api(const struct iwl_fw *fw)
 {
-       return (iwl_fw_lookup_cmd_ver(fw, LINK_CONFIG_CMD,
-                                     IWL_FW_CMD_VER_UNKNOWN) !=
-                               IWL_FW_CMD_VER_UNKNOWN) &&
-               (iwl_fw_lookup_cmd_ver(fw, MAC_CONFIG_CMD,
-                                      IWL_FW_CMD_VER_UNKNOWN) !=
-                               IWL_FW_CMD_VER_UNKNOWN) &&
-               (iwl_fw_lookup_cmd_ver(fw, STA_CONFIG_CMD,
-                                      IWL_FW_CMD_VER_UNKNOWN) !=
-                               IWL_FW_CMD_VER_UNKNOWN) &&
-               (iwl_fw_lookup_cmd_ver(fw, AUX_STA_CMD,
-                                      IWL_FW_CMD_VER_UNKNOWN) !=
-                               IWL_FW_CMD_VER_UNKNOWN) &&
-               (iwl_fw_lookup_cmd_ver(fw, STA_REMOVE_CMD,
-                                      IWL_FW_CMD_VER_UNKNOWN) !=
-                               IWL_FW_CMD_VER_UNKNOWN) &&
-               (iwl_fw_lookup_cmd_ver(fw, STA_DISABLE_TX_CMD,
-                                      IWL_FW_CMD_VER_UNKNOWN) !=
-                               IWL_FW_CMD_VER_UNKNOWN);
+       return fw_has_capa(&fw->ucode_capa,
+                          IWL_UCODE_TLV_CAPA_MLD_API_SUPPORT);
 }
 
 static inline bool iwl_mvm_has_new_tx_api(struct iwl_mvm *mvm)