From patchwork Sun Oct 6 22:53:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dr. David Alan Gilbert" X-Patchwork-Id: 833327 Received: from mx.treblig.org (mx.treblig.org [46.235.229.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 31AF018C036; Sun, 6 Oct 2024 22:53:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.229.95 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728255206; cv=none; b=drQxcZejQz3pxamtKVShfWJNQ+jr9dBGgXwECOmgAZCguakSSwYuDpvOYbb6n0pnLbRdejRtVxr9Rk0FUYHfh6bdYiHATyOvY/LBMx3ezUvqtmvzei5MZfy6OrtfnIAvfgXa/kIXevVI7jBigfIsm7Owi87rNORHW6V9lxf1yzI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728255206; c=relaxed/simple; bh=JbGT4PmDiLI+8OespZr+BZTeb1MTifSY8Tb5f9KoutA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FMQrjbB9pws4iQCK1YAehmhZDmlpBUykbCjz4UQcDoCKuY0NdHx4ohhQ7OoT+XbBXhJ6wTwu8lzHigFYWtDqp67xMnM4T2IdnVCyZWk2r5iVRI0eT0pq/hDtt3LvPPlXlvXnieBHxDO23SgJIIVeiOV2dzHJ1erpfcG6Kg2Az0I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org; spf=pass smtp.mailfrom=treblig.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b=Hn+nhNYR; arc=none smtp.client-ip=46.235.229.95 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=treblig.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b="Hn+nhNYR" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=treblig.org ; s=bytemarkmx; h=MIME-Version:Message-ID:Date:Subject:From:Content-Type:From :Subject; bh=sDoC0AjVQEZ6NF4cxvoGmjALQJWw/amCL5+nVShqYGk=; b=Hn+nhNYRmPY9LuMg UuUkcWjibQkAzlxdn6I3XcRDdItv/07roMzfUs/ndRg/yvAadGc2UiPYnkdbj2mjjLiG+yF10k4Dv AuqtcVnAEY0/30eyFMCJaUpiQO0Kzo6zGc4qV6voSGsq09SeNxGqpE+FrVZg0h6qIyJZf0dx2WJlg eG4hzB1hrFMn1661rwSbIlt0pSygWlD5BG5EZgJPltnEJRz5UKcZBC3bMtDz6Cem8Dy/qxba3SOxy l/9luSTZ9+puHjDQGKNgCoCpQL73Sw6OhnNQOUgSpj16JfiJeJCbQSkgslGyZlNOwRurLw6oFA5xQ tvHE7CPqpxL8yn/WPw==; Received: from localhost ([127.0.0.1] helo=dalek.home.treblig.org) by mx.treblig.org with esmtp (Exim 4.96) (envelope-from ) id 1sxa7d-009LcO-0I; Sun, 06 Oct 2024 22:53:05 +0000 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" Subject: [PATCH 1/2] cfg80211: Remove unused cfg80211_background_cac_abort Date: Sun, 6 Oct 2024 23:53:02 +0100 Message-ID: <20241006225303.121445-2-linux@treblig.org> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20241006225303.121445-1-linux@treblig.org> References: <20241006225303.121445-1-linux@treblig.org> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: "Dr. David Alan Gilbert" cfg80211_background_cac_abort() is unused. It got renamed from cfg80211_offchan_cac_abort by commit a95bfb876fa8 ("cfg80211: rename offchannel_chain structs to background_chain to avoid confusion with ETSI standard") and that was originally added in commit 1507b1531981 ("cfg80211: move offchan_cac_event to a dedicated work") but never used. To me it looks like the queue is still used (I see a queue_work in __cfg80211_radar_event), so I think it's just the wrapper that's unused. Remove cfg80211_background_cac_abort. Signed-off-by: Dr. David Alan Gilbert --- include/net/cfg80211.h | 9 --------- net/wireless/mlme.c | 8 -------- 2 files changed, 17 deletions(-) diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 69ec1eb41a09..fd843a519329 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -8752,15 +8752,6 @@ void cfg80211_cac_event(struct net_device *netdev, enum nl80211_radar_event event, gfp_t gfp, unsigned int link_id); -/** - * cfg80211_background_cac_abort - Channel Availability Check offchan abort event - * @wiphy: the wiphy - * - * This function is called by the driver when a Channel Availability Check - * (CAC) is aborted by a offchannel dedicated chain. - */ -void cfg80211_background_cac_abort(struct wiphy *wiphy); - /** * cfg80211_gtk_rekey_notify - notify userspace about driver rekeying * @dev: network device diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c index 4dac81854721..8ec236bbbc7c 100644 --- a/net/wireless/mlme.c +++ b/net/wireless/mlme.c @@ -1226,14 +1226,6 @@ void cfg80211_background_cac_abort_wk(struct work_struct *work) NL80211_RADAR_CAC_ABORTED); } -void cfg80211_background_cac_abort(struct wiphy *wiphy) -{ - struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); - - queue_work(cfg80211_wq, &rdev->background_cac_abort_wk); -} -EXPORT_SYMBOL(cfg80211_background_cac_abort); - int cfg80211_start_background_radar_detection(struct cfg80211_registered_device *rdev, struct wireless_dev *wdev, From patchwork Sun Oct 6 22:53:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dr. David Alan Gilbert" X-Patchwork-Id: 833936 Received: from mx.treblig.org (mx.treblig.org [46.235.229.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4CF3417335C; Sun, 6 Oct 2024 22:53:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.229.95 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728255200; cv=none; b=L7asYnQW4eGYUsNl0vjyKBWQ8YBqGg7fnof/hlPFmydWzYAV/BWpRTibWe57j1CsPUPhnMK50AzclJ6Y5Q9uxerS1kMpbny4uH5gNvyTyFB5cjfNfTUwPkY+ABU168wr0za7H9aDTuDhv24Qehx7wTcbK0DalS0sVVwhTDyqx1Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728255200; c=relaxed/simple; bh=Of3ewFYPAsAI1H+tkSL99SC2LLS2QQ9DuiAiKAP1EGk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iContvtZ14bndEb4PMO+pWsijrcJztlm9usArjXyzCPBtk4RjT8OstdCU6pZeta3pVCEmDvrtJuNT35npq7VtuaOY4ldvT4OkcbPQo2mlU3JHci7clHwAVcMdsDK3T8FioCFK1OaM74RIKo2OM0dQ21Ym1//xSW+7OSOocW0gfs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org; spf=pass smtp.mailfrom=treblig.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b=CKhc6S5M; arc=none smtp.client-ip=46.235.229.95 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=treblig.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b="CKhc6S5M" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=treblig.org ; s=bytemarkmx; h=MIME-Version:Message-ID:Date:Subject:From:Content-Type:From :Subject; bh=1Po/4b5GDhTFckPAtrsG1PuoF6Q+mG7FncT9Bby/ovc=; b=CKhc6S5MF2n2CsK1 NRQIEaOWUiyhAo3oM8Bw5hIk4IDdyXPaShoBBYReeL8DhqrxzMSmhdeNdx7uSw4oBeMXfXxCkiPzC ag42UqeZLRQcO+enMhqWOwBDhaFtG8J6RAEewZXR6C6PZVW89xTo4IGxRKp6a3fr6kvzEzjcz9pZy NZNlEfqsoqUqoILLQlxJ6ad+yYM2ICTQMFTf1bo1iz7TM2wwGxax/f5j1lOMH2uNAkGnGj/SjU4sl j48Wl0xdnLbSvfzmOtCJrHg+X8HjXhGdAYNGmC9zm0AqataYBymxv2IiuuYA7xnUoWXFq12RB3F0Z pmY2mVsBdZmaQFNWbg==; Received: from localhost ([127.0.0.1] helo=dalek.home.treblig.org) by mx.treblig.org with esmtp (Exim 4.96) (envelope-from ) id 1sxa7d-009LcO-26; Sun, 06 Oct 2024 22:53:05 +0000 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" Subject: [PATCH 2/2] cfg80211: Remove unused cfg80211_vendor_ functions Date: Sun, 6 Oct 2024 23:53:03 +0100 Message-ID: <20241006225303.121445-3-linux@treblig.org> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20241006225303.121445-1-linux@treblig.org> References: <20241006225303.121445-1-linux@treblig.org> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: "Dr. David Alan Gilbert" 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 --- 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) {