diff options
| author | Johannes Berg <[email protected]> | 2019-11-26 10:25:28 +0000 |
|---|---|---|
| committer | Luca Coelho <[email protected]> | 2020-03-27 06:12:53 +0000 |
| commit | 84acc85a62a171de98706b9b2cc73a660088314a (patch) | |
| tree | 55b715c512aaf06b61485279082c86a78baadec9 /drivers/net/wireless/intel/iwlwifi/mvm/rs.c | |
| parent | iwlwifi: pcie: make iwl_pcie_cmdq_reclaim static (diff) | |
| download | kernel-84acc85a62a171de98706b9b2cc73a660088314a.tar.gz kernel-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 <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/rs.c')
| -rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c index 1a990ed9c3ca..c1aba2bf73cf 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c @@ -3697,7 +3697,7 @@ int rs_pretty_print_rate(char *buf, int bufsz, const u32 rate) !(rate & RATE_MCS_HE_MSK)) { int index = iwl_hwrate_to_plcp_idx(rate); - return scnprintf(buf, bufsz, "Legacy | ANT: %s Rate: %s Mbps\n", + return scnprintf(buf, bufsz, "Legacy | ANT: %s Rate: %s Mbps", rs_pretty_ant(ant), index == IWL_RATE_INVALID ? "BAD" : iwl_rate_mcs[index].mbps); @@ -3740,7 +3740,7 @@ int rs_pretty_print_rate(char *buf, int bufsz, const u32 rate) } return scnprintf(buf, bufsz, - "0x%x: %s | ANT: %s BW: %s MCS: %d NSS: %d %s%s%s%s\n", + "0x%x: %s | ANT: %s BW: %s MCS: %d NSS: %d %s%s%s%s", rate, type, rs_pretty_ant(ant), bw, mcs, nss, (rate & RATE_MCS_SGI_MSK) ? "SGI " : "NGI ", (rate & RATE_MCS_STBC_MSK) ? "STBC " : "", @@ -3888,6 +3888,8 @@ static ssize_t rs_sta_dbgfs_scale_table_read(struct file *file, desc += scnprintf(buff + desc, bufsz - desc, " rate[%d] 0x%X ", i, r); desc += rs_pretty_print_rate(buff + desc, bufsz - desc, r); + if (desc < bufsz - 1) + buff[desc++] = '\n'; } ret = simple_read_from_buffer(user_buf, count, ppos, buff, desc); |
