Skip to contentSkip to conversation

mac80211_hwsim: fixes kernel crash during mac80211_hwsim init

PATCH New James Prestwood 1 participant 1 message Nov 13, 2018 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mac80211_hwsim: fixes kernel crash during mac80211_hwsim init

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

---
 drivers/net/wireless/mac80211_hwsim.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/wireless/mac80211_hwsim.c +1 -0
index 4033a800b209..2a5a133f23cf 100644
@@ -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)
Signature · 1 line
2.17.1