All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Yogesh Ashok Powar <yogeshp@marvell.com>
Cc: "John W. Linville" <linville@tuxdriver.com>,
	linux-wireless <linux-wireless@vger.kernel.org>,
	Lennert Buytenhek <buytenh@wantstofly.org>
Subject: Re: [PATCH 1/2] mac80211: Adding HW flag IEEE80211_HW_CRYPTO_ENABLED
Date: Wed, 27 Apr 2011 13:53:51 +0200	[thread overview]
Message-ID: <1303905231.3542.3.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <20110427114010.GA18939@hertz.marvell.com>

On Wed, 2011-04-27 at 17:10 +0530, Yogesh Ashok Powar wrote:
> On Wed, Apr 27, 2011 at 04:27:56AM -0700, Johannes Berg wrote:
> > On Wed, 2011-04-27 at 16:33 +0530, Yogesh Ashok Powar wrote:
> > > On Thu, Apr 21, 2011 at 05:59:48AM -0700, Johannes Berg wrote:
> > > > Well, it kinda goes like this:
> > > > 
> > > > key added           -> need tailroom code
> > > > key put into HW     -> no longer need tailroom code
> > > > key removed from HW -> need tailroom code again
> > > > key deleted         -> no longer need tailroom code
> > > > 
> > > Following patch takes care of these four states. Kindly review.
> > 
> > Looks fine, but still I think it might get out of sync when HW restart
> > happens?
> How about this?
> 
> Thanks
> Yogesh
> 
> diff --git a/net/mac80211/key.c b/net/mac80211/key.c
> index e180149..ca3c626 100644
> --- a/net/mac80211/key.c
> +++ b/net/mac80211/key.c
> @@ -503,8 +503,12 @@ void ieee80211_enable_keys(struct ieee80211_sub_if_data *sdata)
>  
>  	mutex_lock(&sdata->local->key_mtx);
>  
> -	list_for_each_entry(key, &sdata->key_list, list)
> +	sdata->local->crypto_tx_tailroom_needed_cnt = 0;
> +
> +	list_for_each_entry(key, &sdata->key_list, list) {
> +		sdata->local->crypto_tx_tailroom_needed_cnt++;
>  		ieee80211_key_enable_hw_accel(key);
> +	}
>  
>  	mutex_unlock(&sdata->local->key_mtx);
>  }

Yeah that looks good.

johannes



      reply	other threads:[~2011-04-27 11:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-15  4:53 [PATCH 1/2] mac80211: Adding HW flag IEEE80211_HW_CRYPTO_ENABLED Yogesh Ashok Powar
2011-04-15  6:55 ` Johannes Berg
2011-04-15  8:40   ` Yogesh Ashok Powar
2011-04-15  8:52     ` Johannes Berg
2011-04-15 10:51       ` Yogesh Ashok Powar
2011-04-15 11:01         ` Johannes Berg
2011-04-21 12:15           ` Yogesh Ashok Powar
2011-04-21 12:33             ` Johannes Berg
2011-04-21 12:38               ` Johannes Berg
2011-04-21 12:46               ` Yogesh Ashok Powar
2011-04-21 12:59                 ` Johannes Berg
2011-04-27 11:03                   ` Yogesh Ashok Powar
2011-04-27 11:27                     ` Johannes Berg
2011-04-27 11:40                       ` Yogesh Ashok Powar
2011-04-27 11:53                         ` 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=1303905231.3542.3.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=buytenh@wantstofly.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=yogeshp@marvell.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 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.