linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/3] ath5k: Add build option to enable hardware encryption
@ 2008-02-01 13:37 Luis R. Rodriguez
  2008-02-02  2:34 ` bruno randolf
  0 siblings, 1 reply; 4+ messages in thread
From: Luis R. Rodriguez @ 2008-02-01 13:37 UTC (permalink / raw)
  To: linville; +Cc: ath5k-devel, linux-wireless, bruno, jirislaby, mickflemm

Add an option to enable hardware encryption (CONFIG_ATH5K_HARDWARE_ENC)
and disable it by default. This will enforce software encryption
for WEP, WPA (TKIP) and WPA2 (CCMP) until we fix hardware encryption.

Changes-licensed-under: 3-clause-BSD
Signed-off-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
---
 drivers/net/wireless/ath5k/Kconfig |   14 ++++++++++++++
 drivers/net/wireless/ath5k/base.c  |    3 +++
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/ath5k/Kconfig b/drivers/net/wireless/ath5k/Kconfig
index 31d570e..5e75328 100644
--- a/drivers/net/wireless/ath5k/Kconfig
+++ b/drivers/net/wireless/ath5k/Kconfig
@@ -15,9 +15,23 @@ config ATH5K
 	  If you choose to build a module, it'll be called ath5k. Say M if
 	  unsure.
 
+config ATH5K_HARDWARE_ENC
+	bool "Atheros 5xxx hardware encryption"
+	depends on ATH5K
+	default n
+	---help---
+	  Atheros 5xxx hardware encryption.
+
+	  Say N for now unless you are a developer who wants to fix
+	  hardware encryption. Hardware encryption doesn't work yet.
+	  Disabling this will let you use software encrption in the
+	  meantime, this gives you support for WEP, WPA (TKIP) and
+	  WPA2 (CCMP) through mac80211 software encryption.
+
 config ATH5K_DEBUG
 	bool "Atheros 5xxx debugging"
 	depends on ATH5K
+	default n
 	---help---
 	  Atheros 5xxx debugging messages.
 
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c
index 9f2c30b..a83a548 100644
--- a/drivers/net/wireless/ath5k/base.c
+++ b/drivers/net/wireless/ath5k/base.c
@@ -2921,7 +2921,10 @@ ath5k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
 
 	switch(key->alg) {
 	case ALG_WEP:
+/* XXX: fix hardware encryption, its not working */
+#ifdef CONFIG_ATH5K_HARDWARE_ENC
 		break;
+#endif /* CONFIG_ATH5K_HARDWARE_ENC */
 	case ALG_TKIP:
 	case ALG_CCMP:
 		return -EOPNOTSUPP;
-- 
1.5.3.7


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

* Re: [PATCH 3/3] ath5k: Add build option to enable hardware encryption
  2008-02-01 13:37 [PATCH 3/3] ath5k: Add build option to enable hardware encryption Luis R. Rodriguez
@ 2008-02-02  2:34 ` bruno randolf
  2008-02-02 18:41   ` Luis R. Rodriguez
  0 siblings, 1 reply; 4+ messages in thread
From: bruno randolf @ 2008-02-02  2:34 UTC (permalink / raw)
  To: Luis R. Rodriguez
  Cc: linville, ath5k-devel, linux-wireless, jirislaby, mickflemm

On Friday 01 February 2008 22:37:31 Luis R. Rodriguez wrote:
> Add an option to enable hardware encryption (CONFIG_ATH5K_HARDWARE_ENC)
> and disable it by default. This will enforce software encryption
> for WEP, WPA (TKIP) and WPA2 (CCMP) until we fix hardware encryption.
>
> Changes-licensed-under: 3-clause-BSD
> Signed-off-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
> ---
>  drivers/net/wireless/ath5k/Kconfig |   14 ++++++++++++++
>  drivers/net/wireless/ath5k/base.c  |    3 +++
>  2 files changed, 17 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/wireless/ath5k/Kconfig
> b/drivers/net/wireless/ath5k/Kconfig index 31d570e..5e75328 100644
> --- a/drivers/net/wireless/ath5k/Kconfig
> +++ b/drivers/net/wireless/ath5k/Kconfig
> @@ -15,9 +15,23 @@ config ATH5K
>  	  If you choose to build a module, it'll be called ath5k. Say M if
>  	  unsure.
>
> +config ATH5K_HARDWARE_ENC
> +	bool "Atheros 5xxx hardware encryption"
> +	depends on ATH5K
> +	default n
> +	---help---
> +	  Atheros 5xxx hardware encryption.
> +
> +	  Say N for now unless you are a developer who wants to fix
> +	  hardware encryption. Hardware encryption doesn't work yet.
> +	  Disabling this will let you use software encrption in the
> +	  meantime, this gives you support for WEP, WPA (TKIP) and
> +	  WPA2 (CCMP) through mac80211 software encryption.
> +
>  config ATH5K_DEBUG
>  	bool "Atheros 5xxx debugging"
>  	depends on ATH5K
> +	default n
>  	---help---
>  	  Atheros 5xxx debugging messages.
>
> diff --git a/drivers/net/wireless/ath5k/base.c
> b/drivers/net/wireless/ath5k/base.c index 9f2c30b..a83a548 100644
> --- a/drivers/net/wireless/ath5k/base.c
> +++ b/drivers/net/wireless/ath5k/base.c
> @@ -2921,7 +2921,10 @@ ath5k_set_key(struct ieee80211_hw *hw, enum
> set_key_cmd cmd,
>
>  	switch(key->alg) {
>  	case ALG_WEP:
> +/* XXX: fix hardware encryption, its not working */
> +#ifdef CONFIG_ATH5K_HARDWARE_ENC
>  		break;
> +#endif /* CONFIG_ATH5K_HARDWARE_ENC */
>  	case ALG_TKIP:
>  	case ALG_CCMP:
>  		return -EOPNOTSUPP;

hi luis!

i think this is pretty much overkill. why would anyone say Y to that? 
wouldn't it suffice to add that comment to the code and not bother the users?
developers would work on the code anyways.

bruno

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

* Re: [PATCH 3/3] ath5k: Add build option to enable hardware encryption
  2008-02-02  2:34 ` bruno randolf
@ 2008-02-02 18:41   ` Luis R. Rodriguez
  2008-02-02 23:38     ` Luis R. Rodriguez
  0 siblings, 1 reply; 4+ messages in thread
From: Luis R. Rodriguez @ 2008-02-02 18:41 UTC (permalink / raw)
  To: bruno randolf; +Cc: linville, ath5k-devel, linux-wireless, jirislaby, mickflemm

On Feb 1, 2008 9:34 PM, bruno randolf <bruno@thinktube.com> wrote:

> hi luis!
>
> i think this is pretty much overkill. why would anyone say Y to that?
> wouldn't it suffice to add that comment to the code and not bother the users?
> developers would work on the code anyways.

I am not sure if encryption is going to work similar in later
chipsets, this would allow an easy way for developers/distributions
tell users to say yes there for chipsets we know it works for, for
other chipsets people can say no. If we're sure its the same across
chipsets then lets not apply it but I am not sure of that. Anyone?

  Luis

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

* Re: [PATCH 3/3] ath5k: Add build option to enable hardware encryption
  2008-02-02 18:41   ` Luis R. Rodriguez
@ 2008-02-02 23:38     ` Luis R. Rodriguez
  0 siblings, 0 replies; 4+ messages in thread
From: Luis R. Rodriguez @ 2008-02-02 23:38 UTC (permalink / raw)
  To: bruno randolf; +Cc: linville, ath5k-devel, linux-wireless, jirislaby, mickflemm

On Feb 2, 2008 1:41 PM, Luis R. Rodriguez <mcgrof@winlab.rutgers.edu> wrote:
> On Feb 1, 2008 9:34 PM, bruno randolf <bruno@thinktube.com> wrote:
>
> > hi luis!
> >
> > i think this is pretty much overkill. why would anyone say Y to that?
> > wouldn't it suffice to add that comment to the code and not bother the users?
> > developers would work on the code anyways.
>
> I am not sure if encryption is going to work similar in later
> chipsets, this would allow an easy way for developers/distributions
> tell users to say yes there for chipsets we know it works for, for
> other chipsets people can say no. If we're sure its the same across
> chipsets then lets not apply it but I am not sure of that. Anyone?

On second thought this hasn't happened yet so we can do so if it does later.

  Luis

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

end of thread, other threads:[~2008-02-02 23:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-01 13:37 [PATCH 3/3] ath5k: Add build option to enable hardware encryption Luis R. Rodriguez
2008-02-02  2:34 ` bruno randolf
2008-02-02 18:41   ` Luis R. Rodriguez
2008-02-02 23:38     ` Luis R. Rodriguez

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