]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
iwlwifi: yoyo: align the write pointer to DWs
authorRotem Saado <rotem.saado@intel.com>
Wed, 9 Dec 2020 21:16:07 +0000 (23:16 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Wed, 9 Dec 2020 22:11:16 +0000 (00:11 +0200)
from AX210 generation the write pointer is in Bytes.
to be align with all previous HWs convert it DWs.

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.20201209231351.c9a9cbef4a09.Ic7df63c617f79b7e6a95a510c51b3516bba5599f@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/fw/dbg.c
drivers/net/wireless/intel/iwlwifi/pcie/trans.c

index 579c1929729eb19df40b4723d4572c1803de5278..185c1d893b5222ec24683a1acb04dd6bb57d331d 100644 (file)
@@ -1662,6 +1662,11 @@ iwl_dump_ini_mon_fill_header(struct iwl_fw_runtime *fwrt,
 
        data->write_ptr = iwl_get_mon_reg(fwrt, alloc_id,
                                          &addrs->write_ptr);
+       if (fwrt->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_AX210) {
+               u32 wrt_ptr = le32_to_cpu(data->write_ptr);
+
+               data->write_ptr = cpu_to_le32(wrt_ptr >> 2);
+       }
        data->cycle_cnt = iwl_get_mon_reg(fwrt, alloc_id,
                                          &addrs->cycle_cnt);
        data->cur_frag = iwl_get_mon_reg(fwrt, alloc_id,
index 2fffbbc8462fc82cdcfacb6c9b1099cfd6886c2e..44a14312b27d7e08ec1ab8b8ad8ce47a28f3ba7d 100644 (file)
@@ -3133,6 +3133,8 @@ iwl_trans_pcie_dump_pointers(struct iwl_trans *trans,
                fw_mon_data->fw_mon_base_high_ptr =
                        cpu_to_le32(iwl_read_prph(trans, base_high));
                write_ptr_val &= DBGC_CUR_DBGBUF_STATUS_OFFSET_MSK;
+               /* convert wrtPtr to DWs, to align with all HWs */
+               write_ptr_val >>= 2;
        }
        fw_mon_data->fw_mon_wr_ptr = cpu_to_le32(write_ptr_val);
 }