<?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>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 – for kernel developers" /><link rel="up" href="bk01ch06.html" title="Chapter 6. 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 7. RFkill integration" /></head><body><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> </td><th width="60%" align="center">Chapter 6. Regulatory enforcement infrastructure</th><td width="20%" align="right"> <a accesskey="n" href="bk01ch07.html">Next</a></td></tr></table><hr /></div><div class="refentry"><a id="API-freq-reg-info"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>freq_reg_info — get regulatory information for the given frequency </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 * <strong class="fsfunc">freq_reg_info </strong>(</code></td><td>struct wiphy * <var class="pdparam">wiphy</var>, </td></tr><tr><td> </td><td>u32 <var class="pdparam">center_freq</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a id="idm139754518557408"></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> the wiphy for which we want to process this rule for </p></dd><dt><span class="term"><em class="parameter"><code>center_freq</code></em></span></dt><dd><p> Frequency in KHz for which we want regulatory information for </p></dd></dl></div></div><div class="refsect1"><a id="idm139754518552112"></a><h2>Description</h2><p> Use this function to get the regulatory rule for a specific frequency on a given wireless device. If the device has a specific regulatory domain it wants to follow we respect that unless a country IE has been received and processed already. </p></div><div class="refsect1"><a id="idm139754518550656"></a><h2>Return</h2><p> A valid pointer, or, when an error occurs, for example if no rule can be found, the return value is encoded using <code class="function">ERR_PTR</code>. Use <code class="function">IS_ERR</code> to check and <code class="function">PTR_ERR</code> to obtain the numeric return value. The numeric return value will be -ERANGE if we determine the given center_freq does not even have a regulatory rule for a frequency range in the center_freq's band. See <code class="function">freq_in_rule_band</code> for our current definition of a band -- this is purely subjective and right now it's 802.11 specific. </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> </td><td width="20%" align="center"><a accesskey="u" href="bk01ch06.html">Up</a></td><td width="40%" align="right"> <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> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 7. RFkill integration</td></tr></table></div></body></html>