lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <30b9e7eebfc99330857f7a81c72b9eb23ea6406d.camel@sipsolutions.net>
Date: Mon, 20 Oct 2025 16:06:13 +0200
From: Johannes Berg <johannes@...solutions.net>
To: "Dr. David Alan Gilbert" <linux@...blig.org>, 
	linux-wireless@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] wifi: mac80211: Remove unused wdev_to_ieee80211_vif

On Sun, 2025-10-12 at 16:40 +0000, Dr. David Alan Gilbert wrote:
> * linux@...blig.org (linux@...blig.org) wrote:
> > From: "Dr. David Alan Gilbert" <linux@...blig.org>
> > 
> > wdev_to_ieee80211_vif() was added in 2013 by
> > commit ad7e718c9b4f ("nl80211: vendor command support")
> > but has remained unused.
> > 
> > Remove it.
> > 
> > Signed-off-by: Dr. David Alan Gilbert <linux@...blig.org>
> 
> Hi,
>   Gentle ping on this one please.

This was/is used elsewhere out-of-tree, so I had dropped this change, at
least for now. I guess that's really not a good excuse though.

I guess drivers could instead ieee80211_iterate_active_interfaces_mtx()
and find the right wdev from that list, like


struct wdev_find_vif_iter {
	struct wireless_dev *wdev;
	struct ieee80211_vif *vif;
};

static void wdev_find_vif_iter_fn(void *data, u8 *mac, struct ieee80211_vif *vif)
{
	struct wdev_find_vif_iter *iter = data;

	if (ieee80211_vif_to_wdev(vif) == iter->wdev)
		iter->vif = vif;
}

struct ieee80211_vif *wdev_to_ieee80211_vif(struct wireless_dev *wdev)
{
	struct wdev_find_vif_iter iter = {
		.wdev = wdev,
	};

	ieee80211_iterate_active_interfaces_mtx(wiphy_to_ieee80211_hw(wdev->wiphy),
						IEEE80211_IFACE_SKIP_SDATA_NOT_IN_DRIVER,
						wdev_find_vif_iter_fn, &iter);

	return iter.vif;
}


but I guess I'm not sure it's really better for drivers to have that vs.
upstream carrying the unused function.

johannes

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ