Sophie

Sophie

distrib > Fedora > 18 > x86_64 > media > updates > by-pkgid > 1a595394b241504ff370a8d12ebfcea7 > files > 216

kernel-doc-3.11.10-100.fc18.noarch.rpm

<?xml version="1.0" encoding="ANSI_X3.4-1968" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968" /><title>Chapter&#160;12.&#160;Access point mode support</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1" /><link rel="home" href="index.html" title="The 802.11 subsystems &#8211; for kernel developers" /><link rel="up" href="advanced.html" title="Part&#160;II.&#160;Advanced driver interface" /><link rel="prev" href="API-struct-ieee80211-tx-queue-params.html" title="struct ieee80211_tx_queue_params" /><link rel="next" href="API-ieee80211-get-buffered-bc.html" title="ieee80211_get_buffered_bc" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter&#160;12.&#160;Access point mode support</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-struct-ieee80211-tx-queue-params.html">Prev</a>&#160;</td><th width="60%" align="center">Part&#160;II.&#160;Advanced driver interface</th><td width="20%" align="right">&#160;<a accesskey="n" href="API-ieee80211-get-buffered-bc.html">Next</a></td></tr></table><hr /></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a id="AP"></a>Chapter&#160;12.&#160;Access point mode support</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="section"><a href="AP.html#ps-client">support for powersaving clients</a></span></dt><dt><span class="refentrytitle"><a href="API-ieee80211-get-buffered-bc.html"><span class="phrase">ieee80211_get_buffered_bc</span></a></span><span class="refpurpose"> &#8212; 
  accessing buffered broadcast and multicast frames
 </span></dt><dt><span class="refentrytitle"><a href="API-ieee80211-beacon-get.html"><span class="phrase">ieee80211_beacon_get</span></a></span><span class="refpurpose"> &#8212; 
  beacon generation function
 </span></dt><dt><span class="refentrytitle"><a href="API-ieee80211-sta-eosp.html"><span class="phrase">ieee80211_sta_eosp</span></a></span><span class="refpurpose"> &#8212; 
  notify mac80211 about end of SP
 </span></dt><dt><span class="refentrytitle"><a href="API-enum-ieee80211-frame-release-type.html"><span class="phrase">enum ieee80211_frame_release_type</span></a></span><span class="refpurpose"> &#8212; 
  frame release reason
 </span></dt><dt><span class="refentrytitle"><a href="API-ieee80211-sta-ps-transition.html"><span class="phrase">ieee80211_sta_ps_transition</span></a></span><span class="refpurpose"> &#8212; 
  PS transition for connected sta
 </span></dt><dt><span class="refentrytitle"><a href="API-ieee80211-sta-ps-transition-ni.html"><span class="phrase">ieee80211_sta_ps_transition_ni</span></a></span><span class="refpurpose"> &#8212; 
  PS transition for connected sta (in process context)
 </span></dt><dt><span class="refentrytitle"><a href="API-ieee80211-sta-set-buffered.html"><span class="phrase">ieee80211_sta_set_buffered</span></a></span><span class="refpurpose"> &#8212; 
  inform mac80211 about driver-buffered frames
 </span></dt><dt><span class="refentrytitle"><a href="API-ieee80211-sta-block-awake.html"><span class="phrase">ieee80211_sta_block_awake</span></a></span><span class="refpurpose"> &#8212; 
  block station from waking up
 </span></dt></dl></div><p>TBD</p><p>Some parts of the if_conf should be discussed here instead</p><p>
          Insert notes about VLAN interfaces with hw crypto here or
          in the hw crypto chapter.
        </p><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="ps-client"></a>support for powersaving clients</h2></div></div></div><p>
   </p><p>
   In order to implement AP and P2P GO modes, mac80211 has support for
   client powersaving, both <span class="quote">&#8220;<span class="quote">legacy</span>&#8221;</span> PS (PS-Poll/null data) and uAPSD.
   There currently is no support for sAPSD.
   </p><p>
   There is one assumption that mac80211 makes, namely that a client
   will not poll with PS-Poll and trigger with uAPSD at the same time.
   Both are supported, and both can be used by the same client, but
   they can't be used concurrently by the same client. This simplifies
   the driver code.
   </p><p>
   The first thing to keep in mind is that there is a flag for complete
   driver implementation: <code class="constant">IEEE80211_HW_AP_LINK_PS</code>. If this flag is set,
   mac80211 expects the driver to handle most of the state machine for
   powersaving clients and will ignore the PM bit in incoming frames.
   Drivers then use <code class="function">ieee80211_sta_ps_transition</code> to inform mac80211 of
   stations' powersave transitions. In this mode, mac80211 also doesn't
   handle PS-Poll/uAPSD.
   </p><p>
   In the mode without <code class="constant">IEEE80211_HW_AP_LINK_PS</code>, mac80211 will check the
   PM bit in incoming frames for client powersave transitions. When a
   station goes to sleep, we will stop transmitting to it. There is,
   however, a race condition: a station might go to sleep while there is
   data buffered on hardware queues. If the device has support for this
   it will reject frames, and the driver should give the frames back to
   mac80211 with the <code class="constant">IEEE80211_TX_STAT_TX_FILTERED</code> flag set which will
   cause mac80211 to retry the frame when the station wakes up. The
   driver is also notified of powersave transitions by calling its
   <em class="parameter"><code>sta_notify</code></em> callback.
   </p><p>
   When the station is asleep, it has three choices: it can wake up,
   it can PS-Poll, or it can possibly start a uAPSD service period.
   Waking up is implemented by simply transmitting all buffered (and
   filtered) frames to the station. This is the easiest case. When
   the station sends a PS-Poll or a uAPSD trigger frame, mac80211
   will inform the driver of this with the <em class="parameter"><code>allow_buffered_frames</code></em>
   callback; this callback is optional. mac80211 will then transmit
   the frames as usual and set the <code class="constant">IEEE80211_TX_CTL_NO_PS_BUFFER</code>
   on each frame. The last frame in the service period (or the only
   response to a PS-Poll) also has <code class="constant">IEEE80211_TX_STATUS_EOSP</code> set to
   indicate that it ends the service period; as this frame must have
   TX status report it also sets <code class="constant">IEEE80211_TX_CTL_REQ_TX_STATUS</code>.
   When TX status is reported for this frame, the service period is
   marked has having ended and a new one can be started by the peer.
   </p><p>
   Additionally, non-bufferable MMPDUs can also be transmitted by
   mac80211 with the <code class="constant">IEEE80211_TX_CTL_NO_PS_BUFFER</code> set in them.
   </p><p>
   Another race condition can happen on some devices like iwlwifi
   when there are frames queued for the station and it wakes up
   or polls; the frames that are already queued could end up being
   transmitted first instead, causing reordering and/or wrong
   processing of the EOSP. The cause is that allowing frames to be
   transmitted to a certain station is out-of-band communication to
   the device. To allow this problem to be solved, the driver can
   call <code class="function">ieee80211_sta_block_awake</code> if frames are buffered when it
   is notified that the station went to sleep. When all these frames
   have been filtered (see above), it must call the function again
   to indicate that the station is no longer blocked.
   </p><p>
   If the driver buffers frames in the driver for aggregation in any
   way, it must use the <code class="function">ieee80211_sta_set_buffered</code> call when it is
   notified of the station going to sleep to inform mac80211 of any
   TIDs that have frames buffered. Note that when a station wakes up
   this information is reset (hence the requirement to call it when
   informed of the station going to sleep). Then, when a service
   period starts for any reason, <em class="parameter"><code>release_buffered_frames</code></em> is called
   with the number of frames to be released and which TIDs they are
   to come from. In this case, the driver is responsible for setting
   the EOSP (for uAPSD) and MORE_DATA bits in the released frames,
   to help the <em class="parameter"><code>more_data</code></em> paramter is passed to tell the driver if
   there is more data on other TIDs -- the TIDs to release frames
   from are ignored since mac80211 doesn't know how many frames the
   buffers for those TIDs contain.
   </p><p>
   If the driver also implement GO mode, where absence periods may
   shorten service periods (or abort PS-Poll responses), it must
   filter those response frames except in the case of frames that
   are buffered in the driver -- those must remain buffered to avoid
   reordering. Because it is possible that no frames are released
   in this case, the driver must call <code class="function">ieee80211_sta_eosp</code>
   to indicate to mac80211 that the service period ended anyway.
   </p><p>
   Finally, if frames from multiple TIDs are released from mac80211
   but the driver might reorder them, it must clear &amp; set the flags
   appropriately (only the last frame may have <code class="constant">IEEE80211_TX_STATUS_EOSP</code>)
   and also take care of the EOSP and MORE_DATA bits in the frame.
   The driver may also use <code class="function">ieee80211_sta_eosp</code> in this case.
</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-struct-ieee80211-tx-queue-params.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="advanced.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="API-ieee80211-get-buffered-bc.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">struct ieee80211_tx_queue_params</span>&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;<span class="phrase">ieee80211_get_buffered_bc</span></td></tr></table></div></body></html>