Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Ivo van Doorn <ivdoorn@gmail.com>
Cc: linville@tuxdriver.com, linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] rt2x00: remove skb->do_not_encrypt usage
Date: Tue, 16 Jun 2009 20:55:21 +0200	[thread overview]
Message-ID: <1245178521.21287.43.camel@johannes.local> (raw)
In-Reply-To: <200906162046.45728.IvDoorn@gmail.com>

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

      reply	other threads:[~2009-06-16 18:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-16 18:46 [PATCH] rt2x00: remove skb->do_not_encrypt usage Ivo van Doorn
2009-06-16 18:55 ` Johannes Berg [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1245178521.21287.43.camel@johannes.local \
    --to=johannes@sipsolutions.net \
    --cc=ivdoorn@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox