From: Daniel Gabay Date: Wed, 6 May 2026 03:44:31 +0000 (+0300) Subject: wifi: mac80211_hwsim: enable NAN_DATA interface simulation support X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=2c7c70ee7ceeecb5dc8c8bef8676aa9d5d99a15e;p=thirdparty%2Flinux.git wifi: mac80211_hwsim: enable NAN_DATA interface simulation support Enable NAN_DATA interface simulation support by adding it to the supported interface types. This completes the NAN Data Path simulation introduced in the previous patches. Signed-off-by: Daniel Gabay Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20260506064301.d4bd95959bfa.I450087714bd55189242ab6a72ce6650be36edbcb@changeid Signed-off-by: Johannes Berg --- diff --git a/drivers/net/wireless/virtual/mac80211_hwsim_main.c b/drivers/net/wireless/virtual/mac80211_hwsim_main.c index 7f039c3b5c15..a214a3a18841 100644 --- a/drivers/net/wireless/virtual/mac80211_hwsim_main.c +++ b/drivers/net/wireless/virtual/mac80211_hwsim_main.c @@ -6764,12 +6764,9 @@ static int hwsim_new_radio_nl(struct sk_buff *msg, struct genl_info *info) param.p2p_device = true; } - /* ensure both flag and iftype support is honored */ - if (param.nan_device || - param.iftypes & BIT(NL80211_IFTYPE_NAN)) { - param.iftypes |= BIT(NL80211_IFTYPE_NAN); - param.nan_device = true; - } + if (param.nan_device) + param.iftypes |= BIT(NL80211_IFTYPE_NAN) | + BIT(NL80211_IFTYPE_NAN_DATA); if (info->attrs[HWSIM_ATTR_CIPHER_SUPPORT]) { u32 len = nla_len(info->attrs[HWSIM_ATTR_CIPHER_SUPPORT]);