1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>freq_reg_info</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="bk01ch06.html" title="Chapter&#160;6.&#160;Regulatory enforcement infrastructure"><link rel="prev" href="API-wiphy-apply-custom-regulatory.html" title="wiphy_apply_custom_regulatory"><link rel="next" href="bk01ch07.html" title="Chapter&#160;7.&#160;RFkill integration"></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">freq_reg_info</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-wiphy-apply-custom-regulatory.html">Prev</a>&#160;</td><th width="60%" align="center">Chapter&#160;6.&#160;Regulatory enforcement infrastructure</th><td width="20%" align="right">&#160;<a accesskey="n" href="bk01ch07.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-freq-reg-info"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>freq_reg_info &#8212; 
2  get regulatory information for the given frequency
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">const struct ieee80211_reg_rule * <b class="fsfunc">freq_reg_info </b>(</code></td><td>struct wiphy * <var class="pdparam">wiphy</var>, </td></tr><tr><td>&#160;</td><td>u32 <var class="pdparam">center_freq</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">&#160;</div></div></div><div class="refsect1"><a name="idp1113211788"></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 wiphy for which we want to process this rule for
5    </p></dd><dt><span class="term"><em class="parameter"><code>center_freq</code></em></span></dt><dd><p>
6     Frequency in KHz for which we want regulatory information for
7    </p></dd></dl></div></div><div class="refsect1"><a name="idp1113214500"></a><h2>Description</h2><p>
8   Use this function to get the regulatory rule for a specific frequency on
9   a given wireless device. If the device has a specific regulatory domain
10   it wants to follow we respect that unless a country IE has been received
11   and processed already.
12</p></div><div class="refsect1"><a name="idp1113215356"></a><h2>Return</h2><p>
13   A valid pointer, or, when an error occurs, for example if no rule
14   can be found, the return value is encoded using <code class="function">ERR_PTR</code>. Use <code class="function">IS_ERR</code> to
15   check and <code class="function">PTR_ERR</code> to obtain the numeric return value. The numeric return
16   value will be -ERANGE if we determine the given center_freq does not even
17   have a regulatory rule for a frequency range in the center_freq's band.
18   See <code class="function">freq_in_rule_band</code> for our current definition of a band -- this is
19   purely subjective and right now it's 802.11 specific.
20</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-wiphy-apply-custom-regulatory.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="bk01ch06.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="bk01ch07.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">wiphy_apply_custom_regulatory</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;Chapter&#160;7.&#160;RFkill integration</td></tr></table></div></body></html>
21