[AUTOSEL,4.18,027/100] mac80211_hwsim: do not omit multicast announce of first added radio
diff mbox series

Message ID 20181016041221.135528-27-sashal@kernel.org
State New, archived
Headers show
  • [AUTOSEL,4.18,001/100] xfrm: Validate address prefix lengths in the xfrm selector.
Related show

Commit Message

Sasha Levin Oct. 16, 2018, 4:11 a.m. UTC
From: Martin Willi <martin@strongswan.org>

[ Upstream commit 28ef8b49a338dc1844e86b7954cfffc7dfa2660a ]

The allocation of hwsim radio identifiers uses a post-increment from 0,
so the first radio has idx 0. This idx is explicitly excluded from
multicast announcements ever since, but it is unclear why.

Drop that idx check and announce the first radio as well. This makes
userspace happy if it relies on these events.

Signed-off-by: Martin Willi <martin@strongswan.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
 drivers/net/wireless/mac80211_hwsim.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff mbox series

diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index cfd0c58aa02a..58dd217811c8 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -2811,8 +2811,7 @@  static int mac80211_hwsim_new_radio(struct genl_info *info,
-	if (idx > 0)
-		hwsim_mcast_new_radio(idx, info, param);
+	hwsim_mcast_new_radio(idx, info, param);
 	return idx;