diff options
author | John W. Linville <linville@tuxdriver.com> | 2008-10-01 02:59:05 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-11-01 00:00:50 +0100 |
commit | 9387b7caf3049168fc97a8a9111af8fe2143af18 (patch) | |
tree | 6a19e5477d6a6badf19788536a9d3e1913ae48e1 /net/wireless/lib80211.c | |
parent | wireless: escape_ssid should handle non-printables (diff) | |
download | linux-9387b7caf3049168fc97a8a9111af8fe2143af18.tar.xz linux-9387b7caf3049168fc97a8a9111af8fe2143af18.zip |
wireless: use individual buffers for printing ssid values
Also change escape_ssid to print_ssid to match print_mac semantics.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/lib80211.c')
-rw-r--r-- | net/wireless/lib80211.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/net/wireless/lib80211.c b/net/wireless/lib80211.c index b8e34d31e757..e71f7d085621 100644 --- a/net/wireless/lib80211.c +++ b/net/wireless/lib80211.c @@ -19,11 +19,10 @@ MODULE_DESCRIPTION(DRV_DESCRIPTION); MODULE_AUTHOR("John W. Linville <linville@tuxdriver.com>"); MODULE_LICENSE("GPL"); -const char *escape_ssid(const char *ssid, u8 ssid_len) +const char *print_ssid(char *buf, const char *ssid, u8 ssid_len) { - static char escaped[IEEE80211_MAX_SSID_LEN * 4 + 1]; const char *s = ssid; - char *d = escaped; + char *d = buf; ssid_len = min_t(u8, ssid_len, IEEE80211_MAX_SSID_LEN); while (ssid_len--) { @@ -48,9 +47,9 @@ const char *escape_ssid(const char *ssid, u8 ssid_len) s++; } *d = '\0'; - return escaped; + return buf; } -EXPORT_SYMBOL(escape_ssid); +EXPORT_SYMBOL(print_ssid); static int __init ieee80211_init(void) { |