The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: linux@treblig.org
To: johannes@sipsolutions.net, linux-wireless@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	"Dr. David Alan Gilbert" <linux@treblig.org>
Subject: [PATCH] wifi: mac80211: Remove unused wdev_to_ieee80211_vif
Date: Thu, 19 Jun 2025 01:52:29 +0100	[thread overview]
Message-ID: <20250619005229.291961-1-linux@treblig.org> (raw)

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>
---
 include/net/mac80211.h | 13 -------------
 net/mac80211/util.c    | 11 -----------
 2 files changed, 24 deletions(-)

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 286c944d90ad..544a28336b93 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -2112,19 +2112,6 @@ static inline bool ieee80211_vif_is_mesh(struct ieee80211_vif *vif)
 	return false;
 }
 
-/**
- * wdev_to_ieee80211_vif - return a vif struct from a wdev
- * @wdev: the wdev to get the vif for
- *
- * This can be used by mac80211 drivers with direct cfg80211 APIs
- * (like the vendor commands) that get a wdev.
- *
- * Return: pointer to the wdev, or %NULL if the given wdev isn't
- * associated with a vif that the driver knows about (e.g. monitor
- * or AP_VLAN interfaces.)
- */
-struct ieee80211_vif *wdev_to_ieee80211_vif(struct wireless_dev *wdev);
-
 /**
  * ieee80211_vif_to_wdev - return a wdev struct from a vif
  * @vif: the vif to get the wdev for
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 27d414efa3fd..39a25fe20959 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -857,17 +857,6 @@ void ieee80211_iterate_stations_mtx(struct ieee80211_hw *hw,
 }
 EXPORT_SYMBOL_GPL(ieee80211_iterate_stations_mtx);
 
-struct ieee80211_vif *wdev_to_ieee80211_vif(struct wireless_dev *wdev)
-{
-	struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev);
-
-	if (!ieee80211_sdata_running(sdata) ||
-	    !(sdata->flags & IEEE80211_SDATA_IN_DRIVER))
-		return NULL;
-	return &sdata->vif;
-}
-EXPORT_SYMBOL_GPL(wdev_to_ieee80211_vif);
-
 struct wireless_dev *ieee80211_vif_to_wdev(struct ieee80211_vif *vif)
 {
 	if (!vif)
-- 
2.49.0


             reply	other threads:[~2025-06-19  0:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-19  0:52 linux [this message]
2025-10-12 16:40 ` [PATCH] wifi: mac80211: Remove unused wdev_to_ieee80211_vif Dr. David Alan Gilbert
2025-10-20 14:06   ` Johannes Berg
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=20250619005229.291961-1-linux@treblig.org \
    --to=linux@treblig.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.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