diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/key.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/key.c b/net/mac80211/key.c index d6eeace7b83a..4700718e010f 100644 --- a/net/mac80211/key.c +++ b/net/mac80211/key.c @@ -401,8 +401,9 @@ static int ieee80211_key_replace(struct ieee80211_sub_if_data *sdata, * pairwise keys.*/ ret = ieee80211_hw_key_replace(old, new, pairwise); } else { + /* new must be provided in case old is not */ idx = new->conf.keyidx; - if (new && !new->local->wowlan) + if (!new->local->wowlan) ret = ieee80211_key_enable_hw_accel(new); else ret = 0; |