]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
iwlwifi: dbg_ini: apply rx fifo offset after reading the region registers
authorShahar S Matityahu <shahar.s.matityahu@intel.com>
Tue, 19 Feb 2019 13:34:09 +0000 (15:34 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Wed, 3 Apr 2019 08:20:02 +0000 (11:20 +0300)
The region registers comes in abolute value so read the registers before
applying the rx fifo offset.

Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/fw/dbg.c

index 95804feaeb754cba21c60d28223cb7b6ae80b339..f3f00bc9fb48baf5a28faeae547c2274adff64b3 100644 (file)
@@ -1347,8 +1347,6 @@ static int iwl_dump_ini_rxf_iter(struct iwl_fw_runtime *fwrt,
        if (!iwl_trans_grab_nic_access(fwrt->trans, &flags))
                return -EBUSY;
 
-       offs += rxf_data.offset;
-
        range->fifo_num = cpu_to_le32(rxf_data.fifo_num);
        range->num_of_registers = reg->fifos.num_of_registers;
        range->range_data_size = cpu_to_le32(rxf_data.size + registers_size);
@@ -1372,6 +1370,12 @@ static int iwl_dump_ini_rxf_iter(struct iwl_fw_runtime *fwrt,
                goto out;
        }
 
+       /*
+        * region register have absolute value so apply rxf offset after
+        * reading the registers
+        */
+       offs += rxf_data.offset;
+
        /* Lock fence */
        iwl_write_prph_no_grab(fwrt->trans, RXF_SET_FENCE_MODE + offs, 0x1);
        /* Set fence pointer to the same place like WR pointer */