diff mbox series

[1/2,SRU,OEM-5.17] iwlwifi: yoyo: fix DBGC allocation flow

Message ID 20220620103527.463475-2-vicamo.yang@canonical.com
State New
Headers show
Series Intel iwlwifi AX211: WRT: Failed to set DRAM buffer for alloc id 1, ret=-1 | expand

Commit Message

You-Sheng Yang June 20, 2022, 10:35 a.m. UTC
From: Rotem Saado <rotem.saado@intel.com>

BugLink: https://bugs.launchpad.net/bugs/1979182

number of DBGCs and number of fragments per DBGC
is hw family dependency and not capability.

Signed-off-by: Rotem Saado <rotem.saado@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20220129105618.209c6fe4364a.I5b21769d297d6fcfafc58ddf1db87d88349fe06f@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
(cherry picked from commit ab23da483bd79df414edd652acb5350b1acde566)
Signed-off-by: You-Sheng Yang (vicamo) <vicamo.yang@canonical.com>
---
 drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c b/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c
index 901600ca6f0e..16f60a9b880e 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c
@@ -577,8 +577,7 @@  static int iwl_dbg_tlv_alloc_fragments(struct iwl_fw_runtime *fwrt,
 		return 0;
 
 	num_frags = le32_to_cpu(fw_mon_cfg->max_frags_num);
-	if (!fw_has_capa(&fwrt->fw->ucode_capa,
-			 IWL_UCODE_TLV_CAPA_DBG_BUF_ALLOC_CMD_SUPP)) {
+	if (fwrt->trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_AX210) {
 		if (alloc_id != IWL_FW_INI_ALLOCATION_ID_DBGC1)
 			return -EIO;
 		num_frags = 1;