]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - share/man/man9/ieee80211_input.9
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / share / man / man9 / ieee80211_input.9
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:
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\"    notice, this list of conditions and the following disclaimer in the
13 .\"    documentation and/or other materials provided with the distribution.
14 .\"
15 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
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$
28 .\"
29 .Dd August 4, 2009
30 .Dt IEEE80211_INPUT 9
31 .Os
32 .Sh NAME
33 .Nm ieee80211_input
34 .Nd software 802.11 stack input functions
35 .Sh SYNOPSIS
36 .In net80211/ieee80211_var.h
37 .Ft void
38 .Fo ieee80211_input
39 .Fa "struct ieee80211_node *"
40 .Fa "struct mbuf *"
41 .Fa "int rssi"
42 .Fa "int noise"
43 .Fc
44 .Ft void
45 .Fo ieee80211_input_all
46 .Fa "struct ieee80211com *"
47 .Fa "struct mbuf *"
48 .Fa "int rssi"
49 .Fa "int noise"
50 .Fc
51 .Sh DESCRIPTION
52 The
53 .Nm net80211
54 layer that supports 802.11 device drivers requires that
55 receive processing be single-threaded.
56 Typically this is done using a dedicated driver
57 .Xr taskqueue 9
58 thread.
59 .Fn ieee80211_input
60 and
61 .Fn ieee80211_input_all
62 process received 802.11 frames and are designed
63 for use in that context; e.g. no driver locks may be held.
64 .Pp
65 The frame passed up in the
66 .Vt mbuf
67 must have the 802.11 protocol header at the front; all device-specific
68 information and/or PLCP must be removed.
69 Any CRC must be stripped from the end of the frame.
70 The 802.11 protocol header should be 32-bit aligned for
71 optimal performance but receive processing does not require it.
72 If the frame holds a payload and that is not aligned to a 32-bit
73 boundary then the payload will be re-aligned so that it is suitable
74 for processing by protocols such as
75 .Xr ip 4 .
76 .Pp
77 If a device (such as
78 .Xr ath 4 )
79 inserts padding after the 802.11 header to align
80 the payload to a 32-bit boundary the
81 .Dv IEEE80211_C_DATAPAD
82 capability must be set.
83 Otherwise header and payload are assumed contiguous in the mbuf chain.
84 .Pp
85 If a received frame must pass
86 through the A-MPDU receive reorder buffer then the mbuf
87 must be marked with the
88 .Dv M_AMPDU
89 flag.
90 Note that for the moment this is required of all frames received from
91 a station and TID where a Block ACK stream is active, not just A-MPDU
92 aggregates.
93 It is sufficient to check for
94 .Dv IEEE80211_NODE_HT
95 in the
96 .Vt ni_flags
97 of the station's node table entry, any frames that do not require reorder
98 processing will be dispatched with only minimal overhead.
99 .Pp
100 The
101 .Vt rssi
102 parameter is the Receive Signal Strength Indication of the frame
103 measured in 0.5dBm units relative to the noise floor.
104 The
105 .Vt noise
106 parameter is the best approximation of the noise floor in
107 dBm units at the time the frame was received.
108 RSSI and noise are used by the
109 .Nm net80211
110 layer to make scanning and roaming decisions in station mode
111 and to do auto channel selection for hostap and similar modes.
112 Otherwise the values are made available to user applications
113 (with the rssi presented as a filtered average over the last ten values
114 and the noise floor the last reported value).
115 .Sh SEE ALSO
116 .Xr ieee80211 9