Skip to content

Commit

Permalink
mac80211_hwsim: do not omit multicast announce of first added radio
Browse files Browse the repository at this point in the history
[ Upstream commit 28ef8b4 ]

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 <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
martinwilli authored and gregkh committed Nov 10, 2018
1 parent 6e93cd9 commit 5dfa0f7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/wireless/mac80211_hwsim.c
Original file line number Diff line number Diff line change
Expand Up @@ -2665,8 +2665,7 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,
list_add_tail(&data->list, &hwsim_radios);
spin_unlock_bh(&hwsim_radio_lock);

if (idx > 0)
hwsim_mcast_new_radio(idx, info, param);
hwsim_mcast_new_radio(idx, info, param);

return idx;

Expand Down

0 comments on commit 5dfa0f7

Please sign in to comment.