Sophie

Sophie

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

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;8.&#160;Hardware crypto acceleration</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-ieee80211-create-tpt-led-trigger.html" title="ieee80211_create_tpt_led_trigger" /><link rel="next" href="API-enum-set-key-cmd.html" title="enum set_key_cmd" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter&#160;8.&#160;Hardware crypto acceleration</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-ieee80211-create-tpt-led-trigger.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-enum-set-key-cmd.html">Next</a></td></tr></table><hr /></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a id="hardware-crypto-offload"></a>Chapter&#160;8.&#160;Hardware crypto acceleration</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="refentrytitle"><a href="API-enum-set-key-cmd.html"><span class="phrase">enum set_key_cmd</span></a></span><span class="refpurpose"> &#8212; 
  key command
 </span></dt><dt><span class="refentrytitle"><a href="API-struct-ieee80211-key-conf.html"><span class="phrase">struct ieee80211_key_conf</span></a></span><span class="refpurpose"> &#8212; 
  key information
 </span></dt><dt><span class="refentrytitle"><a href="API-enum-ieee80211-key-flags.html"><span class="phrase">enum ieee80211_key_flags</span></a></span><span class="refpurpose"> &#8212; 
  key flags
 </span></dt><dt><span class="refentrytitle"><a href="API-ieee80211-get-tkip-p1k.html"><span class="phrase">ieee80211_get_tkip_p1k</span></a></span><span class="refpurpose"> &#8212; 
  get a TKIP phase 1 key
 </span></dt><dt><span class="refentrytitle"><a href="API-ieee80211-get-tkip-p1k-iv.html"><span class="phrase">ieee80211_get_tkip_p1k_iv</span></a></span><span class="refpurpose"> &#8212; 
  get a TKIP phase 1 key for IV32
 </span></dt><dt><span class="refentrytitle"><a href="API-ieee80211-get-tkip-p2k.html"><span class="phrase">ieee80211_get_tkip_p2k</span></a></span><span class="refpurpose"> &#8212; 
  get a TKIP phase 2 key
 </span></dt></dl></div><p>
   </p><p>
   mac80211 is capable of taking advantage of many hardware
   acceleration designs for encryption and decryption operations.
   </p><p>
   The <code class="function">set_key</code> callback in the <span class="structname">struct ieee80211_ops</span> for a given
   device is called to enable hardware acceleration of encryption and
   decryption. The callback takes a <em class="parameter"><code>sta</code></em> parameter that will be NULL
   for default keys or keys used for transmission only, or point to
   the station information for the peer for individual keys.
   Multiple transmission keys with the same key index may be used when
   VLANs are configured for an access point.
   </p><p>
   When transmitting, the TX control data will use the <em class="parameter"><code>hw_key_idx</code></em>
   selected by the driver by modifying the <span class="structname">struct ieee80211_key_conf</span>
   pointed to by the <em class="parameter"><code>key</code></em> parameter to the <code class="function">set_key</code> function.
   </p><p>
   The <code class="function">set_key</code> call for the <code class="constant">SET_KEY</code> command should return 0 if
   the key is now in use, -<code class="constant">EOPNOTSUPP</code> or -<code class="constant">ENOSPC</code> if it couldn't be
   added; if you return 0 then hw_key_idx must be assigned to the
   hardware key index, you are free to use the full u8 range.
   </p><p>
   When the cmd is <code class="constant">DISABLE_KEY</code> then it must succeed.
   </p><p>
   Note that it is permissible to not decrypt a frame even if a key
   for it has been uploaded to hardware, the stack will not make any
   decision based on whether a key has been uploaded or not but rather
   based on the receive flags.
   </p><p>
   The <span class="structname">struct ieee80211_key_conf</span> structure pointed to by the <em class="parameter"><code>key</code></em>
   parameter is guaranteed to be valid until another call to <code class="function">set_key</code>
   removes it, but it can only be used as a cookie to differentiate
   keys.
   </p><p>
   In TKIP some HW need to be provided a phase 1 key, for RX decryption
   acceleration (i.e. iwlwifi). Those drivers should provide update_tkip_key
   handler.
   The <code class="function">update_tkip_key</code> call updates the driver with the new phase 1 key.
   This happens every time the iv16 wraps around (every 65536 packets). The
   <code class="function">set_key</code> call will happen only once for each key (unless the AP did
   rekeying), it will not include a valid phase 1 key. The valid phase 1 key is
   provided by update_tkip_key only. The trigger that makes mac80211 call this
   handler is software decryption with wrap around of iv16.
   </p><p>
   The <code class="function">set_default_unicast_key</code> call updates the default WEP key index
   configured to the hardware for WEP encryption type. This is required
   for devices that support offload of data packets (e.g. ARP responses).
</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-ieee80211-create-tpt-led-trigger.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-enum-set-key-cmd.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">ieee80211_create_tpt_led_trigger</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">enum set_key_cmd</span></td></tr></table></div></body></html>