Skip to contentSkip to conversation

mac80211_hwsim: Set wmediumd for new radios

PATCH New Andrew Zaborowski 1 participant 1 message Mar 21, 2018 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/net/wireless/mac80211_hwsim.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/wireless/mac80211_hwsim.c +1 -0
index 7b6c3640a9..100cf42db6 100644
@@ -2742,6 +2742,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;
Signature · 1 line
2.14.1