On Sun, 2024-06-30 at 09:50 +0200, Felix Fietkau wrote: > This registers one wiphy radio per supported band. Number of different > channels is set per radio. > > Signed-off-by: Felix Fietkau <nbd@xxxxxxxx> > --- > drivers/net/wireless/virtual/mac80211_hwsim.c | 78 +++++++++++++++++--- > drivers/net/wireless/virtual/mac80211_hwsim.h | 4 +- > 2 files changed, 71 insertions(+), 11 deletions(-) > > diff --git a/drivers/net/wireless/virtual/mac80211_hwsim.c b/drivers/net/wireless/virtual/mac80211_hwsim.c > index 8491eb32f760..50aa2f838e9e 100644 > --- a/drivers/net/wireless/virtual/mac80211_hwsim.c > +++ b/drivers/net/wireless/virtual/mac80211_hwsim.c > @@ -69,6 +69,9 @@ static bool mlo; > module_param(mlo, bool, 0444); > MODULE_PARM_DESC(mlo, "Support MLO"); > > +static bool multi_radio; > +module_param(multi_radio, bool, 0444); > +MODULE_PARM_DESC(mlo, "Support Multiple Radios per wiphy"); > /** nit: keep a blank line > @@ -5423,8 +5442,41 @@ static int mac80211_hwsim_new_radio(struct genl_info *info, > mac80211_hwsim_sband_capab(sband); > > hw->wiphy->bands[band] = sband; > + > + if (!param->multi_radio) > + continue; > + > + if (WARN_ON_ONCE(n_bands >= ARRAY_SIZE(data->radio))) { Not sure you should WARN_ON for userspace stuff; it's hwsim, but syzbot will complain. Could use GENL_SET_ERR_MSG() though. johannes