\hypertarget{ah__regdomain_8c_source}{}\doxysection{ah\+\_\+regdomain.\+c}
\label{ah__regdomain_8c_source}\index{dev/ath/ath\_hal/ah\_regdomain.c@{dev/ath/ath\_hal/ah\_regdomain.c}}
\mbox{\hyperlink{ah__regdomain_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: ISC}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2002-\/2009 Sam Leffler, Errno Consulting}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00005}00005 \textcolor{comment}{ * Copyright (c) 2005-\/2006 Atheros Communications, Inc.}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00006}00006 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00007}00007 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00008}00008 \textcolor{comment}{ * Permission to use, copy, modify, and/or distribute this software for any}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00009}00009 \textcolor{comment}{ * purpose with or without fee is hereby granted, provided that the above}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00010}00010 \textcolor{comment}{ * copyright notice and this permission notice appear in all copies.}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00011}00011 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00012}00012 \textcolor{comment}{ * THE SOFTWARE IS PROVIDED "{}AS IS"{} AND THE AUTHOR DISCLAIMS ALL WARRANTIES}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00013}00013 \textcolor{comment}{ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00014}00014 \textcolor{comment}{ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00015}00015 \textcolor{comment}{ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00016}00016 \textcolor{comment}{ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00017}00017 \textcolor{comment}{ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00018}00018 \textcolor{comment}{ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00019}00019 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00020}00020 \textcolor{comment}{ * \$FreeBSD\$}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00021}00021 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00022}00022 \textcolor{preprocessor}{\#include "{}opt\_ah.h"{}}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00023}00023 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00024}00024 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{ah_8h}{ah.h}}"{}}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00025}00025 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00026}00026 \textcolor{preprocessor}{\#include <net80211/\_ieee80211.h>}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00027}00027 \textcolor{preprocessor}{\#include <net80211/ieee80211\_regdomain.h>}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00028}00028 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00029}00029 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{ah__internal_8h}{ah\_internal.h}}"{}}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00030}00030 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{ah__eeprom_8h}{ah\_eeprom.h}}"{}}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00031}00031 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{ah__devid_8h}{ah\_devid.h}}"{}}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00032}00032 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00033}00033 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{ah__regdomain_8h}{ah\_regdomain.h}}"{}}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00034}00034 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00035}00035 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00036}00036 \textcolor{comment}{ * XXX this code needs a audit+review}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00037}00037 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00038}00038 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00039}00039 \textcolor{comment}{/* used throughout this file... */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00040}\mbox{\hyperlink{ah__regdomain_8c_af04f8faa08e13b16b70b52a56fbc9c53}{00040}} \textcolor{preprocessor}{\#define N(a)            nitems(a)}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00041}00041 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00042}\mbox{\hyperlink{ah__regdomain_8c_a44b3f4446dedad59f5f42dac2b91eb20}{00042}} \textcolor{preprocessor}{\#define HAL\_MODE\_11A\_TURBO      HAL\_MODE\_108A}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00043}\mbox{\hyperlink{ah__regdomain_8c_a243e64635bcef880f5a3753c382c8062}{00043}} \textcolor{preprocessor}{\#define HAL\_MODE\_11G\_TURBO      HAL\_MODE\_108G}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00044}00044 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00045}00045 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00046}00046 \textcolor{comment}{ * Mask to check whether a domain is a multidomain or a single domain}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00047}00047 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00048}\mbox{\hyperlink{ah__regdomain_8c_a97b7d727be7aabf2605921b126b1fbd4}{00048}} \textcolor{preprocessor}{\#define MULTI\_DOMAIN\_MASK 0xFF00}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00049}00049 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00050}00050 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00051}00051 \textcolor{comment}{ * Enumerated Regulatory Domain Information 8 bit values indicate that}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00052}00052 \textcolor{comment}{ * the regdomain is really a pair of unitary regdomains.  12 bit values}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00053}00053 \textcolor{comment}{ * are the real unitary regdomains and are the only ones which have the}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00054}00054 \textcolor{comment}{ * frequency bitmasks and flags set.}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00055}00055 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00056}00056 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{ah__rd__regenum_8h}{ah\_regdomain/ah\_rd\_regenum.h}}"{}}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00057}00057 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00058}\mbox{\hyperlink{ah__regdomain_8c_a962d67dab4a8536eb96931e56016aef5}{00058}} \textcolor{preprocessor}{\#define WORLD\_SKU\_MASK          0x00F0}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00059}\mbox{\hyperlink{ah__regdomain_8c_a95bafa7b7fe3bae8d2f1fc9580bbb024}{00059}} \textcolor{preprocessor}{\#define WORLD\_SKU\_PREFIX        0x0060}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00060}00060 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00061}00061 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00062}00062 \textcolor{comment}{ * THE following table is the mapping of regdomain pairs specified by}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00063}00063 \textcolor{comment}{ * an 8 bit regdomain value to the individual unitary reg domains}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00064}00064 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00065}00065 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{ah__rd__regmap_8h}{ah\_regdomain/ah\_rd\_regmap.h}}"{}}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00066}00066 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00067}00067 \textcolor{comment}{/* }}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00068}00068 \textcolor{comment}{ * The following tables are the master list for all different freqeuncy}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00069}00069 \textcolor{comment}{ * bands with the complete matrix of all possible flags and settings}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00070}00070 \textcolor{comment}{ * for each band if it is used in ANY reg domain.}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00071}00071 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00072}00072 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00073}\mbox{\hyperlink{ah__regdomain_8c_a0f710f1d011be68c551ce5c188bf4d81}{00073}} \textcolor{preprocessor}{\#define COUNTRY\_ERD\_FLAG        0x8000}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00074}\mbox{\hyperlink{ah__regdomain_8c_aea83884850f30ac58c9dd5f2a0fe5990}{00074}} \textcolor{preprocessor}{\#define WORLDWIDE\_ROAMING\_FLAG  0x4000}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00075}00075 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00076}00076 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00077}00077 \textcolor{comment}{ * This table maps country ISO codes from net80211 into regulatory}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00078}00078 \textcolor{comment}{ * domains which the ath regulatory domain code understands.}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00079}00079 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00080}00080 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{ah__rd__ctry_8h}{ah\_regdomain/ah\_rd\_ctry.h}}"{}}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00081}00081 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00082}00082 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00083}00083 \textcolor{comment}{ * The frequency band collections are a set of frequency ranges}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00084}00084 \textcolor{comment}{ * with shared properties -\/ max tx power, max antenna gain, channel width,}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00085}00085 \textcolor{comment}{ * channel spacing, DFS requirements and passive scanning requirements.}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00086}00086 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00087}00087 \textcolor{comment}{ * These are represented as entries in a frequency band bitmask.}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00088}00088 \textcolor{comment}{ * Each regulatory domain entry in ah\_regdomain\_domains.h uses one}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00089}00089 \textcolor{comment}{ * or more frequency band entries for each of the channel modes}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00090}00090 \textcolor{comment}{ * supported (11bg, 11a, half, quarter, turbo, etc.)}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00091}00091 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00092}00092 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00093}00093 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{ah__rd__freqbands_8h}{ah\_regdomain/ah\_rd\_freqbands.h}}"{}}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00094}00094 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00095}00095 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00096}00096 \textcolor{comment}{ * This is the main regulatory database. It defines the supported}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00097}00097 \textcolor{comment}{ * set of features and requirements for each of the defined regulatory}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00098}00098 \textcolor{comment}{ * zones. It uses combinations of frequency ranges -\/ represented in}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00099}00099 \textcolor{comment}{ * a bitmask -\/ to determine the requirements and limitations needed.}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00100}00100 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00101}00101 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{ah__rd__domains_8h}{ah\_regdomain/ah\_rd\_domains.h}}"{}}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00102}00102 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00103}\mbox{\hyperlink{ah__regdomain_8c_a51bafc1dc7a6bc7ea10a9d27dc538fa2}{00103}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structcmode}{cmode}} \mbox{\hyperlink{ah__regdomain_8c_a51bafc1dc7a6bc7ea10a9d27dc538fa2}{modes}}[] = \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00104}00104         \{ \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55bab433f5e17303cfc159f417e0cd40fde3}{HAL\_MODE\_TURBO}}, IEEE80211\_CHAN\_ST,      \&\mbox{\hyperlink{ah__rd__freqbands_8h_a70988e27cf5eb0e749fd274db1b4ac81}{regDmn5GhzTurboFreq}}[0] \},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00105}00105         \{ \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55bae80ef4550a7e672baf48dbbcb80d4bfd}{HAL\_MODE\_11A}},             IEEE80211\_CHAN\_A,       \&\mbox{\hyperlink{ah__rd__freqbands_8h_a31f88fccc93ae110fa3ae8c5d156d87d}{regDmn5GhzFreq}}[0] \},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00106}00106         \{ \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55baf143b2e5066c834d107d32a204d45584}{HAL\_MODE\_11B}},             IEEE80211\_CHAN\_B,       \&\mbox{\hyperlink{ah__rd__freqbands_8h_a9b7fc3de23e968338503b1e8dca7f9bf}{regDmn2GhzFreq}}[0] \},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00107}00107         \{ \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55babe71acb74465638223e2c17a9468c6e4}{HAL\_MODE\_11G}},             IEEE80211\_CHAN\_G,       \&\mbox{\hyperlink{ah__rd__freqbands_8h_af2991078edaf710dee526fb17cb8966d}{regDmn2Ghz11gFreq}}[0] \},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00108}00108         \{ \mbox{\hyperlink{ah__regdomain_8c_a243e64635bcef880f5a3753c382c8062}{HAL\_MODE\_11G\_TURBO}}, IEEE80211\_CHAN\_108G,    \&\mbox{\hyperlink{ah__rd__freqbands_8h_a253fe962b75223b96b509ea957da2d47}{regDmn2Ghz11gTurboFreq}}[0] \},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00109}00109         \{ \mbox{\hyperlink{ah__regdomain_8c_a44b3f4446dedad59f5f42dac2b91eb20}{HAL\_MODE\_11A\_TURBO}}, IEEE80211\_CHAN\_108A,    \&\mbox{\hyperlink{ah__rd__freqbands_8h_a70988e27cf5eb0e749fd274db1b4ac81}{regDmn5GhzTurboFreq}}[0] \},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00110}00110         \{ \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55ba56fc03ecdf413236edf0ba8b8370c801}{HAL\_MODE\_11A\_QUARTER\_RATE}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00111}00111           IEEE80211\_CHAN\_A | IEEE80211\_CHAN\_QUARTER,    \&\mbox{\hyperlink{ah__rd__freqbands_8h_a31f88fccc93ae110fa3ae8c5d156d87d}{regDmn5GhzFreq}}[0] \},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00112}00112         \{ \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55ba053d74d336f0bb6ea476aab5d80e6538}{HAL\_MODE\_11A\_HALF\_RATE}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00113}00113           IEEE80211\_CHAN\_A | IEEE80211\_CHAN\_HALF,       \&\mbox{\hyperlink{ah__rd__freqbands_8h_a31f88fccc93ae110fa3ae8c5d156d87d}{regDmn5GhzFreq}}[0] \},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00114}00114         \{ \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55ba25d082634d0c19389a843c812a3cb75b}{HAL\_MODE\_11G\_QUARTER\_RATE}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00115}00115           IEEE80211\_CHAN\_G | IEEE80211\_CHAN\_QUARTER,    \&\mbox{\hyperlink{ah__rd__freqbands_8h_af2991078edaf710dee526fb17cb8966d}{regDmn2Ghz11gFreq}}[0] \},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00116}00116         \{ \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55ba65785bf206d3c0712e6fe4a0d8b81168}{HAL\_MODE\_11G\_HALF\_RATE}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00117}00117           IEEE80211\_CHAN\_G | IEEE80211\_CHAN\_HALF,       \&\mbox{\hyperlink{ah__rd__freqbands_8h_af2991078edaf710dee526fb17cb8966d}{regDmn2Ghz11gFreq}}[0] \},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00118}00118         \{ \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55bacbb5e1f63262fd483a7bca362ff0bac2}{HAL\_MODE\_11NG\_HT20}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00119}00119           IEEE80211\_CHAN\_G | IEEE80211\_CHAN\_HT20,       \&\mbox{\hyperlink{ah__rd__freqbands_8h_af2991078edaf710dee526fb17cb8966d}{regDmn2Ghz11gFreq}}[0] \},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00120}00120         \{ \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55ba292878803032276bb0ab11bd60a6185d}{HAL\_MODE\_11NG\_HT40PLUS}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00121}00121           IEEE80211\_CHAN\_G | IEEE80211\_CHAN\_HT40U,      \&\mbox{\hyperlink{ah__rd__freqbands_8h_af2991078edaf710dee526fb17cb8966d}{regDmn2Ghz11gFreq}}[0] \},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00122}00122         \{ \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55ba5d60997a2d1ef9478a7b355d3851b49a}{HAL\_MODE\_11NG\_HT40MINUS}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00123}00123           IEEE80211\_CHAN\_G | IEEE80211\_CHAN\_HT40D,      \&\mbox{\hyperlink{ah__rd__freqbands_8h_af2991078edaf710dee526fb17cb8966d}{regDmn2Ghz11gFreq}}[0] \},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00124}00124         \{ \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55babe676010c3e51c1d040d39951eeb3322}{HAL\_MODE\_11NA\_HT20}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00125}00125           IEEE80211\_CHAN\_A | IEEE80211\_CHAN\_HT20,       \&\mbox{\hyperlink{ah__rd__freqbands_8h_a31f88fccc93ae110fa3ae8c5d156d87d}{regDmn5GhzFreq}}[0] \},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00126}00126         \{ \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55ba85b1089d8394ffd9906ea991e81a7bcb}{HAL\_MODE\_11NA\_HT40PLUS}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00127}00127           IEEE80211\_CHAN\_A | IEEE80211\_CHAN\_HT40U,      \&\mbox{\hyperlink{ah__rd__freqbands_8h_a31f88fccc93ae110fa3ae8c5d156d87d}{regDmn5GhzFreq}}[0] \},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00128}00128         \{ \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55ba74f0847d88b8a917895bdbd24863d742}{HAL\_MODE\_11NA\_HT40MINUS}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00129}00129           IEEE80211\_CHAN\_A | IEEE80211\_CHAN\_HT40D,      \&\mbox{\hyperlink{ah__rd__freqbands_8h_a31f88fccc93ae110fa3ae8c5d156d87d}{regDmn5GhzFreq}}[0] \},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00130}00130 \};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00131}00131 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00132}00132 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{ah__regdomain_8c_a0d7ef964446381a4fea1a5aa32eec965}{ath\_hal\_update\_dfsdomain}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00133}00133 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00134}00134 \textcolor{keyword}{static} \mbox{\hyperlink{ah__osdep_8h_ae761f1e238eb62c6989b1580ee81f2dc}{OS\_INLINE}} uint16\_t}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00135}\mbox{\hyperlink{ah__regdomain_8c_a647c51b7d13c8eddaf395935491c1829}{00135}} \mbox{\hyperlink{ah__regdomain_8c_a647c51b7d13c8eddaf395935491c1829}{getEepromRD}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00136}00136 \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00137}00137         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_currentRD \&\string~ WORLDWIDE\_ROAMING\_FLAG;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00138}00138 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00139}00139 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00140}00140 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00141}00141 \textcolor{comment}{ * Test to see if the bitmask array is all zeros}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00142}00142 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00143}00143 \textcolor{keyword}{static} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39a}{HAL\_BOOL}}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00144}\mbox{\hyperlink{ah__regdomain_8c_a396e623f70db464abd827598e12d7456}{00144}} \mbox{\hyperlink{ah__regdomain_8c_a396e623f70db464abd827598e12d7456}{isChanBitMaskZero}}(\textcolor{keyword}{const} uint64\_t *bitmask)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00145}00145 \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00146}00146 \textcolor{preprocessor}{\#if BMLEN > 2}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00147}00147 \textcolor{preprocessor}{\#error  "{}add more cases"{}}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00148}00148 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00149}00149 \textcolor{preprocessor}{\#if BMLEN > 1}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00150}00150         \textcolor{keywordflow}{if} (bitmask[1] != 0)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00151}00151                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aa46085f3e46cbceb46c46b0bde64a6c20}{AH\_FALSE}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00152}00152 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00153}00153         \textcolor{keywordflow}{return} (bitmask[0] == 0);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00154}00154 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00155}00155 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00156}00156 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00157}00157 \textcolor{comment}{ * Return whether or not the regulatory domain/country in EEPROM}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00158}00158 \textcolor{comment}{ * is acceptable.}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00159}00159 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00160}00160 \textcolor{keyword}{static} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39a}{HAL\_BOOL}}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00161}\mbox{\hyperlink{ah__regdomain_8c_ad40002217f96418e65fbaf802c8bfcd1}{00161}} \mbox{\hyperlink{ah__regdomain_8c_ad40002217f96418e65fbaf802c8bfcd1}{isEepromValid}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00162}00162 \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00163}00163         uint16\_t rd = \mbox{\hyperlink{ah__regdomain_8c_a647c51b7d13c8eddaf395935491c1829}{getEepromRD}}(ah);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00164}00164         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00165}00165 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00166}00166         \textcolor{keywordflow}{if} (rd \& \mbox{\hyperlink{ah__regdomain_8c_a0f710f1d011be68c551ce5c188bf4d81}{COUNTRY\_ERD\_FLAG}}) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00167}00167                 uint16\_t cc = rd \&\string~ COUNTRY\_ERD\_FLAG;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00168}00168                 \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{ah__regdomain_8c_af04f8faa08e13b16b70b52a56fbc9c53}{N}}(\mbox{\hyperlink{ah__rd__ctry_8h_af088937a1acafcac84257d11004979fa}{allCountries}}); i++)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00169}00169                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{ah__rd__ctry_8h_af088937a1acafcac84257d11004979fa}{allCountries}}[i].countryCode == cc)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00170}00170                                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aadc898cbb91e577b40c005576c51e8fdb}{AH\_TRUE}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00171}00171         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00172}00172                 \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{ah__regdomain_8c_af04f8faa08e13b16b70b52a56fbc9c53}{N}}(\mbox{\hyperlink{ah__rd__regmap_8h_a325993b3bb6010ccb62b1fb6e5a90f74}{regDomainPairs}}); i++)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00173}00173                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{ah__rd__regmap_8h_a325993b3bb6010ccb62b1fb6e5a90f74}{regDomainPairs}}[i].regDmnEnum == rd)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00174}00174                                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aadc898cbb91e577b40c005576c51e8fdb}{AH\_TRUE}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00175}00175         \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00176}00176 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00177}00177         \textcolor{keywordflow}{if} (rd == \mbox{\hyperlink{ah__rd__regenum_8h_af9bdc3014f3d54c426b6d2df10de4960a87812f088a98fba6d362ce85667dcbee}{FCC\_UBNT}}) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00178}00178                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aadc898cbb91e577b40c005576c51e8fdb}{AH\_TRUE}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00179}00179         \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00180}00180 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00181}00181         \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9eaa7d20390ddd7d65fbe199e0573070382}{HAL\_DEBUG\_REGDOMAIN}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00182}00182             \textcolor{stringliteral}{"{}\%s: invalid regulatory domain/country code 0x\%x\(\backslash\)n"{}}, \_\_func\_\_, rd);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00183}00183         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aa46085f3e46cbceb46c46b0bde64a6c20}{AH\_FALSE}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00184}00184 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00185}00185 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00186}00186 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00187}00187 \textcolor{comment}{ * Find the pointer to the country element in the country table}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00188}00188 \textcolor{comment}{ * corresponding to the country code}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00189}00189 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00190}00190 \textcolor{keyword}{static} \mbox{\hyperlink{structCOUNTRY__CODE__TO__ENUM__RD}{COUNTRY\_CODE\_TO\_ENUM\_RD}}*}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00191}\mbox{\hyperlink{ah__regdomain_8c_ae989521ce33620279543006a66515fac}{00191}} \mbox{\hyperlink{ah__regdomain_8c_ae989521ce33620279543006a66515fac}{findCountry}}(\mbox{\hyperlink{ah_8h_a8df20c4b99d88f97d8d91f143c9dc4c1}{HAL\_CTRY\_CODE}} countryCode)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00192}00192 \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00193}00193         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00194}00194 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00195}00195         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{ah__regdomain_8c_af04f8faa08e13b16b70b52a56fbc9c53}{N}}(\mbox{\hyperlink{ah__rd__ctry_8h_af088937a1acafcac84257d11004979fa}{allCountries}}); i++) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00196}00196                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{ah__rd__ctry_8h_af088937a1acafcac84257d11004979fa}{allCountries}}[i].countryCode == countryCode)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00197}00197                         \textcolor{keywordflow}{return} \&\mbox{\hyperlink{ah__rd__ctry_8h_af088937a1acafcac84257d11004979fa}{allCountries}}[i];}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00198}00198         \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00199}00199         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00200}00200 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00201}00201 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00202}00202 \textcolor{keyword}{static} \mbox{\hyperlink{structregDomain}{REG\_DOMAIN}} *}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00203}\mbox{\hyperlink{ah__regdomain_8c_a0ad80f16037eb1f380e159efc8d7da0f}{00203}} \mbox{\hyperlink{ah__regdomain_8c_a0ad80f16037eb1f380e159efc8d7da0f}{findRegDmn}}(\textcolor{keywordtype}{int} regDmn)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00204}00204 \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00205}00205         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00206}00206 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00207}00207         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{ah__regdomain_8c_af04f8faa08e13b16b70b52a56fbc9c53}{N}}(\mbox{\hyperlink{ah__rd__domains_8h_a1af2f2df83a78853305217b502b9466b}{regDomains}}); i++) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00208}00208                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{ah__rd__domains_8h_a1af2f2df83a78853305217b502b9466b}{regDomains}}[i].regDmnEnum == regDmn)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00209}00209                         \textcolor{keywordflow}{return} \&\mbox{\hyperlink{ah__rd__domains_8h_a1af2f2df83a78853305217b502b9466b}{regDomains}}[i];}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00210}00210         \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00211}00211         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00212}00212 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00213}00213 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00214}00214 \textcolor{keyword}{static} \mbox{\hyperlink{structregDomainPair}{REG\_DMN\_PAIR\_MAPPING}} *}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00215}\mbox{\hyperlink{ah__regdomain_8c_a99852ac5c8a7b2ee61316afb602b3423}{00215}} \mbox{\hyperlink{ah__regdomain_8c_a99852ac5c8a7b2ee61316afb602b3423}{findRegDmnPair}}(\textcolor{keywordtype}{int} regDmnPair)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00216}00216 \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00217}00217         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00218}00218 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00219}00219         \textcolor{keywordflow}{if} (regDmnPair != \mbox{\hyperlink{ah__rd__regenum_8h_af9bdc3014f3d54c426b6d2df10de4960adb0ab54913935e5c6b1a1cc28911bb71}{NO\_ENUMRD}}) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00220}00220                 \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{ah__regdomain_8c_af04f8faa08e13b16b70b52a56fbc9c53}{N}}(\mbox{\hyperlink{ah__rd__regmap_8h_a325993b3bb6010ccb62b1fb6e5a90f74}{regDomainPairs}}); i++) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00221}00221                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{ah__rd__regmap_8h_a325993b3bb6010ccb62b1fb6e5a90f74}{regDomainPairs}}[i].regDmnEnum == regDmnPair)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00222}00222                                 \textcolor{keywordflow}{return} \&\mbox{\hyperlink{ah__rd__regmap_8h_a325993b3bb6010ccb62b1fb6e5a90f74}{regDomainPairs}}[i];}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00223}00223                 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00224}00224         \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00225}00225         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00226}00226 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00227}00227 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00228}00228 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00229}00229 \textcolor{comment}{ * Calculate a default country based on the EEPROM setting.}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00230}00230 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00231}00231 \textcolor{keyword}{static} \mbox{\hyperlink{ah_8h_a8df20c4b99d88f97d8d91f143c9dc4c1}{HAL\_CTRY\_CODE}}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00232}\mbox{\hyperlink{ah__regdomain_8c_ab238cbfdaca0a24d32991d5bfbe4bcc5}{00232}} \mbox{\hyperlink{ah__regdomain_8c_ab238cbfdaca0a24d32991d5bfbe4bcc5}{getDefaultCountry}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00233}00233 \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00234}00234         \mbox{\hyperlink{structregDomainPair}{REG\_DMN\_PAIR\_MAPPING}} *regpair;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00235}00235         uint16\_t rd;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00236}00236 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00237}00237         rd = \mbox{\hyperlink{ah__regdomain_8c_a647c51b7d13c8eddaf395935491c1829}{getEepromRD}}(ah);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00238}00238         \textcolor{keywordflow}{if} (rd \& \mbox{\hyperlink{ah__regdomain_8c_a0f710f1d011be68c551ce5c188bf4d81}{COUNTRY\_ERD\_FLAG}}) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00239}00239                 \mbox{\hyperlink{structCOUNTRY__CODE__TO__ENUM__RD}{COUNTRY\_CODE\_TO\_ENUM\_RD}} *country;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00240}00240                 uint16\_t cc = rd \& \string~COUNTRY\_ERD\_FLAG;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00241}00241                 country = \mbox{\hyperlink{ah__regdomain_8c_ae989521ce33620279543006a66515fac}{findCountry}}(cc);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00242}00242                 \textcolor{keywordflow}{if} (country != \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}})}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00243}00243                         \textcolor{keywordflow}{return} cc;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00244}00244         \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00245}00245         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00246}00246 \textcolor{comment}{         * Check reg domains that have only one country}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00247}00247 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00248}00248         regpair = \mbox{\hyperlink{ah__regdomain_8c_a99852ac5c8a7b2ee61316afb602b3423}{findRegDmnPair}}(rd);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00249}00249         \textcolor{keywordflow}{return} (regpair != \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}}) ? regpair-\/>\mbox{\hyperlink{structregDomainPair_a8c76a00447660c93b9e96032347155ed}{singleCC}} : CTRY\_DEFAULT;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00250}00250 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00251}00251 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00252}00252 \textcolor{keyword}{static} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39a}{HAL\_BOOL}}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00253}\mbox{\hyperlink{ah__regdomain_8c_abd7c00230c4aa3dc914574f366ce0c60}{00253}} \mbox{\hyperlink{ah__regdomain_8c_abd7c00230c4aa3dc914574f366ce0c60}{IS\_BIT\_SET}}(\textcolor{keywordtype}{int} bit, \textcolor{keyword}{const} uint64\_t bitmask[])}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00254}00254 \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00255}00255         \textcolor{keywordtype}{int} byteOffset, bitnum;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00256}00256         uint64\_t val;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00257}00257 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00258}00258         byteOffset = bit/64;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00259}00259         bitnum = bit -\/ byteOffset*64;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00260}00260         val = ((uint64\_t) 1) << bitnum;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00261}00261         \textcolor{keywordflow}{return} (bitmask[byteOffset] \& val) != 0;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00262}00262 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00263}00263 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00264}00264 \textcolor{keyword}{static} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0}{HAL\_STATUS}}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00265}\mbox{\hyperlink{ah__regdomain_8c_a606658101fd8b712fe785be91b286c27}{00265}} \mbox{\hyperlink{ah__regdomain_8c_a606658101fd8b712fe785be91b286c27}{getregstate}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, \mbox{\hyperlink{ah_8h_a8df20c4b99d88f97d8d91f143c9dc4c1}{HAL\_CTRY\_CODE}} cc, \mbox{\hyperlink{ah_8h_a9c751b28b79f1cc3f09213b6b53f94f3}{HAL\_REG\_DOMAIN}} regDmn,}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00266}00266     \mbox{\hyperlink{structCOUNTRY__CODE__TO__ENUM__RD}{COUNTRY\_CODE\_TO\_ENUM\_RD}} **pcountry,}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00267}00267     \mbox{\hyperlink{structregDomain}{REG\_DOMAIN}} **prd2GHz, \mbox{\hyperlink{structregDomain}{REG\_DOMAIN}} **prd5GHz)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00268}00268 \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00269}00269         \mbox{\hyperlink{structCOUNTRY__CODE__TO__ENUM__RD}{COUNTRY\_CODE\_TO\_ENUM\_RD}} *country;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00270}00270         \mbox{\hyperlink{structregDomain}{REG\_DOMAIN}} *rd5GHz, *rd2GHz;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00271}00271 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00272}00272         \textcolor{keywordflow}{if} (cc == CTRY\_DEFAULT \&\& regDmn == SKU\_NONE) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00273}00273                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00274}00274 \textcolor{comment}{                 * Validate the EEPROM setting and setup defaults}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00275}00275 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00276}00276                 \textcolor{keywordflow}{if} (!\mbox{\hyperlink{ah__regdomain_8c_ad40002217f96418e65fbaf802c8bfcd1}{isEepromValid}}(ah)) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00277}00277                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00278}00278 \textcolor{comment}{                         * Don't return any channels if the EEPROM has an}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00279}00279 \textcolor{comment}{                         * invalid regulatory domain/country code setting.}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00280}00280 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00281}00281                         \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9eaa7d20390ddd7d65fbe199e0573070382}{HAL\_DEBUG\_REGDOMAIN}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00282}00282                             \textcolor{stringliteral}{"{}\%s: invalid EEPROM contents\(\backslash\)n"{}},\_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00283}00283                         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a2a323542dfb0e985b8a6344398db2d2a}{HAL\_EEBADREG}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00284}00284                 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00285}00285 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00286}00286                 cc = \mbox{\hyperlink{ah__regdomain_8c_ab238cbfdaca0a24d32991d5bfbe4bcc5}{getDefaultCountry}}(ah);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00287}00287                 country = \mbox{\hyperlink{ah__regdomain_8c_ae989521ce33620279543006a66515fac}{findCountry}}(cc);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00288}00288                 \textcolor{keywordflow}{if} (country == \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}}) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00289}00289                         \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9eaa7d20390ddd7d65fbe199e0573070382}{HAL\_DEBUG\_REGDOMAIN}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00290}00290                             \textcolor{stringliteral}{"{}NULL Country!, cc \%d\(\backslash\)n"{}}, cc);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00291}00291                         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a0962a4e0d48ab7dcf0ce7afb998b8235}{HAL\_EEBADCC}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00292}00292                 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00293}00293                 regDmn = country-\/>\mbox{\hyperlink{structCOUNTRY__CODE__TO__ENUM__RD_a74a0a961271eed40c164de0d6023b6ae}{regDmnEnum}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00294}00294                 \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9eaa7d20390ddd7d65fbe199e0573070382}{HAL\_DEBUG\_REGDOMAIN}}, \textcolor{stringliteral}{"{}\%s: EEPROM cc \%u rd 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00295}00295                     \_\_func\_\_, cc, regDmn);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00296}00296 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00297}00297                 \textcolor{keywordflow}{if} (country-\/>\mbox{\hyperlink{structCOUNTRY__CODE__TO__ENUM__RD_a908d703a7fe686a7e6e3c7865c15256f}{countryCode}} == CTRY\_DEFAULT) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00298}00298                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00299}00299 \textcolor{comment}{                         * Check EEPROM; SKU may be for a country, single}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00300}00300 \textcolor{comment}{                         * domain, or multiple domains (WWR).}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00301}00301 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00302}00302                         uint16\_t rdnum = \mbox{\hyperlink{ah__regdomain_8c_a647c51b7d13c8eddaf395935491c1829}{getEepromRD}}(ah);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00303}00303                         \textcolor{keywordflow}{if} ((rdnum \& \mbox{\hyperlink{ah__regdomain_8c_a0f710f1d011be68c551ce5c188bf4d81}{COUNTRY\_ERD\_FLAG}}) == 0 \&\&}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00304}00304                             (\mbox{\hyperlink{ah__regdomain_8c_a0ad80f16037eb1f380e159efc8d7da0f}{findRegDmn}}(rdnum) != \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}} ||}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00305}00305                              \mbox{\hyperlink{ah__regdomain_8c_a99852ac5c8a7b2ee61316afb602b3423}{findRegDmnPair}}(rdnum) != \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}})) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00306}00306                                 regDmn = rdnum;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00307}00307                                 \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9eaa7d20390ddd7d65fbe199e0573070382}{HAL\_DEBUG\_REGDOMAIN}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00308}00308                                     \textcolor{stringliteral}{"{}\%s: EEPROM rd 0x\%x\(\backslash\)n"{}}, \_\_func\_\_, rdnum);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00309}00309                         \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00310}00310                 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00311}00311         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00312}00312                 country = \mbox{\hyperlink{ah__regdomain_8c_ae989521ce33620279543006a66515fac}{findCountry}}(cc);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00313}00313                 \textcolor{keywordflow}{if} (country == \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}}) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00314}00314                         \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9eaa7d20390ddd7d65fbe199e0573070382}{HAL\_DEBUG\_REGDOMAIN}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00315}00315                             \textcolor{stringliteral}{"{}unknown country, cc \%d\(\backslash\)n"{}}, cc);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00316}00316                         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a925d3be7c5ded1ced35f00a48560e01f}{HAL\_EINVAL}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00317}00317                 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00318}00318                 \textcolor{keywordflow}{if} (regDmn == SKU\_NONE)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00319}00319                         regDmn = country-\/>\mbox{\hyperlink{structCOUNTRY__CODE__TO__ENUM__RD_a74a0a961271eed40c164de0d6023b6ae}{regDmnEnum}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00320}00320                 \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9eaa7d20390ddd7d65fbe199e0573070382}{HAL\_DEBUG\_REGDOMAIN}}, \textcolor{stringliteral}{"{}\%s: cc \%u rd 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00321}00321                     \_\_func\_\_, cc, regDmn);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00322}00322         \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00323}00323 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00324}00324         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00325}00325 \textcolor{comment}{         * Setup per-\/band state.}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00326}00326 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00327}00327         \textcolor{keywordflow}{if} ((regDmn \& \mbox{\hyperlink{ah__regdomain_8c_a97b7d727be7aabf2605921b126b1fbd4}{MULTI\_DOMAIN\_MASK}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00328}00328                 \mbox{\hyperlink{structregDomainPair}{REG\_DMN\_PAIR\_MAPPING}} *regpair = \mbox{\hyperlink{ah__regdomain_8c_a99852ac5c8a7b2ee61316afb602b3423}{findRegDmnPair}}(regDmn);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00329}00329                 \textcolor{keywordflow}{if} (regpair == \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}}) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00330}00330                         \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9eaa7d20390ddd7d65fbe199e0573070382}{HAL\_DEBUG\_REGDOMAIN}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00331}00331                             \textcolor{stringliteral}{"{}\%s: no reg domain pair \%u for country \%u\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00332}00332                             \_\_func\_\_, regDmn, country-\/>\mbox{\hyperlink{structCOUNTRY__CODE__TO__ENUM__RD_a908d703a7fe686a7e6e3c7865c15256f}{countryCode}});}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00333}00333                         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a925d3be7c5ded1ced35f00a48560e01f}{HAL\_EINVAL}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00334}00334                 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00335}00335                 rd5GHz = \mbox{\hyperlink{ah__regdomain_8c_a0ad80f16037eb1f380e159efc8d7da0f}{findRegDmn}}(regpair-\/>\mbox{\hyperlink{structregDomainPair_a530486d7aa0cd64338eb0ca3b29dfa2c}{regDmn5GHz}});}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00336}00336                 \textcolor{keywordflow}{if} (rd5GHz == \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}}) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00337}00337                         \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9eaa7d20390ddd7d65fbe199e0573070382}{HAL\_DEBUG\_REGDOMAIN}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00338}00338                             \textcolor{stringliteral}{"{}\%s: no 5GHz reg domain \%u for country \%u\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00339}00339                             \_\_func\_\_, regpair-\/>\mbox{\hyperlink{structregDomainPair_a530486d7aa0cd64338eb0ca3b29dfa2c}{regDmn5GHz}}, country-\/>\mbox{\hyperlink{structCOUNTRY__CODE__TO__ENUM__RD_a908d703a7fe686a7e6e3c7865c15256f}{countryCode}});}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00340}00340                         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a925d3be7c5ded1ced35f00a48560e01f}{HAL\_EINVAL}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00341}00341                 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00342}00342                 rd2GHz = \mbox{\hyperlink{ah__regdomain_8c_a0ad80f16037eb1f380e159efc8d7da0f}{findRegDmn}}(regpair-\/>\mbox{\hyperlink{structregDomainPair_ad20b82fee30ec19cdd31108997d663c8}{regDmn2GHz}});}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00343}00343                 \textcolor{keywordflow}{if} (rd2GHz == \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}}) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00344}00344                         \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9eaa7d20390ddd7d65fbe199e0573070382}{HAL\_DEBUG\_REGDOMAIN}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00345}00345                             \textcolor{stringliteral}{"{}\%s: no 2GHz reg domain \%u for country \%u\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00346}00346                             \_\_func\_\_, regpair-\/>\mbox{\hyperlink{structregDomainPair_ad20b82fee30ec19cdd31108997d663c8}{regDmn2GHz}}, country-\/>\mbox{\hyperlink{structCOUNTRY__CODE__TO__ENUM__RD_a908d703a7fe686a7e6e3c7865c15256f}{countryCode}});}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00347}00347                         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a925d3be7c5ded1ced35f00a48560e01f}{HAL\_EINVAL}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00348}00348                 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00349}00349         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00350}00350                 rd5GHz = rd2GHz = \mbox{\hyperlink{ah__regdomain_8c_a0ad80f16037eb1f380e159efc8d7da0f}{findRegDmn}}(regDmn);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00351}00351                 \textcolor{keywordflow}{if} (rd2GHz == \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}}) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00352}00352                         \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9eaa7d20390ddd7d65fbe199e0573070382}{HAL\_DEBUG\_REGDOMAIN}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00353}00353                             \textcolor{stringliteral}{"{}\%s: no unitary reg domain \%u for country \%u\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00354}00354                             \_\_func\_\_, regDmn, country-\/>\mbox{\hyperlink{structCOUNTRY__CODE__TO__ENUM__RD_a908d703a7fe686a7e6e3c7865c15256f}{countryCode}});}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00355}00355                         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a925d3be7c5ded1ced35f00a48560e01f}{HAL\_EINVAL}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00356}00356                 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00357}00357         \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00358}00358         \textcolor{keywordflow}{if} (pcountry != \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}})}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00359}00359                 *pcountry = country;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00360}00360         *prd2GHz = rd2GHz;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00361}00361         *prd5GHz = rd5GHz;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00362}00362         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00363}00363 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00364}00364 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00365}00365 \textcolor{keyword}{static} uint64\_t *}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00366}\mbox{\hyperlink{ah__regdomain_8c_ab0073d688a6706964627841addb9ca3e}{00366}} \mbox{\hyperlink{ah__regdomain_8c_ab0073d688a6706964627841addb9ca3e}{getchannelBM}}(u\_int \mbox{\hyperlink{structcmode_a51b76c3df2d72d63991c3ff17e358fcd}{mode}}, \mbox{\hyperlink{structregDomain}{REG\_DOMAIN}} *rd)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00367}00367 \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00368}00368         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{structcmode_a51b76c3df2d72d63991c3ff17e358fcd}{mode}}) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00369}00369         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55baf143b2e5066c834d107d32a204d45584}{HAL\_MODE\_11B}}:}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00370}00370                 \textcolor{keywordflow}{return} (rd-\/>\mbox{\hyperlink{structregDomain_a3c37b6b14e66979d67fbab5fcbe32ec8}{chan11b}});}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00371}00371         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55ba25d082634d0c19389a843c812a3cb75b}{HAL\_MODE\_11G\_QUARTER\_RATE}}:}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00372}00372                 \textcolor{keywordflow}{return} (rd-\/>\mbox{\hyperlink{structregDomain_a5d928ae9fcb3f6698dc6fa54757a1b58}{chan11g\_quarter}});}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00373}00373         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55ba65785bf206d3c0712e6fe4a0d8b81168}{HAL\_MODE\_11G\_HALF\_RATE}}:}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00374}00374                 \textcolor{keywordflow}{return} (rd-\/>\mbox{\hyperlink{structregDomain_a493b15cac129ebab3e05064340a5449b}{chan11g\_half}});}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00375}00375         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55babe71acb74465638223e2c17a9468c6e4}{HAL\_MODE\_11G}}:}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00376}00376         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55bacbb5e1f63262fd483a7bca362ff0bac2}{HAL\_MODE\_11NG\_HT20}}:}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00377}00377         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55ba292878803032276bb0ab11bd60a6185d}{HAL\_MODE\_11NG\_HT40PLUS}}:}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00378}00378         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55ba5d60997a2d1ef9478a7b355d3851b49a}{HAL\_MODE\_11NG\_HT40MINUS}}:}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00379}00379                 \textcolor{keywordflow}{return} (rd-\/>\mbox{\hyperlink{structregDomain_ac39feb8fd4c6b647dbf2350e56f6da19}{chan11g}});}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00380}00380         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah__regdomain_8c_a243e64635bcef880f5a3753c382c8062}{HAL\_MODE\_11G\_TURBO}}:}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00381}00381                 \textcolor{keywordflow}{return} (rd-\/>\mbox{\hyperlink{structregDomain_aeae4563e1ca56cad5da99dc01349f898}{chan11g\_turbo}});}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00382}00382         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55ba56fc03ecdf413236edf0ba8b8370c801}{HAL\_MODE\_11A\_QUARTER\_RATE}}:}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00383}00383                 \textcolor{keywordflow}{return} (rd-\/>\mbox{\hyperlink{structregDomain_aa248fb7a0de1e75a5653dc42d7e002d1}{chan11a\_quarter}});}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00384}00384         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55ba053d74d336f0bb6ea476aab5d80e6538}{HAL\_MODE\_11A\_HALF\_RATE}}:}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00385}00385                 \textcolor{keywordflow}{return} (rd-\/>\mbox{\hyperlink{structregDomain_a5094cfa902f42d4bf664b97478275d1a}{chan11a\_half}});}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00386}00386         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55bae80ef4550a7e672baf48dbbcb80d4bfd}{HAL\_MODE\_11A}}:}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00387}00387         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55babe676010c3e51c1d040d39951eeb3322}{HAL\_MODE\_11NA\_HT20}}:}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00388}00388         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55ba85b1089d8394ffd9906ea991e81a7bcb}{HAL\_MODE\_11NA\_HT40PLUS}}:}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00389}00389         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55ba74f0847d88b8a917895bdbd24863d742}{HAL\_MODE\_11NA\_HT40MINUS}}:}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00390}00390                 \textcolor{keywordflow}{return} (rd-\/>\mbox{\hyperlink{structregDomain_a8f7e6b29104c555274f74b42fbcce16a}{chan11a}});}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00391}00391         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55bab433f5e17303cfc159f417e0cd40fde3}{HAL\_MODE\_TURBO}}:}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00392}00392                 \textcolor{keywordflow}{return} (rd-\/>\mbox{\hyperlink{structregDomain_a1b7d350295dc23673af3e3d4835bdbe2}{chan11a\_turbo}});}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00393}00393         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah__regdomain_8c_a44b3f4446dedad59f5f42dac2b91eb20}{HAL\_MODE\_11A\_TURBO}}:}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00394}00394                 \textcolor{keywordflow}{return} (rd-\/>\mbox{\hyperlink{structregDomain_a15fb2d987ca6db15d241accfaa727b8c}{chan11a\_dyn\_turbo}});}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00395}00395         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00396}00396                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}});}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00397}00397         \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00398}00398 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00399}00399 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00400}00400 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00401}\mbox{\hyperlink{ah__regdomain_8c_a5b96016e605b434c6148150ed41d6f20}{00401}} \mbox{\hyperlink{ah__regdomain_8c_a5b96016e605b434c6148150ed41d6f20}{setchannelflags}}(\textcolor{keyword}{struct} ieee80211\_channel *c, \mbox{\hyperlink{structREG__DMN__FREQ__BAND}{REG\_DMN\_FREQ\_BAND}} *fband,}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00402}00402     \mbox{\hyperlink{structregDomain}{REG\_DOMAIN}} *rd)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00403}00403 \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00404}00404         \textcolor{keywordflow}{if} (fband-\/>\mbox{\hyperlink{structREG__DMN__FREQ__BAND_ae89a8b81c3ac433cc5f60be8de3386a8}{usePassScan}} \& rd-\/>\mbox{\hyperlink{structregDomain_ae7e15a112f26f0d604b0acc1e9c95f28}{pscan}})}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00405}00405                 c-\/>ic\_flags |= IEEE80211\_CHAN\_PASSIVE;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00406}00406         \textcolor{keywordflow}{if} (fband-\/>\mbox{\hyperlink{structREG__DMN__FREQ__BAND_a2d8c8a336fce151654a0ded6e35825ec}{useDfs}} \& rd-\/>\mbox{\hyperlink{structregDomain_a1886931caa781e75783fd7b6581e9038}{dfsMask}})}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00407}00407                 c-\/>ic\_flags |= IEEE80211\_CHAN\_DFS;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00408}00408         \textcolor{keywordflow}{if} (IEEE80211\_IS\_CHAN\_5GHZ(c) \&\& (rd-\/>\mbox{\hyperlink{structregDomain_a4741bde7a7d8ec9d45867563b5563593}{flags}} \& \mbox{\hyperlink{ah__regdomain_8h_aaf105ae5beaca1dee30ae54530691fceacae414784b2b7ccbd901af24ad638e22}{DISALLOW\_ADHOC\_11A}}))}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00409}00409                 c-\/>ic\_flags |= IEEE80211\_CHAN\_NOADHOC;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00410}00410         \textcolor{keywordflow}{if} (IEEE80211\_IS\_CHAN\_TURBO(c) \&\&}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00411}00411             (rd-\/>\mbox{\hyperlink{structregDomain_a4741bde7a7d8ec9d45867563b5563593}{flags}} \& \mbox{\hyperlink{ah__regdomain_8h_aaf105ae5beaca1dee30ae54530691fcea5293358bb81a10c1103ea834930b1bf1}{DISALLOW\_ADHOC\_11A\_TURB}}))}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00412}00412                 c-\/>ic\_flags |= IEEE80211\_CHAN\_NOADHOC;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00413}00413         \textcolor{keywordflow}{if} (rd-\/>\mbox{\hyperlink{structregDomain_a4741bde7a7d8ec9d45867563b5563593}{flags}} \& \mbox{\hyperlink{ah__regdomain_8h_aaf105ae5beaca1dee30ae54530691fceac5839005c97013f481c82449ec8abf64}{NO\_HOSTAP}})}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00414}00414                 c-\/>ic\_flags |= IEEE80211\_CHAN\_NOHOSTAP;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00415}00415         \textcolor{keywordflow}{if} (rd-\/>\mbox{\hyperlink{structregDomain_a4741bde7a7d8ec9d45867563b5563593}{flags}} \& \mbox{\hyperlink{ah__regdomain_8h_aaf105ae5beaca1dee30ae54530691fceab75034eae616430216421130127e953e}{LIMIT\_FRAME\_4MS}})}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00416}00416                 c-\/>ic\_flags |= IEEE80211\_CHAN\_4MSXMIT;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00417}00417         \textcolor{keywordflow}{if} (rd-\/>\mbox{\hyperlink{structregDomain_a4741bde7a7d8ec9d45867563b5563593}{flags}} \& \mbox{\hyperlink{ah__regdomain_8h_aaf105ae5beaca1dee30ae54530691fceacbb30657e4ab13599deba58ef41b2d90}{NEED\_NFC}})}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00418}00418                 c-\/>ic\_flags |= \mbox{\hyperlink{ah__internal_8h_ae07a47f938f1f14b52e5ed701cde36b1}{CHANNEL\_NFCREQUIRED}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00419}00419 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00420}00420 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00421}00421 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00422}\mbox{\hyperlink{ah__regdomain_8c_aace7bc6ce5d3134834ad91bb2cae5909}{00422}} \mbox{\hyperlink{ah__regdomain_8c_aace7bc6ce5d3134834ad91bb2cae5909}{addchan}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, \textcolor{keyword}{struct} ieee80211\_channel chans[],}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00423}00423     u\_int maxchans, \textcolor{keywordtype}{int} *nchans, uint16\_t freq, uint32\_t \mbox{\hyperlink{structcmode_af2b2a1431e42fd9fb8d845a546b92141}{flags}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00424}00424     \mbox{\hyperlink{structREG__DMN__FREQ__BAND}{REG\_DMN\_FREQ\_BAND}} *fband, \mbox{\hyperlink{structregDomain}{REG\_DOMAIN}} *rd)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00425}00425 \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00426}00426         \textcolor{keyword}{struct }ieee80211\_channel *c;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00427}00427 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00428}00428         \textcolor{keywordflow}{if} (*nchans >= maxchans)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00429}00429                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0ab19ce53cce6a6d5f053082bebffd7392}{HAL\_ENOMEM}});}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00430}00430 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00431}00431         \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9eaa7d20390ddd7d65fbe199e0573070382}{HAL\_DEBUG\_REGDOMAIN}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00432}00432             \textcolor{stringliteral}{"{}\%s: \%d: freq=\%d, flags=0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00433}00433             \_\_func\_\_, *nchans, (\textcolor{keywordtype}{int}) freq, flags);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00434}00434 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00435}00435         c = \&chans[(*nchans)++];}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00436}00436         c-\/>ic\_freq = freq;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00437}00437         c-\/>ic\_flags = flags;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00438}00438         \mbox{\hyperlink{ah__regdomain_8c_a5b96016e605b434c6148150ed41d6f20}{setchannelflags}}(c, fband, rd);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00439}00439         c-\/>ic\_maxregpower = fband-\/>\mbox{\hyperlink{structREG__DMN__FREQ__BAND_ac0b810018f4e34c414f48d3075942ccd}{powerDfs}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00440}00440         \mbox{\hyperlink{ah__internal_8h_ac5b13812b483efb78e1e6ce504ddb511}{ath\_hal\_getpowerlimits}}(ah, c);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00441}00441         c-\/>ic\_maxantgain = fband-\/>\mbox{\hyperlink{structREG__DMN__FREQ__BAND_a4a2a1b1e4216e9e58033261b2876a4fe}{antennaMax}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00442}00442 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00443}00443         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00444}00444 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00445}00445 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00446}00446 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00447}\mbox{\hyperlink{ah__regdomain_8c_af064095ab2e321e68080b26d7f58bc22}{00447}} \mbox{\hyperlink{ah__regdomain_8c_af064095ab2e321e68080b26d7f58bc22}{copychan\_prev}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, \textcolor{keyword}{struct} ieee80211\_channel chans[],}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00448}00448     u\_int maxchans, \textcolor{keywordtype}{int} *nchans, uint16\_t freq, uint32\_t flags)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00449}00449 \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00450}00450         \textcolor{keyword}{struct }ieee80211\_channel *c;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00451}00451 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00452}00452         \textcolor{keywordflow}{if} (*nchans == 0)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00453}00453                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a925d3be7c5ded1ced35f00a48560e01f}{HAL\_EINVAL}});}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00454}00454 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00455}00455         \textcolor{keywordflow}{if} (*nchans >= maxchans)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00456}00456                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0ab19ce53cce6a6d5f053082bebffd7392}{HAL\_ENOMEM}});}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00457}00457 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00458}00458         \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9eaa7d20390ddd7d65fbe199e0573070382}{HAL\_DEBUG\_REGDOMAIN}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00459}00459             \textcolor{stringliteral}{"{}\%s: \%d: freq=\%d, flags=0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00460}00460             \_\_func\_\_, *nchans, (\textcolor{keywordtype}{int}) freq, flags);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00461}00461 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00462}00462         c = \&chans[(*nchans)++];}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00463}00463         c[0] = c[-\/1];}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00464}00464         c-\/>ic\_freq = freq;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00465}00465         \textcolor{comment}{/* XXX is it needed here? */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00466}00466         \mbox{\hyperlink{ah__internal_8h_ac5b13812b483efb78e1e6ce504ddb511}{ath\_hal\_getpowerlimits}}(ah, c);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00467}00467 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00468}00468         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00469}00469 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00470}00470 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00471}00471 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00472}\mbox{\hyperlink{ah__regdomain_8c_a343f8513c5a29489cbe07c1fa945c21a}{00472}} \mbox{\hyperlink{ah__regdomain_8c_a343f8513c5a29489cbe07c1fa945c21a}{add\_chanlist\_band}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, \textcolor{keyword}{struct} ieee80211\_channel chans[],}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00473}00473     \textcolor{keywordtype}{int} maxchans, \textcolor{keywordtype}{int} *nchans, uint16\_t freq\_lo, uint16\_t freq\_hi, \textcolor{keywordtype}{int} step,}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00474}00474     uint32\_t flags, \mbox{\hyperlink{structREG__DMN__FREQ__BAND}{REG\_DMN\_FREQ\_BAND}} *fband, \mbox{\hyperlink{structregDomain}{REG\_DOMAIN}} *rd)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00475}00475 \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00476}00476         uint16\_t freq = freq\_lo;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00477}00477         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00478}00478 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00479}00479         \textcolor{keywordflow}{if} (freq\_hi < freq\_lo)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00480}00480                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00481}00481 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00482}00482         \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9eaa7d20390ddd7d65fbe199e0573070382}{HAL\_DEBUG\_REGDOMAIN}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00483}00483             \textcolor{stringliteral}{"{}\%s: freq=\%d..\%d, flags=0x\%08x, step=\%d\(\backslash\)n"{}}, \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00484}00484             (\textcolor{keywordtype}{int}) freq\_lo, (\textcolor{keywordtype}{int}) freq\_hi, flags, step);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00485}00485 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00486}00486         error = \mbox{\hyperlink{ah__regdomain_8c_aace7bc6ce5d3134834ad91bb2cae5909}{addchan}}(ah, chans, maxchans, nchans, freq, flags, fband, rd);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00487}00487         \textcolor{keywordflow}{for} (freq += step; freq <= freq\_hi \&\& error == 0; freq += step)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00488}00488                 error = \mbox{\hyperlink{ah__regdomain_8c_af064095ab2e321e68080b26d7f58bc22}{copychan\_prev}}(ah, chans, maxchans, nchans, freq, flags);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00489}00489 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00490}00490         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00491}00491 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00492}00492 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00493}00493 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00494}\mbox{\hyperlink{ah__regdomain_8c_a3720745b4d24eb7c2ce47e15579558d9}{00494}} \mbox{\hyperlink{ah__regdomain_8c_a3720745b4d24eb7c2ce47e15579558d9}{adj\_freq\_ht40}}(u\_int mode, \textcolor{keywordtype}{int} *low\_adj, \textcolor{keywordtype}{int} *hi\_adj, \textcolor{keywordtype}{int} *channelSep)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00495}00495 \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00496}00496 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00497}00497         *low\_adj = *hi\_adj = *channelSep = 0;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00498}00498         \textcolor{keywordflow}{switch} (mode) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00499}00499         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55ba85b1089d8394ffd9906ea991e81a7bcb}{HAL\_MODE\_11NA\_HT40PLUS}}:}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00500}00500                 *channelSep = 40;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00501}00501                 \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00502}00502         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55ba292878803032276bb0ab11bd60a6185d}{HAL\_MODE\_11NG\_HT40PLUS}}:}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00503}00503                 *hi\_adj = -\/20;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00504}00504                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00505}00505         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55ba74f0847d88b8a917895bdbd24863d742}{HAL\_MODE\_11NA\_HT40MINUS}}:}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00506}00506                 *channelSep = 40;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00507}00507                 \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00508}00508         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55ba5d60997a2d1ef9478a7b355d3851b49a}{HAL\_MODE\_11NG\_HT40MINUS}}:}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00509}00509                 *low\_adj = 20;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00510}00510                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00511}00511         \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00512}00512 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00513}00513 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00514}00514 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00515}\mbox{\hyperlink{ah__regdomain_8c_a9475c5716f956f10aed01c010b8121fb}{00515}} \mbox{\hyperlink{ah__regdomain_8c_a9475c5716f956f10aed01c010b8121fb}{add\_chanlist\_mode}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, \textcolor{keyword}{struct} ieee80211\_channel chans[],}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00516}00516     u\_int maxchans, \textcolor{keywordtype}{int} *nchans, \textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structcmode}{cmode}} *cm, \mbox{\hyperlink{structregDomain}{REG\_DOMAIN}} *rd,}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00517}00517     \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39a}{HAL\_BOOL}} enableExtendedChannels)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00518}00518 \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00519}00519         uint64\_t *channelBM;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00520}00520         uint16\_t freq\_lo, freq\_hi;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00521}00521         \textcolor{keywordtype}{int} b, error, low\_adj, hi\_adj, channelSep;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00522}00522 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00523}00523         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{ah__internal_8h_a7d1938615a484d9927e24941b0a3f35a}{ath\_hal\_getChannelEdges}}(ah, cm-\/>\mbox{\hyperlink{structcmode_af2b2a1431e42fd9fb8d845a546b92141}{flags}}, \&freq\_lo, \&freq\_hi)) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00524}00524                 \textcolor{comment}{/* channel not supported by hardware, skip it */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00525}00525                 \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9eaa7d20390ddd7d65fbe199e0573070382}{HAL\_DEBUG\_REGDOMAIN}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00526}00526                     \textcolor{stringliteral}{"{}\%s: channels 0x\%x not supported by hardware\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00527}00527                     \_\_func\_\_, cm-\/>\mbox{\hyperlink{structcmode_af2b2a1431e42fd9fb8d845a546b92141}{flags}});}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00528}00528                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00529}00529         \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00530}00530 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00531}00531         channelBM = \mbox{\hyperlink{ah__regdomain_8c_ab0073d688a6706964627841addb9ca3e}{getchannelBM}}(cm-\/>\mbox{\hyperlink{structcmode_a51b76c3df2d72d63991c3ff17e358fcd}{mode}}, rd);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00532}00532         \textcolor{keywordflow}{if} (\mbox{\hyperlink{ah__regdomain_8c_a396e623f70db464abd827598e12d7456}{isChanBitMaskZero}}(channelBM))}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00533}00533                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00534}00534 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00535}00535         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00536}00536 \textcolor{comment}{         * Setup special handling for HT40 channels; e.g.}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00537}00537 \textcolor{comment}{         * 5G HT40 channels require 40Mhz channel separation.}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00538}00538 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00539}00539         \mbox{\hyperlink{ah__regdomain_8c_a3720745b4d24eb7c2ce47e15579558d9}{adj\_freq\_ht40}}(cm-\/>\mbox{\hyperlink{structcmode_a51b76c3df2d72d63991c3ff17e358fcd}{mode}}, \&low\_adj, \&hi\_adj, \&channelSep);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00540}00540 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00541}00541         \textcolor{keywordflow}{for} (b = 0; b < 64*\mbox{\hyperlink{ah__regdomain_8h_a1b4c7d73698dcf26f8ad382c9cc87858}{BMLEN}}; b++) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00542}00542                 \mbox{\hyperlink{structREG__DMN__FREQ__BAND}{REG\_DMN\_FREQ\_BAND}} *fband;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00543}00543                 uint16\_t bfreq\_lo, bfreq\_hi;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00544}00544                 \textcolor{keywordtype}{int} step;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00545}00545 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00546}00546                 \textcolor{keywordflow}{if} (!\mbox{\hyperlink{ah__regdomain_8c_abd7c00230c4aa3dc914574f366ce0c60}{IS\_BIT\_SET}}(b, channelBM))}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00547}00547                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00548}00548                 fband = \&cm-\/>\mbox{\hyperlink{structcmode_ab1b0be27176b4ef7881c548f7d0106bb}{freqs}}[b];}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00549}00549 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00550}00550                 \textcolor{keywordflow}{if} ((fband-\/>\mbox{\hyperlink{structREG__DMN__FREQ__BAND_ae89a8b81c3ac433cc5f60be8de3386a8}{usePassScan}} \& \mbox{\hyperlink{ah__regdomain_8h_a6b077dacd9afc4ad99931f9c66f631a9}{IS\_ECM\_CHAN}}) \&\&}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00551}00551                     !enableExtendedChannels) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00552}00552                         \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9eaa7d20390ddd7d65fbe199e0573070382}{HAL\_DEBUG\_REGDOMAIN}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00553}00553                             \textcolor{stringliteral}{"{}skip ecm channels\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00554}00554                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00555}00555                 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00556}00556 \textcolor{preprocessor}{\#if 0}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00557}00557                 \textcolor{keywordflow}{if} ((fband-\/>\mbox{\hyperlink{structREG__DMN__FREQ__BAND_a2d8c8a336fce151654a0ded6e35825ec}{useDfs}} \& rd-\/>\mbox{\hyperlink{structregDomain_a1886931caa781e75783fd7b6581e9038}{dfsMask}}) \&\& }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00558}00558                     (cm-\/>\mbox{\hyperlink{structcmode_af2b2a1431e42fd9fb8d845a546b92141}{flags}} \& IEEE80211\_CHAN\_HT40)) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00559}00559                         \textcolor{comment}{/* NB: DFS and HT40 don't mix */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00560}00560                         \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9eaa7d20390ddd7d65fbe199e0573070382}{HAL\_DEBUG\_REGDOMAIN}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00561}00561                             \textcolor{stringliteral}{"{}skip HT40 chan, DFS required\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00562}00562                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00563}00563                 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00564}00564 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00565}00565                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00566}00566 \textcolor{comment}{                 * XXX TODO: handle REG\_EXT\_FCC\_CH\_144.}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00567}00567 \textcolor{comment}{                 *}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00568}00568 \textcolor{comment}{                 * Figure out which instances/uses cause us to not}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00569}00569 \textcolor{comment}{                 * be allowed to use channel 144 (pri or sec overlap.)}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00570}00570 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00571}00571 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00572}00572                 bfreq\_lo = \mbox{\hyperlink{sample_8h_afa99ec4acc4ecb2dc3c2d05da15d0e3f}{MAX}}(fband-\/>\mbox{\hyperlink{structREG__DMN__FREQ__BAND_a75e8362a4160b641bf8190b97082ea74}{lowChannel}} + low\_adj, freq\_lo);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00573}00573                 bfreq\_hi = \mbox{\hyperlink{sample_8h_a3acffbd305ee72dcd4593c0d8af64a4f}{MIN}}(fband-\/>\mbox{\hyperlink{structREG__DMN__FREQ__BAND_ab6b3163b1b3268bbbc8b40f383793349}{highChannel}} + hi\_adj, freq\_hi);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00574}00574 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00575}00575                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00576}00576 \textcolor{comment}{                 * Don't start the 5GHz channel list at 5120MHz.}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00577}00577 \textcolor{comment}{                 *}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00578}00578 \textcolor{comment}{                 * Unfortunately (sigh) the HT40 channel creation}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00579}00579 \textcolor{comment}{                 * logic will create HT40U channels at 5120, 5160, 5200.}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00580}00580 \textcolor{comment}{                 * This means that 36 (5180) isn't considered as a}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00581}00581 \textcolor{comment}{                 * HT40 channel, and everything goes messed up from there.}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00582}00582 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00583}00583                 \textcolor{keywordflow}{if} ((cm-\/>\mbox{\hyperlink{structcmode_af2b2a1431e42fd9fb8d845a546b92141}{flags}} \& IEEE80211\_CHAN\_5GHZ) \&\&}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00584}00584                     (cm-\/>\mbox{\hyperlink{structcmode_af2b2a1431e42fd9fb8d845a546b92141}{flags}} \& IEEE80211\_CHAN\_HT40U)) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00585}00585                         \textcolor{keywordflow}{if} (bfreq\_lo < 5180)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00586}00586                                 bfreq\_lo = 5180;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00587}00587                 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00588}00588 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00589}00589                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00590}00590 \textcolor{comment}{                 * Same with HT40D -\/ need to start at 5200 or the low}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00591}00591 \textcolor{comment}{                 * channels are all wrong again.}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00592}00592 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00593}00593                 \textcolor{keywordflow}{if} ((cm-\/>\mbox{\hyperlink{structcmode_af2b2a1431e42fd9fb8d845a546b92141}{flags}} \& IEEE80211\_CHAN\_5GHZ) \&\&}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00594}00594                     (cm-\/>\mbox{\hyperlink{structcmode_af2b2a1431e42fd9fb8d845a546b92141}{flags}} \& IEEE80211\_CHAN\_HT40D)) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00595}00595                         \textcolor{keywordflow}{if} (bfreq\_lo < 5200)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00596}00596                                 bfreq\_lo = 5200;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00597}00597                 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00598}00598 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00599}00599                 \textcolor{keywordflow}{if} (fband-\/>\mbox{\hyperlink{structREG__DMN__FREQ__BAND_a70f5bbbcc938cbc7966fe93ec8b907c6}{channelSep}} >= channelSep)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00600}00600                         step = fband-\/>\mbox{\hyperlink{structREG__DMN__FREQ__BAND_a70f5bbbcc938cbc7966fe93ec8b907c6}{channelSep}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00601}00601                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00602}00602                         step = \mbox{\hyperlink{ah__internal_8h_aeb47018f732c79a339c5617ef0cbab65}{roundup}}(channelSep, fband-\/>\mbox{\hyperlink{structREG__DMN__FREQ__BAND_a70f5bbbcc938cbc7966fe93ec8b907c6}{channelSep}});}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00603}00603 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00604}00604                 \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9eaa7d20390ddd7d65fbe199e0573070382}{HAL\_DEBUG\_REGDOMAIN}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00605}00605                     \textcolor{stringliteral}{"{}\%s: freq\_lo=\%d, freq\_hi=\%d, low\_adj=\%d, hi\_adj=\%d, "{}}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00606}00606                     \textcolor{stringliteral}{"{}bandlo=\%d, bandhi=\%d, bfreqlo=\%d, bfreqhi=\%d, step=\%d, "{}}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00607}00607                     \textcolor{stringliteral}{"{}flags=0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00608}00608                     \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00609}00609                     (\textcolor{keywordtype}{int}) freq\_lo,}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00610}00610                     (\textcolor{keywordtype}{int}) freq\_hi,}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00611}00611                     (\textcolor{keywordtype}{int}) low\_adj,}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00612}00612                     (\textcolor{keywordtype}{int}) hi\_adj,}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00613}00613                     (\textcolor{keywordtype}{int}) fband-\/>\mbox{\hyperlink{structREG__DMN__FREQ__BAND_a75e8362a4160b641bf8190b97082ea74}{lowChannel}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00614}00614                     (\textcolor{keywordtype}{int}) fband-\/>\mbox{\hyperlink{structREG__DMN__FREQ__BAND_ab6b3163b1b3268bbbc8b40f383793349}{highChannel}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00615}00615                     (\textcolor{keywordtype}{int}) bfreq\_lo,}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00616}00616                     (\textcolor{keywordtype}{int}) bfreq\_hi,}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00617}00617                     step,}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00618}00618                     (\textcolor{keywordtype}{int}) cm-\/>\mbox{\hyperlink{structcmode_af2b2a1431e42fd9fb8d845a546b92141}{flags}});}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00619}00619 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00620}00620                 error = \mbox{\hyperlink{ah__regdomain_8c_a343f8513c5a29489cbe07c1fa945c21a}{add\_chanlist\_band}}(ah, chans, maxchans, nchans,}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00621}00621                     bfreq\_lo, bfreq\_hi, step, cm-\/>\mbox{\hyperlink{structcmode_af2b2a1431e42fd9fb8d845a546b92141}{flags}}, fband, rd);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00622}00622                 \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00623}00623                         \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9eaa7d20390ddd7d65fbe199e0573070382}{HAL\_DEBUG\_REGDOMAIN}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00624}00624                             \textcolor{stringliteral}{"{}\%s: too many channels for channel table\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00625}00625                             \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00626}00626                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00627}00627                 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00628}00628         \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00629}00629 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00630}00630 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00631}00631 \textcolor{keyword}{static} u\_int}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00632}\mbox{\hyperlink{ah__regdomain_8c_ada16717fb8a33065d8bd1f30737e1b51}{00632}} \mbox{\hyperlink{ah__regdomain_8c_ada16717fb8a33065d8bd1f30737e1b51}{getmodesmask}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, \mbox{\hyperlink{structregDomain}{REG\_DOMAIN}} *rd5GHz, u\_int modeSelect)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00633}00633 \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00634}00634 \textcolor{preprocessor}{\#define HAL\_MODE\_11A\_ALL \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00635}00635 \textcolor{preprocessor}{        (HAL\_MODE\_11A | HAL\_MODE\_11A\_TURBO | HAL\_MODE\_TURBO | \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00636}00636 \textcolor{preprocessor}{         HAL\_MODE\_11A\_QUARTER\_RATE | HAL\_MODE\_11A\_HALF\_RATE)}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00637}00637         u\_int modesMask;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00638}00638 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00639}00639         \textcolor{comment}{/* get modes that HW is capable of */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00640}00640         modesMask = \mbox{\hyperlink{ah__internal_8h_a19328faa5adf09a293040bbfe1e2c7f5}{ath\_hal\_getWirelessModes}}(ah);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00641}00641         modesMask \&= modeSelect;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00642}00642         \textcolor{comment}{/* optimize work below if no 11a channels */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00643}00643         \textcolor{keywordflow}{if} (\mbox{\hyperlink{ah__regdomain_8c_a396e623f70db464abd827598e12d7456}{isChanBitMaskZero}}(rd5GHz-\/>\mbox{\hyperlink{structregDomain_a8f7e6b29104c555274f74b42fbcce16a}{chan11a}}) \&\&}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00644}00644             (modesMask \& \mbox{\hyperlink{ah__regdomain_8c_aac8897fbf1680ee464759044b0a818ea}{HAL\_MODE\_11A\_ALL}})) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00645}00645                 \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9eaa7d20390ddd7d65fbe199e0573070382}{HAL\_DEBUG\_REGDOMAIN}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00646}00646                     \textcolor{stringliteral}{"{}\%s: disallow all 11a\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00647}00647                 modesMask \&= \string~HAL\_MODE\_11A\_ALL;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00648}00648         \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00649}00649 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00650}00650         \textcolor{keywordflow}{return} (modesMask);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00651}00651 \textcolor{preprocessor}{\#undef HAL\_MODE\_11A\_ALL}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00652}00652 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00653}00653 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00654}00654 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00655}00655 \textcolor{comment}{ * Construct the channel list for the specified regulatory config.}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00656}00656 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00657}00657 \textcolor{keyword}{static} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0}{HAL\_STATUS}}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00658}\mbox{\hyperlink{ah__regdomain_8c_ab57cd3c957022ea48b5f4076c7ed8434}{00658}} \mbox{\hyperlink{ah__regdomain_8c_ab57cd3c957022ea48b5f4076c7ed8434}{getchannels}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah,}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00659}00659     \textcolor{keyword}{struct} ieee80211\_channel chans[], u\_int maxchans, \textcolor{keywordtype}{int} *nchans,}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00660}00660     u\_int modeSelect, \mbox{\hyperlink{ah_8h_a8df20c4b99d88f97d8d91f143c9dc4c1}{HAL\_CTRY\_CODE}} cc, \mbox{\hyperlink{ah_8h_a9c751b28b79f1cc3f09213b6b53f94f3}{HAL\_REG\_DOMAIN}} regDmn,}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00661}00661     \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39a}{HAL\_BOOL}} enableExtendedChannels,}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00662}00662     \mbox{\hyperlink{structCOUNTRY__CODE__TO__ENUM__RD}{COUNTRY\_CODE\_TO\_ENUM\_RD}} **pcountry,}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00663}00663     \mbox{\hyperlink{structregDomain}{REG\_DOMAIN}} **prd2GHz, \mbox{\hyperlink{structregDomain}{REG\_DOMAIN}} **prd5GHz)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00664}00664 \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00665}00665         \mbox{\hyperlink{structregDomain}{REG\_DOMAIN}} *rd5GHz, *rd2GHz;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00666}00666         u\_int modesMask;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00667}00667         \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structcmode}{cmode}} *cm;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00668}00668         \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0}{HAL\_STATUS}} status;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00669}00669 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00670}00670         \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9eaa7d20390ddd7d65fbe199e0573070382}{HAL\_DEBUG\_REGDOMAIN}}, \textcolor{stringliteral}{"{}\%s: cc \%u regDmn 0x\%x mode 0x\%x\%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00671}00671             \_\_func\_\_, cc, regDmn, modeSelect, }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00672}00672             enableExtendedChannels ? \textcolor{stringliteral}{"{} ecm"{}} : \textcolor{stringliteral}{"{}"{}});}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00673}00673 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00674}00674         status = \mbox{\hyperlink{ah__regdomain_8c_a606658101fd8b712fe785be91b286c27}{getregstate}}(ah, cc, regDmn, pcountry, \&rd2GHz, \&rd5GHz);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00675}00675         \textcolor{keywordflow}{if} (status != \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}})}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00676}00676                 \textcolor{keywordflow}{return} status;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00677}00677 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00678}00678         modesMask = \mbox{\hyperlink{ah__regdomain_8c_ada16717fb8a33065d8bd1f30737e1b51}{getmodesmask}}(ah, rd5GHz, modeSelect);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00679}00679         \textcolor{comment}{/* XXX error? */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00680}00680         \textcolor{keywordflow}{if} (modesMask == 0)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00681}00681                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00682}00682 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00683}00683         \textcolor{keywordflow}{for} (cm = \mbox{\hyperlink{ah__regdomain_8c_a51bafc1dc7a6bc7ea10a9d27dc538fa2}{modes}}; cm < \&\mbox{\hyperlink{ah__regdomain_8c_a51bafc1dc7a6bc7ea10a9d27dc538fa2}{modes}}[\mbox{\hyperlink{ah__regdomain_8c_af04f8faa08e13b16b70b52a56fbc9c53}{N}}(\mbox{\hyperlink{ah__regdomain_8c_a51bafc1dc7a6bc7ea10a9d27dc538fa2}{modes}})]; cm++) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00684}00684                 \mbox{\hyperlink{structregDomain}{REG\_DOMAIN}} *rd;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00685}00685 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00686}00686                 \textcolor{keywordflow}{if} ((cm-\/>\mbox{\hyperlink{structcmode_a51b76c3df2d72d63991c3ff17e358fcd}{mode}} \& modesMask) == 0) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00687}00687                         \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9eaa7d20390ddd7d65fbe199e0573070382}{HAL\_DEBUG\_REGDOMAIN}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00688}00688                             \textcolor{stringliteral}{"{}\%s: skip mode 0x\%x flags 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00689}00689                             \_\_func\_\_, cm-\/>\mbox{\hyperlink{structcmode_a51b76c3df2d72d63991c3ff17e358fcd}{mode}}, cm-\/>\mbox{\hyperlink{structcmode_af2b2a1431e42fd9fb8d845a546b92141}{flags}});}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00690}00690                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00691}00691                 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00692}00692 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00693}00693                 \textcolor{keywordflow}{if} (cm-\/>\mbox{\hyperlink{structcmode_af2b2a1431e42fd9fb8d845a546b92141}{flags}} \& IEEE80211\_CHAN\_5GHZ)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00694}00694                         rd = rd5GHz;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00695}00695                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (cm-\/>\mbox{\hyperlink{structcmode_af2b2a1431e42fd9fb8d845a546b92141}{flags}} \& IEEE80211\_CHAN\_2GHZ)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00696}00696                         rd = rd2GHz;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00697}00697                 \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00698}00698                         \mbox{\hyperlink{ah__osdep_8c_ab05b380aa2dabe9a6f6f1c13c6a482cf}{ath\_hal\_printf}}(ah, \textcolor{stringliteral}{"{}\%s: Unknown HAL flags 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00699}00699                             \_\_func\_\_, cm-\/>\mbox{\hyperlink{structcmode_af2b2a1431e42fd9fb8d845a546b92141}{flags}});}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00700}00700                         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a925d3be7c5ded1ced35f00a48560e01f}{HAL\_EINVAL}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00701}00701                 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00702}00702 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00703}00703                 \mbox{\hyperlink{ah__regdomain_8c_a9475c5716f956f10aed01c010b8121fb}{add\_chanlist\_mode}}(ah, chans, maxchans, nchans, cm,}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00704}00704                     rd, enableExtendedChannels);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00705}00705                 \textcolor{keywordflow}{if} (*nchans >= maxchans)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00706}00706                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00707}00707         \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00708}00708 done:}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00709}00709         \textcolor{comment}{/* NB: pcountry set above by getregstate */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00710}00710         \textcolor{keywordflow}{if} (prd2GHz != \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}})}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00711}00711                 *prd2GHz = rd2GHz;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00712}00712         \textcolor{keywordflow}{if} (prd5GHz != \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}})}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00713}00713                 *prd5GHz = rd5GHz;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00714}00714         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00715}00715 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00716}00716 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00717}00717 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00718}00718 \textcolor{comment}{ * Retrieve a channel list without affecting runtime state.}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00719}00719 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00720}00720 \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0}{HAL\_STATUS}}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00721}\mbox{\hyperlink{ah__regdomain_8c_a4efa577d6a95c288e33daf2c32124d7a}{00721}} \mbox{\hyperlink{ah__regdomain_8c_a4efa577d6a95c288e33daf2c32124d7a}{ath\_hal\_getchannels}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah,}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00722}00722     \textcolor{keyword}{struct} ieee80211\_channel chans[], u\_int maxchans, \textcolor{keywordtype}{int} *nchans,}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00723}00723     u\_int modeSelect, \mbox{\hyperlink{ah_8h_a8df20c4b99d88f97d8d91f143c9dc4c1}{HAL\_CTRY\_CODE}} cc, \mbox{\hyperlink{ah_8h_a9c751b28b79f1cc3f09213b6b53f94f3}{HAL\_REG\_DOMAIN}} regDmn,}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00724}00724     \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39a}{HAL\_BOOL}} enableExtendedChannels)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00725}00725 \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00726}00726         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah__regdomain_8c_ab57cd3c957022ea48b5f4076c7ed8434}{getchannels}}(ah, chans, maxchans, nchans, modeSelect,}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00727}00727             cc, regDmn, enableExtendedChannels, \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}}, \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}}, \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}});}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00728}00728 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00729}00729 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00730}00730 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00731}00731 \textcolor{comment}{ * Handle frequency mapping from 900Mhz range to 2.4GHz range}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00732}00732 \textcolor{comment}{ * for GSM radios.  This is done when we need the h/w frequency}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00733}00733 \textcolor{comment}{ * and the channel is marked IEEE80211\_CHAN\_GSM.}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00734}00734 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00735}00735 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00736}\mbox{\hyperlink{ah__regdomain_8c_a7efb6989abd4e9b3e559ce15b535cfeb}{00736}} \mbox{\hyperlink{ah__regdomain_8c_a7efb6989abd4e9b3e559ce15b535cfeb}{ath\_hal\_mapgsm}}(\textcolor{keywordtype}{int} sku, \textcolor{keywordtype}{int} freq)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00737}00737 \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00738}00738         \textcolor{keywordflow}{if} (sku == SKU\_XR9)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00739}00739                 \textcolor{keywordflow}{return} 1520 + freq;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00740}00740         \textcolor{keywordflow}{if} (sku == SKU\_GZ901)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00741}00741                 \textcolor{keywordflow}{return} 1544 + freq;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00742}00742         \textcolor{keywordflow}{if} (sku == SKU\_SR9)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00743}00743                 \textcolor{keywordflow}{return} 3344 -\/ freq;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00744}00744         \textcolor{keywordflow}{if} (sku == SKU\_XC900M)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00745}00745                 \textcolor{keywordflow}{return} 1517 + freq;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00746}00746         \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(\mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}}, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9ea35506ea938627da4c44204d0895d0bf8}{HAL\_DEBUG\_ANY}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00747}00747             \textcolor{stringliteral}{"{}\%s: cannot map freq \%u unknown gsm sku \%u\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00748}00748             \_\_func\_\_, freq, sku);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00749}00749         \textcolor{keywordflow}{return} freq;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00750}00750 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00751}00751 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00752}00752 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00753}00753 \textcolor{comment}{ * Setup the internal/private channel state given a table of}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00754}00754 \textcolor{comment}{ * net80211 channels.  We collapse entries for the same frequency}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00755}00755 \textcolor{comment}{ * and record the frequency for doing noise floor processing}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00756}00756 \textcolor{comment}{ * where we don't have net80211 channel context.}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00757}00757 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00758}00758 \textcolor{keyword}{static} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39a}{HAL\_BOOL}}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00759}\mbox{\hyperlink{ah__regdomain_8c_a1865e53afcd1a05aa684c3730d09ddd6}{00759}} \mbox{\hyperlink{ah__regdomain_8c_a1865e53afcd1a05aa684c3730d09ddd6}{assignPrivateChannels}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah,}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00760}00760         \textcolor{keyword}{struct} ieee80211\_channel chans[], \textcolor{keywordtype}{int} nchans, \textcolor{keywordtype}{int} sku)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00761}00761 \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00762}00762         \mbox{\hyperlink{structHAL__CHANNEL__INTERNAL}{HAL\_CHANNEL\_INTERNAL}} *ic;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00763}00763         \textcolor{keywordtype}{int} i, j, next, freq;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00764}00764 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00765}00765         next = 0;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00766}00766         \textcolor{keywordflow}{for} (i = 0; i < nchans; i++) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00767}00767                 \textcolor{keyword}{struct }ieee80211\_channel *c = \&chans[i];}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00768}00768                 \textcolor{keywordflow}{for} (j = i-\/1; j >= 0; j-\/-\/)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00769}00769                         \textcolor{keywordflow}{if} (chans[j].ic\_freq == c-\/>ic\_freq) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00770}00770                                 c-\/>ic\_devdata = chans[j].ic\_devdata;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00771}00771                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00772}00772                         \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00773}00773                 \textcolor{keywordflow}{if} (j < 0) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00774}00774                         \textcolor{comment}{/* new entry, assign a private channel entry */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00775}00775                         \textcolor{keywordflow}{if} (next >= \mbox{\hyperlink{ah__regdomain_8c_af04f8faa08e13b16b70b52a56fbc9c53}{N}}(\mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_channels)) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00776}00776                                 \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9ea35506ea938627da4c44204d0895d0bf8}{HAL\_DEBUG\_ANY}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00777}00777                                     \textcolor{stringliteral}{"{}\%s: too many channels, max \%zu\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00778}00778                                     \_\_func\_\_, \mbox{\hyperlink{ah__regdomain_8c_af04f8faa08e13b16b70b52a56fbc9c53}{N}}(\mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_channels));}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00779}00779                                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aa46085f3e46cbceb46c46b0bde64a6c20}{AH\_FALSE}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00780}00780                         \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00781}00781                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00782}00782 \textcolor{comment}{                         * Handle frequency mapping for 900MHz devices.}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00783}00783 \textcolor{comment}{                         * The hardware uses 2.4GHz frequencies that are}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00784}00784 \textcolor{comment}{                         * down-\/converted.  The 802.11 layer uses the}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00785}00785 \textcolor{comment}{                         * true frequencies.}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00786}00786 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00787}00787                         freq = IEEE80211\_IS\_CHAN\_GSM(c) ?}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00788}00788                             \mbox{\hyperlink{ah__regdomain_8c_a7efb6989abd4e9b3e559ce15b535cfeb}{ath\_hal\_mapgsm}}(sku, c-\/>ic\_freq) : c-\/>ic\_freq;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00789}00789 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00790}00790                         \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9eaa7d20390ddd7d65fbe199e0573070382}{HAL\_DEBUG\_REGDOMAIN}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00791}00791                             \textcolor{stringliteral}{"{}\%s: private[\%3u] \%u/0x\%x -\/> channel \%u\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00792}00792                             \_\_func\_\_, next, c-\/>ic\_freq, c-\/>ic\_flags, freq);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00793}00793 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00794}00794                         ic = \&\mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_channels[next];}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00795}00795                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00796}00796 \textcolor{comment}{                         * NB: This clears privFlags which means ancillary}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00797}00797 \textcolor{comment}{                         *     code like ANI and IQ calibration will be}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00798}00798 \textcolor{comment}{                         *     restarted and re-\/setup any per-\/channel state.}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00799}00799 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00800}00800                         \mbox{\hyperlink{ah__osdep_8h_a7fe5b3aa939ce794d6247468c5389e1a}{OS\_MEMZERO}}(ic, \textcolor{keyword}{sizeof}(*ic));}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00801}00801                         ic-\/>\mbox{\hyperlink{structHAL__CHANNEL__INTERNAL_afb5a6850ca1450448b70ae862d69dcfd}{channel}} = freq;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00802}00802                         c-\/>ic\_devdata = next;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00803}00803                         next++;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00804}00804                 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00805}00805         \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00806}00806         \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_nchan = next;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00807}00807         \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9ea35506ea938627da4c44204d0895d0bf8}{HAL\_DEBUG\_ANY}}, \textcolor{stringliteral}{"{}\%s: \%u public, \%u private channels\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00808}00808             \_\_func\_\_, nchans, next);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00809}00809         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aadc898cbb91e577b40c005576c51e8fdb}{AH\_TRUE}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00810}00810 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00811}00811 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00812}00812 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00813}00813 \textcolor{comment}{ * Setup the channel list based on the information in the EEPROM.}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00814}00814 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00815}00815 \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0}{HAL\_STATUS}}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00816}\mbox{\hyperlink{ah__regdomain_8c_ad1a7f2b1db42a1c9fd114492b24b4cbe}{00816}} \mbox{\hyperlink{ah__regdomain_8c_ad1a7f2b1db42a1c9fd114492b24b4cbe}{ath\_hal\_init\_channels}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah,}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00817}00817     \textcolor{keyword}{struct} ieee80211\_channel chans[], u\_int maxchans, \textcolor{keywordtype}{int} *nchans,}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00818}00818     u\_int modeSelect, \mbox{\hyperlink{ah_8h_a8df20c4b99d88f97d8d91f143c9dc4c1}{HAL\_CTRY\_CODE}} cc, \mbox{\hyperlink{ah_8h_a9c751b28b79f1cc3f09213b6b53f94f3}{HAL\_REG\_DOMAIN}} regDmn,}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00819}00819     \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39a}{HAL\_BOOL}} enableExtendedChannels)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00820}00820 \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00821}00821         \mbox{\hyperlink{structCOUNTRY__CODE__TO__ENUM__RD}{COUNTRY\_CODE\_TO\_ENUM\_RD}} *country;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00822}00822         \mbox{\hyperlink{structregDomain}{REG\_DOMAIN}} *rd5GHz, *rd2GHz;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00823}00823         \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0}{HAL\_STATUS}} status;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00824}00824 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00825}00825         status = \mbox{\hyperlink{ah__regdomain_8c_ab57cd3c957022ea48b5f4076c7ed8434}{getchannels}}(ah, chans, maxchans, nchans, modeSelect,}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00826}00826             cc, regDmn, enableExtendedChannels, \&country, \&rd2GHz, \&rd5GHz);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00827}00827         \textcolor{keywordflow}{if} (status == \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}} \&\&}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00828}00828             \mbox{\hyperlink{ah__regdomain_8c_a1865e53afcd1a05aa684c3730d09ddd6}{assignPrivateChannels}}(ah, chans, *nchans, \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_currentRD)) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00829}00829                 \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_rd2GHz = rd2GHz;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00830}00830                 \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_rd5GHz = rd5GHz;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00831}00831 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00832}00832                 ah-\/>\mbox{\hyperlink{structath__hal_a50e81591afe1cc9ba4f5010e12078472}{ah\_countryCode}} = country-\/>\mbox{\hyperlink{structCOUNTRY__CODE__TO__ENUM__RD_a908d703a7fe686a7e6e3c7865c15256f}{countryCode}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00833}00833                 \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9eaa7d20390ddd7d65fbe199e0573070382}{HAL\_DEBUG\_REGDOMAIN}}, \textcolor{stringliteral}{"{}\%s: cc \%u\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00834}00834                     \_\_func\_\_, ah-\/>\mbox{\hyperlink{structath__hal_a50e81591afe1cc9ba4f5010e12078472}{ah\_countryCode}});}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00835}00835 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00836}00836                 \textcolor{comment}{/* Update current DFS domain */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00837}00837                 \mbox{\hyperlink{ah__regdomain_8c_a0d7ef964446381a4fea1a5aa32eec965}{ath\_hal\_update\_dfsdomain}}(ah);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00838}00838         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00839}00839                 status = \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a925d3be7c5ded1ced35f00a48560e01f}{HAL\_EINVAL}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00840}00840 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00841}00841         \textcolor{keywordflow}{return} status;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00842}00842 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00843}00843 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00844}00844 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00845}00845 \textcolor{comment}{ * Set the channel list.}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00846}00846 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00847}00847 \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0}{HAL\_STATUS}}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00848}\mbox{\hyperlink{ah__regdomain_8c_ab85b26f85e2d443dad9e6534021d5265}{00848}} \mbox{\hyperlink{ah__regdomain_8c_ab85b26f85e2d443dad9e6534021d5265}{ath\_hal\_set\_channels}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah,}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00849}00849     \textcolor{keyword}{struct} ieee80211\_channel chans[], \textcolor{keywordtype}{int} nchans,}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00850}00850     \mbox{\hyperlink{ah_8h_a8df20c4b99d88f97d8d91f143c9dc4c1}{HAL\_CTRY\_CODE}} cc, \mbox{\hyperlink{ah_8h_a9c751b28b79f1cc3f09213b6b53f94f3}{HAL\_REG\_DOMAIN}} rd)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00851}00851 \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00852}00852         \mbox{\hyperlink{structCOUNTRY__CODE__TO__ENUM__RD}{COUNTRY\_CODE\_TO\_ENUM\_RD}} *country;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00853}00853         \mbox{\hyperlink{structregDomain}{REG\_DOMAIN}} *rd5GHz, *rd2GHz;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00854}00854         \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0}{HAL\_STATUS}} status;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00855}00855 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00856}00856         \textcolor{keywordflow}{switch} (rd) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00857}00857         \textcolor{keywordflow}{case} SKU\_SR9:}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00858}00858         \textcolor{keywordflow}{case} SKU\_XR9:}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00859}00859         \textcolor{keywordflow}{case} SKU\_GZ901:}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00860}00860         \textcolor{keywordflow}{case} SKU\_XC900M:}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00861}00861                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00862}00862 \textcolor{comment}{                 * Map 900MHz sku's.  The frequencies will be mapped}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00863}00863 \textcolor{comment}{                 * according to the sku to compensate for the down-\/converter.}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00864}00864 \textcolor{comment}{                 * We use the FCC for these sku's as the mapped channel}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00865}00865 \textcolor{comment}{                 * list is known compatible (will need to change if/when}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00866}00866 \textcolor{comment}{                 * vendors do different mapping in different locales).}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00867}00867 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00868}00868                 status = \mbox{\hyperlink{ah__regdomain_8c_a606658101fd8b712fe785be91b286c27}{getregstate}}(ah, CTRY\_DEFAULT, SKU\_FCC,}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00869}00869                     \&country, \&rd2GHz, \&rd5GHz);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00870}00870                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00871}00871         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00872}00872                 status = \mbox{\hyperlink{ah__regdomain_8c_a606658101fd8b712fe785be91b286c27}{getregstate}}(ah, cc, rd,}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00873}00873                     \&country, \&rd2GHz, \&rd5GHz);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00874}00874                 rd = \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_currentRD;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00875}00875                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00876}00876         \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00877}00877         \textcolor{keywordflow}{if} (status == \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}} \&\& \mbox{\hyperlink{ah__regdomain_8c_a1865e53afcd1a05aa684c3730d09ddd6}{assignPrivateChannels}}(ah, chans, nchans, rd)) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00878}00878                 \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_rd2GHz = rd2GHz;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00879}00879                 \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_rd5GHz = rd5GHz;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00880}00880 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00881}00881                 ah-\/>\mbox{\hyperlink{structath__hal_a50e81591afe1cc9ba4f5010e12078472}{ah\_countryCode}} = country-\/>\mbox{\hyperlink{structCOUNTRY__CODE__TO__ENUM__RD_a908d703a7fe686a7e6e3c7865c15256f}{countryCode}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00882}00882                 \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9eaa7d20390ddd7d65fbe199e0573070382}{HAL\_DEBUG\_REGDOMAIN}}, \textcolor{stringliteral}{"{}\%s: cc \%u\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00883}00883                     \_\_func\_\_, ah-\/>\mbox{\hyperlink{structath__hal_a50e81591afe1cc9ba4f5010e12078472}{ah\_countryCode}});}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00884}00884         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00885}00885                 status = \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a925d3be7c5ded1ced35f00a48560e01f}{HAL\_EINVAL}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00886}00886 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00887}00887         \textcolor{keywordflow}{if} (status == \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}}) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00888}00888                 \textcolor{comment}{/* Update current DFS domain */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00889}00889                 (void) \mbox{\hyperlink{ah__regdomain_8c_a0d7ef964446381a4fea1a5aa32eec965}{ath\_hal\_update\_dfsdomain}}(ah);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00890}00890         \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00891}00891         \textcolor{keywordflow}{return} status;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00892}00892 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00893}00893 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00894}00894 \textcolor{preprocessor}{\#ifdef AH\_DEBUG}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00895}00895 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00896}00896 \textcolor{comment}{ * Return the internal channel corresponding to a public channel.}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00897}00897 \textcolor{comment}{ * NB: normally this routine is inline'd (see ah\_internal.h)}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00898}00898 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00899}00899 \mbox{\hyperlink{structHAL__CHANNEL__INTERNAL}{HAL\_CHANNEL\_INTERNAL}} *}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00900}00900 \mbox{\hyperlink{ah__internal_8h_a43ec3662d6186b79cd289c466ed900fe}{ath\_hal\_checkchannel}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, \textcolor{keyword}{const} \textcolor{keyword}{struct} ieee80211\_channel *c)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00901}00901 \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00902}00902         \mbox{\hyperlink{structHAL__CHANNEL__INTERNAL}{HAL\_CHANNEL\_INTERNAL}} *cc = \&\mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_channels[c-\/>ic\_devdata];}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00903}00903 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00904}00904         \textcolor{keywordflow}{if} (c-\/>ic\_devdata < \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_nchan \&\&}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00905}00905             (c-\/>ic\_freq == cc-\/>\mbox{\hyperlink{structHAL__CHANNEL__INTERNAL_afb5a6850ca1450448b70ae862d69dcfd}{channel}} || IEEE80211\_IS\_CHAN\_GSM(c)))}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00906}00906                 \textcolor{keywordflow}{return} cc;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00907}00907         \textcolor{keywordflow}{if} (c-\/>ic\_devdata >= \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_nchan) \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00908}00908                 \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9ea35506ea938627da4c44204d0895d0bf8}{HAL\_DEBUG\_ANY}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00909}00909                     \textcolor{stringliteral}{"{}\%s: bad mapping, devdata \%u nchans \%u\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00910}00910                    \_\_func\_\_, c-\/>ic\_devdata, \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_nchan);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00911}00911                 \mbox{\hyperlink{ah__internal_8h_abb8bdaf7438fdc315b333ab07ed68c9c}{HALASSERT}}(c-\/>ic\_devdata < \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_nchan);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00912}00912         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00913}00913                 \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9ea35506ea938627da4c44204d0895d0bf8}{HAL\_DEBUG\_ANY}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00914}00914                     \textcolor{stringliteral}{"{}\%s: no match for \%u/0x\%x devdata \%u channel \%u\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00915}00915                    \_\_func\_\_, c-\/>ic\_freq, c-\/>ic\_flags, c-\/>ic\_devdata,}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00916}00916                    cc-\/>\mbox{\hyperlink{structHAL__CHANNEL__INTERNAL_afb5a6850ca1450448b70ae862d69dcfd}{channel}});}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00917}00917                 \mbox{\hyperlink{ah__internal_8h_abb8bdaf7438fdc315b333ab07ed68c9c}{HALASSERT}}(c-\/>ic\_freq == cc-\/>\mbox{\hyperlink{structHAL__CHANNEL__INTERNAL_afb5a6850ca1450448b70ae862d69dcfd}{channel}} || IEEE80211\_IS\_CHAN\_GSM(c));}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00918}00918         \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00919}00919         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00920}00920 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00921}00921 \textcolor{preprocessor}{\#endif }\textcolor{comment}{/* AH\_DEBUG */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00922}00922 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00923}\mbox{\hyperlink{ah__regdomain_8c_a04f0522bda949b1deb00a6f09bc28fe4}{00923}} \textcolor{preprocessor}{\#define isWwrSKU(\_ah) \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00924}00924 \textcolor{preprocessor}{        ((getEepromRD((\_ah)) \& WORLD\_SKU\_MASK) == WORLD\_SKU\_PREFIX || \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00925}00925 \textcolor{preprocessor}{          getEepromRD(\_ah) == WORLD)}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00926}00926 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00927}00927 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00928}00928 \textcolor{comment}{ * Return the test group for the specific channel based on}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00929}00929 \textcolor{comment}{ * the current regulatory setup.}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00930}00930 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00931}00931 u\_int}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00932}\mbox{\hyperlink{ah__internal_8h_a195ff223d41f767e8e1aaff18a914c70}{00932}} \mbox{\hyperlink{ah__regdomain_8c_add6ce1f04bcc27aeb74479edf2dbe944}{ath\_hal\_getctl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, \textcolor{keyword}{const} \textcolor{keyword}{struct} ieee80211\_channel *c)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00933}00933 \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00934}00934         u\_int ctl;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00935}00935 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00936}00936         \textcolor{keywordflow}{if} (\mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_rd2GHz == \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_rd5GHz ||}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00937}00937             (ah-\/>\mbox{\hyperlink{structath__hal_a50e81591afe1cc9ba4f5010e12078472}{ah\_countryCode}} == CTRY\_DEFAULT \&\& \mbox{\hyperlink{ah__regdomain_8c_a04f0522bda949b1deb00a6f09bc28fe4}{isWwrSKU}}(ah)))}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00938}00938                 ctl = \mbox{\hyperlink{ah__eeprom_8h_a9e2ceca586dbee740da2400e8c554cb8}{SD\_NO\_CTL}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00939}00939         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (IEEE80211\_IS\_CHAN\_2GHZ(c))}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00940}00940                 ctl = \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_rd2GHz-\/>conformanceTestLimit;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00941}00941         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00942}00942                 ctl = \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_rd5GHz-\/>conformanceTestLimit;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00943}00943         \textcolor{keywordflow}{if} (IEEE80211\_IS\_CHAN\_B(c))}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00944}00944                 \textcolor{keywordflow}{return} ctl | \mbox{\hyperlink{ah__eeprom_8h_ac62b4aba480dbd34074f1d2606b45057}{CTL\_11B}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00945}00945         \textcolor{keywordflow}{if} (IEEE80211\_IS\_CHAN\_G(c))}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00946}00946                 \textcolor{keywordflow}{return} ctl | \mbox{\hyperlink{ah__eeprom_8h_a4460ba3392adf825625f730b64452f68}{CTL\_11G}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00947}00947         \textcolor{keywordflow}{if} (IEEE80211\_IS\_CHAN\_108G(c))}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00948}00948                 \textcolor{keywordflow}{return} ctl | \mbox{\hyperlink{ah__eeprom_8h_a6220788aea04a02468b9f43381fa1d2c}{CTL\_108G}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00949}00949         \textcolor{keywordflow}{if} (IEEE80211\_IS\_CHAN\_TURBO(c))}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00950}00950                 \textcolor{keywordflow}{return} ctl | \mbox{\hyperlink{ah__eeprom_8h_ace7760d186882cad9e378233e6693942}{CTL\_TURBO}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00951}00951         \textcolor{keywordflow}{if} (IEEE80211\_IS\_CHAN\_A(c))}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00952}00952                 \textcolor{keywordflow}{return} ctl | \mbox{\hyperlink{ah__eeprom_8h_a5d909c5c89f7a6f1efbbb712d0d9d143}{CTL\_11A}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00953}00953         \textcolor{keywordflow}{return} ctl;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00954}00954 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00955}00955 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00956}00956 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00957}00957 \textcolor{comment}{ * Update the current dfsDomain setting based on the given}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00958}00958 \textcolor{comment}{ * country code.}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00959}00959 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00960}00960 \textcolor{comment}{ * Since FreeBSD/net80211 allows the channel set to change}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00961}00961 \textcolor{comment}{ * after the card has been setup (via ath\_hal\_init\_channels())}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00962}00962 \textcolor{comment}{ * this function method is needed to update ah\_dfsDomain.}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00963}00963 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00964}00964 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00965}\mbox{\hyperlink{ah__regdomain_8c_a0d7ef964446381a4fea1a5aa32eec965}{00965}} \mbox{\hyperlink{ah__regdomain_8c_a0d7ef964446381a4fea1a5aa32eec965}{ath\_hal\_update\_dfsdomain}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00966}00966 \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00967}00967         \textcolor{keyword}{const} \mbox{\hyperlink{structregDomain}{REG\_DOMAIN}} *rd5GHz = \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_rd5GHz;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00968}00968         \mbox{\hyperlink{ah_8h_a3bf85d440fa597df796c0fc04a401a62}{HAL\_DFS\_DOMAIN}} dfsDomain = \mbox{\hyperlink{ah_8h_a3bf85d440fa597df796c0fc04a401a62a5c29f15e8667c4d502df495e22a758f8}{HAL\_DFS\_UNINIT\_DOMAIN}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00969}00969 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00970}00970         \textcolor{keywordflow}{if} (rd5GHz-\/>\mbox{\hyperlink{structregDomain_a1886931caa781e75783fd7b6581e9038}{dfsMask}} \& \mbox{\hyperlink{ah__regdomain_8h_a80155586fa275b28773c9b203f52cabaa49191c5462c8aa5d4f234a969c7875a0}{DFS\_FCC3}})}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00971}00971                 dfsDomain = \mbox{\hyperlink{ah_8h_a3bf85d440fa597df796c0fc04a401a62a841ca9ea90828b1d828d0a99997aa2ad}{HAL\_DFS\_FCC\_DOMAIN}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00972}00972         \textcolor{keywordflow}{if} (rd5GHz-\/>\mbox{\hyperlink{structregDomain_a1886931caa781e75783fd7b6581e9038}{dfsMask}} \& \mbox{\hyperlink{ah__regdomain_8h_a80155586fa275b28773c9b203f52cabaa4ce549a099f2a7eb76b99bbc0d16bdbc}{DFS\_ETSI}})}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00973}00973                 dfsDomain = \mbox{\hyperlink{ah_8h_a3bf85d440fa597df796c0fc04a401a62a9a0f7e4024d1e5511ca2dac4a0288670}{HAL\_DFS\_ETSI\_DOMAIN}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00974}00974         \textcolor{keywordflow}{if} (rd5GHz-\/>\mbox{\hyperlink{structregDomain_a1886931caa781e75783fd7b6581e9038}{dfsMask}} \& \mbox{\hyperlink{ah__regdomain_8h_a80155586fa275b28773c9b203f52cabaaedfa7c4c1853e57c100f5d810b481084}{DFS\_MKK4}})}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00975}00975                 dfsDomain = \mbox{\hyperlink{ah_8h_a3bf85d440fa597df796c0fc04a401a62ace72b6f122b078d5d172861708ec0132}{HAL\_DFS\_MKK4\_DOMAIN}};}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00976}00976         \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_dfsDomain = dfsDomain;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00977}00977         \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9eaa7d20390ddd7d65fbe199e0573070382}{HAL\_DEBUG\_REGDOMAIN}}, \textcolor{stringliteral}{"{}\%s ah\_dfsDomain: \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00978}00978             \_\_func\_\_, \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_dfsDomain);}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00979}00979 \}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00980}00980 }
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00981}00981 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00982}00982 \textcolor{comment}{ * Return the max allowed antenna gain and apply any regulatory}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00983}00983 \textcolor{comment}{ * domain specific changes.}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00984}00984 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00985}00985 \textcolor{comment}{ * NOTE: a negative reduction is possible in RD's that only}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00986}00986 \textcolor{comment}{ * measure radiated power (e.g., ETSI) which would increase}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00987}00987 \textcolor{comment}{ * that actual conducted output power (though never beyond}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00988}00988 \textcolor{comment}{ * the calibrated target power).}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00989}00989 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00990}00990 u\_int}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00991}\mbox{\hyperlink{ah__internal_8h_a1632f664a910ac6d4c326bb37c01d6dc}{00991}} \mbox{\hyperlink{ah__regdomain_8c_a1632f664a910ac6d4c326bb37c01d6dc}{ath\_hal\_getantennareduction}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah,}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00992}00992     \textcolor{keyword}{const} \textcolor{keyword}{struct} ieee80211\_channel *chan, u\_int twiceGain)}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00993}00993 \{}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00994}00994         int8\_t antennaMax = twiceGain -\/ chan-\/>ic\_maxantgain*2;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00995}00995         \textcolor{keywordflow}{return} (antennaMax < 0) ? 0 : antennaMax;}
\DoxyCodeLine{\Hypertarget{ah__regdomain_8c_source_l00996}00996 \}}

\end{DoxyCode}
