All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rt2x00: remove skb->do_not_encrypt usage
@ 2009-06-16 18:46 Ivo van Doorn
  2009-06-16 18:55 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Ivo van Doorn @ 2009-06-16 18:46 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Johannes Berg

From: Johannes Berg <johannes@sipsolutions.net>

Johannes is trying to get rid of the master netdev and in the process will
remove skb->do_not_encrypt field. This removes the do_not_encrypt
usage from rt2x00 to make the change easier.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
diff --git a/drivers/net/wireless/rt2x00/rt2x00crypto.c b/drivers/net/wireless/rt2x00/rt2x00crypto.c
index 57ab42c..3ef26f5 100644
--- a/drivers/net/wireless/rt2x00/rt2x00crypto.c
+++ b/drivers/net/wireless/rt2x00/rt2x00crypto.c
@@ -53,8 +53,7 @@ void rt2x00crypto_create_tx_descriptor(struct queue_entry *entry,
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(entry->skb);
 	struct ieee80211_key_conf *hw_key = tx_info->control.hw_key;
 
-	if (!test_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags) ||
-	    !hw_key || entry->skb->do_not_encrypt)
+	if (!test_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags) || !hw_key)
 		return;
 
 	__set_bit(ENTRY_TXD_ENCRYPT, &txdesc->flags);
@@ -82,8 +81,7 @@ unsigned int rt2x00crypto_tx_overhead(struct rt2x00_dev *rt2x00dev,
 	struct ieee80211_key_conf *key = tx_info->control.hw_key;
 	unsigned int overhead = 0;
 
-	if (!test_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags) ||
-	    !key || skb->do_not_encrypt)
+	if (!test_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags) || !key)
 		return overhead;
 
 	/*
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c
index c4c06b4..475a3ed 100644
--- a/drivers/net/wireless/rt2x00/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
@@ -73,7 +73,8 @@ static int rt2x00mac_tx_rts_cts(struct rt2x00_dev *rt2x00dev,
 	else
 		rts_info->flags &= ~IEEE80211_TX_CTL_NO_ACK;
 
-	skb->do_not_encrypt = 1;
+	/* Disable hardware encryption */
+	rts_info->control.hw_key = NULL;
 
 	/*
 	 * RTS/CTS frame should use the length of the frame plus any

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

* Re: [PATCH] rt2x00: remove skb->do_not_encrypt usage
  2009-06-16 18:46 [PATCH] rt2x00: remove skb->do_not_encrypt usage Ivo van Doorn
@ 2009-06-16 18:55 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2009-06-16 18:55 UTC (permalink / raw)
  To: Ivo van Doorn; +Cc: linville, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 2169 bytes --]

On Tue, 2009-06-16 at 20:46 +0200, Ivo van Doorn wrote:
> From: Johannes Berg <johannes@sipsolutions.net>
> 
> Johannes is trying to get rid of the master netdev and in the process will
> remove skb->do_not_encrypt field. This removes the do_not_encrypt
> usage from rt2x00 to make the change easier.

So that worked, thanks!

johannes

> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
> ---
> diff --git a/drivers/net/wireless/rt2x00/rt2x00crypto.c b/drivers/net/wireless/rt2x00/rt2x00crypto.c
> index 57ab42c..3ef26f5 100644
> --- a/drivers/net/wireless/rt2x00/rt2x00crypto.c
> +++ b/drivers/net/wireless/rt2x00/rt2x00crypto.c
> @@ -53,8 +53,7 @@ void rt2x00crypto_create_tx_descriptor(struct queue_entry *entry,
>  	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(entry->skb);
>  	struct ieee80211_key_conf *hw_key = tx_info->control.hw_key;
>  
> -	if (!test_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags) ||
> -	    !hw_key || entry->skb->do_not_encrypt)
> +	if (!test_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags) || !hw_key)
>  		return;
>  
>  	__set_bit(ENTRY_TXD_ENCRYPT, &txdesc->flags);
> @@ -82,8 +81,7 @@ unsigned int rt2x00crypto_tx_overhead(struct rt2x00_dev *rt2x00dev,
>  	struct ieee80211_key_conf *key = tx_info->control.hw_key;
>  	unsigned int overhead = 0;
>  
> -	if (!test_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags) ||
> -	    !key || skb->do_not_encrypt)
> +	if (!test_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags) || !key)
>  		return overhead;
>  
>  	/*
> diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c
> index c4c06b4..475a3ed 100644
> --- a/drivers/net/wireless/rt2x00/rt2x00mac.c
> +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
> @@ -73,7 +73,8 @@ static int rt2x00mac_tx_rts_cts(struct rt2x00_dev *rt2x00dev,
>  	else
>  		rts_info->flags &= ~IEEE80211_TX_CTL_NO_ACK;
>  
> -	skb->do_not_encrypt = 1;
> +	/* Disable hardware encryption */
> +	rts_info->control.hw_key = NULL;
>  
>  	/*
>  	 * RTS/CTS frame should use the length of the frame plus any
> 

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

end of thread, other threads:[~2009-06-16 18:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-16 18:46 [PATCH] rt2x00: remove skb->do_not_encrypt usage Ivo van Doorn
2009-06-16 18:55 ` Johannes Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.