diff options
-rw-r--r-- | drivers/net/wireless/Kconfig | 1 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/decl.h | 5 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/main.c | 26 |
3 files changed, 31 insertions, 1 deletions
diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig index 9cba8ea58ca8..3c8cf682e9bd 100644 --- a/drivers/net/wireless/Kconfig +++ b/drivers/net/wireless/Kconfig | |||
@@ -271,7 +271,6 @@ config LIBERTAS | |||
271 | tristate "Marvell 8xxx Libertas WLAN driver support" | 271 | tristate "Marvell 8xxx Libertas WLAN driver support" |
272 | depends on WLAN_80211 | 272 | depends on WLAN_80211 |
273 | select WIRELESS_EXT | 273 | select WIRELESS_EXT |
274 | select IEEE80211 | ||
275 | select FW_LOADER | 274 | select FW_LOADER |
276 | ---help--- | 275 | ---help--- |
277 | A library for Marvell Libertas 8xxx devices. | 276 | A library for Marvell Libertas 8xxx devices. |
diff --git a/drivers/net/wireless/libertas/decl.h b/drivers/net/wireless/libertas/decl.h index cadc59d7f77f..1ca747b28ef5 100644 --- a/drivers/net/wireless/libertas/decl.h +++ b/drivers/net/wireless/libertas/decl.h | |||
@@ -71,4 +71,9 @@ int lbs_stop_card(struct lbs_private *priv); | |||
71 | void lbs_host_to_card_done(struct lbs_private *priv); | 71 | void lbs_host_to_card_done(struct lbs_private *priv); |
72 | 72 | ||
73 | int lbs_update_channel(struct lbs_private *priv); | 73 | int lbs_update_channel(struct lbs_private *priv); |
74 | |||
75 | #ifndef CONFIG_IEEE80211 | ||
76 | const char *escape_essid(const char *essid, u8 essid_len); | ||
77 | #endif | ||
78 | |||
74 | #endif | 79 | #endif |
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index efff63fb6b66..6c2af176da20 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c | |||
@@ -1559,6 +1559,32 @@ out: | |||
1559 | return ret; | 1559 | return ret; |
1560 | } | 1560 | } |
1561 | 1561 | ||
1562 | #ifndef CONFIG_IEEE80211 | ||
1563 | const char *escape_essid(const char *essid, u8 essid_len) | ||
1564 | { | ||
1565 | static char escaped[IW_ESSID_MAX_SIZE * 2 + 1]; | ||
1566 | const char *s = essid; | ||
1567 | char *d = escaped; | ||
1568 | |||
1569 | if (ieee80211_is_empty_essid(essid, essid_len)) { | ||
1570 | memcpy(escaped, "<hidden>", sizeof("<hidden>")); | ||
1571 | return escaped; | ||
1572 | } | ||
1573 | |||
1574 | essid_len = min(essid_len, (u8) IW_ESSID_MAX_SIZE); | ||
1575 | while (essid_len--) { | ||
1576 | if (*s == '\0') { | ||
1577 | *d++ = '\\'; | ||
1578 | *d++ = '0'; | ||
1579 | s++; | ||
1580 | } else { | ||
1581 | *d++ = *s++; | ||
1582 | } | ||
1583 | } | ||
1584 | *d = '\0'; | ||
1585 | return escaped; | ||
1586 | } | ||
1587 | #endif | ||
1562 | 1588 | ||
1563 | module_init(lbs_init_module); | 1589 | module_init(lbs_init_module); |
1564 | module_exit(lbs_exit_module); | 1590 | module_exit(lbs_exit_module); |