Skip to content

Commit 4ea5aca

Browse files
balrog-kunjmberg-intel
authored andcommitted
mac80211_hwsim: Set wmediumd for new radios
Set the wmediumd to the net's wmediumd when the radio gets created. Radios created after HWSIM_CMD_REGISTER don't currently get their data->wmediumd set and the userspace would need to reconnect to netlink to be able to call HWSIM_CMD_REGISTER again. Alternatively I think data->netgroup and data->wmedium could be replaced with a pointer to hwsim_net. Signed-off-by: Andrew Zaborowski <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
1 parent 7c181f4 commit 4ea5aca

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/net/wireless/mac80211_hwsim.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2727,6 +2727,7 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,
27272727
mutex_init(&data->mutex);
27282728

27292729
data->netgroup = hwsim_net_get_netgroup(net);
2730+
data->wmediumd = hwsim_net_get_wmediumd(net);
27302731

27312732
/* Enable frame retransmissions for lossy channels */
27322733
hw->max_rates = 4;

0 commit comments

Comments
 (0)