From: Johannes Berg <johannes@sipsolutions.net>
To: "Dr. David Alan Gilbert" <linux@treblig.org>,
linux-wireless@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] wifi: mac80211: Remove unused wdev_to_ieee80211_vif
Date: Mon, 20 Oct 2025 16:06:13 +0200 [thread overview]
Message-ID: <30b9e7eebfc99330857f7a81c72b9eb23ea6406d.camel@sipsolutions.net> (raw)
In-Reply-To: <aOvZ8FHp7-tliei2@gallifrey>
On Sun, 2025-10-12 at 16:40 +0000, Dr. David Alan Gilbert wrote:
> * linux@treblig.org (linux@treblig.org) wrote:
> > From: "Dr. David Alan Gilbert" <linux@treblig.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@treblig.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
next prev parent reply other threads:[~2025-10-20 14:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-19 0:52 linux
2025-10-12 16:40 ` Dr. David Alan Gilbert
2025-10-20 14:06 ` Johannes Berg [this message]
2025-10-20 16:39 ` Dr. David Alan Gilbert
2025-10-21 14:30 ` Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=30b9e7eebfc99330857f7a81c72b9eb23ea6406d.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linux@treblig.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®