]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: mac80211_hwsim: enable NAN_DATA interface simulation support
authorDaniel Gabay <daniel.gabay@intel.com>
Wed, 6 May 2026 03:44:31 +0000 (06:44 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 6 May 2026 09:42:12 +0000 (11:42 +0200)
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 <daniel.gabay@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260506064301.d4bd95959bfa.I450087714bd55189242ab6a72ce6650be36edbcb@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/virtual/mac80211_hwsim_main.c

index 7f039c3b5c15b155ec0e1518c7f62d4be801612e..a214a3a18841bae26350b5e4c447cad9ec221885 100644 (file)
@@ -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]);