]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: mac80211_hwsim: add NAN_DATA interface limits
authorDaniel Gabay <daniel.gabay@intel.com>
Wed, 6 May 2026 03:44:25 +0000 (06:44 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 6 May 2026 09:41:50 +0000 (11:41 +0200)
Increase interface limits for NAN_DATA interface.

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.587955b23089.I261b782e5c198726b9465815d59ce037f094784d@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/virtual/mac80211_hwsim_i.h
drivers/net/wireless/virtual/mac80211_hwsim_main.c

index 5378f721c29905bcfb062e874a7fc64e4b81a88a..d182b5117bfb51b12ce46dabf683337ec13b127c 100644 (file)
@@ -4,7 +4,7 @@
  * Copyright (c) 2008, Jouni Malinen <j@w1.fi>
  * Copyright (c) 2011, Javier Lopez <jlopex@gmail.com>
  * Copyright (c) 2016 - 2017 Intel Deutschland GmbH
- * Copyright (C) 2018 - 2025 Intel Corporation
+ * Copyright (C) 2018 - 2026 Intel Corporation
  */
 
 #ifndef __MAC80211_HWSIM_I_H
@@ -39,7 +39,7 @@ struct mac80211_hwsim_data {
        struct ieee80211_channel channels_s1g[HWSIM_NUM_S1G_CHANNELS_US];
        struct ieee80211_rate rates[HWSIM_NUM_RATES];
        struct ieee80211_iface_combination if_combination;
-       struct ieee80211_iface_limit if_limits[4];
+       struct ieee80211_iface_limit if_limits[5];
        int n_if_limits;
        /* Storage space for channels, etc. */
        struct mac80211_hwsim_phy_data *phy_data;
index 969ebc28cb1e6585f337c37fa0d210d9fc47fbe8..3397acfe61c8a7f9a32b65b755d6b58c889b3064 100644 (file)
@@ -4,7 +4,7 @@
  * Copyright (c) 2008, Jouni Malinen <j@w1.fi>
  * Copyright (c) 2011, Javier Lopez <jlopex@gmail.com>
  * Copyright (c) 2016 - 2017 Intel Deutschland GmbH
- * Copyright (C) 2018 - 2025 Intel Corporation
+ * Copyright (C) 2018 - 2026 Intel Corporation
  */
 
 /*
@@ -5631,6 +5631,12 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,
                spin_lock_init(&data->nan.state_lock);
        }
 
+       if (param->iftypes & BIT(NL80211_IFTYPE_NAN_DATA)) {
+               data->if_limits[n_limits].max = 2;
+               data->if_limits[n_limits].types = BIT(NL80211_IFTYPE_NAN_DATA);
+               n_limits++;
+       }
+
        data->if_combination.radar_detect_widths =
                                BIT(NL80211_CHAN_WIDTH_5) |
                                BIT(NL80211_CHAN_WIDTH_10) |