From: linux@treblig.org
To: johannes@sipsolutions.net, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
"Dr. David Alan Gilbert" <linux@treblig.org>
Subject: [PATCH 2/2] cfg80211: Remove unused cfg80211_vendor_ functions
Date: Sun, 6 Oct 2024 23:53:03 +0100 [thread overview]
Message-ID: <20241006225303.121445-3-linux@treblig.org> (raw)
In-Reply-To: <20241006225303.121445-1-linux@treblig.org>
From: "Dr. David Alan Gilbert" <linux@treblig.org>
cfg80211_vendor_cmd_get_sender() and cfg80211_vendor_event_alloc_ucast()
were added in 2019 by commit
55c1fdf0d6c5 ("cfg80211: allow sending vendor events unicast")
but never used.
Remove them.
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
---
include/net/cfg80211.h | 45 ------------------------------------------
net/wireless/nl80211.c | 11 -----------
2 files changed, 56 deletions(-)
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index fd843a519329..cd3ed718efe2 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -7806,16 +7806,6 @@ cfg80211_vendor_cmd_alloc_reply_skb(struct wiphy *wiphy, int approxlen)
*/
int cfg80211_vendor_cmd_reply(struct sk_buff *skb);
-/**
- * cfg80211_vendor_cmd_get_sender - get the current sender netlink ID
- * @wiphy: the wiphy
- *
- * Return: the current netlink port ID in a vendor command handler.
- *
- * Context: May only be called from a vendor command handler
- */
-unsigned int cfg80211_vendor_cmd_get_sender(struct wiphy *wiphy);
-
/**
* cfg80211_vendor_event_alloc - allocate vendor-specific event skb
* @wiphy: the wiphy
@@ -7846,41 +7836,6 @@ cfg80211_vendor_event_alloc(struct wiphy *wiphy, struct wireless_dev *wdev,
0, event_idx, approxlen, gfp);
}
-/**
- * cfg80211_vendor_event_alloc_ucast - alloc unicast vendor-specific event skb
- * @wiphy: the wiphy
- * @wdev: the wireless device
- * @event_idx: index of the vendor event in the wiphy's vendor_events
- * @portid: port ID of the receiver
- * @approxlen: an upper bound of the length of the data that will
- * be put into the skb
- * @gfp: allocation flags
- *
- * This function allocates and pre-fills an skb for an event to send to
- * a specific (userland) socket. This socket would previously have been
- * obtained by cfg80211_vendor_cmd_get_sender(), and the caller MUST take
- * care to register a netlink notifier to see when the socket closes.
- *
- * If wdev != NULL, both the ifindex and identifier of the specified
- * wireless device are added to the event message before the vendor data
- * attribute.
- *
- * When done filling the skb, call cfg80211_vendor_event() with the
- * skb to send the event.
- *
- * Return: An allocated and pre-filled skb. %NULL if any errors happen.
- */
-static inline struct sk_buff *
-cfg80211_vendor_event_alloc_ucast(struct wiphy *wiphy,
- struct wireless_dev *wdev,
- unsigned int portid, int approxlen,
- int event_idx, gfp_t gfp)
-{
- return __cfg80211_alloc_event_skb(wiphy, wdev, NL80211_CMD_VENDOR,
- NL80211_ATTR_VENDOR_DATA,
- portid, event_idx, approxlen, gfp);
-}
-
/**
* cfg80211_vendor_event - send the event
* @skb: The skb, must have been allocated with cfg80211_vendor_event_alloc()
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 9ab777e0bd4d..674ab5fa6da0 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -15416,17 +15416,6 @@ int cfg80211_vendor_cmd_reply(struct sk_buff *skb)
}
EXPORT_SYMBOL_GPL(cfg80211_vendor_cmd_reply);
-unsigned int cfg80211_vendor_cmd_get_sender(struct wiphy *wiphy)
-{
- struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
-
- if (WARN_ON(!rdev->cur_cmd_info))
- return 0;
-
- return rdev->cur_cmd_info->snd_portid;
-}
-EXPORT_SYMBOL_GPL(cfg80211_vendor_cmd_get_sender);
-
static int nl80211_set_qos_map(struct sk_buff *skb,
struct genl_info *info)
{
--
2.46.2
next prev parent reply other threads:[~2024-10-06 22:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-06 22:53 [PATCH 0/2] Some cfg80211 deadcode removal linux
2024-10-06 22:53 ` [PATCH 1/2] cfg80211: Remove unused cfg80211_background_cac_abort linux
2024-10-07 6:59 ` Vasanthakumar Thiagarajan
2024-10-07 11:02 ` Dr. David Alan Gilbert
2024-10-06 22:53 ` linux [this message]
2024-10-07 11:04 ` [PATCH 2/2] cfg80211: Remove unused cfg80211_vendor_ functions Johannes Berg
2024-10-07 11:29 ` 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=20241006225303.121445-3-linux@treblig.org \
--to=linux@treblig.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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