libertas: don't depend on IEEE80211
PATCH 1/1 libertas: don't depend on IEEE80211
Runtime-wise we only need escape_ssid from the deprecated IEEE80211 subsystem. However, it's easy to provide our own copy.
drivers/net/wireless/Kconfig +0 -1
@@ -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.
drivers/net/wireless/libertas/decl.h +5 -0
@@ -71,4 +71,9 @@ int lbs_stop_card(struct lbs_private *prvoid lbs_host_to_card_done (struct lbs_private *priv);int lbs_update_channel (struct lbs_private *priv); + +#if !defined(CONFIG_IEEE80211 ) && defined(CONFIG_LIBERTAS_DEBUG ) +const char *escape_essid (const char *essid,u8 essid_len); +#endif +#endif
drivers/net/wireless/libertas/main.c +27 -0
@@ -1559,6 +1559,33 @@ out:return ret; } +#if !defined(CONFIG_IEEE80211 ) && defined(CONFIG_LIBERTAS_DEBUG ) +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; +} +EXPORT_SYMBOL (escape_essid); +#endif module_init (lbs_init_module);module_exit (lbs_exit_module);
Quoted 4 lines · Holger Schurig
Runtime-wise we only need
escape_ssidfrom the deprecated IEEE80211 subsystem. However, it's easy to provide our own copy.Signed-off-by Holger Schurig <[email protected]>
Quoted 64 lines
Index: wireless-testing/drivers/net/wireless/Kconfig
===================================================================drivers/net/wireless/Kconfig +0
-1@@ -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:
wireless-testing/drivers/net/wireless/libertas/decl.h
===================================================================drivers/net/wireless/libertas/decl.h +5
-0@@ -71,4 +71,9 @@ int lbs_stop_card(struct lbs_private *prvoid lbs_host_to_card_done (struct lbs_private *priv);int lbs_update_channel (struct lbs_private *priv); + +#if !defined(CONFIG_IEEE80211 ) && defined(CONFIG_LIBERTAS_DEBUG ) +const char *escape_essid (const char *essid,u8 essid_len); +#endif +#endif Index:
wireless-testing/drivers/net/wireless/libertas/main.c
===================================================================drivers/net/wireless/libertas/main.c +27
-0@@ -1559,6 +1559,33 @@ out:return ret; } +#if !defined(CONFIG_IEEE80211 ) && defined(CONFIG_LIBERTAS_DEBUG ) +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; +} +EXPORT_SYMBOL (escape_essid); +#endif module_init (lbs_init_module);module_exit (lbs_exit_module);
John, please wait with applying this. I just saw that escape_essid is also used in debugfs.c, even when CONFIG_LIBERTAS_DEBUG is off.
[PATCH] libertas: don't depend on IEEE80211
Runtime-wise we only need escape_ssid from the deprecated IEEE80211 subsystem. However, it's easy to provide our own copy.
---
The previous patch also exported this as GPL. However, there is no need to to is. Actually there is no need to export this at all. It's only used inside libertas.ko.
drivers/net/wireless/Kconfig +0 -1
@@ -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.
drivers/net/wireless/libertas/decl.h +5 -0
@@ -71,4 +71,9 @@ int lbs_stop_card(struct lbs_private *prvoid 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
drivers/net/wireless/libertas/main.c +26 -0
@@ -1565,6 +1565,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);
Dan Williams
Acked-byQuoted 6 lines · Holger Schurig
[PATCH] libertas: don't depend on IEEE80211
Runtime-wise we only need
escape_ssidfrom the deprecated IEEE80211 subsystem. However, it's easy to provide our own copy.Signed-off-by Holger Schurig <[email protected]>
Quoted 69 lines
---
The previous patch also exported this as GPL. However, there is no need to to is. Actually there is no need to export this at all. It's only used inside libertas.ko.
Index: wireless-testing/drivers/net/wireless/Kconfig
===================================================================drivers/net/wireless/Kconfig +0
-1@@ -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:
wireless-testing/drivers/net/wireless/libertas/decl.h
===================================================================drivers/net/wireless/libertas/decl.h +5
-0@@ -71,4 +71,9 @@ int lbs_stop_card(struct lbs_private *prvoid 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:
wireless-testing/drivers/net/wireless/libertas/main.c
===================================================================drivers/net/wireless/libertas/main.c +26
-0@@ -1565,6 +1565,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);
Quoted 3 lines · Holger Schurig
John, please wait with applying this. I just saw that
escape_essidis also used indebugfs.c, even whenCONFIG_LIBERTAS_DEBUGis off.
Yeah, but from lbs_getscantable() which is utterly pointless since the only thing it provides beyond 'iwlist eth1 scan' is CAP_SPECTRUM_MGMT, which if people really care, we can shove out in custom WEXT scan result
tags. I'd just kill lbs_getscantable() completely.
Dan
Quoted 5 lines · On Wednesday 26 March 2008 18:37:54 Dan Williams wrote:
Yeah, but from
lbs_getscantable()which is utterly pointless since the only thing it provides beyond 'iwlist eth1 scan' isCAP_SPECTRUM_MGMT, which if people really care, we can shove
out in custom WEXT scan result tags. I'd just killlbs_getscantable()completely.
That is the only thing from debugfs that I regularly "cat". The reason is that I get the current version, if I do "iwlist eth1 scan", I get a new version of what's there.