Message ID | 7DDF37406E10F0438561DBB78326DF3902F35339F2@SC-VEXCH1.marvell.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
On Tue, 2011-05-03 at 07:25 -0700, Yogesh Powar wrote: > >so may will this help? I don't know whether its a correct and with a > >quick test the warning gets fixed. > That should solve our problem with following explanation. > > The devices that require IV generation in software need tailroom reservation > for ICVs used in TKIP or WEP encryptions. > > Currently, decision to skip the tailroom reservation in the tx > path was taken only on whether driver wants MMIC to be generated > in software or not. Following patch appends IV generation check for such > decisions. > > diff --git a/net/mac80211/key.c b/net/mac80211/key.c > index ca3c626..f3c4deb 100644 > --- a/net/mac80211/key.c > +++ b/net/mac80211/key.c > @@ -102,7 +102,9 @@ static int ieee80211_key_enable_hw_accel(struct ieee80211_key *key) > if (!ret) { > key->flags |= KEY_FLAG_UPLOADED_TO_HARDWARE; > > - if (!(key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIC)) > + if (!((key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIC) || > + (key->conf.flags & > + IEEE80211_KEY_FLAG_GENERATE_IV))) > key->local->crypto_tx_tailroom_needed_cnt--; Can we have a bit nicer code style? :) Also, need to submit a proper patch with S-o-b etc, and reported-by rossi. johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, May 3, 2011 at 7:58 PM, Johannes Berg <johannes@sipsolutions.net> wrote: > On Tue, 2011-05-03 at 07:25 -0700, Yogesh Powar wrote: >> >so may will this help? I don't know whether its a correct and with a >> >quick test the warning gets fixed. >> That should solve our problem with following explanation. >> >> The devices that require IV generation in software need tailroom reservation >> for ICVs used in TKIP or WEP encryptions. >> >> Currently, decision to skip the tailroom reservation in the tx >> path was taken only on whether driver wants MMIC to be generated >> in software or not. Following patch appends IV generation check for such >> decisions. >> >> diff --git a/net/mac80211/key.c b/net/mac80211/key.c >> index ca3c626..f3c4deb 100644 >> --- a/net/mac80211/key.c >> +++ b/net/mac80211/key.c >> @@ -102,7 +102,9 @@ static int ieee80211_key_enable_hw_accel(struct ieee80211_key *key) >> if (!ret) { >> key->flags |= KEY_FLAG_UPLOADED_TO_HARDWARE; >> >> - if (!(key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIC)) >> + if (!((key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIC) || >> + (key->conf.flags & >> + IEEE80211_KEY_FLAG_GENERATE_IV))) >> key->local->crypto_tx_tailroom_needed_cnt--; > > Can we have a bit nicer code style? :) > > Also, need to submit a proper patch with S-o-b etc, and reported-by > rossi. Can please send the patch, with some more testing. > > johannes > > -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/mac80211/key.c b/net/mac80211/key.c index ca3c626..f3c4deb 100644 --- a/net/mac80211/key.c +++ b/net/mac80211/key.c @@ -102,7 +102,9 @@ static int ieee80211_key_enable_hw_accel(struct ieee80211_key *key) if (!ret) { key->flags |= KEY_FLAG_UPLOADED_TO_HARDWARE; - if (!(key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIC)) + if (!((key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIC) || + (key->conf.flags & + IEEE80211_KEY_FLAG_GENERATE_IV))) key->local->crypto_tx_tailroom_needed_cnt--; return 0; @@ -161,7 +163,9 @@ static void ieee80211_key_disable_hw_accel(struct ieee80211_key *key) key->flags &= ~KEY_FLAG_UPLOADED_TO_HARDWARE; - if (!(key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIC)) + if (!((key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIC) || + (key->conf.flags & + IEEE80211_KEY_FLAG_GENERATE_IV))) key->local->crypto_tx_tailroom_needed_cnt++; }