All of lore.kernel.org
 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 2/2] wifi: mac80211: Remove unused ieee80211_nan_func_match
Date: Tue, 24 Dec 2024 01:32:57 +0000	[thread overview]
Message-ID: <20241224013257.185742-3-linux@treblig.org> (raw)
In-Reply-To: <20241224013257.185742-1-linux@treblig.org>

From: "Dr. David Alan Gilbert" <linux@treblig.org>

ieee80211_nan_func_match() was explicitly added in 2016 by
commit 92bc43bce284 ("mac80211: Add API to report NAN function match")

but has remained unused.

Remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
---
 include/net/mac80211.h | 15 ---------------
 net/mac80211/cfg.c     | 25 -------------------------
 2 files changed, 40 deletions(-)

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index ab8dce1f2c27..47d67b1f7d02 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -7550,21 +7550,6 @@ void ieee80211_nan_func_terminated(struct ieee80211_vif *vif,
 				   enum nl80211_nan_func_term_reason reason,
 				   gfp_t gfp);
 
-/**
- * ieee80211_nan_func_match - notify about NAN function match event.
- *
- * This function is used to notify mac80211 about NAN function match. The
- * cookie inside the match struct will be assigned by mac80211.
- * Note that this function can't be called from hard irq.
- *
- * @vif: &struct ieee80211_vif pointer from the add_interface callback.
- * @match: match event information
- * @gfp: allocation flags
- */
-void ieee80211_nan_func_match(struct ieee80211_vif *vif,
-			      struct cfg80211_nan_match_params *match,
-			      gfp_t gfp);
-
 /**
  * ieee80211_calc_rx_airtime - calculate estimated transmission airtime for RX.
  *
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index d3fc158ccaf6..50b4ec777349 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -4525,31 +4525,6 @@ void ieee80211_nan_func_terminated(struct ieee80211_vif *vif,
 }
 EXPORT_SYMBOL(ieee80211_nan_func_terminated);
 
-void ieee80211_nan_func_match(struct ieee80211_vif *vif,
-			      struct cfg80211_nan_match_params *match,
-			      gfp_t gfp)
-{
-	struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
-	struct cfg80211_nan_func *func;
-
-	if (WARN_ON(vif->type != NL80211_IFTYPE_NAN))
-		return;
-
-	spin_lock_bh(&sdata->u.nan.func_lock);
-
-	func = idr_find(&sdata->u.nan.function_inst_ids,  match->inst_id);
-	if (WARN_ON(!func)) {
-		spin_unlock_bh(&sdata->u.nan.func_lock);
-		return;
-	}
-	match->cookie = func->cookie;
-
-	spin_unlock_bh(&sdata->u.nan.func_lock);
-
-	cfg80211_nan_match(ieee80211_vif_to_wdev(vif), match, gfp);
-}
-EXPORT_SYMBOL(ieee80211_nan_func_match);
-
 static int ieee80211_set_multicast_to_unicast(struct wiphy *wiphy,
 					      struct net_device *dev,
 					      const bool enabled)
-- 
2.47.1


  parent reply	other threads:[~2024-12-24  1:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-24  1:32 [PATCH 0/2] wifi: mac80211: Deadcode cleanup linux
2024-12-24  1:32 ` [PATCH 1/2] wifi: mac80211: Clean up debugfs_key deadcode linux
2024-12-24  1:32 ` linux [this message]
2025-01-28 18:39 ` [PATCH 0/2] wifi: mac80211: Deadcode cleanup Dr. David Alan Gilbert
2025-01-28 19:33   ` Johannes Berg
2025-01-28 19:53     ` Dr. David Alan Gilbert

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=20241224013257.185742-3-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.