summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2014-10-14 00:55:24 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2014-10-14 02:18:27 +0200
commite5ead669a3de3cc822f19b7289932ffbf9664328 (patch)
tree06400f16c4c3802a10cb5a88fba17ed972317b28 /drivers/net/wireless
parentwireless: ipw2x00: print SSID via %*pE (diff)
downloadlinux-e5ead669a3de3cc822f19b7289932ffbf9664328.tar.xz
linux-e5ead669a3de3cc822f19b7289932ffbf9664328.zip
wireless: hostap: proc: print properly escaped SSID
Instead of substituting non-printable characters by '_' let's print SSID properly escaped by using recently added %*pE specifier. [akpm@linux-foundation.org: fix printk type warning] [akpm@linux-foundation.org: remove now-unused local `i'] Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: "John W . Linville" <linville@tuxdriver.com> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/hostap/hostap_proc.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/wireless/hostap/hostap_proc.c b/drivers/net/wireless/hostap/hostap_proc.c
index 8efd17c52f65..dd84557cf957 100644
--- a/drivers/net/wireless/hostap/hostap_proc.c
+++ b/drivers/net/wireless/hostap/hostap_proc.c
@@ -168,7 +168,6 @@ static int prism2_bss_list_proc_show(struct seq_file *m, void *v)
local_info_t *local = m->private;
struct list_head *ptr = v;
struct hostap_bss_info *bss;
- int i;
if (ptr == &local->bss_list) {
seq_printf(m, "#BSSID\tlast_update\tcount\tcapab_info\tSSID(txt)\t"
@@ -181,9 +180,7 @@ static int prism2_bss_list_proc_show(struct seq_file *m, void *v)
bss->bssid, bss->last_update,
bss->count, bss->capab_info);
- for (i = 0; i < bss->ssid_len; i++)
- seq_putc(m,bss->ssid[i] >= 32 && bss->ssid[i] < 127 ?
- bss->ssid[i] : '_');
+ seq_printf(m, "%*pE", (int)bss->ssid_len, bss->ssid);
seq_putc(m, '\t');
seq_printf(m, "%*phN", (int)bss->ssid_len, bss->ssid);