aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
diff options
context:
space:
mode:
authorGravatar Johannes Berg <johannes.berg@intel.com> 2019-11-26 11:25:28 +0100
committerGravatar Luca Coelho <luciano.coelho@intel.com> 2020-03-27 08:12:53 +0200
commit84acc85a62a171de98706b9b2cc73a660088314a (patch)
tree55b715c512aaf06b61485279082c86a78baadec9 /drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
parentiwlwifi: pcie: make iwl_pcie_cmdq_reclaim static (diff)
downloadlinux-84acc85a62a171de98706b9b2cc73a660088314a.tar.gz
linux-84acc85a62a171de98706b9b2cc73a660088314a.tar.bz2
linux-84acc85a62a171de98706b9b2cc73a660088314a.zip
iwlwifi: mvm: remove newline from rs_pretty_print_rate()
Some of the places using this want the newline, but not all, so remove the newline from it and generate it in the debugfs files where it's desired. The effect of this is not printing double newlines in debug log messages. Change-Id: Ia59b0abbef16b6783fcabc095c5fde16bd047a26 Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
index 190cf15b825c..3beef8d077b8 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
@@ -461,6 +461,8 @@ static ssize_t iwl_dbgfs_rs_data_read(struct file *file, char __user *user_buf,
desc += rs_pretty_print_rate(buff + desc, bufsz - desc,
lq_sta->last_rate_n_flags);
+ if (desc < bufsz - 1)
+ buff[desc++] = '\n';
mutex_unlock(&mvm->mutex);
ret = simple_read_from_buffer(user_buf, count, ppos, buff, desc);
@@ -1013,6 +1015,8 @@ static ssize_t iwl_dbgfs_frame_stats_read(struct iwl_mvm *mvm,
(int)(ARRAY_SIZE(stats->last_rates) - i));
pos += rs_pretty_print_rate(pos, endpos - pos,
stats->last_rates[idx]);
+ if (pos < endpos - 1)
+ *pos++ = '\n';
}
spin_unlock_bh(&mvm->drv_stats_lock);