aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-05-03 05:30:23 -0400
committerJohannes Berg <johannes.berg@intel.com>2013-05-13 12:15:38 -0400
commitce7f9ab381ea1cc4514f462d18a15785de050323 (patch)
tree5e0852773f26edf1b8ab4d63c520b73f9dc35ce4 /drivers/net
parentb415210b3a36c414dec646104adf84d3b78d9f99 (diff)
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>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/debugfs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/iwlwifi/mvm/debugfs.c
index 2053dccefcd6..a12c98be8616 100644
--- a/drivers/net/wireless/iwlwifi/mvm/debugfs.c
+++ b/drivers/net/wireless/iwlwifi/mvm/debugfs.c
@@ -147,10 +147,11 @@ static ssize_t iwl_dbgfs_sram_read(struct file *file, char __user *user_buf,
147 147
148 /* default is to dump the entire data segment */ 148 /* default is to dump the entire data segment */
149 if (!mvm->dbgfs_sram_offset && !mvm->dbgfs_sram_len) { 149 if (!mvm->dbgfs_sram_offset && !mvm->dbgfs_sram_len) {
150 mvm->dbgfs_sram_offset = 0x800000;
151 if (!mvm->ucode_loaded) 150 if (!mvm->ucode_loaded)
152 return -EINVAL; 151 return -EINVAL;
153 img = &mvm->fw->img[mvm->cur_ucode]; 152 img = &mvm->fw->img[mvm->cur_ucode];
153 mvm->dbgfs_sram_offset =
154 img->sec[IWL_UCODE_SECTION_DATA].offset;
154 mvm->dbgfs_sram_len = img->sec[IWL_UCODE_SECTION_DATA].len; 155 mvm->dbgfs_sram_len = img->sec[IWL_UCODE_SECTION_DATA].len;
155 } 156 }
156 len = mvm->dbgfs_sram_len; 157 len = mvm->dbgfs_sram_len;