From nobody Thu Nov 30 00:38:25 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SgckB3ylzz52V9Z; Thu, 30 Nov 2023 00:38:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SgckB1Mvtz3N9p; Thu, 30 Nov 2023 00:38:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701304706; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tAsBAigxpv5+fHLuGurxQb3Rpk797wuPT8xSTVoLa8U=; b=LDCV6467SS1deJNUr3kgMvAuDoRo0yAG57w6KobMUUnir/ebRKowfmFoj9qze7IkK4yQi7 nfu61qisVSF8TKKbjfUst7jq8W3Z0Ge+pFusQz6dK6HN+vye21GO0GUzKfE8S76C87Sjv9 t4j4jYCH438hT6ZUH0BL7YDf6gkVvejGrIxR+u7HyvgpyWoGakzucFHWK8zEhFs//gQ4hQ Tywb57qSAqARpEM+YQVMs2FHuq5sz18S2KNb58MElfcEYjdVHwqXVINa3foSaWthHbp1f7 37sZ1h/JUbLyDyehsaNJ8p6a6zFkE6HyQccNjOp/pTnYoZjlSRaJh8HaHUyZpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701304706; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tAsBAigxpv5+fHLuGurxQb3Rpk797wuPT8xSTVoLa8U=; b=Pv534YznZB+On/8nQnS7dunAW4WIKYxniNypIhGe8OkgZuTPBdNCIDKS5HG2E2+yojvSNn K8YWxzqZm3Qy8VGa2rd4Hk7bW4Gk+xBVelDXhfYgUkR8W9jQjsNdECga9ltddeI8dZjfgK DjyOwLmiShXjgH+enADXiZKR6PGAJYfjyU9JhYu0HB4XBfHMyHx0bPelsh7MpMShZZa8Du W5WHY2arBZ4Mvyb7zp27j3vc67UGhxCU1PAzsuFBVNZ6i53iu7CfWztzAFdi05sVCvoDCy uDJTiXrNpsJpteCzx5a683Aj/TQKexUrip2OdgfeZ2rvMR5+DMbC4xnGi4C6aA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1701304706; a=rsa-sha256; cv=none; b=BjcQG1SCsvSyJfbDri3ZvLlRwcjje4l//BZlveUJUDJ88s0mdjKxsATAKmyIl5ISEbhdlI HOkDXFGiyRR3tZKCCeL6A1OQ5x7e4/RUrR2dT3woYe6qpYaIfM2exApMBcfmeBgRivbs1m 7SFQvk2MiJPnl7uLIw1ZIrWRH7/DlpMcLoauinAf0MTX2Erd/DSMgIvtcFgVfBRIkVlfhN JA/An3URnmj2aAqxkRqY5jW4UYwtEQouzEv2LVAhJJr3WdXlWRkDzIvBhskhuzGQsM4qt0 MSs3GzSuTi1Fa3LBvo7AsfcEOx+CRXLkwdQeKQId9AxiJurjipy5wwRtv2PPuA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SgckB0TbbzD8s; Thu, 30 Nov 2023 00:38:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3AU0cPlY052363; Thu, 30 Nov 2023 00:38:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AU0cPHb052359; Thu, 30 Nov 2023 00:38:25 GMT (envelope-from git) Date: Thu, 30 Nov 2023 00:38:25 GMT Message-Id: <202311300038.3AU0cPHb052359@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: a8c36fd7a3e8 - stable/14 - net80211: remove ieee80211_unref_node() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a8c36fd7a3e8af322bdb06886e40a79d1a614ac6 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=a8c36fd7a3e8af322bdb06886e40a79d1a614ac6 commit a8c36fd7a3e8af322bdb06886e40a79d1a614ac6 Author: Bjoern A. Zeeb AuthorDate: 2023-10-02 14:30:46 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-11-30 00:36:58 +0000 net80211: remove ieee80211_unref_node() ieee80211_unref_node() was only used in two error cases in ieee80211_send_nulldata(). There we do not need to guard against ni pointer reuse after decrementing the refcount of the ni as we only update the stats and return. Update the man page and remove the link for the now gone function. Note: the last uses of the function were removed in 493d6255434ce. Sponsored by: The FreeBSD Foundation Reviewed by: adrian, emaste Differential Revision: https://reviews.freebsd.org/D42035 (cherry picked from commit 1137943b1c5b225e30b82350ff7fb12c258ea90f) --- ObsoleteFiles.inc | 3 +++ share/man/man9/Makefile | 3 +-- share/man/man9/ieee80211_node.9 | 15 ++++----------- sys/net80211/ieee80211_node.h | 7 ------- sys/net80211/ieee80211_output.c | 4 ++-- 5 files changed, 10 insertions(+), 22 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 32a044706e51..49ba0898132e 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -54,6 +54,9 @@ # 20231006: rename tcp6_v4unmapped_bind_test OLD_FILES+=usr/tests/sys/netinet/tcp6_v4unmapped_bind_test +# 20231005: Remove man page link for now gone net80211 function. +OLD_FILES+=usr/share/man/man9/ieee80211_unref_node.9.gz + # 20231013: Man pages renamed to match the actual functions OLD_FILES+=usr/share/man/man9/cr_seeothergids.9.gz OLD_FILES+=usr/share/man/man9/cr_seeotheruids.9.gz diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 2122f8d6ea8c..c82ce254f681 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1212,8 +1212,7 @@ MLINKS+=ieee80211_node.9 ieee80211_dump_node.9 \ ieee80211_node.9 ieee80211_find_rxnode_withkey.9 \ ieee80211_node.9 ieee80211_free_node.9 \ ieee80211_node.9 ieee80211_iterate_nodes.9 \ - ieee80211_node.9 ieee80211_ref_node.9 \ - ieee80211_node.9 ieee80211_unref_node.9 + ieee80211_node.9 ieee80211_ref_node.9 MLINKS+=ieee80211_output.9 ieee80211_process_callback.9 \ ieee80211_output.9 M_SEQNO_GET.9 \ ieee80211_output.9 M_WME_GETAC.9 diff --git a/share/man/man9/ieee80211_node.9 b/share/man/man9/ieee80211_node.9 index 8340b4762b67..6dd492e3b33d 100644 --- a/share/man/man9/ieee80211_node.9 +++ b/share/man/man9/ieee80211_node.9 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 28, 2010 +.Dd October 2, 2023 .Dt IEEE80211_NODE 9 .Os .Sh NAME @@ -50,9 +50,6 @@ .Fn ieee80211_ref_node "struct ieee80211_node *" .\" .Ft void -.Fn ieee80211_unref_node "struct ieee80211_node *" -.\" -.Ft void .Fn ieee80211_free_node "struct ieee80211_node *" .\" .Ft void @@ -106,14 +103,10 @@ Routines that lookup a table entry return a (i.e. a pointer to a table entry with the reference count incremented). The .Fn ieee80211_ref_node -and -.Fn ieee80211_unref_node -calls explicitly increment/decrement the reference count of a node, -but are rarely used. -Instead most callers use +call explicitly increments the reference count of a node. .Fn ieee80211_free_node -to release a reference and, if the count goes to zero, reclaim the -table entry. +decrements the reference count of a node and if the count goes to zero +reclaims the table entry. .Pp The station table and its entries are exposed to drivers in several ways. Each frame transmitted to a station includes a reference to the diff --git a/sys/net80211/ieee80211_node.h b/sys/net80211/ieee80211_node.h index 67ad4a7c44f6..954e8e03563f 100644 --- a/sys/net80211/ieee80211_node.h +++ b/sys/net80211/ieee80211_node.h @@ -319,13 +319,6 @@ MALLOC_DECLARE(M_80211_NODE_IE); #define IEEE80211_RSSI_GET(x) \ IEEE80211_RSSI_EP_RND(x, IEEE80211_RSSI_EP_MULTIPLIER) -static __inline void -ieee80211_unref_node(struct ieee80211_node **ni) -{ - ieee80211_node_decref(*ni); - *ni = NULL; /* guard against use */ -} - void ieee80211_node_attach(struct ieee80211com *); void ieee80211_node_lateattach(struct ieee80211com *); void ieee80211_node_detach(struct ieee80211com *); diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c index 6fc4a1567d8e..a5fad2462598 100644 --- a/sys/net80211/ieee80211_output.c +++ b/sys/net80211/ieee80211_output.c @@ -1104,7 +1104,7 @@ ieee80211_send_nulldata(struct ieee80211_node *ni) if (vap->iv_state == IEEE80211_S_CAC) { IEEE80211_NOTE(vap, IEEE80211_MSG_OUTPUT | IEEE80211_MSG_DOTH, ni, "block %s frame in CAC state", "null data"); - ieee80211_unref_node(&ni); + ieee80211_node_decref(ni); vap->iv_stats.is_tx_badstate++; return EIO; /* XXX */ } @@ -1122,7 +1122,7 @@ ieee80211_send_nulldata(struct ieee80211_node *ni) m = ieee80211_getmgtframe(&frm, ic->ic_headroom + hdrlen, 0); if (m == NULL) { /* XXX debug msg */ - ieee80211_unref_node(&ni); + ieee80211_node_decref(ni); vap->iv_stats.is_tx_nobuf++; return ENOMEM; }