Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 958def63 authored by Jukka Rissanen's avatar Jukka Rissanen Committed by Alistair Strachan
Browse files

UPSTREAM: mac80211-hwsim: hwname is always known so use the value from wiphy



We can always know the hwname of the radio so use the value
from wiphy.

Signed-off-by: default avatarJukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
(cherry picked from commit b9995f83c33e3ff7486da0630a979a05edf2e982)
Bug: 70214720
Change-Id: If274e2786e5ef4dafc235c42f950a4f03a11cfa6
Signed-off-by: default avatarAlistair Strachan <astrachan@google.com>
parent a687068d
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -2350,12 +2350,10 @@ static void hwsim_mcast_del_radio(int id, const char *hwname,
	if (ret < 0)
		goto error;

	if (hwname) {
	ret = nla_put(skb, HWSIM_ATTR_RADIO_NAME, strlen(hwname),
		      hwname);
	if (ret < 0)
		goto error;
	}

	genlmsg_end(skb, data);

@@ -2389,7 +2387,8 @@ static void mac80211_hwsim_free(void)
						list))) {
		list_del(&data->list);
		spin_unlock_bh(&hwsim_radio_lock);
		mac80211_hwsim_del_radio(data, NULL, NULL);
		mac80211_hwsim_del_radio(data, wiphy_name(data->hw->wiphy),
					 NULL);
		spin_lock_bh(&hwsim_radio_lock);
	}
	spin_unlock_bh(&hwsim_radio_lock);
@@ -2673,7 +2672,8 @@ static int hwsim_del_radio_nl(struct sk_buff *msg, struct genl_info *info)

		list_del(&data->list);
		spin_unlock_bh(&hwsim_radio_lock);
		mac80211_hwsim_del_radio(data, hwname, info);
		mac80211_hwsim_del_radio(data, wiphy_name(data->hw->wiphy),
					 info);
		return 0;
	}
	spin_unlock_bh(&hwsim_radio_lock);
@@ -2718,7 +2718,7 @@ static void destroy_radio(struct work_struct *work)
	struct mac80211_hwsim_data *data =
		container_of(work, struct mac80211_hwsim_data, destroy_work);

	mac80211_hwsim_del_radio(data, NULL, NULL);
	mac80211_hwsim_del_radio(data, wiphy_name(data->hw->wiphy), NULL);
}

static void remove_user_radios(u32 portid)