Search Linux Wireless

Re: [PATCH 1/2] mac80211: Adding HW flag IEEE80211_HW_CRYPTO_ENABLED

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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);
 }
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux