blob: e0ded463558a3433ffea53f3ca841a1034949c16 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
<table class="head">
<tr>
<td class="head-ltitle">IEEE80211_INPUT(9)</td>
<td class="head-vol">Kernel Developer's Manual</td>
<td class="head-rtitle">IEEE80211_INPUT(9)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<p class="Pp"><code class="Nm">ieee80211_input</code> —
<span class="Nd">software 802.11 stack input functions</span></p>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<p class="Pp"><code class="In">#include
<<a class="In">net80211/ieee80211_var.h</a>></code></p>
<p class="Pp"><var class="Ft">void</var>
<br/>
<code class="Fn">ieee80211_input</code>(<var class="Fa">struct ieee80211_node
*</var>, <var class="Fa">struct mbuf *</var>, <var class="Fa">int
rssi</var>, <var class="Fa">int noise</var>);</p>
<p class="Pp"><var class="Ft">void</var>
<br/>
<code class="Fn">ieee80211_input_all</code>(<var class="Fa">struct
ieee80211com *</var>, <var class="Fa">struct mbuf *</var>,
<var class="Fa">int rssi</var>, <var class="Fa">int noise</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp">The <code class="Nm">net80211</code> layer that supports 802.11
device drivers requires that receive processing be single-threaded.
Typically this is done using a dedicated driver
<a class="Xr">taskqueue(9)</a> thread.
<a class="permalink" href="#ieee80211_input"><code class="Fn" id="ieee80211_input">ieee80211_input</code></a>()
and
<a class="permalink" href="#ieee80211_input_all"><code class="Fn" id="ieee80211_input_all">ieee80211_input_all</code></a>()
process received 802.11 frames and are designed for use in that context;
e.g. no driver locks may be held.</p>
<p class="Pp">The frame passed up in the <var class="Vt">mbuf</var> must have
the 802.11 protocol header at the front; all device-specific information
and/or PLCP must be removed. Any CRC must be stripped from the end of the
frame. The 802.11 protocol header should be 32-bit aligned for optimal
performance but receive processing does not require it. If the frame holds a
payload and that is not aligned to a 32-bit boundary then the payload will
be re-aligned so that it is suitable for processing by protocols such as
<a class="Xr">ip(4)</a>.</p>
<p class="Pp">If a device (such as <a class="Xr">ath(4)</a>) inserts padding
after the 802.11 header to align the payload to a 32-bit boundary the
<code class="Dv">IEEE80211_C_DATAPAD</code> capability must be set.
Otherwise header and payload are assumed contiguous in the mbuf chain.</p>
<p class="Pp">If a received frame must pass through the A-MPDU receive reorder
buffer then the mbuf must be marked with the <code class="Dv">M_AMPDU</code>
flag. Note that for the moment this is required of all frames received from
a station and TID where a Block ACK stream is active, not just A-MPDU
aggregates. It is sufficient to check for
<code class="Dv">IEEE80211_NODE_HT</code> in the
<var class="Vt">ni_flags</var> of the station's node table entry, any frames
that do not require reorder processing will be dispatched with only minimal
overhead.</p>
<p class="Pp">The <var class="Vt">rssi</var> parameter is the Receive Signal
Strength Indication of the frame measured in 0.5dBm units relative to the
noise floor. The <var class="Vt">noise</var> parameter is the best
approximation of the noise floor in dBm units at the time the frame was
received. RSSI and noise are used by the <code class="Nm">net80211</code>
layer to make scanning and roaming decisions in station mode and to do auto
channel selection for hostap and similar modes. Otherwise the values are
made available to user applications (with the rssi presented as a filtered
average over the last ten values and the noise floor the last reported
value).</p>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<p class="Pp"><a class="Xr">ieee80211(9)</a></p>
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">August 4, 2009</td>
<td class="foot-os">FreeBSD 15.0</td>
</tr>
</table>
|