diff options
| author | Avraham Stern <avraham.stern@intel.com> | 2026-03-26 13:14:45 +0300 |
|---|---|---|
| committer | Johannes Berg <johannes.berg@intel.com> | 2026-04-07 16:36:04 +0300 |
| commit | 014eec318fc00f0b497bffa04f1a45255ba7ff5e (patch) | |
| tree | d9c3b7ec4341ab2ad995efe6e649a5e1af5ea83b | |
| parent | 5f6fba9a1e7b03a6369a1078d3921440fff95200 (diff) | |
| download | linux-014eec318fc00f0b497bffa04f1a45255ba7ff5e.tar.xz | |
wifi: mac80211: allow add_key on NAN interfaces
Keys may be added to the NAN interfaces to protect
NAN management frames and data, allow that.
Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260326121156.34961ba9a0c4.I5b7c646c456d4112e5ab8663026153ace9b6b7d6@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| -rw-r--r-- | net/mac80211/cfg.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index e47197fe6d1b..5a908eaddbf2 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -702,6 +702,8 @@ static int ieee80211_add_key(struct wiphy *wiphy, struct wireless_dev *wdev, break; case NL80211_IFTYPE_AP: case NL80211_IFTYPE_AP_VLAN: + case NL80211_IFTYPE_NAN: + case NL80211_IFTYPE_NAN_DATA: /* Keys without a station are used for TX only */ if (sta && test_sta_flag(sta, WLAN_STA_MFP)) key->conf.flags |= IEEE80211_KEY_FLAG_RX_MGMT; @@ -718,13 +720,11 @@ static int ieee80211_add_key(struct wiphy *wiphy, struct wireless_dev *wdev, case NL80211_IFTYPE_WDS: case NL80211_IFTYPE_MONITOR: case NL80211_IFTYPE_P2P_DEVICE: - case NL80211_IFTYPE_NAN: case NL80211_IFTYPE_UNSPECIFIED: case NUM_NL80211_IFTYPES: case NL80211_IFTYPE_P2P_CLIENT: case NL80211_IFTYPE_P2P_GO: case NL80211_IFTYPE_OCB: - case NL80211_IFTYPE_NAN_DATA: /* shouldn't happen */ WARN_ON_ONCE(1); break; |
