Skip to content

Commit

Permalink
mac80211_hwsim: fixes kernel crash during mac80211_hwsim init
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
James Prestwood authored and Johannes Berg committed Dec 5, 2018
1 parent ecbc12a commit 082b12d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/wireless/mac80211_hwsim.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 082b12d

Please sign in to comment.