diff options
author | David S. Miller <davem@davemloft.net> | 2015-01-06 13:29:27 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-01-06 13:29:27 -0500 |
commit | 15ecf7a063fcc11caa3281076d63d515f1f9a951 (patch) | |
tree | 3bca92021502058095c5dfeee9b956069e53723a /net | |
parent | a5e31255e02a0797259f210c3bb92c6326a98a9c (diff) | |
parent | 1e359a5de861a57aa04d92bb620f52a5c1d7f8b1 (diff) |
Merge tag 'mac80211-for-davem-2015-01-06' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
Here's just a single fix - a revert of a patch that broke the
p54 and cw2100 drivers (arguably due to bad assumptions there.)
Since this affects kernels since 3.17, I decided to revert for
now and we'll revisit this optimisation properly for -next.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/key.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/net/mac80211/key.c b/net/mac80211/key.c index 0bb7038121ac..bd4e46ec32bd 100644 --- a/net/mac80211/key.c +++ b/net/mac80211/key.c | |||
@@ -140,7 +140,9 @@ static int ieee80211_key_enable_hw_accel(struct ieee80211_key *key) | |||
140 | if (!ret) { | 140 | if (!ret) { |
141 | key->flags |= KEY_FLAG_UPLOADED_TO_HARDWARE; | 141 | key->flags |= KEY_FLAG_UPLOADED_TO_HARDWARE; |
142 | 142 | ||
143 | if (!(key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIC)) | 143 | if (!((key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIC) || |
144 | (key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_IV) || | ||
145 | (key->conf.flags & IEEE80211_KEY_FLAG_PUT_IV_SPACE))) | ||
144 | sdata->crypto_tx_tailroom_needed_cnt--; | 146 | sdata->crypto_tx_tailroom_needed_cnt--; |
145 | 147 | ||
146 | WARN_ON((key->conf.flags & IEEE80211_KEY_FLAG_PUT_IV_SPACE) && | 148 | WARN_ON((key->conf.flags & IEEE80211_KEY_FLAG_PUT_IV_SPACE) && |
@@ -188,7 +190,9 @@ static void ieee80211_key_disable_hw_accel(struct ieee80211_key *key) | |||
188 | sta = key->sta; | 190 | sta = key->sta; |
189 | sdata = key->sdata; | 191 | sdata = key->sdata; |
190 | 192 | ||
191 | if (!(key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIC)) | 193 | if (!((key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIC) || |
194 | (key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_IV) || | ||
195 | (key->conf.flags & IEEE80211_KEY_FLAG_PUT_IV_SPACE))) | ||
192 | increment_tailroom_need_count(sdata); | 196 | increment_tailroom_need_count(sdata); |
193 | 197 | ||
194 | ret = drv_set_key(key->local, DISABLE_KEY, sdata, | 198 | ret = drv_set_key(key->local, DISABLE_KEY, sdata, |
@@ -884,7 +888,9 @@ void ieee80211_remove_key(struct ieee80211_key_conf *keyconf) | |||
884 | if (key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE) { | 888 | if (key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE) { |
885 | key->flags &= ~KEY_FLAG_UPLOADED_TO_HARDWARE; | 889 | key->flags &= ~KEY_FLAG_UPLOADED_TO_HARDWARE; |
886 | 890 | ||
887 | if (!(key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIC)) | 891 | if (!((key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIC) || |
892 | (key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_IV) || | ||
893 | (key->conf.flags & IEEE80211_KEY_FLAG_PUT_IV_SPACE))) | ||
888 | increment_tailroom_need_count(key->sdata); | 894 | increment_tailroom_need_count(key->sdata); |
889 | } | 895 | } |
890 | 896 | ||