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>
This commit is contained in:
John W. Linville
2008-09-30 20:59:05 -04:00
parent 2819f8ad6d
commit 9387b7caf3
14 changed files with 168 additions and 106 deletions

View File

@ -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)
{