diff options
author | Brian Norris <briannorris@chromium.org> | 2017-01-09 15:33:50 -0800 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2017-01-17 14:03:32 +0200 |
commit | 6183468a23fc6b6903f8597982017ad2c7fdefcf (patch) | |
tree | 9eefc0b6f3ffe681d21d2e552ed053268e4f9825 | |
parent | ab99063f873749b3c3b1e5d44038559883465e74 (diff) |
mwifiex: debugfs: Fix (sometimes) off-by-1 SSID print
Similar to commit fcd2042e8d36 ("mwifiex: printk() overflow with 32-byte
SSIDs"), we failed to account for the existence of 32-char SSIDs in our
debugfs code. Unlike in that case though, we zeroed out the containing
struct first, and I'm pretty sure we're guaranteed to have some padding
after the 'ssid.ssid' and 'ssid.ssid_len' fields (the struct is 33 bytes
long).
So, this is the difference between:
# cat /sys/kernel/debug/mwifiex/mlan0/info
...
essid="0123456789abcdef0123456789abcdef "
...
and the correct output:
# cat /sys/kernel/debug/mwifiex/mlan0/info
...
essid="0123456789abcdef0123456789abcdef"
...
Fixes: 5e6e3a92b9a4 ("wireless: mwifiex: initial commit for Marvell mwifiex driver")
Signed-off-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>