]> err.no Git - linux-2.6/commitdiff
libertas: don't depend on IEEE80211
authorHolger Schurig <hs4233@mail.mn-solutions.de>
Wed, 26 Mar 2008 16:56:26 +0000 (17:56 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 1 Apr 2008 21:13:17 +0000 (17:13 -0400)
Runtime-wise we only need escape_ssid from the deprecated IEEE80211
subsystem. However, it's easy to provide our own copy.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/Kconfig
drivers/net/wireless/libertas/decl.h
drivers/net/wireless/libertas/main.c

index 9cba8ea58ca8c59aa145d16678426ce842ae22ff..3c8cf682e9bdfb0c76c057371906e146354c3563 100644 (file)
@@ -271,7 +271,6 @@ config LIBERTAS
        tristate "Marvell 8xxx Libertas WLAN driver support"
        depends on WLAN_80211
        select WIRELESS_EXT
-       select IEEE80211
        select FW_LOADER
        ---help---
          A library for Marvell Libertas 8xxx devices.
index cadc59d7f77f58641c9ba8306a7fb7ed310f198f..1ca747b28ef5bec2496c681e5bb2604fe7878ea7 100644 (file)
@@ -71,4 +71,9 @@ int lbs_stop_card(struct lbs_private *priv);
 void lbs_host_to_card_done(struct lbs_private *priv);
 
 int lbs_update_channel(struct lbs_private *priv);
+
+#ifndef CONFIG_IEEE80211
+const char *escape_essid(const char *essid, u8 essid_len);
+#endif
+
 #endif
index efff63fb6b666b539b0ba637a3628afe2885f1cf..6c2af176da2095c68cd6685fe9f167cabc7d123e 100644 (file)
@@ -1559,6 +1559,32 @@ out:
        return ret;
 }
 
+#ifndef CONFIG_IEEE80211
+const char *escape_essid(const char *essid, u8 essid_len)
+{
+       static char escaped[IW_ESSID_MAX_SIZE * 2 + 1];
+       const char *s = essid;
+       char *d = escaped;
+
+       if (ieee80211_is_empty_essid(essid, essid_len)) {
+               memcpy(escaped, "<hidden>", sizeof("<hidden>"));
+               return escaped;
+       }
+
+       essid_len = min(essid_len, (u8) IW_ESSID_MAX_SIZE);
+       while (essid_len--) {
+               if (*s == '\0') {
+                       *d++ = '\\';
+                       *d++ = '0';
+                       s++;
+               } else {
+                       *d++ = *s++;
+               }
+       }
+       *d = '\0';
+       return escaped;
+}
+#endif
 
 module_init(lbs_init_module);
 module_exit(lbs_exit_module);