]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mac80211_hwsim: Set wmediumd for new radios
authorAndrew Zaborowski <andrew.zaborowski@intel.com>
Wed, 21 Mar 2018 07:05:18 +0000 (08:05 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 21 Mar 2018 12:01:54 +0000 (13:01 +0100)
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 <andrew.zaborowski@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/mac80211_hwsim.c

index 6e0af815f25ec78eacafc61e286cff5fe85170bf..35b21f8152bb333d3d42fcc4c3eb92fe742fa782 100644 (file)
@@ -2727,6 +2727,7 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,
        mutex_init(&data->mutex);
 
        data->netgroup = hwsim_net_get_netgroup(net);
+       data->wmediumd = hwsim_net_get_wmediumd(net);
 
        /* Enable frame retransmissions for lossy channels */
        hw->max_rates = 4;