From: Emmanuel Grumbach Date: Mon, 6 Jan 2014 07:05:54 +0000 (+0200) Subject: iwlwifi: mvm: fix SRAM dump debugfs handler X-Git-Tag: v3.14-rc1~94^2~3^2^2~5^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=01e0efe3178dbeed1284e55b70a3160a279995b2;p=profile%2Fivi%2Fkernel-x86-ivi.git iwlwifi: mvm: fix SRAM dump debugfs handler If the length isn't set it means we want all the SRAM. Also - this is perfectly valid to partially dump starting at offset 0. Signed-off-by: Emmanuel Grumbach --- diff --git a/drivers/net/wireless/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/iwlwifi/mvm/debugfs.c index 76cdce9..369d4c9 100644 --- a/drivers/net/wireless/iwlwifi/mvm/debugfs.c +++ b/drivers/net/wireless/iwlwifi/mvm/debugfs.c @@ -135,7 +135,7 @@ static ssize_t iwl_dbgfs_sram_read(struct file *file, char __user *user_buf, ofs = img->sec[IWL_UCODE_SECTION_DATA].offset; len = img->sec[IWL_UCODE_SECTION_DATA].len; - if (!mvm->dbgfs_sram_offset && !mvm->dbgfs_sram_len) { + if (mvm->dbgfs_sram_len) { ofs = mvm->dbgfs_sram_offset; len = mvm->dbgfs_sram_len; }