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