diff options
author | Andrew Zaborowski <andrew.zaborowski@intel.com> | 2018-03-21 03:05:18 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2018-03-21 08:01:54 -0400 |
commit | 4ea5aca27eab1c495985eb2a30b65b78cbf99404 (patch) | |
tree | 27fbec57b7de3b5eb890e8b345cabe0965a0bc42 | |
parent | 7c181f4fcdc62e5dc7a87fd33387d322262c3b52 (diff) |
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 <andrew.zaborowski@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | drivers/net/wireless/mac80211_hwsim.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 6e0af815f25e..35b21f8152bb 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c | |||
@@ -2727,6 +2727,7 @@ static int mac80211_hwsim_new_radio(struct genl_info *info, | |||
2727 | mutex_init(&data->mutex); | 2727 | mutex_init(&data->mutex); |
2728 | 2728 | ||
2729 | data->netgroup = hwsim_net_get_netgroup(net); | 2729 | data->netgroup = hwsim_net_get_netgroup(net); |
2730 | data->wmediumd = hwsim_net_get_wmediumd(net); | ||
2730 | 2731 | ||
2731 | /* Enable frame retransmissions for lossy channels */ | 2732 | /* Enable frame retransmissions for lossy channels */ |
2732 | hw->max_rates = 4; | 2733 | hw->max_rates = 4; |