git: db195a523f9b - main - net80211: make ieee80211_alloc_node() private
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 02 Oct 2023 14:06:02 UTC
The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=db195a523f9bbeb111b621d2c2c7a46d8b921631 commit db195a523f9bbeb111b621d2c2c7a46d8b921631 Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2023-10-02 13:57:45 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2023-10-02 14:05:03 +0000 net80211: make ieee80211_alloc_node() private Looking through the allocation/free and reference cycle of nodes we have a few (publicly) (almost) unused macros and functions. Start making them private and reducing the amount of entry paths to the same/similar functionality. First is to make ieee80211_alloc_node() static as it is nowhere used in the tree outside this file. Sponsored by: The FreeBSD Foundation X-MFC: no --- sys/net80211/ieee80211_node.c | 5 ++++- sys/net80211/ieee80211_node.h | 3 --- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index 39b411059cf1..b7cdc5090c96 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -82,6 +82,9 @@ CTASSERT((IEEE80211_NODE_HASHSIZE & (IEEE80211_NODE_HASHSIZE-1)) == 0); static int ieee80211_sta_join1(struct ieee80211_node *); +static struct ieee80211_node *ieee80211_alloc_node( + struct ieee80211_node_table *, struct ieee80211vap *, + const uint8_t macaddr[IEEE80211_ADDR_LEN]); static struct ieee80211_node *node_alloc(struct ieee80211vap *, const uint8_t [IEEE80211_ADDR_LEN]); static int node_init(struct ieee80211_node *); @@ -1396,7 +1399,7 @@ ieee80211_del_node_nt(struct ieee80211_node_table *nt, ni->ni_table = NULL; } -struct ieee80211_node * +static struct ieee80211_node * ieee80211_alloc_node(struct ieee80211_node_table *nt, struct ieee80211vap *vap, const uint8_t macaddr[IEEE80211_ADDR_LEN]) { diff --git a/sys/net80211/ieee80211_node.h b/sys/net80211/ieee80211_node.h index 7c9ff70bcb71..826ecccb1238 100644 --- a/sys/net80211/ieee80211_node.h +++ b/sys/net80211/ieee80211_node.h @@ -395,9 +395,6 @@ struct ieee80211_node_table { int nt_inact_init; /* initial node inact setting */ }; -struct ieee80211_node *ieee80211_alloc_node(struct ieee80211_node_table *, - struct ieee80211vap *, - const uint8_t macaddr[IEEE80211_ADDR_LEN]); struct ieee80211_node *ieee80211_tmp_node(struct ieee80211vap *, const uint8_t macaddr[IEEE80211_ADDR_LEN]); struct ieee80211_node *ieee80211_dup_bss(struct ieee80211vap *,