1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>ieee80211_alloc_hw</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="basics.html" title="Chapter 1. Basic hardware handling"><link rel="prev" href="API-struct-ieee80211-ops.html" title="struct ieee80211_ops"><link rel="next" href="API-ieee80211-register-hw.html" title="ieee80211_register_hw"></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"><span class="phrase">ieee80211_alloc_hw</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-struct-ieee80211-ops.html">Prev</a> </td><th width="60%" align="center">Chapter 1. Basic hardware handling</th><td width="20%" align="right"> <a accesskey="n" href="API-ieee80211-register-hw.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-ieee80211-alloc-hw"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ieee80211_alloc_hw — 2 Allocate a new hardware device 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">struct ieee80211_hw * <b class="fsfunc">ieee80211_alloc_hw </b>(</code></td><td>size_t <var class="pdparam">priv_data_len</var>, </td></tr><tr><td> </td><td>const struct ieee80211_ops * <var class="pdparam">ops</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp1113501244"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>priv_data_len</code></em></span></dt><dd><p> 4 length of private data 5 </p></dd><dt><span class="term"><em class="parameter"><code>ops</code></em></span></dt><dd><p> 6 callbacks for this device 7 </p></dd></dl></div></div><div class="refsect1"><a name="idp1113503884"></a><h2>Description</h2><p> 8 </p><p> 9 10 This must be called once for each hardware device. The returned pointer 11 must be used to refer to this device when calling other functions. 12 mac80211 allocates a private data area for the driver pointed to by 13 <em class="parameter"><code>priv</code></em> in <span class="structname">struct ieee80211_hw</span>, the size of this area is given as 14 <em class="parameter"><code>priv_data_len</code></em>. 15</p></div><div class="refsect1"><a name="idp1113505812"></a><h2>Return</h2><p> 16 A pointer to the new hardware device, or <code class="constant">NULL</code> on error. 17</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-ops.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="basics.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-ieee80211-register-hw.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">struct ieee80211_ops</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">ieee80211_register_hw</span></td></tr></table></div></body></html> 18