1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>regulatory_hint</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="bk01ch06.html" title="Chapter 6. Regulatory enforcement infrastructure"><link rel="prev" href="bk01ch06.html" title="Chapter 6. Regulatory enforcement infrastructure"><link rel="next" href="API-wiphy-apply-custom-regulatory.html" title="wiphy_apply_custom_regulatory"></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">regulatory_hint</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01ch06.html">Prev</a> </td><th width="60%" align="center">Chapter 6. Regulatory enforcement infrastructure</th><td width="20%" align="right"> <a accesskey="n" href="API-wiphy-apply-custom-regulatory.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-regulatory-hint"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>regulatory_hint — 2 driver hint to the wireless core a regulatory domain 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">int <b class="fsfunc">regulatory_hint </b>(</code></td><td>struct wiphy * <var class="pdparam">wiphy</var>, </td></tr><tr><td> </td><td>const char * <var class="pdparam">alpha2</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp1113191132"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>wiphy</code></em></span></dt><dd><p> 4 the wireless device giving the hint (used only for reporting 5 conflicts) 6 </p></dd><dt><span class="term"><em class="parameter"><code>alpha2</code></em></span></dt><dd><p> 7 the ISO/IEC 3166 alpha2 the driver claims its regulatory domain 8 should be in. If <em class="parameter"><code>rd</code></em> is set this should be NULL. Note that if you 9 set this to NULL you should still set rd->alpha2 to some accepted 10 alpha2. 11 </p></dd></dl></div></div><div class="refsect1"><a name="idp1113194436"></a><h2>Description</h2><p> 12 Wireless drivers can use this function to hint to the wireless core 13 what it believes should be the current regulatory domain by 14 giving it an ISO/IEC 3166 alpha2 country code it knows its regulatory 15 domain should be in or by providing a completely build regulatory domain. 16 If the driver provides an ISO/IEC 3166 alpha2 userspace will be queried 17 for a regulatory domain structure for the respective country. 18 </p><p> 19 20 The wiphy must have been registered to cfg80211 prior to this call. 21 For cfg80211 drivers this means you must first use <code class="function">wiphy_register</code>, 22 for mac80211 drivers you must first use <code class="function">ieee80211_register_hw</code>. 23 </p><p> 24 25 Drivers should check the return value, its possible you can get 26 an -ENOMEM. 27</p></div><div class="refsect1"><a name="idp1113196740"></a><h2>Return</h2><p> 28 0 on success. -ENOMEM. 29</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01ch06.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01ch06.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-wiphy-apply-custom-regulatory.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 6. Regulatory enforcement infrastructure </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">wiphy_apply_custom_regulatory</span></td></tr></table></div></body></html> 30