2022-11-02 15:04:25

by Greenman, Gregory

[permalink] [raw]
Subject: [PATCH 05/11] wifi: iwlwifi: dbg: use bit of DRAM alloc ID to store failed allocs

From: Rotem Saado <[email protected]>

The failed_alloc variable is used as a bitmask in the loop where we
check DRAM allocations. But erroneously, we were clearing the DRAM
alloc IDs we removed as an integer.

Fix that by clearing them as bits instead.

Signed-off-by: Rotem Saado <[email protected]>
Signed-off-by: Gregory Greenman <[email protected]>
---
drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c b/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c
index cd7a84c553e9..6d6c12999645 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c
@@ -1327,7 +1327,7 @@ static void iwl_dbg_tlv_init_cfg(struct iwl_fw_runtime *fwrt)
"WRT: removing allocation id %d from region id %d\n",
le32_to_cpu(reg->dram_alloc_id), i);

- failed_alloc &= ~le32_to_cpu(reg->dram_alloc_id);
+ failed_alloc &= ~BIT(le32_to_cpu(reg->dram_alloc_id));
fwrt->trans->dbg.unsupported_region_msk |= BIT(i);

kfree(*active_reg);
--
2.35.3