mirror of https://gitee.com/openkylin/linux.git
iwlwifi: mvm: don't assume data section is at 0x800000
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>
This commit is contained in:
parent
b415210b3a
commit
ce7f9ab381
|
@ -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 */
|
/* default is to dump the entire data segment */
|
||||||
if (!mvm->dbgfs_sram_offset && !mvm->dbgfs_sram_len) {
|
if (!mvm->dbgfs_sram_offset && !mvm->dbgfs_sram_len) {
|
||||||
mvm->dbgfs_sram_offset = 0x800000;
|
|
||||||
if (!mvm->ucode_loaded)
|
if (!mvm->ucode_loaded)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
img = &mvm->fw->img[mvm->cur_ucode];
|
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;
|
mvm->dbgfs_sram_len = img->sec[IWL_UCODE_SECTION_DATA].len;
|
||||||
}
|
}
|
||||||
len = mvm->dbgfs_sram_len;
|
len = mvm->dbgfs_sram_len;
|
||||||
|
|
Loading…
Reference in New Issue