iwlwifi: mvm: don't assume data section is at 0x800000
authorJohannes Berg <johannes.berg@intel.com>
Fri, 3 May 2013 09:30:23 +0000 (11:30 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 13 May 2013 16:15:38 +0000 (18:15 +0200)
In theory, the firmware format allows changing the data section
offset. This may not be used today, but there's no reason for
the driver to assume the data section is always at 0x800000 as
it can know better.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/iwlwifi/mvm/debugfs.c

index 2053dccefcd6875060a13b45224344614971d5cb..a12c98be8616a6b0b9dc26255e21eb717be41646 100644 (file)
@@ -147,10 +147,11 @@ static ssize_t iwl_dbgfs_sram_read(struct file *file, char __user *user_buf,
 
        /* default is to dump the entire data segment */
        if (!mvm->dbgfs_sram_offset && !mvm->dbgfs_sram_len) {
-               mvm->dbgfs_sram_offset = 0x800000;
                if (!mvm->ucode_loaded)
                        return -EINVAL;
                img = &mvm->fw->img[mvm->cur_ucode];
+               mvm->dbgfs_sram_offset =
+                       img->sec[IWL_UCODE_SECTION_DATA].offset;
                mvm->dbgfs_sram_len = img->sec[IWL_UCODE_SECTION_DATA].len;
        }
        len = mvm->dbgfs_sram_len;
This page took 0.026044 seconds and 5 git commands to generate.