linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libertas: don't depend on IEEE80211
@ 2008-03-26 12:24 Holger Schurig
  2008-03-26 14:14 ` Dan Williams
  2008-03-26 16:35 ` Holger Schurig
  0 siblings, 2 replies; 7+ messages in thread
From: Holger Schurig @ 2008-03-26 12:24 UTC (permalink / raw)
  To: libertas-dev; +Cc: Dan Williams, linux-wireless, John W. Linville

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>

Index: wireless-testing/drivers/net/wireless/Kconfig
===================================================================
--- wireless-testing.orig/drivers/net/wireless/Kconfig	2008-03-26 12:13:45.000000000 +0100
+++ wireless-testing/drivers/net/wireless/Kconfig	2008-03-26 12:14:07.000000000 +0100
@@ -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
===================================================================
--- wireless-testing.orig/drivers/net/wireless/libertas/decl.h	2008-03-26 12:13:44.000000000 +0100
+++ wireless-testing/drivers/net/wireless/libertas/decl.h	2008-03-26 12:16:33.000000000 +0100
@@ -71,4 +71,9 @@ int lbs_stop_card(struct lbs_private *pr
 void 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
===================================================================
--- wireless-testing.orig/drivers/net/wireless/libertas/main.c	2008-03-26 12:14:07.000000000 +0100
+++ wireless-testing/drivers/net/wireless/libertas/main.c	2008-03-26 12:15:47.000000000 +0100
@@ -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);

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] libertas: don't depend on IEEE80211
  2008-03-26 12:24 [PATCH] libertas: don't depend on IEEE80211 Holger Schurig
@ 2008-03-26 14:14 ` Dan Williams
  2008-03-26 16:35 ` Holger Schurig
  1 sibling, 0 replies; 7+ messages in thread
From: Dan Williams @ 2008-03-26 14:14 UTC (permalink / raw)
  To: Holger Schurig; +Cc: libertas-dev, linux-wireless, John W. Linville

On Wed, 2008-03-26 at 13:24 +0100, Holger Schurig wrote:
> 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>

> Index: wireless-testing/drivers/net/wireless/Kconfig
> ===================================================================
> --- wireless-testing.orig/drivers/net/wireless/Kconfig	2008-03-26 12:13:45.000000000 +0100
> +++ wireless-testing/drivers/net/wireless/Kconfig	2008-03-26 12:14:07.000000000 +0100
> @@ -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
> ===================================================================
> --- wireless-testing.orig/drivers/net/wireless/libertas/decl.h	2008-03-26 12:13:44.000000000 +0100
> +++ wireless-testing/drivers/net/wireless/libertas/decl.h	2008-03-26 12:16:33.000000000 +0100
> @@ -71,4 +71,9 @@ int lbs_stop_card(struct lbs_private *pr
>  void 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
> ===================================================================
> --- wireless-testing.orig/drivers/net/wireless/libertas/main.c	2008-03-26 12:14:07.000000000 +0100
> +++ wireless-testing/drivers/net/wireless/libertas/main.c	2008-03-26 12:15:47.000000000 +0100
> @@ -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);


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] libertas: don't depend on IEEE80211
  2008-03-26 12:24 [PATCH] libertas: don't depend on IEEE80211 Holger Schurig
  2008-03-26 14:14 ` Dan Williams
@ 2008-03-26 16:35 ` Holger Schurig
  2008-03-26 16:56   ` [PATCH, take 2] " Holger Schurig
  2008-03-26 17:37   ` [PATCH] " Dan Williams
  1 sibling, 2 replies; 7+ messages in thread
From: Holger Schurig @ 2008-03-26 16:35 UTC (permalink / raw)
  To: libertas-dev; +Cc: Dan Williams, linux-wireless, John W. Linville

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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH, take 2] libertas: don't depend on IEEE80211
  2008-03-26 16:35 ` Holger Schurig
@ 2008-03-26 16:56   ` Holger Schurig
  2008-03-27 11:17     ` Dan Williams
  2008-03-26 17:37   ` [PATCH] " Dan Williams
  1 sibling, 1 reply; 7+ messages in thread
From: Holger Schurig @ 2008-03-26 16:56 UTC (permalink / raw)
  To: libertas-dev; +Cc: Dan Williams, linux-wireless, John W. Linville

[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.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>

---

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
===================================================================
--- wireless-testing.orig/drivers/net/wireless/Kconfig	2008-03-26 16:45:21.000000000 +0100
+++ wireless-testing/drivers/net/wireless/Kconfig	2008-03-26 16:46:43.000000000 +0100
@@ -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
===================================================================
--- wireless-testing.orig/drivers/net/wireless/libertas/decl.h	2008-03-26 16:45:21.000000000 +0100
+++ wireless-testing/drivers/net/wireless/libertas/decl.h	2008-03-26 16:46:43.000000000 +0100
@@ -71,4 +71,9 @@ int lbs_stop_card(struct lbs_private *pr
 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: wireless-testing/drivers/net/wireless/libertas/main.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/libertas/main.c	2008-03-26 16:46:43.000000000 +0100
+++ wireless-testing/drivers/net/wireless/libertas/main.c	2008-03-26 16:46:58.000000000 +0100
@@ -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);

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] libertas: don't depend on IEEE80211
  2008-03-26 16:35 ` Holger Schurig
  2008-03-26 16:56   ` [PATCH, take 2] " Holger Schurig
@ 2008-03-26 17:37   ` Dan Williams
  2008-03-27  7:46     ` Holger Schurig
  1 sibling, 1 reply; 7+ messages in thread
From: Dan Williams @ 2008-03-26 17:37 UTC (permalink / raw)
  To: Holger Schurig; +Cc: libertas-dev, linux-wireless, John W. Linville

On Wed, 2008-03-26 at 17:35 +0100, Holger Schurig wrote:
> 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.

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] libertas: don't depend on IEEE80211
  2008-03-26 17:37   ` [PATCH] " Dan Williams
@ 2008-03-27  7:46     ` Holger Schurig
  0 siblings, 0 replies; 7+ messages in thread
From: Holger Schurig @ 2008-03-27  7:46 UTC (permalink / raw)
  To: Dan Williams; +Cc: linux-wireless, John W. Linville

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' 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.

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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH, take 2] libertas: don't depend on IEEE80211
  2008-03-26 16:56   ` [PATCH, take 2] " Holger Schurig
@ 2008-03-27 11:17     ` Dan Williams
  0 siblings, 0 replies; 7+ messages in thread
From: Dan Williams @ 2008-03-27 11:17 UTC (permalink / raw)
  To: Holger Schurig; +Cc: libertas-dev, linux-wireless, John W. Linville

On Wed, 2008-03-26 at 17:56 +0100, Holger Schurig wrote:
> [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.
> 
> Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>

Acked-by: Dan Williams <dcbw@redhat.com>

> ---
> 
> 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
> ===================================================================
> --- wireless-testing.orig/drivers/net/wireless/Kconfig	2008-03-26 16:45:21.000000000 +0100
> +++ wireless-testing/drivers/net/wireless/Kconfig	2008-03-26 16:46:43.000000000 +0100
> @@ -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
> ===================================================================
> --- wireless-testing.orig/drivers/net/wireless/libertas/decl.h	2008-03-26 16:45:21.000000000 +0100
> +++ wireless-testing/drivers/net/wireless/libertas/decl.h	2008-03-26 16:46:43.000000000 +0100
> @@ -71,4 +71,9 @@ int lbs_stop_card(struct lbs_private *pr
>  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: wireless-testing/drivers/net/wireless/libertas/main.c
> ===================================================================
> --- wireless-testing.orig/drivers/net/wireless/libertas/main.c	2008-03-26 16:46:43.000000000 +0100
> +++ wireless-testing/drivers/net/wireless/libertas/main.c	2008-03-26 16:46:58.000000000 +0100
> @@ -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);


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-03-27 11:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-26 12:24 [PATCH] libertas: don't depend on IEEE80211 Holger Schurig
2008-03-26 14:14 ` Dan Williams
2008-03-26 16:35 ` Holger Schurig
2008-03-26 16:56   ` [PATCH, take 2] " Holger Schurig
2008-03-27 11:17     ` Dan Williams
2008-03-26 17:37   ` [PATCH] " Dan Williams
2008-03-27  7:46     ` Holger Schurig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).