Deleted Added
full compact
ieee80211_node.9 (211936) ieee80211_node.9 (233648)
1.\"
2.\" Copyright (c) 2004 Bruce M. Simpson <bms@spc.org>
3.\" Copyright (c) 2004 Darron Broad <darron@kewl.org>
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:

--- 10 unchanged lines hidden (view full) ---

19.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25.\" SUCH DAMAGE.
26.\"
1.\"
2.\" Copyright (c) 2004 Bruce M. Simpson <bms@spc.org>
3.\" Copyright (c) 2004 Darron Broad <darron@kewl.org>
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:

--- 10 unchanged lines hidden (view full) ---

19.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25.\" SUCH DAMAGE.
26.\"
27.\" $FreeBSD: head/share/man/man9/ieee80211_node.9 211936 2010-08-28 16:32:01Z brucec $
27.\" $FreeBSD: head/share/man/man9/ieee80211_node.9 233648 2012-03-29 05:02:12Z eadler $
28.\"
29.Dd April 28, 2010
30.Dt IEEE80211_NODE 9
31.Os
32.Sh NAME
33.Nm ieee80211_node
34.Nd software 802.11 stack node management functions
35.Sh SYNOPSIS

--- 26 unchanged lines hidden (view full) ---

62.Fa "struct ieee80211_node_table *"
63.Fa "ieee80211_iter_func *f"
64.Fa "void *arg"
65.Fc
66.\"
67.Ft void
68.Fo ieee80211_dump_nodes
69.Fa "struct ieee80211_node_table *"
28.\"
29.Dd April 28, 2010
30.Dt IEEE80211_NODE 9
31.Os
32.Sh NAME
33.Nm ieee80211_node
34.Nd software 802.11 stack node management functions
35.Sh SYNOPSIS

--- 26 unchanged lines hidden (view full) ---

62.Fa "struct ieee80211_node_table *"
63.Fa "ieee80211_iter_func *f"
64.Fa "void *arg"
65.Fc
66.\"
67.Ft void
68.Fo ieee80211_dump_nodes
69.Fa "struct ieee80211_node_table *"
70.Fc
70.Fc
71.\"
72.Ft void
73.Fo ieee80211_dump_node
74.Fa "struct ieee80211_node *"
71.\"
72.Ft void
73.Fo ieee80211_dump_node
74.Fa "struct ieee80211_node *"
75.Fc
75.Fc
76.Sh DESCRIPTION
77The
78.Nm net80211
79layer that supports 802.11 device drivers maintains a database of
80peer stations called the
76.Sh DESCRIPTION
77The
78.Nm net80211
79layer that supports 802.11 device drivers maintains a database of
80peer stations called the
81.Dq node table
81.Dq node table
82in the
83.Vt ic_sta
84entry of the
85.Vt ieee80211com
86structure.
87Station mode vaps create an entry for the access point
88the station is associated to.
89AP mode vaps create entries for associated stations.

--- 30 unchanged lines hidden (view full) ---

120The station table and its entries are exposed to drivers in several ways.
121Each frame transmitted to a station includes a reference to the
122associated node in the
123.Vt m_pkthdr.rcvif
124field.
125This reference must be reclaimed by the driver when transmit processing
126is done.
127For each frame received the driver must lookup the table entry to
82in the
83.Vt ic_sta
84entry of the
85.Vt ieee80211com
86structure.
87Station mode vaps create an entry for the access point
88the station is associated to.
89AP mode vaps create entries for associated stations.

--- 30 unchanged lines hidden (view full) ---

120The station table and its entries are exposed to drivers in several ways.
121Each frame transmitted to a station includes a reference to the
122associated node in the
123.Vt m_pkthdr.rcvif
124field.
125This reference must be reclaimed by the driver when transmit processing
126is done.
127For each frame received the driver must lookup the table entry to
128use in dispatching the frame
128use in dispatching the frame
129.Dq up the stack .
130This lookup implicitly obtains a reference to the table entry and
131the driver must reclaim the reference when frame processing is completed.
132Otherwise drivers frequently inspect the contents of the
133.Vt iv_bss
134node when handling state machine changes as important information
135is maintained in the data structure.
136.Pp
137The node table is opaque to drivers.
138Entries may be looked up using one of the pre-defined API's or the
139.Fn ieee80211_iterate_nodes
140call may be used to iterate through all entries to do per-node
141processing or implement some non-standard search mechanism.
129.Dq up the stack .
130This lookup implicitly obtains a reference to the table entry and
131the driver must reclaim the reference when frame processing is completed.
132Otherwise drivers frequently inspect the contents of the
133.Vt iv_bss
134node when handling state machine changes as important information
135is maintained in the data structure.
136.Pp
137The node table is opaque to drivers.
138Entries may be looked up using one of the pre-defined API's or the
139.Fn ieee80211_iterate_nodes
140call may be used to iterate through all entries to do per-node
141processing or implement some non-standard search mechanism.
142Note that
142Note that
143.Fn ieee80211_iterate_nodes
144is single-threaded per-device
145and the effort processing involved is fairly
146substantial so it should be used carefully.
147.Pp
148Two routines are provided to print the contents of nodes to the console
149for debugging:
150.Fn ieee80211_dump_node

--- 50 unchanged lines hidden (view full) ---

201state is reclaimed; for example:
202.Bd -literal -offset indent
203static void
204iwi_node_free(struct ieee80211_node *ni)
205{
206 struct ieee80211com *ic = ni->ni_ic;
207 struct iwi_softc *sc = ic->ic_ifp->if_softc;
208 struct iwi_node *in = (struct iwi_node *)ni;
143.Fn ieee80211_iterate_nodes
144is single-threaded per-device
145and the effort processing involved is fairly
146substantial so it should be used carefully.
147.Pp
148Two routines are provided to print the contents of nodes to the console
149for debugging:
150.Fn ieee80211_dump_node

--- 50 unchanged lines hidden (view full) ---

201state is reclaimed; for example:
202.Bd -literal -offset indent
203static void
204iwi_node_free(struct ieee80211_node *ni)
205{
206 struct ieee80211com *ic = ni->ni_ic;
207 struct iwi_softc *sc = ic->ic_ifp->if_softc;
208 struct iwi_node *in = (struct iwi_node *)ni;
209
209
210 if (in->in_station != -1)
211 free_unr(sc->sc_unr, in->in_station);
212 sc->sc_node_free(ni); /* invoke net80211 free handler */
213}
214.Ed
215.Pp
216Beware that care must be taken to avoid holding references that
217might cause nodes from being reclaimed.

--- 34 unchanged lines hidden ---
210 if (in->in_station != -1)
211 free_unr(sc->sc_unr, in->in_station);
212 sc->sc_node_free(ni); /* invoke net80211 free handler */
213}
214.Ed
215.Pp
216Beware that care must be taken to avoid holding references that
217might cause nodes from being reclaimed.

--- 34 unchanged lines hidden ---