diff options
author | John W. Linville <linville@tuxdriver.com> | 2008-09-30 20:59:05 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-10-31 19:00:50 -0400 |
commit | 9387b7caf3049168fc97a8a9111af8fe2143af18 (patch) | |
tree | 6a19e5477d6a6badf19788536a9d3e1913ae48e1 /net/wireless | |
parent | 2819f8ad6da1e24b5dd94a221978e61f2a9c972a (diff) |
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')
-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); | |||
19 | MODULE_AUTHOR("John W. Linville <linville@tuxdriver.com>"); | 19 | MODULE_AUTHOR("John W. Linville <linville@tuxdriver.com>"); |
20 | MODULE_LICENSE("GPL"); | 20 | MODULE_LICENSE("GPL"); |
21 | 21 | ||
22 | const char *escape_ssid(const char *ssid, u8 ssid_len) | 22 | const char *print_ssid(char *buf, const char *ssid, u8 ssid_len) |
23 | { | 23 | { |
24 | static char escaped[IEEE80211_MAX_SSID_LEN * 4 + 1]; | ||
25 | const char *s = ssid; | 24 | const char *s = ssid; |
26 | char *d = escaped; | 25 | char *d = buf; |
27 | 26 | ||
28 | ssid_len = min_t(u8, ssid_len, IEEE80211_MAX_SSID_LEN); | 27 | ssid_len = min_t(u8, ssid_len, IEEE80211_MAX_SSID_LEN); |
29 | while (ssid_len--) { | 28 | while (ssid_len--) { |
@@ -48,9 +47,9 @@ const char *escape_ssid(const char *ssid, u8 ssid_len) | |||
48 | s++; | 47 | s++; |
49 | } | 48 | } |
50 | *d = '\0'; | 49 | *d = '\0'; |
51 | return escaped; | 50 | return buf; |
52 | } | 51 | } |
53 | EXPORT_SYMBOL(escape_ssid); | 52 | EXPORT_SYMBOL(print_ssid); |
54 | 53 | ||
55 | static int __init ieee80211_init(void) | 54 | static int __init ieee80211_init(void) |
56 | { | 55 | { |