mac80211_hwsim: fixes kernel crash during mac80211_hwsim init
authorJames Prestwood <james.prestwood@linux.intel.com>
Tue, 13 Nov 2018 19:26:42 +0000 (11:26 -0800)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 5 Dec 2018 14:30:50 +0000 (15:30 +0100)
Creating radios during startup follows a different code path than
HWSIM_CMD_NEW_RADIO. The problem was that param.iftypes was not
being set to the deafult before calling mac80211_hwsim_new_radio

Signed-off-by: James Prestwood <james.prestwood@linux.intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/mac80211_hwsim.c

index 4033a80..2a5a133 100644 (file)
@@ -3884,6 +3884,7 @@ static int __init init_mac80211_hwsim(void)
 
                param.p2p_device = support_p2p_device;
                param.use_chanctx = channels > 1;
+               param.iftypes = HWSIM_IFTYPE_SUPPORT_MASK;
 
                err = mac80211_hwsim_new_radio(NULL, &param);
                if (err < 0)