diff options
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/key.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/mac80211/key.c b/net/mac80211/key.c index 7dfee848abac..1be3686562ee 100644 --- a/net/mac80211/key.c +++ b/net/mac80211/key.c | |||
@@ -6,6 +6,7 @@ | |||
6 | * Copyright 2007-2008 Johannes Berg <johannes@sipsolutions.net> | 6 | * Copyright 2007-2008 Johannes Berg <johannes@sipsolutions.net> |
7 | * Copyright 2013-2014 Intel Mobile Communications GmbH | 7 | * Copyright 2013-2014 Intel Mobile Communications GmbH |
8 | * Copyright 2015-2017 Intel Deutschland GmbH | 8 | * Copyright 2015-2017 Intel Deutschland GmbH |
9 | * Copyright 2018-2019 Intel Corporation | ||
9 | */ | 10 | */ |
10 | 11 | ||
11 | #include <linux/if_ether.h> | 12 | #include <linux/if_ether.h> |
@@ -781,9 +782,8 @@ int ieee80211_key_link(struct ieee80211_key *key, | |||
781 | /* The rekey code assumes that the old and new key are using | 782 | /* The rekey code assumes that the old and new key are using |
782 | * the same cipher. Enforce the assumption for pairwise keys. | 783 | * the same cipher. Enforce the assumption for pairwise keys. |
783 | */ | 784 | */ |
784 | if (key && | 785 | if ((alt_key && alt_key->conf.cipher != key->conf.cipher) || |
785 | ((alt_key && alt_key->conf.cipher != key->conf.cipher) || | 786 | (old_key && old_key->conf.cipher != key->conf.cipher)) |
786 | (old_key && old_key->conf.cipher != key->conf.cipher))) | ||
787 | goto out; | 787 | goto out; |
788 | } else if (sta) { | 788 | } else if (sta) { |
789 | old_key = key_mtx_dereference(sdata->local, sta->gtk[idx]); | 789 | old_key = key_mtx_dereference(sdata->local, sta->gtk[idx]); |