1<html><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.78.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 bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><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"><div class="titlepage"><div><div><h2 class="title"><a name="key-handling"></a>Chapter 19. Key handling</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="sect1"><a href="key-handling.html#idp1114411348">Key handling basics</a></span></dt><dt><span class="sect1"><a href="bk02pt04ch19s02.html">MORE TBD</a></span></dt></dl></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="idp1114411348"></a>Key handling basics</h2></div></div></div><p> 2 </p><p> 3 Key handling in mac80211 is done based on per-interface (sub_if_data) 4 keys and per-station keys. Since each station belongs to an interface, 5 each station key also belongs to that interface. 6 </p><p> 7 Hardware acceleration is done on a best-effort basis for algorithms 8 that are implemented in software, for each key the hardware is asked 9 to enable that key for offloading but if it cannot do that the key is 10 simply kept for software encryption (unless it is for an algorithm 11 that isn't implemented in software). 12 There is currently no way of knowing whether a key is handled in SW 13 or HW except by looking into debugfs. 14 </p><p> 15 All key management is internally protected by a mutex. Within all 16 other parts of mac80211, key references are, just as STA structure 17 references, protected by RCU. Note, however, that some things are 18 unprotected, namely the key->sta dereferences within the hardware 19 acceleration functions. This means that <code class="function">sta_info_destroy</code> must 20 remove the key which waits for an RCU grace period. 21</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> 22