summaryrefslogtreecommitdiff
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2023-10-05 23:57:34 +0300
committerKalle Valo <kvalo@kernel.org>2023-10-06 17:08:47 +0300
commit7d6904bf26b96ef087514cb7a8c50b62a4911c99 (patch)
tree2feaff8495d88c2102dc2e017b7afc5c58db02d6 /net/mac80211/cfg.c
parent9418edf8ff01e7a4904aac1aca4864ecdea37593 (diff)
parent22061bfc57fe08c77141dc876b4af75603c4d61d (diff)
downloadlinux-7d6904bf26b96ef087514cb7a8c50b62a4911c99.tar.xz
Merge wireless into wireless-next
Resolve several conflicts, mostly between changes/fixes in wireless and the locking rework in wireless-next. One of the conflicts actually shows a bug in wireless that we'll want to fix separately. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Kalle Valo <kvalo@kernel.org>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 5bc6b1329465..5cec0c251e86 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -470,6 +470,7 @@ static int ieee80211_add_key(struct wiphy *wiphy, struct net_device *dev,
struct ieee80211_local *local = sdata->local;
struct sta_info *sta = NULL;
struct ieee80211_key *key;
+ int err;
lockdep_assert_wiphy(local->hw.wiphy);
@@ -561,7 +562,12 @@ static int ieee80211_add_key(struct wiphy *wiphy, struct net_device *dev,
break;
}
- return ieee80211_key_link(key, link, sta);
+ err = ieee80211_key_link(key, link, sta);
+ /* KRACK protection, shouldn't happen but just silently accept key */
+ if (err == -EALREADY)
+ err = 0;
+
+ return err;
}
static struct ieee80211_key *
@@ -1836,7 +1842,8 @@ static int sta_link_apply_parameters(struct ieee80211_local *local,
/* VHT can override some HT caps such as the A-MSDU max length */
if (params->vht_capa)
ieee80211_vht_cap_ie_to_sta_vht_cap(sdata, sband,
- params->vht_capa, link_sta);
+ params->vht_capa, NULL,
+ link_sta);
if (params->he_capa)
ieee80211_he_cap_ie_to_sta_he_cap(sdata, sband,