diff mbox series

wifi: mac80211: Remove unused wdev_to_ieee80211_vif

Message ID 20250619005229.291961-1-linux@treblig.org
State New
Headers show
Series wifi: mac80211: Remove unused wdev_to_ieee80211_vif | expand

Commit Message

Dr. David Alan Gilbert June 19, 2025, 12:52 a.m. UTC
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 mbox series

Patch

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)