<?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 19. Key handling</title><meta name="generator" content="DocBook XSL Stylesheets V1.76.1" /><link rel="home" href="index.html" title="The 802.11 subsystems – for kernel developers" /><link rel="up" href="internal.html" title="Part IV. Internals" /><link rel="prev" href="internal.html" title="Part IV. Internals" /><link rel="next" href="bk02pt04ch19s02.html" title="MORE TBD" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 19. Key handling</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="internal.html">Prev</a> </td><th width="60%" align="center">Part IV. Internals</th><td width="20%" align="right"> <a accesskey="n" href="bk02pt04ch19s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" title="Chapter 19. Key handling"><div class="titlepage"><div><div><h2 class="title"><a id="key-handling"></a>Chapter 19. Key handling</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="sect1"><a href="key-handling.html#id3059437">Key handling basics</a></span></dt><dt><span class="sect1"><a href="bk02pt04ch19s02.html">MORE TBD</a></span></dt></dl></div><div class="sect1" title="Key handling basics"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="id3059437"></a>Key handling basics</h2></div></div></div><p> </p><p> Key handling in mac80211 is done based on per-interface (sub_if_data) keys and per-station keys. Since each station belongs to an interface, each station key also belongs to that interface. </p><p> Hardware acceleration is done on a best-effort basis for algorithms that are implemented in software, for each key the hardware is asked to enable that key for offloading but if it cannot do that the key is simply kept for software encryption (unless it is for an algorithm that isn't implemented in software). There is currently no way of knowing whether a key is handled in SW or HW except by looking into debugfs. </p><p> All key management is internally protected by a mutex. Within all other parts of mac80211, key references are, just as STA structure references, protected by RCU. Note, however, that some things are unprotected, namely the key->sta dereferences within the hardware acceleration functions. This means that <code class="function">sta_info_destroy</code> must remove the key which waits for an RCU grace period. </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="internal.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="internal.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk02pt04ch19s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Part IV. Internals </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> MORE TBD</td></tr></table></div></body></html>