\hypertarget{ah_8c_source}{}\doxysection{ah.\+c}
\label{ah_8c_source}\index{dev/ath/ath\_hal/ah.c@{dev/ath/ath\_hal/ah.c}}
\mbox{\hyperlink{ah_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: ISC}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2002-\/2009 Sam Leffler, Errno Consulting}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00005}00005 \textcolor{comment}{ * Copyright (c) 2002-\/2008 Atheros Communications, Inc.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00007}00007 \textcolor{comment}{ * Permission to use, copy, modify, and/or distribute this software for any}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00008}00008 \textcolor{comment}{ * purpose with or without fee is hereby granted, provided that the above}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00009}00009 \textcolor{comment}{ * copyright notice and this permission notice appear in all copies.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00010}00010 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00011}00011 \textcolor{comment}{ * THE SOFTWARE IS PROVIDED "{}AS IS"{} AND THE AUTHOR DISCLAIMS ALL WARRANTIES}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00012}00012 \textcolor{comment}{ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00013}00013 \textcolor{comment}{ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00014}00014 \textcolor{comment}{ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00015}00015 \textcolor{comment}{ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00016}00016 \textcolor{comment}{ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00017}00017 \textcolor{comment}{ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00018}00018 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00019}00019 \textcolor{comment}{ * \$FreeBSD\$}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00020}00020 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00021}00021 \textcolor{preprocessor}{\#include "{}opt\_ah.h"{}}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00022}00022 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00023}00023 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{ah_8h}{ah.h}}"{}}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00024}00024 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{ah__internal_8h}{ah\_internal.h}}"{}}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00025}00025 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{ah__devid_8h}{ah\_devid.h}}"{}}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00026}00026 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{ah__eeprom_8h}{ah\_eeprom.h}}"{}}                       \textcolor{comment}{/* for 5ghz fast clock flag */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00027}00027 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00028}00028 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{ar5416reg_8h}{ar5416/ar5416reg.h}}"{}}         \textcolor{comment}{/* NB: includes ar5212reg.h */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00029}00029 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{ar9300__devid_8h}{ar9003/ar9300\_devid.h}}"{}}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00030}00030 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00031}00031 \textcolor{comment}{/* linker set of registered chips */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00032}\mbox{\hyperlink{ah_8c_a62dd3b0b0e575efc78596dd43d3bcbf5}{00032}} \mbox{\hyperlink{ah_8c_a62dd3b0b0e575efc78596dd43d3bcbf5}{OS\_SET\_DECLARE}}(ah\_chips, \textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal__chip}{ath\_hal\_chip}});}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00033}\mbox{\hyperlink{ah_8c_ad1f1af35abd6c3c31d053715fd7fba4e}{00033}} \mbox{\hyperlink{ah_8c_ad1f1af35abd6c3c31d053715fd7fba4e}{TAILQ\_HEAD}}(, \mbox{\hyperlink{structath__hal__chip}{ath\_hal\_chip}}) ah\_chip\_list = TAILQ\_HEAD\_INITIALIZER(ah\_chip\_list);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00034}00034 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00035}00035 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00036}00036 \mbox{\hyperlink{ah__internal_8h_af4b53455f9ce7a033fbb2615360b55ea}{ath\_hal\_add\_chip}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal__chip}{ath\_hal\_chip}} *ahc)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00037}00037 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00038}00038 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00039}00039         TAILQ\_INSERT\_TAIL(\&ah\_chip\_list, ahc, node);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00040}00040         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00041}00041 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00042}00042 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00043}00043 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00044}\mbox{\hyperlink{ah_8c_ab64a134ccc7a2c9db51898e594282dcd}{00044}} \mbox{\hyperlink{ah_8c_ab64a134ccc7a2c9db51898e594282dcd}{ath\_hal\_remove\_chip}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal__chip}{ath\_hal\_chip}} *ahc)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00045}00045 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00046}00046 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00047}00047         TAILQ\_REMOVE(\&ah\_chip\_list, ahc, node);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00048}00048         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00049}00049 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00050}00050 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00051}00051 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00052}00052 \textcolor{comment}{ * Check the set of registered chips to see if any recognize}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00053}00053 \textcolor{comment}{ * the device as one they can support.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00054}00054 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00055}00055 \textcolor{keyword}{const} \textcolor{keywordtype}{char}*}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00056}\mbox{\hyperlink{ah_8c_a25d3d09fbb22432c55557ad1fddf4004}{00056}} \mbox{\hyperlink{ah_8c_a25d3d09fbb22432c55557ad1fddf4004}{ath\_hal\_probe}}(uint16\_t vendorid, uint16\_t devid)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00057}00057 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00058}00058         \textcolor{keyword}{struct }\mbox{\hyperlink{structath__hal__chip}{ath\_hal\_chip}} * \textcolor{keyword}{const} *pchip;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00059}00059         \textcolor{keyword}{struct }\mbox{\hyperlink{structath__hal__chip}{ath\_hal\_chip}} *pc;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00060}00060 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00061}00061         \textcolor{comment}{/* Linker set */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00062}00062         \mbox{\hyperlink{ah__osdep_8h_aa5f78915594db9c2907aa7b02d1676e0}{OS\_SET\_FOREACH}}(pchip, ah\_chips) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00063}00063                 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{structath__hal__chip_a25c9d26a65dab2b7566652577431568c}{name}} = (*pchip)-\/>probe(vendorid, devid);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00064}00064                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structath__hal__chip_a25c9d26a65dab2b7566652577431568c}{name}} != \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}})}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00065}00065                         \textcolor{keywordflow}{return} \mbox{\hyperlink{structath__hal__chip_a25c9d26a65dab2b7566652577431568c}{name}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00066}00066         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00067}00067 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00068}00068         \textcolor{comment}{/* List */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00069}00069         TAILQ\_FOREACH(pc, \&ah\_chip\_list, node) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00070}00070                 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{structath__hal__chip_a25c9d26a65dab2b7566652577431568c}{name}} = pc-\/>\mbox{\hyperlink{structath__hal__chip_a5402803d4c608ec3535a1deb00ae0c3c}{probe}}(vendorid, devid);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00071}00071                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structath__hal__chip_a25c9d26a65dab2b7566652577431568c}{name}} != \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}})}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00072}00072                         \textcolor{keywordflow}{return} \mbox{\hyperlink{structath__hal__chip_a25c9d26a65dab2b7566652577431568c}{name}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00073}00073         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00074}00074 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00075}00075         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00076}00076 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00077}00077 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00078}00078 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00079}00079 \textcolor{comment}{ * Attach detects device chip revisions, initializes the hwLayer}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00080}00080 \textcolor{comment}{ * function list, reads EEPROM information,}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00081}00081 \textcolor{comment}{ * selects reset vectors, and performs a short self test.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00082}00082 \textcolor{comment}{ * Any failures will return an error that should cause a hardware}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00083}00083 \textcolor{comment}{ * disable.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00084}00084 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00085}00085 \textcolor{keyword}{struct }\mbox{\hyperlink{structath__hal}{ath\_hal}}*}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00086}\mbox{\hyperlink{ah_8c_a83eb27e921afcd63280c7f24ba7e653e}{00086}} \mbox{\hyperlink{ah_8c_a83eb27e921afcd63280c7f24ba7e653e}{ath\_hal\_attach}}(uint16\_t devid, \mbox{\hyperlink{ah__osdep_8h_a992b4d201fa7972b414c5dfeac3e18e5}{HAL\_SOFTC}} sc,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00087}00087         \mbox{\hyperlink{ah__osdep_8h_a77249ffa9316d2580fbb830304c59d99}{HAL\_BUS\_TAG}} st, \mbox{\hyperlink{ah__osdep_8h_abcad28debd6fa3485fe27752662fb605}{HAL\_BUS\_HANDLE}} sh, uint16\_t *eepromdata,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00088}00088         \mbox{\hyperlink{structHAL__OPS__CONFIG}{HAL\_OPS\_CONFIG}} *\mbox{\hyperlink{structath__hal_a7865226c677aa67240c2a04e7f64175a}{ah\_config}},}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00089}00089         \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0}{HAL\_STATUS}} *error)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00090}00090 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00091}00091         \textcolor{keyword}{struct }\mbox{\hyperlink{structath__hal__chip}{ath\_hal\_chip}} * \textcolor{keyword}{const} *pchip;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00092}00092         \textcolor{keyword}{struct }\mbox{\hyperlink{structath__hal__chip}{ath\_hal\_chip}} *pc;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00093}00093 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00094}00094         \mbox{\hyperlink{ah__osdep_8h_aa5f78915594db9c2907aa7b02d1676e0}{OS\_SET\_FOREACH}}(pchip, ah\_chips) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00095}00095                 \textcolor{keyword}{struct }\mbox{\hyperlink{structath__hal__chip}{ath\_hal\_chip}} *chip = *pchip;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00096}00096                 \textcolor{keyword}{struct }\mbox{\hyperlink{structath__hal}{ath\_hal}} *ah;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00097}00097 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00098}00098                 \textcolor{comment}{/* XXX don't have vendorid, assume atheros one works */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00099}00099                 \textcolor{keywordflow}{if} (chip-\/>\mbox{\hyperlink{structath__hal__chip_a5402803d4c608ec3535a1deb00ae0c3c}{probe}}(\mbox{\hyperlink{ah__devid_8h_aeaeb2ee471d2af0336f6fa3276426316}{ATHEROS\_VENDOR\_ID}}, devid) == \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}})}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00100}00100                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00101}00101                 ah = chip-\/>\mbox{\hyperlink{structath__hal__chip_a2d27df34fa92640193dd1bc0ae4252b4}{attach}}(devid, sc, st, sh, eepromdata, \mbox{\hyperlink{structath__hal_a7865226c677aa67240c2a04e7f64175a}{ah\_config}},}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00102}00102                     error);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00103}00103                 \textcolor{keywordflow}{if} (ah != \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}}) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00104}00104                         \textcolor{comment}{/* copy back private state to public area */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00105}00105                         ah-\/>\mbox{\hyperlink{structath__hal_a3e2d8c9d4151abb019b109372f4d8a1c}{ah\_devid}} = \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_devid;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00106}00106                         ah-\/>\mbox{\hyperlink{structath__hal_a72039a40e404a6804e07b54d3a2eef33}{ah\_subvendorid}} = \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_subvendorid;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00107}00107                         ah-\/>\mbox{\hyperlink{structath__hal_a067aa53a2fe38c5d4f5985bf6a82bb3d}{ah\_macVersion}} = \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_macVersion;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00108}00108                         ah-\/>\mbox{\hyperlink{structath__hal_a4b07022c8ec549d17d6ea117ca65065e}{ah\_macRev}} = \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_macRev;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00109}00109                         ah-\/>\mbox{\hyperlink{structath__hal_a38684b5ce020e4c8d3053a8a2d3cc6ac}{ah\_phyRev}} = \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_phyRev;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00110}00110                         ah-\/>\mbox{\hyperlink{structath__hal_a9680c90b7900e544d1d75ac57d9822e8}{ah\_analog5GhzRev}} = \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_analog5GhzRev;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00111}00111                         ah-\/>\mbox{\hyperlink{structath__hal_a85daabcb6749afff4be6700059f5567a}{ah\_analog2GhzRev}} = \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_analog2GhzRev;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00112}00112                         \textcolor{keywordflow}{return} ah;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00113}00113                 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00114}00114         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00115}00115 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00116}00116         \textcolor{comment}{/* List */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00117}00117         TAILQ\_FOREACH(pc, \&ah\_chip\_list, node) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00118}00118                 \textcolor{keyword}{struct }\mbox{\hyperlink{structath__hal__chip}{ath\_hal\_chip}} *chip = pc;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00119}00119                 \textcolor{keyword}{struct }\mbox{\hyperlink{structath__hal}{ath\_hal}} *ah;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00120}00120 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00121}00121                 \textcolor{comment}{/* XXX don't have vendorid, assume atheros one works */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00122}00122                 \textcolor{keywordflow}{if} (chip-\/>\mbox{\hyperlink{structath__hal__chip_a5402803d4c608ec3535a1deb00ae0c3c}{probe}}(\mbox{\hyperlink{ah__devid_8h_aeaeb2ee471d2af0336f6fa3276426316}{ATHEROS\_VENDOR\_ID}}, devid) == \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}})}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00123}00123                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00124}00124                 ah = chip-\/>\mbox{\hyperlink{structath__hal__chip_a2d27df34fa92640193dd1bc0ae4252b4}{attach}}(devid, sc, st, sh, eepromdata, \mbox{\hyperlink{structath__hal_a7865226c677aa67240c2a04e7f64175a}{ah\_config}},}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00125}00125                     error);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00126}00126                 \textcolor{keywordflow}{if} (ah != \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}}) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00127}00127                         \textcolor{comment}{/* copy back private state to public area */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00128}00128                         ah-\/>\mbox{\hyperlink{structath__hal_a3e2d8c9d4151abb019b109372f4d8a1c}{ah\_devid}} = \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_devid;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00129}00129                         ah-\/>\mbox{\hyperlink{structath__hal_a72039a40e404a6804e07b54d3a2eef33}{ah\_subvendorid}} = \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_subvendorid;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00130}00130                         ah-\/>\mbox{\hyperlink{structath__hal_a067aa53a2fe38c5d4f5985bf6a82bb3d}{ah\_macVersion}} = \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_macVersion;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00131}00131                         ah-\/>\mbox{\hyperlink{structath__hal_a4b07022c8ec549d17d6ea117ca65065e}{ah\_macRev}} = \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_macRev;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00132}00132                         ah-\/>\mbox{\hyperlink{structath__hal_a38684b5ce020e4c8d3053a8a2d3cc6ac}{ah\_phyRev}} = \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_phyRev;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00133}00133                         ah-\/>\mbox{\hyperlink{structath__hal_a9680c90b7900e544d1d75ac57d9822e8}{ah\_analog5GhzRev}} = \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_analog5GhzRev;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00134}00134                         ah-\/>\mbox{\hyperlink{structath__hal_a85daabcb6749afff4be6700059f5567a}{ah\_analog2GhzRev}} = \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_analog2GhzRev;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00135}00135                         \textcolor{keywordflow}{return} ah;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00136}00136                 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00137}00137         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00138}00138 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00139}00139         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00140}00140 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00141}00141 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00142}00142 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00143}\mbox{\hyperlink{ah_8c_ab8f70ab01d73970fd4132a3f162d0703}{00143}} \mbox{\hyperlink{ah_8c_ab8f70ab01d73970fd4132a3f162d0703}{ath\_hal\_mac\_name}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00144}00144 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00145}00145         \textcolor{keywordflow}{switch} (ah-\/>\mbox{\hyperlink{structath__hal_a067aa53a2fe38c5d4f5985bf6a82bb3d}{ah\_macVersion}}) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00146}00146         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar5211reg_8h_adc27c44958b714a5500dbc46b9ea40dc}{AR\_SREV\_VERSION\_CRETE}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00147}00147         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar5211reg_8h_a035d4901aee3e28707dcebed491226a4}{AR\_SREV\_VERSION\_MAUI\_1}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00148}00148                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}AR5210"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00149}00149         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar5211reg_8h_af6a14f343e4fc3d7c0f05186a79d4f69}{AR\_SREV\_VERSION\_MAUI\_2}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00150}00150         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar5211reg_8h_aa68f39a7b4367b67addf2e0bf33c2727}{AR\_SREV\_VERSION\_OAHU}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00151}00151                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}AR5211"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00152}00152         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar5212reg_8h_ab6ff5e38fc20cb031fab3639075a6817}{AR\_SREV\_VERSION\_VENICE}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00153}00153                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}AR5212"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00154}00154         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar5212reg_8h_a99dcf918e28e85a9b2c18a3f5106a27f}{AR\_SREV\_VERSION\_GRIFFIN}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00155}00155                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}AR2413"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00156}00156         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar5212reg_8h_aa6f3bb18f75e280a063dc6f3e8a10a5b}{AR\_SREV\_VERSION\_CONDOR}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00157}00157                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}AR5424"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00158}00158         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar5212reg_8h_a5d146b82bfcd88caecf483d7969d2d4d}{AR\_SREV\_VERSION\_EAGLE}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00159}00159                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}AR5413"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00160}00160         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar5212reg_8h_ac024b2abe5284615483240a20168405c}{AR\_SREV\_VERSION\_COBRA}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00161}00161                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}AR2415"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00162}00162         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar5212reg_8h_ad4eab84cc90aef4be13472bcd9c89649}{AR\_SREV\_2425}}:  \textcolor{comment}{/* Swan */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00163}00163                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}AR2425"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00164}00164         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar5212reg_8h_aa0a894ecad3d1e29f82272bd8fffd6a4}{AR\_SREV\_2417}}:  \textcolor{comment}{/* Nala */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00165}00165                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}AR2417"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00166}00166         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar5416reg_8h_ae33a74da3dec19ce7130a1b4fce66af5}{AR\_XSREV\_VERSION\_OWL\_PCI}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00167}00167                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}AR5416"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00168}00168         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar5416reg_8h_ac7d2eafdaaee84235865391838de8be7}{AR\_XSREV\_VERSION\_OWL\_PCIE}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00169}00169                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}AR5418"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00170}00170         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar5416reg_8h_a82aa5611a0e32e76e3069d46de1e9ce5}{AR\_XSREV\_VERSION\_HOWL}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00171}00171                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}AR9130"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00172}00172         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar5416reg_8h_ad2a17359c819186b421d01ac802bc491}{AR\_XSREV\_VERSION\_SOWL}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00173}00173                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}AR9160"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00174}00174         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar5416reg_8h_a68781b20616e9f447ed28be5ae7a81ec}{AR\_XSREV\_VERSION\_MERLIN}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00175}00175                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_ispcie)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00176}00176                         \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}AR9280"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00177}00177                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}AR9220"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00178}00178         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar5416reg_8h_a3e462723901149a7cc16a498cea34f58}{AR\_XSREV\_VERSION\_KITE}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00179}00179                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}AR9285"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00180}00180         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar5416reg_8h_a798fdbc985be0dbdc4bbe91639c9a5e0}{AR\_XSREV\_VERSION\_KIWI}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00181}00181                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_ispcie)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00182}00182                         \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}AR9287"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00183}00183                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}AR9227"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00184}00184         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar9300__devid_8h_a5892b00e5783cff91b95087a8bd2e1d2}{AR\_SREV\_VERSION\_AR9380}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00185}00185                 \textcolor{keywordflow}{if} (ah-\/>\mbox{\hyperlink{structath__hal_a4b07022c8ec549d17d6ea117ca65065e}{ah\_macRev}} >= \mbox{\hyperlink{ar9300__devid_8h_a37755e041276112d43b484ca054235f3}{AR\_SREV\_REVISION\_AR9580\_10}})}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00186}00186                         \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}AR9580"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00187}00187                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}AR9380"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00188}00188         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar9300__devid_8h_aefec1a421d7396b904e2ad7bf3b5a1e0}{AR\_SREV\_VERSION\_AR9460}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00189}00189                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}AR9460"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00190}00190         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar9300__devid_8h_a9ec5d19a375953131e77a508d192d687}{AR\_SREV\_VERSION\_AR9330}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00191}00191                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}AR9330"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00192}00192         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar9300__devid_8h_a1a37d82c893a5d736999ba7548b58683}{AR\_SREV\_VERSION\_AR9340}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00193}00193                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}AR9340"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00194}00194         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar9300__devid_8h_af8cb23247bd28d45bdf70a15bf46e57b}{AR\_SREV\_VERSION\_QCA9550}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00195}00195                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}QCA9550"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00196}00196         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar9300__devid_8h_a785b7557956ce85507c6a4245a29f6bb}{AR\_SREV\_VERSION\_AR9485}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00197}00197                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}AR9485"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00198}00198         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar9300__devid_8h_aa11c7c591852e542ebf2203252b8d480}{AR\_SREV\_VERSION\_QCA9565}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00199}00199                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}QCA9565"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00200}00200         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar9300__devid_8h_a6cbf900a54e6abc8690ff4bffcf3d468}{AR\_SREV\_VERSION\_QCA9530}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00201}00201                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}QCA9530"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00202}00202         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00203}00203         \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}????"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00204}00204 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00205}00205 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00206}00206 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00207}00207 \textcolor{comment}{ * Return the mask of available modes based on the hardware capabilities.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00208}00208 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00209}00209 u\_int}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00210}\mbox{\hyperlink{ah_8c_abbd9c782487f863645e8ac24072a3598}{00210}} \mbox{\hyperlink{ah_8c_abbd9c782487f863645e8ac24072a3598}{ath\_hal\_getwirelessmodes}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}}*ah)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00211}00211 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00212}00212         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah__internal_8h_a19328faa5adf09a293040bbfe1e2c7f5}{ath\_hal\_getWirelessModes}}(ah);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00213}00213 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00214}00214 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00215}00215 \textcolor{comment}{/* linker set of registered RF backends */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00216}\mbox{\hyperlink{ah_8c_ad7c08a2633ead13526b0927405ee2236}{00216}} \mbox{\hyperlink{ah_8c_a62dd3b0b0e575efc78596dd43d3bcbf5}{OS\_SET\_DECLARE}}(ah\_rfs, \textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal__rf}{ath\_hal\_rf}});}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00217}\mbox{\hyperlink{ah_8c_a2ba7aa1aef18c0524668e62252bc4c31}{00217}} \mbox{\hyperlink{ah_8c_ad1f1af35abd6c3c31d053715fd7fba4e}{TAILQ\_HEAD}}(, \mbox{\hyperlink{structath__hal__rf}{ath\_hal\_rf}}) ah\_rf\_list = TAILQ\_HEAD\_INITIALIZER(ah\_rf\_list);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00218}00218 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00219}00219 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00220}00220 \mbox{\hyperlink{ah__internal_8h_a129e473400b66cdae1df165696b9f818}{ath\_hal\_add\_rf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal__rf}{ath\_hal\_rf}} *arf)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00221}00221 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00222}00222 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00223}00223         TAILQ\_INSERT\_TAIL(\&ah\_rf\_list, arf, node);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00224}00224         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00225}00225 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00226}00226 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00227}00227 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00228}\mbox{\hyperlink{ah_8c_a72ebee9fc4940c85c6f877e69e9fe053}{00228}} \mbox{\hyperlink{ah_8c_a72ebee9fc4940c85c6f877e69e9fe053}{ath\_hal\_remove\_rf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal__rf}{ath\_hal\_rf}} *arf)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00229}00229 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00230}00230 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00231}00231         TAILQ\_REMOVE(\&ah\_rf\_list, arf, node);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00232}00232         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00233}00233 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00234}00234 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00235}00235 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00236}00236 \textcolor{comment}{ * Check the set of registered RF backends to see if}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00237}00237 \textcolor{comment}{ * any recognize the device as one they can support.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00238}00238 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00239}00239 \textcolor{keyword}{struct }\mbox{\hyperlink{structath__hal__rf}{ath\_hal\_rf}} *}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00240}\mbox{\hyperlink{ah_8c_a2cf62cf6ce1ea2310576fb1511964e54}{00240}} \mbox{\hyperlink{ah_8c_a2cf62cf6ce1ea2310576fb1511964e54}{ath\_hal\_rfprobe}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0}{HAL\_STATUS}} *ecode)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00241}00241 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00242}00242         \textcolor{keyword}{struct }\mbox{\hyperlink{structath__hal__rf}{ath\_hal\_rf}} * \textcolor{keyword}{const} *prf;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00243}00243         \textcolor{keyword}{struct }\mbox{\hyperlink{structath__hal__rf}{ath\_hal\_rf}} * rf;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00244}00244 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00245}00245         \mbox{\hyperlink{ah__osdep_8h_aa5f78915594db9c2907aa7b02d1676e0}{OS\_SET\_FOREACH}}(prf, ah\_rfs) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00246}00246                 \textcolor{keyword}{struct }\mbox{\hyperlink{structath__hal__rf}{ath\_hal\_rf}} *rf = *prf;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00247}00247                 \textcolor{keywordflow}{if} (rf-\/>\mbox{\hyperlink{structath__hal__rf_a5210221ca00c74786a9e85da82680c3e}{probe}}(ah))}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00248}00248                         \textcolor{keywordflow}{return} rf;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00249}00249         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00250}00250 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00251}00251         TAILQ\_FOREACH(rf, \&ah\_rf\_list, node) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00252}00252                 \textcolor{keywordflow}{if} (rf-\/>\mbox{\hyperlink{structath__hal__rf_a5210221ca00c74786a9e85da82680c3e}{probe}}(ah))}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00253}00253                         \textcolor{keywordflow}{return} rf;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00254}00254         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00255}00255         *ecode = \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00256}00256         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00257}00257 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00258}00258 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00259}00259 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00260}\mbox{\hyperlink{ah_8c_ae3a8739661f4dc92e564e7c24853b757}{00260}} \mbox{\hyperlink{ah_8c_ae3a8739661f4dc92e564e7c24853b757}{ath\_hal\_rf\_name}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00261}00261 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00262}00262         \textcolor{keywordflow}{switch} (ah-\/>\mbox{\hyperlink{structath__hal_a9680c90b7900e544d1d75ac57d9822e8}{ah\_analog5GhzRev}} \& \mbox{\hyperlink{ar5212reg_8h_ad1497f58d2af3510277cdf8c41122a62}{AR\_RADIO\_SREV\_MAJOR}}) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00263}00263         \textcolor{keywordflow}{case} 0:                 \textcolor{comment}{/* 5210 */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00264}00264                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}5110"{}};  \textcolor{comment}{/* NB: made up */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00265}00265         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar5212reg_8h_a079826a4e16e00da1497549dec7f5edf}{AR\_RAD5111\_SREV\_MAJOR}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00266}00266         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar5212reg_8h_a71882ae2c5a760c1d5f167e3b02a9dc8}{AR\_RAD5111\_SREV\_PROD}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00267}00267                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}5111"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00268}00268         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar5212reg_8h_ab3ba1a4117aea6058f963da10de26e5b}{AR\_RAD2111\_SREV\_MAJOR}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00269}00269                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}2111"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00270}00270         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar5212reg_8h_a9cf217cff9a0fb17b13d87f91478227e}{AR\_RAD5112\_SREV\_MAJOR}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00271}00271         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar5212reg_8h_a58a0bf51590eb2bb3f893b45a213b11b}{AR\_RAD5112\_SREV\_2\_0}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00272}00272         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar5212reg_8h_afa92c7f70ffb181899c7e23968e11bd4}{AR\_RAD5112\_SREV\_2\_1}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00273}00273                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}5112"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00274}00274         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar5212reg_8h_a94eb68ad035506a871323243946cb270}{AR\_RAD2112\_SREV\_MAJOR}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00275}00275         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar5212reg_8h_ac7ec06a3bc5eb95fb90861d235f90d1d}{AR\_RAD2112\_SREV\_2\_0}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00276}00276         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar5212reg_8h_aedc43c9fffcd82b80bf2932f5362f3c3}{AR\_RAD2112\_SREV\_2\_1}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00277}00277                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}2112"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00278}00278         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar5212reg_8h_ad37e51397a60d10248428fb0baa01643}{AR\_RAD2413\_SREV\_MAJOR}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00279}00279                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}2413"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00280}00280         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar5212reg_8h_abbf2186a3837d590c689aeef0566e3a5}{AR\_RAD5413\_SREV\_MAJOR}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00281}00281                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}5413"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00282}00282         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar5212reg_8h_af9012b1b9053eb1f36218ce8f8b15fea}{AR\_RAD2316\_SREV\_MAJOR}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00283}00283                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}2316"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00284}00284         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar5212reg_8h_a5c27e4a9c9f1f37e419feb6ff81ca656}{AR\_RAD2317\_SREV\_MAJOR}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00285}00285                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}2317"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00286}00286         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar5212reg_8h_aa0baf0f006a9a8418d9a852a3f690923}{AR\_RAD5424\_SREV\_MAJOR}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00287}00287                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}5424"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00288}00288 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00289}00289         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar5416reg_8h_a2b0a46a4f9f0a6b4dc3fe966d1e066d8}{AR\_RAD5133\_SREV\_MAJOR}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00290}00290                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}5133"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00291}00291         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar5416reg_8h_a881afdfe33c4571c824d5607360d888c}{AR\_RAD2133\_SREV\_MAJOR}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00292}00292                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}2133"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00293}00293         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar5416reg_8h_a0a38f3dcfd2f1e952f306509cbc4562b}{AR\_RAD5122\_SREV\_MAJOR}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00294}00294                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}5122"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00295}00295         \textcolor{keywordflow}{case} \mbox{\hyperlink{ar5416reg_8h_a6a739ed17602f94a67bf94e46273868a}{AR\_RAD2122\_SREV\_MAJOR}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00296}00296                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}2122"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00297}00297         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00298}00298         \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}????"{}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00299}00299 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00300}00300 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00301}00301 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00302}00302 \textcolor{comment}{ * Poll the register looking for a specific value.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00303}00303 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00304}00304 \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39a}{HAL\_BOOL}}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00305}\mbox{\hyperlink{ah_8c_ae13dc040798ba80daf9dc3da9e571146}{00305}} \mbox{\hyperlink{ah_8c_ae13dc040798ba80daf9dc3da9e571146}{ath\_hal\_wait}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, u\_int reg, uint32\_t mask, uint32\_t val)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00306}00306 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00307}00307 \textcolor{preprocessor}{\#define AH\_TIMEOUT      5000}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00308}00308         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8c_a0f642adebbcbae0e33f6dbdf7fd0c015}{ath\_hal\_waitfor}}(ah, reg, mask, val, \mbox{\hyperlink{ah_8c_a9f104d8a9857e5ff501467baf808f26c}{AH\_TIMEOUT}});}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00309}00309 \textcolor{preprocessor}{\#undef AH\_TIMEOUT}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00310}00310 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00311}00311 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00312}00312 \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39a}{HAL\_BOOL}}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00313}\mbox{\hyperlink{ah_8c_a0f642adebbcbae0e33f6dbdf7fd0c015}{00313}} \mbox{\hyperlink{ah_8c_a0f642adebbcbae0e33f6dbdf7fd0c015}{ath\_hal\_waitfor}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, u\_int reg, uint32\_t mask, uint32\_t val, uint32\_t timeout)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00314}00314 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00315}00315         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00316}00316 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00317}00317         \textcolor{keywordflow}{for} (i = 0; i < timeout; i++) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00318}00318                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{ah__osdep_8h_afded631196d59ba3443fc37addc9a2a6}{OS\_REG\_READ}}(ah, reg) \& mask) == val)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00319}00319                         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aadc898cbb91e577b40c005576c51e8fdb}{AH\_TRUE}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00320}00320                 \mbox{\hyperlink{ah__osdep_8h_a34b88156c4561e13f775e8b9cd9a5374}{OS\_DELAY}}(10);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00321}00321         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00322}00322         \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9eafdeae15362d5c53c161a8b775448f0d1}{HAL\_DEBUG\_REGIO}} | \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9ea152918acfe27a27429ad9ac1cb443a0d}{HAL\_DEBUG\_PHYIO}},}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00323}00323             \textcolor{stringliteral}{"{}\%s: timeout on reg 0x\%x: 0x\%08x \& 0x\%08x != 0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00324}00324             \_\_func\_\_, reg, \mbox{\hyperlink{ah__osdep_8h_afded631196d59ba3443fc37addc9a2a6}{OS\_REG\_READ}}(ah, reg), mask, val);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00325}00325         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aa46085f3e46cbceb46c46b0bde64a6c20}{AH\_FALSE}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00326}00326 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00327}00327 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00328}00328 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00329}00329 \textcolor{comment}{ * Reverse the bits starting at the low bit for a value of}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00330}00330 \textcolor{comment}{ * bit\_count in size}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00331}00331 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00332}00332 uint32\_t}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00333}\mbox{\hyperlink{ah_8c_a06d3b4640558879b794e86f233f41b2d}{00333}} \mbox{\hyperlink{ah_8c_a06d3b4640558879b794e86f233f41b2d}{ath\_hal\_reverseBits}}(uint32\_t val, uint32\_t n)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00334}00334 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00335}00335         uint32\_t retval;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00336}00336         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00337}00337 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00338}00338         \textcolor{keywordflow}{for} (i = 0, retval = 0; i < n; i++) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00339}00339                 retval = (retval << 1) | (val \& 1);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00340}00340                 val >>= 1;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00341}00341         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00342}00342         \textcolor{keywordflow}{return} retval;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00343}00343 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00344}00344 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00345}00345 \textcolor{comment}{/* 802.11n related timing definitions */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00346}00346 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00347}\mbox{\hyperlink{ah_8c_a0e496eb1774d417f1bb777e2864d18f6}{00347}} \textcolor{preprocessor}{\#define OFDM\_PLCP\_BITS  22}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00348}\mbox{\hyperlink{ah_8c_a55214dd69be177480c3afcc172fc5f57}{00348}} \textcolor{preprocessor}{\#define HT\_L\_STF        8}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00349}\mbox{\hyperlink{ah_8c_ad9850d0ef80abaf5b95ad8cf9a8c8302}{00349}} \textcolor{preprocessor}{\#define HT\_L\_LTF        8}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00350}\mbox{\hyperlink{ah_8c_a31429e7e160444bd032130a8c2e5abe1}{00350}} \textcolor{preprocessor}{\#define HT\_L\_SIG        4}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00351}\mbox{\hyperlink{ah_8c_ab3c4c02090886854fdae8ae8fe333787}{00351}} \textcolor{preprocessor}{\#define HT\_SIG          8}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00352}\mbox{\hyperlink{ah_8c_a6e8926a33e2c886c624ce8e43d646230}{00352}} \textcolor{preprocessor}{\#define HT\_STF          4}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00353}\mbox{\hyperlink{ah_8c_aabbe9d1c241c927943fbc4d0b258ec39}{00353}} \textcolor{preprocessor}{\#define HT\_LTF(n)       ((n) * 4)}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00354}00354 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00355}\mbox{\hyperlink{ah_8c_a781c2d149a2cf3b21092c02de6b0057d}{00355}} \textcolor{preprocessor}{\#define HT\_RC\_2\_MCS(\_rc)        ((\_rc) \& 0x1f)}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00356}\mbox{\hyperlink{ah_8c_acba55a3f1c2271e1dea6593496b11df1}{00356}} \textcolor{preprocessor}{\#define HT\_RC\_2\_STREAMS(\_rc)    ((((\_rc) \& 0x78) >> 3) + 1)}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00357}\mbox{\hyperlink{ah_8c_afd34b3b38505ce283f04c1e95e2bc0dc}{00357}} \textcolor{preprocessor}{\#define IS\_HT\_RATE(\_rc)         ( (\_rc) \& IEEE80211\_RATE\_MCS)}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00358}00358 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00359}00359 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00360}00360 \textcolor{comment}{ * Calculate the duration of a packet whether it is 11n or legacy.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00361}00361 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00362}00362 uint32\_t}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00363}\mbox{\hyperlink{ah_8c_a4e17334f2fc75c03654b5597904d603c}{00363}} \mbox{\hyperlink{ah_8c_a4e17334f2fc75c03654b5597904d603c}{ath\_hal\_pkt\_txtime}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, \textcolor{keyword}{const} \mbox{\hyperlink{structHAL__RATE__TABLE}{HAL\_RATE\_TABLE}} *rates, uint32\_t frameLen,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00364}00364     uint16\_t rateix, \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39a}{HAL\_BOOL}} isht40, \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39a}{HAL\_BOOL}} shortPreamble,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00365}00365     \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39a}{HAL\_BOOL}} includeSifs)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00366}00366 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00367}00367         uint8\_t rc;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00368}00368         \textcolor{keywordtype}{int} numStreams;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00369}00369 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00370}00370         rc = rates-\/>\mbox{\hyperlink{structHAL__RATE__TABLE_a774693dd0b6fea4fbc608762cab128e6}{info}}[rateix].\mbox{\hyperlink{structHAL__RATE__TABLE_a5f95e623e3f1b69f441ac9e023b13ed0}{rateCode}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00371}00371 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00372}00372         \textcolor{comment}{/* Legacy rate? Return the old way */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00373}00373         \textcolor{keywordflow}{if} (! \mbox{\hyperlink{ah_8c_afd34b3b38505ce283f04c1e95e2bc0dc}{IS\_HT\_RATE}}(rc))}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00374}00374                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8c_a4009ac5922fa60710c545bba6acb91a7}{ath\_hal\_computetxtime}}(ah, rates, frameLen, rateix,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00375}00375                     shortPreamble, includeSifs);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00376}00376 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00377}00377         \textcolor{comment}{/* 11n frame -\/ extract out the number of spatial streams */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00378}00378         numStreams = \mbox{\hyperlink{ah_8c_acba55a3f1c2271e1dea6593496b11df1}{HT\_RC\_2\_STREAMS}}(rc);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00379}00379         KASSERT(numStreams > 0 \&\& numStreams <= 4,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00380}00380             (\textcolor{stringliteral}{"{}number of spatial streams needs to be 1..3: MCS rate 0x\%x!"{}},}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00381}00381             rateix));}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00382}00382 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00383}00383         \textcolor{comment}{/* XXX TODO: Add SIFS */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00384}00384         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8c_a981657e5bc6cb3eb43c2200a348f7a79}{ath\_computedur\_ht}}(frameLen, rc, numStreams, isht40,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00385}00385             shortPreamble);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00386}00386 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00387}00387 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00388}\mbox{\hyperlink{ah_8c_a0d5669fb69819c7a4e0f7e11f580aa94}{00388}} \textcolor{keyword}{static} \textcolor{keyword}{const} uint16\_t \mbox{\hyperlink{ah_8c_a0d5669fb69819c7a4e0f7e11f580aa94}{ht20\_bps}}[32] = \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00389}00389     26, 52, 78, 104, 156, 208, 234, 260,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00390}00390     52, 104, 156, 208, 312, 416, 468, 520,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00391}00391     78, 156, 234, 312, 468, 624, 702, 780,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00392}00392     104, 208, 312, 416, 624, 832, 936, 1040}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00393}00393 \};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00394}\mbox{\hyperlink{ah_8c_a370ff071841bdc7ff898efb6ba76ae21}{00394}} \textcolor{keyword}{static} \textcolor{keyword}{const} uint16\_t \mbox{\hyperlink{ah_8c_a370ff071841bdc7ff898efb6ba76ae21}{ht40\_bps}}[32] = \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00395}00395     54, 108, 162, 216, 324, 432, 486, 540,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00396}00396     108, 216, 324, 432, 648, 864, 972, 1080,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00397}00397     162, 324, 486, 648, 972, 1296, 1458, 1620,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00398}00398     216, 432, 648, 864, 1296, 1728, 1944, 2160}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00399}00399 \};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00400}00400 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00401}00401 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00402}00402 \textcolor{comment}{ * Calculate the transmit duration of an 11n frame.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00403}00403 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00404}00404 uint32\_t}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00405}\mbox{\hyperlink{ah_8c_a981657e5bc6cb3eb43c2200a348f7a79}{00405}} \mbox{\hyperlink{ah_8c_a981657e5bc6cb3eb43c2200a348f7a79}{ath\_computedur\_ht}}(uint32\_t frameLen, uint16\_t rate, \textcolor{keywordtype}{int} streams,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00406}00406     \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39a}{HAL\_BOOL}} isht40, \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39a}{HAL\_BOOL}} isShortGI)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00407}00407 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00408}00408         uint32\_t bitsPerSymbol, numBits, numSymbols, txTime;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00409}00409 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00410}00410         KASSERT(rate \& IEEE80211\_RATE\_MCS, (\textcolor{stringliteral}{"{}not mcs \%d"{}}, rate));}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00411}00411         KASSERT((rate \&\string~ IEEE80211\_RATE\_MCS) < 31, (\textcolor{stringliteral}{"{}bad mcs 0x\%x"{}}, rate));}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00412}00412 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00413}00413         \textcolor{keywordflow}{if} (isht40)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00414}00414                 bitsPerSymbol = \mbox{\hyperlink{ah_8c_a370ff071841bdc7ff898efb6ba76ae21}{ht40\_bps}}[\mbox{\hyperlink{ah_8c_a781c2d149a2cf3b21092c02de6b0057d}{HT\_RC\_2\_MCS}}(rate)];}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00415}00415         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00416}00416                 bitsPerSymbol = \mbox{\hyperlink{ah_8c_a0d5669fb69819c7a4e0f7e11f580aa94}{ht20\_bps}}[\mbox{\hyperlink{ah_8c_a781c2d149a2cf3b21092c02de6b0057d}{HT\_RC\_2\_MCS}}(rate)];}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00417}00417         numBits = \mbox{\hyperlink{ah_8c_a0e496eb1774d417f1bb777e2864d18f6}{OFDM\_PLCP\_BITS}} + (frameLen << 3);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00418}00418         numSymbols = \mbox{\hyperlink{ah__internal_8h_a5986a9a34b5ef2d56f42336b32ef85c7}{howmany}}(numBits, bitsPerSymbol);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00419}00419         \textcolor{keywordflow}{if} (isShortGI)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00420}00420                 txTime = ((numSymbols * 18) + 4) / 5;   \textcolor{comment}{/* 3.6us */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00421}00421         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00422}00422                 txTime = numSymbols * 4;                \textcolor{comment}{/* 4us */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00423}00423         \textcolor{keywordflow}{return} txTime + \mbox{\hyperlink{ah_8c_a55214dd69be177480c3afcc172fc5f57}{HT\_L\_STF}} + \mbox{\hyperlink{ah_8c_ad9850d0ef80abaf5b95ad8cf9a8c8302}{HT\_L\_LTF}} +}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00424}00424             \mbox{\hyperlink{ah_8c_a31429e7e160444bd032130a8c2e5abe1}{HT\_L\_SIG}} + \mbox{\hyperlink{ah_8c_ab3c4c02090886854fdae8ae8fe333787}{HT\_SIG}} + \mbox{\hyperlink{ah_8c_a6e8926a33e2c886c624ce8e43d646230}{HT\_STF}} + \mbox{\hyperlink{ah_8c_aabbe9d1c241c927943fbc4d0b258ec39}{HT\_LTF}}(streams);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00425}00425 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00426}00426 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00427}00427 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00428}00428 \textcolor{comment}{ * Compute the time to transmit a frame of length frameLen bytes}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00429}00429 \textcolor{comment}{ * using the specified rate, phy, and short preamble setting.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00430}00430 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00431}00431 uint16\_t}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00432}\mbox{\hyperlink{ah_8c_a4009ac5922fa60710c545bba6acb91a7}{00432}} \mbox{\hyperlink{ah_8c_a4009ac5922fa60710c545bba6acb91a7}{ath\_hal\_computetxtime}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00433}00433         \textcolor{keyword}{const} \mbox{\hyperlink{structHAL__RATE__TABLE}{HAL\_RATE\_TABLE}} *rates, uint32\_t frameLen, uint16\_t rateix,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00434}00434         \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39a}{HAL\_BOOL}} shortPreamble, \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39a}{HAL\_BOOL}} includeSifs)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00435}00435 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00436}00436         uint32\_t bitsPerSymbol, numBits, numSymbols, phyTime, txTime;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00437}00437         uint32\_t kbps;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00438}00438 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00439}00439         \textcolor{comment}{/* Warn if this function is called for 11n rates; it should not be! */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00440}00440         \textcolor{keywordflow}{if} (\mbox{\hyperlink{ah_8c_afd34b3b38505ce283f04c1e95e2bc0dc}{IS\_HT\_RATE}}(rates-\/>\mbox{\hyperlink{structHAL__RATE__TABLE_a774693dd0b6fea4fbc608762cab128e6}{info}}[rateix].\mbox{\hyperlink{structHAL__RATE__TABLE_a5f95e623e3f1b69f441ac9e023b13ed0}{rateCode}}))}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00441}00441                 \mbox{\hyperlink{ah__osdep_8c_ab05b380aa2dabe9a6f6f1c13c6a482cf}{ath\_hal\_printf}}(ah, \textcolor{stringliteral}{"{}\%s: MCS rate? (index \%d; hwrate 0x\%x)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00442}00442                     \_\_func\_\_, rateix, rates-\/>\mbox{\hyperlink{structHAL__RATE__TABLE_a774693dd0b6fea4fbc608762cab128e6}{info}}[rateix].\mbox{\hyperlink{structHAL__RATE__TABLE_a5f95e623e3f1b69f441ac9e023b13ed0}{rateCode}});}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00443}00443 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00444}00444         kbps = rates-\/>\mbox{\hyperlink{structHAL__RATE__TABLE_a774693dd0b6fea4fbc608762cab128e6}{info}}[rateix].\mbox{\hyperlink{structHAL__RATE__TABLE_af05952e9ab069de60722ad2e86e4c601}{rateKbps}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00445}00445         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00446}00446 \textcolor{comment}{         * index can be invalid during dynamic Turbo transitions. }}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00447}00447 \textcolor{comment}{         * XXX}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00448}00448 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00449}00449         \textcolor{keywordflow}{if} (kbps == 0)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00450}00450                 \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00451}00451         \textcolor{keywordflow}{switch} (rates-\/>\mbox{\hyperlink{structHAL__RATE__TABLE_a774693dd0b6fea4fbc608762cab128e6}{info}}[rateix].\mbox{\hyperlink{structHAL__RATE__TABLE_abd97d7d0612d669d2ecdb0a1f2f2aa6e}{phy}}) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00452}00452         \textcolor{keywordflow}{case} IEEE80211\_T\_CCK:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00453}00453                 phyTime         = \mbox{\hyperlink{ah__internal_8h_a41e3d2f175ecfec9a37e7a60884f8a5f}{CCK\_PREAMBLE\_BITS}} + \mbox{\hyperlink{ah__internal_8h_aed2d9f25f171f3f00972fbc1828591f4}{CCK\_PLCP\_BITS}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00454}00454                 \textcolor{keywordflow}{if} (shortPreamble \&\& rates-\/>\mbox{\hyperlink{structHAL__RATE__TABLE_a774693dd0b6fea4fbc608762cab128e6}{info}}[rateix].\mbox{\hyperlink{structHAL__RATE__TABLE_a4721f20f74bbc53407ef077c78b22404}{shortPreamble}})}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00455}00455                         phyTime >>= 1;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00456}00456                 numBits         = frameLen << 3;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00457}00457                 txTime          = phyTime}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00458}00458                                 + ((numBits * 1000)/kbps);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00459}00459                 \textcolor{keywordflow}{if} (includeSifs)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00460}00460                         txTime  += \mbox{\hyperlink{ah__internal_8h_a39fc782c7b393bab150573b76d521544}{CCK\_SIFS\_TIME}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00461}00461                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00462}00462         \textcolor{keywordflow}{case} IEEE80211\_T\_OFDM:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00463}00463                 bitsPerSymbol   = (kbps * \mbox{\hyperlink{ah__internal_8h_add0d516db335ecf1b765244e64d97a04}{OFDM\_SYMBOL\_TIME}}) / 1000;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00464}00464                 \mbox{\hyperlink{ah__internal_8h_abb8bdaf7438fdc315b333ab07ed68c9c}{HALASSERT}}(bitsPerSymbol != 0);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00465}00465 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00466}00466                 numBits         = \mbox{\hyperlink{ah_8c_a0e496eb1774d417f1bb777e2864d18f6}{OFDM\_PLCP\_BITS}} + (frameLen << 3);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00467}00467                 numSymbols      = \mbox{\hyperlink{ah__internal_8h_a5986a9a34b5ef2d56f42336b32ef85c7}{howmany}}(numBits, bitsPerSymbol);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00468}00468                 txTime          = \mbox{\hyperlink{ah__internal_8h_aeed7926135cbc76dd26faee7889f4864}{OFDM\_PREAMBLE\_TIME}}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00469}00469                                 + (numSymbols * \mbox{\hyperlink{ah__internal_8h_add0d516db335ecf1b765244e64d97a04}{OFDM\_SYMBOL\_TIME}});}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00470}00470                 \textcolor{keywordflow}{if} (includeSifs)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00471}00471                         txTime  += \mbox{\hyperlink{ah__internal_8h_a7f1c7e7fd797a7e34347b8cf215ccff9}{OFDM\_SIFS\_TIME}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00472}00472                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00473}00473         \textcolor{keywordflow}{case} IEEE80211\_T\_OFDM\_HALF:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00474}00474                 bitsPerSymbol   = (kbps * \mbox{\hyperlink{ah__internal_8h_a774261cf403a7f52aedd7731a736637c}{OFDM\_HALF\_SYMBOL\_TIME}}) / 1000;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00475}00475                 \mbox{\hyperlink{ah__internal_8h_abb8bdaf7438fdc315b333ab07ed68c9c}{HALASSERT}}(bitsPerSymbol != 0);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00476}00476 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00477}00477                 numBits         = \mbox{\hyperlink{ah__internal_8h_aa65d6c811b2fa411328b3e50007e991d}{OFDM\_HALF\_PLCP\_BITS}} + (frameLen << 3);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00478}00478                 numSymbols      = \mbox{\hyperlink{ah__internal_8h_a5986a9a34b5ef2d56f42336b32ef85c7}{howmany}}(numBits, bitsPerSymbol);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00479}00479                 txTime          = \mbox{\hyperlink{ah__internal_8h_a1518457e5c697908af871aada5ff1f25}{OFDM\_HALF\_PREAMBLE\_TIME}}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00480}00480                                 + (numSymbols * \mbox{\hyperlink{ah__internal_8h_a774261cf403a7f52aedd7731a736637c}{OFDM\_HALF\_SYMBOL\_TIME}});}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00481}00481                 \textcolor{keywordflow}{if} (includeSifs)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00482}00482                         txTime  += \mbox{\hyperlink{ah__internal_8h_a1a38719bdb96ad6d2f2cf51fbfc63f22}{OFDM\_HALF\_SIFS\_TIME}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00483}00483                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00484}00484         \textcolor{keywordflow}{case} IEEE80211\_T\_OFDM\_QUARTER:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00485}00485                 bitsPerSymbol   = (kbps * \mbox{\hyperlink{ah__internal_8h_aad0d72f98d367818a4ee70180ef96a65}{OFDM\_QUARTER\_SYMBOL\_TIME}}) / 1000;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00486}00486                 \mbox{\hyperlink{ah__internal_8h_abb8bdaf7438fdc315b333ab07ed68c9c}{HALASSERT}}(bitsPerSymbol != 0);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00487}00487 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00488}00488                 numBits         = \mbox{\hyperlink{ah__internal_8h_a56fc554090dda25437be42707a74800d}{OFDM\_QUARTER\_PLCP\_BITS}} + (frameLen << 3);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00489}00489                 numSymbols      = \mbox{\hyperlink{ah__internal_8h_a5986a9a34b5ef2d56f42336b32ef85c7}{howmany}}(numBits, bitsPerSymbol);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00490}00490                 txTime          = \mbox{\hyperlink{ah__internal_8h_a76ddb4550f12a53abebb58a39f03f638}{OFDM\_QUARTER\_PREAMBLE\_TIME}}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00491}00491                                 + (numSymbols * \mbox{\hyperlink{ah__internal_8h_aad0d72f98d367818a4ee70180ef96a65}{OFDM\_QUARTER\_SYMBOL\_TIME}});}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00492}00492                 \textcolor{keywordflow}{if} (includeSifs)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00493}00493                         txTime  += \mbox{\hyperlink{ah__internal_8h_aa2b57ca2e5e39eb5f397110948e7ab4a}{OFDM\_QUARTER\_SIFS\_TIME}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00494}00494                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00495}00495         \textcolor{keywordflow}{case} IEEE80211\_T\_TURBO:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00496}00496                 bitsPerSymbol   = (kbps * \mbox{\hyperlink{ah__internal_8h_a5cba41dcc894be3abe49db1e3f983f08}{TURBO\_SYMBOL\_TIME}}) / 1000;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00497}00497                 \mbox{\hyperlink{ah__internal_8h_abb8bdaf7438fdc315b333ab07ed68c9c}{HALASSERT}}(bitsPerSymbol != 0);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00498}00498 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00499}00499                 numBits         = \mbox{\hyperlink{ah__internal_8h_a1cc7b37afd83350b394b2446006242a5}{TURBO\_PLCP\_BITS}} + (frameLen << 3);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00500}00500                 numSymbols      = \mbox{\hyperlink{ah__internal_8h_a5986a9a34b5ef2d56f42336b32ef85c7}{howmany}}(numBits, bitsPerSymbol);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00501}00501                 txTime          = \mbox{\hyperlink{ah__internal_8h_a2c6a9bbe502ac66b0d228c9fced2d014}{TURBO\_PREAMBLE\_TIME}}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00502}00502                                 + (numSymbols * \mbox{\hyperlink{ah__internal_8h_a5cba41dcc894be3abe49db1e3f983f08}{TURBO\_SYMBOL\_TIME}});}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00503}00503                 \textcolor{keywordflow}{if} (includeSifs)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00504}00504                         txTime  += \mbox{\hyperlink{ah__internal_8h_a1b88781fd83d662869cc281fc98a046a}{TURBO\_SIFS\_TIME}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00505}00505                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00506}00506         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00507}00507                 \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9ea152918acfe27a27429ad9ac1cb443a0d}{HAL\_DEBUG\_PHYIO}},}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00508}00508                     \textcolor{stringliteral}{"{}\%s: unknown phy \%u (rate ix \%u)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00509}00509                     \_\_func\_\_, rates-\/>\mbox{\hyperlink{structHAL__RATE__TABLE_a774693dd0b6fea4fbc608762cab128e6}{info}}[rateix].\mbox{\hyperlink{structHAL__RATE__TABLE_abd97d7d0612d669d2ecdb0a1f2f2aa6e}{phy}}, rateix);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00510}00510                 txTime = 0;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00511}00511                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00512}00512         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00513}00513         \textcolor{keywordflow}{return} txTime;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00514}00514 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00515}00515 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00516}00516 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00517}\mbox{\hyperlink{ah_8c_a19a6df948cb6b66e18bcf10047ea897b}{00517}} \mbox{\hyperlink{ah_8c_a19a6df948cb6b66e18bcf10047ea897b}{ath\_hal\_get\_curmode}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, \textcolor{keyword}{const} \textcolor{keyword}{struct} ieee80211\_channel *chan)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00518}00518 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00519}00519         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00520}00520 \textcolor{comment}{         * Pick a default mode at bootup. A channel change is inevitable.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00521}00521 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00522}00522         \textcolor{keywordflow}{if} (!chan)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00523}00523                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55bacbb5e1f63262fd483a7bca362ff0bac2}{HAL\_MODE\_11NG\_HT20}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00524}00524 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00525}00525         \textcolor{keywordflow}{if} (IEEE80211\_IS\_CHAN\_TURBO(chan))}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00526}00526                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55bab433f5e17303cfc159f417e0cd40fde3}{HAL\_MODE\_TURBO}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00527}00527 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00528}00528         \textcolor{comment}{/* check for NA\_HT before plain A, since IS\_CHAN\_A includes NA\_HT */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00529}00529         \textcolor{keywordflow}{if} (IEEE80211\_IS\_CHAN\_5GHZ(chan) \&\& IEEE80211\_IS\_CHAN\_HT20(chan))}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00530}00530                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55babe676010c3e51c1d040d39951eeb3322}{HAL\_MODE\_11NA\_HT20}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00531}00531         \textcolor{keywordflow}{if} (IEEE80211\_IS\_CHAN\_5GHZ(chan) \&\& IEEE80211\_IS\_CHAN\_HT40U(chan))}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00532}00532                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55ba85b1089d8394ffd9906ea991e81a7bcb}{HAL\_MODE\_11NA\_HT40PLUS}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00533}00533         \textcolor{keywordflow}{if} (IEEE80211\_IS\_CHAN\_5GHZ(chan) \&\& IEEE80211\_IS\_CHAN\_HT40D(chan))}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00534}00534                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55ba74f0847d88b8a917895bdbd24863d742}{HAL\_MODE\_11NA\_HT40MINUS}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00535}00535         \textcolor{keywordflow}{if} (IEEE80211\_IS\_CHAN\_A(chan))}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00536}00536                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55bae80ef4550a7e672baf48dbbcb80d4bfd}{HAL\_MODE\_11A}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00537}00537 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00538}00538         \textcolor{comment}{/* check for NG\_HT before plain G, since IS\_CHAN\_G includes NG\_HT */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00539}00539         \textcolor{keywordflow}{if} (IEEE80211\_IS\_CHAN\_2GHZ(chan) \&\& IEEE80211\_IS\_CHAN\_HT20(chan))}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00540}00540                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55bacbb5e1f63262fd483a7bca362ff0bac2}{HAL\_MODE\_11NG\_HT20}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00541}00541         \textcolor{keywordflow}{if} (IEEE80211\_IS\_CHAN\_2GHZ(chan) \&\& IEEE80211\_IS\_CHAN\_HT40U(chan))}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00542}00542                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55ba292878803032276bb0ab11bd60a6185d}{HAL\_MODE\_11NG\_HT40PLUS}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00543}00543         \textcolor{keywordflow}{if} (IEEE80211\_IS\_CHAN\_2GHZ(chan) \&\& IEEE80211\_IS\_CHAN\_HT40D(chan))}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00544}00544                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55ba5d60997a2d1ef9478a7b355d3851b49a}{HAL\_MODE\_11NG\_HT40MINUS}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00545}00545 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00546}00546         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00547}00547 \textcolor{comment}{         * XXX For FreeBSD, will this work correctly given the DYN}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00548}00548 \textcolor{comment}{         * chan mode (OFDM+CCK dynamic) ? We have pure-\/G versions DYN-\/BG..}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00549}00549 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00550}00550         \textcolor{keywordflow}{if} (IEEE80211\_IS\_CHAN\_G(chan))}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00551}00551                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55babe71acb74465638223e2c17a9468c6e4}{HAL\_MODE\_11G}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00552}00552         \textcolor{keywordflow}{if} (IEEE80211\_IS\_CHAN\_B(chan))}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00553}00553                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55baf143b2e5066c834d107d32a204d45584}{HAL\_MODE\_11B}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00554}00554 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00555}00555         \mbox{\hyperlink{ah__internal_8h_abb8bdaf7438fdc315b333ab07ed68c9c}{HALASSERT}}(0);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00556}00556         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a06fc87d81c62e9abb8790b6e5713c55bacbb5e1f63262fd483a7bca362ff0bac2}{HAL\_MODE\_11NG\_HT20}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00557}00557 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00558}00558 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00559}\mbox{\hyperlink{ah_8c_af3e0c98d38c9b4b8b78f40523ae08711}{00559}} \textcolor{keyword}{typedef} \textcolor{keyword}{enum} \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00560}\mbox{\hyperlink{ah_8c_af3e0c98d38c9b4b8b78f40523ae08711ad0b45671fcf961978541967e72f31400}{00560}}         \mbox{\hyperlink{ah_8c_af3e0c98d38c9b4b8b78f40523ae08711ad0b45671fcf961978541967e72f31400}{WIRELESS\_MODE\_11a}}   = 0,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00561}\mbox{\hyperlink{ah_8c_af3e0c98d38c9b4b8b78f40523ae08711a70bfdf1ba9072278529b3033970875f7}{00561}}         \mbox{\hyperlink{ah_8c_af3e0c98d38c9b4b8b78f40523ae08711a70bfdf1ba9072278529b3033970875f7}{WIRELESS\_MODE\_TURBO}} = 1,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00562}\mbox{\hyperlink{ah_8c_af3e0c98d38c9b4b8b78f40523ae08711a08cdba0e5225c8aa53de79ef1dc22618}{00562}}         \mbox{\hyperlink{ah_8c_af3e0c98d38c9b4b8b78f40523ae08711a08cdba0e5225c8aa53de79ef1dc22618}{WIRELESS\_MODE\_11b}}   = 2,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00563}\mbox{\hyperlink{ah_8c_af3e0c98d38c9b4b8b78f40523ae08711a46f70e247105233ae4d60546fe1179ba}{00563}}         \mbox{\hyperlink{ah_8c_af3e0c98d38c9b4b8b78f40523ae08711a46f70e247105233ae4d60546fe1179ba}{WIRELESS\_MODE\_11g}}   = 3,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00564}\mbox{\hyperlink{ah_8c_af3e0c98d38c9b4b8b78f40523ae08711a303ba357d3392365d1a82f795203a894}{00564}}         \mbox{\hyperlink{ah_8c_af3e0c98d38c9b4b8b78f40523ae08711a303ba357d3392365d1a82f795203a894}{WIRELESS\_MODE\_108g}}  = 4,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00565}00565 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00566}00566         \mbox{\hyperlink{ah_8c_af3e0c98d38c9b4b8b78f40523ae08711aa75abd0ac5b9a4dfecf282b54c328cce}{WIRELESS\_MODE\_MAX}}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00567}\mbox{\hyperlink{ah_8c_af3e0c98d38c9b4b8b78f40523ae08711aa75abd0ac5b9a4dfecf282b54c328cce}{00567}} \} \mbox{\hyperlink{ah_8c_af3e0c98d38c9b4b8b78f40523ae08711}{WIRELESS\_MODE}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00568}00568 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00569}00569 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00570}00570 \textcolor{comment}{ * XXX TODO: for some (?) chips, an 11b mode still runs at 11bg.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00571}00571 \textcolor{comment}{ * Maybe AR5211 has separate 11b and 11g only modes, so 11b is 22MHz}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00572}00572 \textcolor{comment}{ * and 11g is 44MHz, but AR5416 and later run 11b in 11bg mode, right?}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00573}00573 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00574}00574 \textcolor{keyword}{static} \mbox{\hyperlink{ah_8c_af3e0c98d38c9b4b8b78f40523ae08711}{WIRELESS\_MODE}}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00575}\mbox{\hyperlink{ah_8c_ae14a9e814a29b9db3c8a169aec291ff1}{00575}} \mbox{\hyperlink{ah_8c_ae14a9e814a29b9db3c8a169aec291ff1}{ath\_hal\_chan2wmode}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, \textcolor{keyword}{const} \textcolor{keyword}{struct} ieee80211\_channel *chan)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00576}00576 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00577}00577         \textcolor{keywordflow}{if} (IEEE80211\_IS\_CHAN\_B(chan))}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00578}00578                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8c_af3e0c98d38c9b4b8b78f40523ae08711a08cdba0e5225c8aa53de79ef1dc22618}{WIRELESS\_MODE\_11b}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00579}00579         \textcolor{keywordflow}{if} (IEEE80211\_IS\_CHAN\_G(chan))}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00580}00580                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8c_af3e0c98d38c9b4b8b78f40523ae08711a46f70e247105233ae4d60546fe1179ba}{WIRELESS\_MODE\_11g}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00581}00581         \textcolor{keywordflow}{if} (IEEE80211\_IS\_CHAN\_108G(chan))}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00582}00582                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8c_af3e0c98d38c9b4b8b78f40523ae08711a303ba357d3392365d1a82f795203a894}{WIRELESS\_MODE\_108g}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00583}00583         \textcolor{keywordflow}{if} (IEEE80211\_IS\_CHAN\_TURBO(chan))}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00584}00584                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8c_af3e0c98d38c9b4b8b78f40523ae08711a70bfdf1ba9072278529b3033970875f7}{WIRELESS\_MODE\_TURBO}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00585}00585         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8c_af3e0c98d38c9b4b8b78f40523ae08711ad0b45671fcf961978541967e72f31400}{WIRELESS\_MODE\_11a}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00586}00586 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00587}00587 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00588}00588 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00589}00589 \textcolor{comment}{ * Convert between microseconds and core system clocks.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00590}00590 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00591}00591                                      \textcolor{comment}{/* 11a Turbo  11b  11g  108g */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00592}\mbox{\hyperlink{ah_8c_a75854aebca2a2b345492373022d7fd75}{00592}} \textcolor{keyword}{static} \textcolor{keyword}{const} uint8\_t \mbox{\hyperlink{ah_8c_a75854aebca2a2b345492373022d7fd75}{CLOCK\_RATE}}[]  = \{ 40,  80,   22,  44,   88  \};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00593}00593 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00594}\mbox{\hyperlink{ah_8c_a29befe186a828ff03068295124d492b8}{00594}} \textcolor{preprocessor}{\#define CLOCK\_FAST\_RATE\_5GHZ\_OFDM       44}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00595}00595 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00596}00596 u\_int}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00597}\mbox{\hyperlink{ah_8c_a3e0b286019ef1a8f2436416f9cb21f32}{00597}} \mbox{\hyperlink{ah_8c_a3e0b286019ef1a8f2436416f9cb21f32}{ath\_hal\_mac\_clks}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, u\_int usecs)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00598}00598 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00599}00599         \textcolor{keyword}{const} \textcolor{keyword}{struct }ieee80211\_channel *c = \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_curchan;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00600}00600         u\_int clks;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00601}00601 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00602}00602         \textcolor{comment}{/* NB: ah\_curchan may be null when called attach time */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00603}00603         \textcolor{comment}{/* XXX merlin and later specific workaround -\/ 5ghz fast clock is 44 */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00604}00604         \textcolor{keywordflow}{if} (c != \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}} \&\& \mbox{\hyperlink{ah__internal_8h_aaaa6591a2d441f03fc8c55b9f4f34399}{IS\_5GHZ\_FAST\_CLOCK\_EN}}(ah, c)) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00605}00605                 clks = usecs * \mbox{\hyperlink{ah_8c_a29befe186a828ff03068295124d492b8}{CLOCK\_FAST\_RATE\_5GHZ\_OFDM}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00606}00606                 \textcolor{keywordflow}{if} (IEEE80211\_IS\_CHAN\_HT40(c))}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00607}00607                         clks <<= 1;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00608}00608         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (c != \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}}) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00609}00609                 clks = usecs * \mbox{\hyperlink{ah_8c_a75854aebca2a2b345492373022d7fd75}{CLOCK\_RATE}}[\mbox{\hyperlink{ah_8c_ae14a9e814a29b9db3c8a169aec291ff1}{ath\_hal\_chan2wmode}}(ah, c)];}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00610}00610                 \textcolor{keywordflow}{if} (IEEE80211\_IS\_CHAN\_HT40(c))}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00611}00611                         clks <<= 1;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00612}00612         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00613}00613                 clks = usecs * \mbox{\hyperlink{ah_8c_a75854aebca2a2b345492373022d7fd75}{CLOCK\_RATE}}[\mbox{\hyperlink{ah_8c_af3e0c98d38c9b4b8b78f40523ae08711a08cdba0e5225c8aa53de79ef1dc22618}{WIRELESS\_MODE\_11b}}];}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00614}00614 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00615}00615         \textcolor{comment}{/* Compensate for half/quarter rate */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00616}00616         \textcolor{keywordflow}{if} (c != \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}} \&\& IEEE80211\_IS\_CHAN\_HALF(c))}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00617}00617                 clks = clks / 2;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00618}00618         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (c != \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}} \&\& IEEE80211\_IS\_CHAN\_QUARTER(c))}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00619}00619                 clks = clks / 4;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00620}00620 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00621}00621         \textcolor{keywordflow}{return} clks;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00622}00622 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00623}00623 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00624}00624 u\_int}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00625}\mbox{\hyperlink{ah_8c_ac8af02931a133e0ac18f23ede58f90bf}{00625}} \mbox{\hyperlink{ah_8c_ac8af02931a133e0ac18f23ede58f90bf}{ath\_hal\_mac\_usec}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, u\_int clks)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00626}00626 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00627}00627         uint64\_t psec;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00628}00628 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00629}00629         psec = \mbox{\hyperlink{ah_8c_a1e2805f87d17068b7c3fa1fef275ff48}{ath\_hal\_mac\_psec}}(ah, clks);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00630}00630         \textcolor{keywordflow}{return} (psec / 1000000);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00631}00631 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00632}00632 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00633}00633 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00634}00634 \textcolor{comment}{ * XXX TODO: half, quarter rates.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00635}00635 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00636}00636 uint64\_t}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00637}\mbox{\hyperlink{ah_8c_a1e2805f87d17068b7c3fa1fef275ff48}{00637}} \mbox{\hyperlink{ah_8c_a1e2805f87d17068b7c3fa1fef275ff48}{ath\_hal\_mac\_psec}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, u\_int clks)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00638}00638 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00639}00639         \textcolor{keyword}{const} \textcolor{keyword}{struct }ieee80211\_channel *c = \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_curchan;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00640}00640         uint64\_t psec;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00641}00641 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00642}00642         \textcolor{comment}{/* NB: ah\_curchan may be null when called attach time */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00643}00643         \textcolor{comment}{/* XXX merlin and later specific workaround -\/ 5ghz fast clock is 44 */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00644}00644         \textcolor{keywordflow}{if} (c != \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}} \&\& \mbox{\hyperlink{ah__internal_8h_aaaa6591a2d441f03fc8c55b9f4f34399}{IS\_5GHZ\_FAST\_CLOCK\_EN}}(ah, c)) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00645}00645                 psec = (clks * 1000000ULL) / \mbox{\hyperlink{ah_8c_a29befe186a828ff03068295124d492b8}{CLOCK\_FAST\_RATE\_5GHZ\_OFDM}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00646}00646                 \textcolor{keywordflow}{if} (IEEE80211\_IS\_CHAN\_HT40(c))}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00647}00647                         psec >>= 1;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00648}00648         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (c != \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}}) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00649}00649                 psec = (clks * 1000000ULL) / \mbox{\hyperlink{ah_8c_a75854aebca2a2b345492373022d7fd75}{CLOCK\_RATE}}[\mbox{\hyperlink{ah_8c_ae14a9e814a29b9db3c8a169aec291ff1}{ath\_hal\_chan2wmode}}(ah, c)];}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00650}00650                 \textcolor{keywordflow}{if} (IEEE80211\_IS\_CHAN\_HT40(c))}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00651}00651                         psec >>= 1;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00652}00652         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00653}00653                 psec = (clks * 1000000ULL) / \mbox{\hyperlink{ah_8c_a75854aebca2a2b345492373022d7fd75}{CLOCK\_RATE}}[\mbox{\hyperlink{ah_8c_af3e0c98d38c9b4b8b78f40523ae08711a08cdba0e5225c8aa53de79ef1dc22618}{WIRELESS\_MODE\_11b}}];}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00654}00654         \textcolor{keywordflow}{return} psec;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00655}00655 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00656}00656 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00657}00657 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00658}00658 \textcolor{comment}{ * Setup a h/w rate table's reverse lookup table and}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00659}00659 \textcolor{comment}{ * fill in ack durations.  This routine is called for}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00660}00660 \textcolor{comment}{ * each rate table returned through the ah\_getRateTable}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00661}00661 \textcolor{comment}{ * method.  The reverse lookup tables are assumed to be}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00662}00662 \textcolor{comment}{ * initialized to zero (or at least the first entry).}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00663}00663 \textcolor{comment}{ * We use this as a key that indicates whether or not}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00664}00664 \textcolor{comment}{ * we've previously setup the reverse lookup table.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00665}00665 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00666}00666 \textcolor{comment}{ * XXX not reentrant, but shouldn't matter}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00667}00667 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00668}00668 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00669}\mbox{\hyperlink{ah_8c_a26bc76fda67c12b5420d15b418efe340}{00669}} \mbox{\hyperlink{ah_8c_a26bc76fda67c12b5420d15b418efe340}{ath\_hal\_setupratetable}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, \mbox{\hyperlink{structHAL__RATE__TABLE}{HAL\_RATE\_TABLE}} *rt)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00670}00670 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00671}00671 \textcolor{preprocessor}{\#define N(a)    (sizeof(a)/sizeof(a[0]))}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00672}00672         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00673}00673 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00674}00674         \textcolor{keywordflow}{if} (rt-\/>\mbox{\hyperlink{structHAL__RATE__TABLE_a38311e747e245f3cda1e86d87eed65a5}{rateCodeToIndex}}[0] != 0) \textcolor{comment}{/* already setup */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00675}00675                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00676}00676         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{ah_8c_af04f8faa08e13b16b70b52a56fbc9c53}{N}}(rt-\/>\mbox{\hyperlink{structHAL__RATE__TABLE_a38311e747e245f3cda1e86d87eed65a5}{rateCodeToIndex}}); i++)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00677}00677                 rt-\/>\mbox{\hyperlink{structHAL__RATE__TABLE_a38311e747e245f3cda1e86d87eed65a5}{rateCodeToIndex}}[i] = (uint8\_t) -\/1;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00678}00678         \textcolor{keywordflow}{for} (i = 0; i < rt-\/>\mbox{\hyperlink{structHAL__RATE__TABLE_a116a1e694a53b8e6b81d3991a133b6e3}{rateCount}}; i++) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00679}00679                 uint8\_t code = rt-\/>\mbox{\hyperlink{structHAL__RATE__TABLE_a774693dd0b6fea4fbc608762cab128e6}{info}}[i].\mbox{\hyperlink{structHAL__RATE__TABLE_a5f95e623e3f1b69f441ac9e023b13ed0}{rateCode}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00680}00680                 uint8\_t cix = rt-\/>\mbox{\hyperlink{structHAL__RATE__TABLE_a774693dd0b6fea4fbc608762cab128e6}{info}}[i].\mbox{\hyperlink{structHAL__RATE__TABLE_a70431ea0bf1713ec4ded5bcc3fe97079}{controlRate}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00681}00681 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00682}00682                 \mbox{\hyperlink{ah__internal_8h_abb8bdaf7438fdc315b333ab07ed68c9c}{HALASSERT}}(code < \mbox{\hyperlink{ah_8c_af04f8faa08e13b16b70b52a56fbc9c53}{N}}(rt-\/>\mbox{\hyperlink{structHAL__RATE__TABLE_a38311e747e245f3cda1e86d87eed65a5}{rateCodeToIndex}}));}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00683}00683                 rt-\/>\mbox{\hyperlink{structHAL__RATE__TABLE_a38311e747e245f3cda1e86d87eed65a5}{rateCodeToIndex}}[code] = i;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00684}00684                 \mbox{\hyperlink{ah__internal_8h_abb8bdaf7438fdc315b333ab07ed68c9c}{HALASSERT}}((code | rt-\/>\mbox{\hyperlink{structHAL__RATE__TABLE_a774693dd0b6fea4fbc608762cab128e6}{info}}[i].\mbox{\hyperlink{structHAL__RATE__TABLE_a4721f20f74bbc53407ef077c78b22404}{shortPreamble}}) <}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00685}00685                     \mbox{\hyperlink{ah_8c_af04f8faa08e13b16b70b52a56fbc9c53}{N}}(rt-\/>\mbox{\hyperlink{structHAL__RATE__TABLE_a38311e747e245f3cda1e86d87eed65a5}{rateCodeToIndex}}));}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00686}00686                 rt-\/>\mbox{\hyperlink{structHAL__RATE__TABLE_a38311e747e245f3cda1e86d87eed65a5}{rateCodeToIndex}}[code | rt-\/>\mbox{\hyperlink{structHAL__RATE__TABLE_a774693dd0b6fea4fbc608762cab128e6}{info}}[i].\mbox{\hyperlink{structHAL__RATE__TABLE_a4721f20f74bbc53407ef077c78b22404}{shortPreamble}}] = i;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00687}00687                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00688}00688 \textcolor{comment}{                 * XXX for 11g the control rate to use for 5.5 and 11 Mb/s}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00689}00689 \textcolor{comment}{                 *     depends on whether they are marked as basic rates;}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00690}00690 \textcolor{comment}{                 *     the static tables are setup with an 11b-\/compatible}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00691}00691 \textcolor{comment}{                 *     2Mb/s rate which will work but is suboptimal}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00692}00692 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00693}00693                 rt-\/>\mbox{\hyperlink{structHAL__RATE__TABLE_a774693dd0b6fea4fbc608762cab128e6}{info}}[i].\mbox{\hyperlink{structHAL__RATE__TABLE_ade5bcdf0b5e0f47c1de871554a125bb5}{lpAckDuration}} = \mbox{\hyperlink{ah_8c_a4009ac5922fa60710c545bba6acb91a7}{ath\_hal\_computetxtime}}(ah, rt,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00694}00694                         \mbox{\hyperlink{ah__internal_8h_ae1084fe3d6460d0cf2c314b87ce9b8d7}{WLAN\_CTRL\_FRAME\_SIZE}}, cix, \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aa46085f3e46cbceb46c46b0bde64a6c20}{AH\_FALSE}}, \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aadc898cbb91e577b40c005576c51e8fdb}{AH\_TRUE}});}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00695}00695                 rt-\/>\mbox{\hyperlink{structHAL__RATE__TABLE_a774693dd0b6fea4fbc608762cab128e6}{info}}[i].\mbox{\hyperlink{structHAL__RATE__TABLE_ae06c99352e81bbeb4cd865d5fdf0266c}{spAckDuration}} = \mbox{\hyperlink{ah_8c_a4009ac5922fa60710c545bba6acb91a7}{ath\_hal\_computetxtime}}(ah, rt,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00696}00696                         \mbox{\hyperlink{ah__internal_8h_ae1084fe3d6460d0cf2c314b87ce9b8d7}{WLAN\_CTRL\_FRAME\_SIZE}}, cix, \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aadc898cbb91e577b40c005576c51e8fdb}{AH\_TRUE}}, \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aadc898cbb91e577b40c005576c51e8fdb}{AH\_TRUE}});}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00697}00697         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00698}00698 \textcolor{preprocessor}{\#undef N}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00699}00699 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00700}00700 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00701}00701 \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0}{HAL\_STATUS}}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00702}\mbox{\hyperlink{ah_8c_a877a9e397598c763eaf9d14fbbb61ee2}{00702}} \mbox{\hyperlink{ah_8c_a877a9e397598c763eaf9d14fbbb61ee2}{ath\_hal\_getcapability}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384}{HAL\_CAPABILITY\_TYPE}} type,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00703}00703         uint32\_t capability, uint32\_t *result)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00704}00704 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00705}00705         \textcolor{keyword}{const} \mbox{\hyperlink{structHAL__CAPABILITIES}{HAL\_CAPABILITIES}} *pCap = \&\mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_caps;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00706}00706 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00707}00707         \textcolor{keywordflow}{switch} (type) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00708}00708         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a976c5885fa4d348d92d1c6ab3c076457}{HAL\_CAP\_REG\_DMN}}:            \textcolor{comment}{/* regulatory domain */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00709}00709                 *result = \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_currentRD;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00710}00710                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00711}00711         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a1274724b9f79fd5928e6986837de0546}{HAL\_CAP\_DFS\_DMN}}:            \textcolor{comment}{/* DFS Domain */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00712}00712                 *result = \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_dfsDomain;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00713}00713                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00714}00714         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a4181427e535ed79676550bc75ca13948}{HAL\_CAP\_CIPHER}}:              \textcolor{comment}{/* cipher handled in hardware */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00715}00715         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384aaddd4e33d6d11bc02953f2df718f90f8}{HAL\_CAP\_TKIP\_MIC}}:          \textcolor{comment}{/* handle TKIP MIC in hardware */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00716}00716                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00717}00717         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a40423836c0339618c7b3a2151609716a}{HAL\_CAP\_TKIP\_SPLIT}}:      \textcolor{comment}{/* hardware TKIP uses split keys */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00718}00718                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00719}00719         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384af15f6b1a1fcd3c84dd978e32d833c90f}{HAL\_CAP\_PHYCOUNTERS}}:    \textcolor{comment}{/* hardware PHY error counters */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00720}00720                 \textcolor{keywordflow}{return} pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_a130fcf182d295fa2b33b97d51fed74b7}{halHwPhyCounterSupport}} ? \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}} : \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6db6a323843ad8956f70cfe8af3376e4}{HAL\_ENXIO}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00721}00721         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a015342be15567165e666e22742028272}{HAL\_CAP\_WME\_TKIPMIC}}:   \textcolor{comment}{/* hardware can do TKIP MIC when WMM is turned on */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00722}00722                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00723}00723         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a1fe125a0e6dd5275b57aea9589f785bf}{HAL\_CAP\_DIVERSITY}}:                \textcolor{comment}{/* hardware supports fast diversity */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00724}00724                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00725}00725         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384ab1d52f0858f231ed6a5c8108be55ce35}{HAL\_CAP\_KEYCACHE\_SIZE}}:        \textcolor{comment}{/* hardware key cache size */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00726}00726                 *result =  pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_a69be369684e502047e3dc155d2dbc19e}{halKeyCacheSize}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00727}00727                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00728}00728         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a8925e3e2c3919cdbcbaab08ae3741a28}{HAL\_CAP\_NUM\_TXQUEUES}}:  \textcolor{comment}{/* number of hardware tx queues */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00729}00729                 *result = pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_a81f99745f71eeeda2b6357bb470c5273}{halTotalQueues}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00730}00730                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00731}00731         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a511d564dc21e3181ffe2909b02e4590c}{HAL\_CAP\_VEOL}}:          \textcolor{comment}{/* hardware supports virtual EOL */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00732}00732                 \textcolor{keywordflow}{return} pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_a770c6878a809d87e7466ad790529c3fd}{halVEOLSupport}} ? \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}} : \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00733}00733         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a99c2fb685d56afc5e932ddae689f5904}{HAL\_CAP\_PSPOLL}}:              \textcolor{comment}{/* hardware PS-\/Poll support works */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00734}00734                 \textcolor{keywordflow}{return} pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_ae22f1670e021c0518c972a10e594d8dc}{halPSPollBroken}} ? \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}} : \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00735}00735         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a7e9ea73aa2f5b2efa48d3529193c941e}{HAL\_CAP\_COMPRESSION}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00736}00736                 \textcolor{keywordflow}{return} pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_a91df3adf884f80c0f1918d5380d9811a}{halCompressSupport}} ? \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}} : \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00737}00737         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a3741338ed2f86f42f22c19902c9d1c78}{HAL\_CAP\_BURST}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00738}00738                 \textcolor{keywordflow}{return} pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_ae2b4ad6ec8339f22c3608887b44b2643}{halBurstSupport}} ? \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}} : \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00739}00739         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a1cbac5449aaa886ec133510c859e6424}{HAL\_CAP\_FASTFRAME}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00740}00740                 \textcolor{keywordflow}{return} pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_a259ad4880440560c48f37a6b5b043c11}{halFastFramesSupport}} ? \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}} : \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00741}00741         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384ab4a8c6fe1782cde00e7c9e5876ec5c16}{HAL\_CAP\_DIAG}}:          \textcolor{comment}{/* hardware diagnostic support */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00742}00742                 *result = \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_diagreg;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00743}00743                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00744}00744         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a01645ea958c2b201dd675240a821afcf}{HAL\_CAP\_TXPOW}}:                \textcolor{comment}{/* global tx power limit  */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00745}00745                 \textcolor{keywordflow}{switch} (capability) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00746}00746                 \textcolor{keywordflow}{case} 0:                 \textcolor{comment}{/* facility is supported */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00747}00747                         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00748}00748                 \textcolor{keywordflow}{case} 1:                 \textcolor{comment}{/* current limit */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00749}00749                         *result = \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_powerLimit;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00750}00750                         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00751}00751                 \textcolor{keywordflow}{case} 2:                 \textcolor{comment}{/* current max tx power */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00752}00752                         *result = \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_maxPowerLevel;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00753}00753                         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00754}00754                 \textcolor{keywordflow}{case} 3:                 \textcolor{comment}{/* scale factor */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00755}00755                         *result = \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_tpScale;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00756}00756                         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00757}00757                 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00758}00758                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00759}00759         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384ab16416669d49fd925cef1aa33125d759}{HAL\_CAP\_BSSIDMASK}}:                \textcolor{comment}{/* hardware supports bssid mask */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00760}00760                 \textcolor{keywordflow}{return} pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_a567d5859175f65fdf340f035d3ee30d5}{halBssIdMaskSupport}} ? \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}} : \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00761}00761         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384ad0ea80631687274329334cf0c99122e1}{HAL\_CAP\_MCAST\_KEYSRCH}}:        \textcolor{comment}{/* multicast frame keycache search */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00762}00762                 \textcolor{keywordflow}{return} pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_aa8fb707075726fb8457f1ae2bf3aad07}{halMcastKeySrchSupport}} ? \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}} : \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00763}00763         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384af43bbd3ba10350f7bb9961c1dd1ad841}{HAL\_CAP\_TSF\_ADJUST}}:      \textcolor{comment}{/* hardware has beacon tsf adjust */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00764}00764                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00765}00765         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a4c2eeab29eb3bc6f534886529784db1a}{HAL\_CAP\_RFSILENT}}:          \textcolor{comment}{/* rfsilent support  */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00766}00766                 \textcolor{keywordflow}{switch} (capability) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00767}00767                 \textcolor{keywordflow}{case} 0:                 \textcolor{comment}{/* facility is supported */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00768}00768                         \textcolor{keywordflow}{return} pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_a038c28870a48a11948f436cc392535e0}{halRfSilentSupport}} ? \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}} : \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00769}00769                 \textcolor{keywordflow}{case} 1:                 \textcolor{comment}{/* current setting */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00770}00770                         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_rfkillEnabled ?}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00771}00771                                 \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}} : \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00772}00772                 \textcolor{keywordflow}{case} 2:                 \textcolor{comment}{/* rfsilent config */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00773}00773                         *result = \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_rfsilent;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00774}00774                         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00775}00775                 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00776}00776                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00777}00777         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a9a3658810b9cecf73076a1d7da117fa1}{HAL\_CAP\_11D}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00778}00778                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00779}00779 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00780}00780         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a1075bfb8398cc5eacb4b684c0f3cc51a}{HAL\_CAP\_HT}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00781}00781                 \textcolor{keywordflow}{return} pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_a8c3941cd6ab225b29658864867315fd7}{halHTSupport}} ? \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}} : \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00782}00782         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a1003657138e2eb468e63236adef36f42}{HAL\_CAP\_GTXTO}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00783}00783                 \textcolor{keywordflow}{return} pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_aa495016ff452f6c8e115a032e561edb1}{halGTTSupport}} ? \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}} : \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00784}00784         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384aec4627f4f81fcfa8e1cdd82e631cecc7}{HAL\_CAP\_FAST\_CC}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00785}00785                 \textcolor{keywordflow}{return} pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_aa2b3deca8c0b8926773ead3000b63c0c}{halFastCCSupport}} ? \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}} : \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00786}00786         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384ae95f1aca7de829d4dec2ab8bb9d84446}{HAL\_CAP\_TX\_CHAINMASK}}:  \textcolor{comment}{/* mask of TX chains supported */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00787}00787                 *result = pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_adac1b1547916073d6674ab7c45df6433}{halTxChainMask}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00788}00788                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00789}00789         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a490d668bbe56307dfcf2b557f9ad101d}{HAL\_CAP\_RX\_CHAINMASK}}:  \textcolor{comment}{/* mask of RX chains supported */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00790}00790                 *result = pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_ae0202b9f035521ec419208cae42430ea}{halRxChainMask}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00791}00791                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00792}00792         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384ae6afa4aaf4b7f155db57192c3f22ad6b}{HAL\_CAP\_NUM\_GPIO\_PINS}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00793}00793                 *result = pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_a1f76129b7fa0f937d2b13b09ca34a44a}{halNumGpioPins}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00794}00794                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00795}00795         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a470f362f82ad19b6ff7121eb2751846d}{HAL\_CAP\_CST}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00796}00796                 \textcolor{keywordflow}{return} pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_a4c361320b42779f57c69a0aeadde84a1}{halCSTSupport}} ? \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}} : \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00797}00797         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384af6bacc1c6d3481ab944f2d312270c9c8}{HAL\_CAP\_RTS\_AGGR\_LIMIT}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00798}00798                 *result = pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_a03f6f870c341940e925f6c416957666f}{halRtsAggrLimit}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00799}00799                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00800}00800         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384afa806db3cbe2911598132d894b93ffd8}{HAL\_CAP\_4ADDR\_AGGR}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00801}00801                 \textcolor{keywordflow}{return} pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_a0d19e5dc4272ca558cd8e029527e2582}{hal4AddrAggrSupport}} ? \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}} : \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00802}00802         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a067f0a8cf563acd22d669e230c6420b7}{HAL\_CAP\_EXT\_CHAN\_DFS}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00803}00803                 \textcolor{keywordflow}{return} pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_aa27706b168f28b6bc45713c313c6aa1a}{halExtChanDfsSupport}} ? \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}} : \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00804}00804         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a15acb43c36014f2b14404b5f6814a7f5}{HAL\_CAP\_RX\_STBC}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00805}00805                 \textcolor{keywordflow}{return} pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_a4528dcc142ed725df5f2ae54488d2003}{halRxStbcSupport}} ? \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}} : \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00806}00806         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a1d82481e565893422f11b3a9a37e46cc}{HAL\_CAP\_TX\_STBC}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00807}00807                 \textcolor{keywordflow}{return} pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_a19aa2e13a3dd377e3b021bf11534bf7c}{halTxStbcSupport}} ? \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}} : \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00808}00808         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384aa3136b50817895deb8d9e85d995c7c99}{HAL\_CAP\_COMBINED\_RADAR\_RSSI}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00809}00809                 \textcolor{keywordflow}{return} pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_a39e114b6f780f27417214c29849d8826}{halUseCombinedRadarRssi}} ? \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}} : \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00810}00810         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a484113000a4343053c09b02915c5001c}{HAL\_CAP\_AUTO\_SLEEP}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00811}00811                 \textcolor{keywordflow}{return} pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_a0f8f29e7e8692cd20a473760864a294a}{halAutoSleepSupport}} ? \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}} : \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00812}00812         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384adbfe073846e2e70ae6f7800af2c151eb}{HAL\_CAP\_MBSSID\_AGGR\_SUPPORT}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00813}00813                 \textcolor{keywordflow}{return} pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_a03eeb8647db143792236a2fe5a44d5ed}{halMbssidAggrSupport}} ? \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}} : \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00814}00814         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a4b4261cb9a80333916a833bd2db4f37e}{HAL\_CAP\_SPLIT\_4KB\_TRANS}}:    \textcolor{comment}{/* hardware handles descriptors straddling 4k page boundary */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00815}00815                 \textcolor{keywordflow}{return} pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_af269f181a37aa29c641d65b5cbfc27ff}{hal4kbSplitTransSupport}} ? \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}} : \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00816}00816         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384adc6cca051e55a33b77d62e8a8ca3d32f}{HAL\_CAP\_REG\_FLAG}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00817}00817                 *result = \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_currentRDext;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00818}00818                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00819}00819         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a64abc315aa087fddd92c89457d933277}{HAL\_CAP\_ENHANCED\_DMA\_SUPPORT}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00820}00820                 \textcolor{keywordflow}{return} pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_a05ab2c45e4e6ef4418e4ef0194abbf82}{halEnhancedDmaSupport}} ? \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}} : \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00821}00821         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a73611a21e2452ebd9ac570fa03ee80e6}{HAL\_CAP\_NUM\_TXMAPS}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00822}00822                 *result = pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_a1af29359ab96d32b6c6432d6a05f42bb}{halNumTxMaps}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00823}00823                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00824}00824         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a0931efc8e06fb6d626ccce1215f09ac7}{HAL\_CAP\_TXDESCLEN}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00825}00825                 *result = pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_ae84937b37b20a098093d7a72e1cdb255}{halTxDescLen}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00826}00826                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00827}00827         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384af55b0e3a44b651e6f88765b9cf96153d}{HAL\_CAP\_TXSTATUSLEN}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00828}00828                 *result = pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_ad2b4702e3775b40ae4381c28a85b22c2}{halTxStatusLen}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00829}00829                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00830}00830         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a97aa8be1edb4efbca55e321bd760787c}{HAL\_CAP\_RXSTATUSLEN}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00831}00831                 *result = pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_a8a0e68295814d1d293a7bc0ff92e79c6}{halRxStatusLen}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00832}00832                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00833}00833         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a2508d7352a3ab7d0c0b33411fb354322}{HAL\_CAP\_RXFIFODEPTH}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00834}00834                 \textcolor{keywordflow}{switch} (capability) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00835}00835                 \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a405d6652f03ac935415afef8ae4ba1d2afaf5595df9fbc063e7b9278c11859890}{HAL\_RX\_QUEUE\_HP}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00836}00836                         *result = pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_a843bfe05279bc70212becd4879db3334}{halRxHpFifoDepth}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00837}00837                         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00838}00838                 \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a405d6652f03ac935415afef8ae4ba1d2aff4a2499ab6f9d1c33ff0a3cf634c17a}{HAL\_RX\_QUEUE\_LP}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00839}00839                         *result = pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_ac95195161477fd354cb62217e2bb7027}{halRxLpFifoDepth}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00840}00840                         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00841}00841                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00842}00842                         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00843}00843         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00844}00844         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384ad7921620c280ff9bbeff39972786c743}{HAL\_CAP\_RXBUFSIZE}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00845}00845         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384ae539569d5da03cc8684b9909871bf764}{HAL\_CAP\_NUM\_MR\_RETRIES}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00846}00846                 *result = pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_a2f1cd3ca1b8630cb94faede01cf78b27}{halNumMRRetries}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00847}00847                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00848}00848         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a19d62d6b97a1abc69c8911d75c7f61ae}{HAL\_CAP\_BT\_COEX}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00849}00849                 \textcolor{keywordflow}{return} pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_a5a67a0285f01628e9253f9db0916f714}{halBtCoexSupport}} ? \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}} : \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00850}00850         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a8dd43823c8fb440c3a2140646e6f8e60}{HAL\_CAP\_SPECTRAL\_SCAN}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00851}00851                 \textcolor{keywordflow}{return} pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_ab0d34c613d8e6158c59d05c9a1225961}{halSpectralScanSupport}} ? \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}} : \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00852}00852         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a4da661738549ee65ecaf2ed199ce8aa7}{HAL\_CAP\_HT20\_SGI}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00853}00853                 \textcolor{keywordflow}{return} pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_ae0a8e2872cdd5492e27f0f4bf2802be6}{halHTSGI20Support}} ? \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}} : \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00854}00854         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384aa53963fbd1abbba374c3b69ca6fb5174}{HAL\_CAP\_RXTSTAMP\_PREC}}:        \textcolor{comment}{/* rx desc tstamp precision (bits) */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00855}00855                 *result = pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_a48fc988a170e66b07568cb0f63da5bc4}{halRxTstampPrecision}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00856}00856                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00857}00857         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384ae772f31150e0861019f6885f6fb4fb4e}{HAL\_CAP\_ANT\_DIV\_COMB}}:  \textcolor{comment}{/* AR9285/AR9485 LNA diversity */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00858}00858                 \textcolor{keywordflow}{return} pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_a6ad43f92b1abd0b8032920b63836d7b9}{halAntDivCombSupport}} ? \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}}  : \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00859}00859 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00860}00860         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a3f3b42de58e33e7da0833743f0f3e85a}{HAL\_CAP\_ENHANCED\_DFS\_SUPPORT}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00861}00861                 \textcolor{keywordflow}{return} pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_af75818e9c08e2082047518618e02f619}{halEnhancedDfsSupport}} ? \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}} : \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00862}00862 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00863}00863         \textcolor{comment}{/* FreeBSD-\/specific entries for now */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00864}00864         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a36541a0648929e54594a5bc08e700e5a}{HAL\_CAP\_RXORN\_FATAL}}:    \textcolor{comment}{/* HAL\_INT\_RXORN treated as fatal  */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00865}00865                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_rxornIsFatal ? \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}} : \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00866}00866         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a0fedd389e7f4d1a7b3d86d93dca4e583}{HAL\_CAP\_INTRMASK}}:          \textcolor{comment}{/* mask of supported interrupts */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00867}00867                 *result = pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_a3cd96edfae98800ed603fc58f053767b}{halIntrMask}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00868}00868                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00869}00869         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384afc5c5e90ba7fcc4094fb68b6110634b9}{HAL\_CAP\_BSSIDMATCH}}:      \textcolor{comment}{/* hardware has disable bssid match */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00870}00870                 \textcolor{keywordflow}{return} pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_a0d60eb1d6f143e34b62d8fc1a646c0bc}{halBssidMatchSupport}} ? \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}} : \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00871}00871         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a83d31a6e776476541b1e8099ae01a39b}{HAL\_CAP\_STREAMS}}:            \textcolor{comment}{/* number of 11n spatial streams */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00872}00872                 \textcolor{keywordflow}{switch} (capability) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00873}00873                 \textcolor{keywordflow}{case} 0:                 \textcolor{comment}{/* TX */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00874}00874                         *result = pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_a93e0fc66d9dcfa621901dac603a3d23c}{halTxStreams}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00875}00875                         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00876}00876                 \textcolor{keywordflow}{case} 1:                 \textcolor{comment}{/* RX */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00877}00877                         *result = pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_a02794709a49cf24acde40cda22a3b5f4}{halRxStreams}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00878}00878                         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00879}00879                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00880}00880                         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00881}00881                 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00882}00882         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384ae9912c793b35bdbcec8f5a128b3ea019}{HAL\_CAP\_RXDESC\_SELFLINK}}:    \textcolor{comment}{/* hardware supports self-\/linked final RX descriptors correctly */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00883}00883                 \textcolor{keywordflow}{return} pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_ab70afa97666afd80f489126f8eca20bd}{halHasRxSelfLinkedTail}} ? \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}} : \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00884}00884         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384ae9d83352e6f4d7349b12a6a31a7ddc59}{HAL\_CAP\_BB\_READ\_WAR}}:            \textcolor{comment}{/* Baseband read WAR */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00885}00885                 \textcolor{keywordflow}{return} pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_ae0ce94edd4bb4de57bdcb0803d11868a}{halHasBBReadWar}}? \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}} : \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00886}00886         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384aa52165c76b8e8e16cc03065e13ab7796}{HAL\_CAP\_SERIALISE\_WAR}}:                \textcolor{comment}{/* PCI register serialisation */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00887}00887                 \textcolor{keywordflow}{return} pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_a8af4295bb04c3404d8d9bf496e58dd78}{halSerialiseRegWar}} ? \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}} : \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00888}00888         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a1a3a74325be0f78eb76de1e7088e6e81}{HAL\_CAP\_MFP}}:                    \textcolor{comment}{/* Management frame protection setting */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00889}00889                 *result = pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_a23d8069a5acaa25f9ab553dc64904752}{halMfpSupport}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00890}00890                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00891}00891         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a14a18b0847aa7a72d3985f7fb211bb51}{HAL\_CAP\_RX\_LNA\_MIXING}}:        \textcolor{comment}{/* Hardware uses an RX LNA mixer to map 2 antennas to a 1 stream receiver */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00892}00892                 \textcolor{keywordflow}{return} pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_a1712a2945624f2a3834fed4da110c70a}{halRxUsingLnaMixing}} ? \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}} : \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00893}00893         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a5bcd4538ceae625b8f78c87a3d7d236b}{HAL\_CAP\_DO\_MYBEACON}}:    \textcolor{comment}{/* Hardware supports filtering my-\/beacons */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00894}00894                 \textcolor{keywordflow}{return} pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_a58e0546582562c93c3351734f039df1e}{halRxDoMyBeacon}} ? \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}} : \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a37dabb34ab9f9c9c54ccb1eff36c11bd}{HAL\_ENOTSUPP}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00895}00895         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a52154037daaeaf7595a7d7693479b688}{HAL\_CAP\_TXTSTAMP\_PREC}}:        \textcolor{comment}{/* tx desc tstamp precision (bits) */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00896}00896                 *result = pCap-\/>\mbox{\hyperlink{structHAL__CAPABILITIES_ae8d6183673b3602af0bf3c4a7d4cb435}{halTxTstampPrecision}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00897}00897                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00898}00898         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00899}00899                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a925d3be7c5ded1ced35f00a48560e01f}{HAL\_EINVAL}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00900}00900         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00901}00901 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00902}00902 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00903}00903 \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39a}{HAL\_BOOL}}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00904}\mbox{\hyperlink{ah_8c_a6accb6162c01ffc229228d53cbccf057}{00904}} \mbox{\hyperlink{ah_8c_a6accb6162c01ffc229228d53cbccf057}{ath\_hal\_setcapability}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384}{HAL\_CAPABILITY\_TYPE}} type,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00905}00905         uint32\_t capability, uint32\_t setting, \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0}{HAL\_STATUS}} *status)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00906}00906 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00907}00907 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00908}00908         \textcolor{keywordflow}{switch} (type) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00909}00909         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a01645ea958c2b201dd675240a821afcf}{HAL\_CAP\_TXPOW}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00910}00910                 \textcolor{keywordflow}{switch} (capability) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00911}00911                 \textcolor{keywordflow}{case} 3:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00912}00912                         \textcolor{keywordflow}{if} (setting <= \mbox{\hyperlink{ah__internal_8h_a0eca0142f1f566ab19aa90fa87e6de2bab1a6b2a4ff19bd192a9e747e3a2755af}{HAL\_TP\_SCALE\_MIN}}) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00913}00913                                 \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_tpScale = setting;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00914}00914                                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aadc898cbb91e577b40c005576c51e8fdb}{AH\_TRUE}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00915}00915                         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00916}00916                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00917}00917                 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00918}00918                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00919}00919         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a4c2eeab29eb3bc6f534886529784db1a}{HAL\_CAP\_RFSILENT}}:          \textcolor{comment}{/* rfsilent support  */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00920}00920                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00921}00921 \textcolor{comment}{                 * NB: allow even if halRfSilentSupport is false}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00922}00922 \textcolor{comment}{                 *     in case the EEPROM is misprogrammed.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00923}00923 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00924}00924                 \textcolor{keywordflow}{switch} (capability) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00925}00925                 \textcolor{keywordflow}{case} 1:                 \textcolor{comment}{/* current setting */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00926}00926                         \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_rfkillEnabled = (setting != 0);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00927}00927                         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aadc898cbb91e577b40c005576c51e8fdb}{AH\_TRUE}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00928}00928                 \textcolor{keywordflow}{case} 2:                 \textcolor{comment}{/* rfsilent config */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00929}00929                         \textcolor{comment}{/* XXX better done per-\/chip for validation? */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00930}00930                         \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_rfsilent = setting;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00931}00931                         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aadc898cbb91e577b40c005576c51e8fdb}{AH\_TRUE}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00932}00932                 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00933}00933                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00934}00934         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a976c5885fa4d348d92d1c6ab3c076457}{HAL\_CAP\_REG\_DMN}}:            \textcolor{comment}{/* regulatory domain */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00935}00935                 \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_currentRD = setting;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00936}00936                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aadc898cbb91e577b40c005576c51e8fdb}{AH\_TRUE}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00937}00937         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384a36541a0648929e54594a5bc08e700e5a}{HAL\_CAP\_RXORN\_FATAL}}:    \textcolor{comment}{/* HAL\_INT\_RXORN treated as fatal  */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00938}00938                 \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_rxornIsFatal = setting;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00939}00939                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aadc898cbb91e577b40c005576c51e8fdb}{AH\_TRUE}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00940}00940         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00941}00941                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00942}00942         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00943}00943         \textcolor{keywordflow}{if} (status)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00944}00944                 *status = \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a925d3be7c5ded1ced35f00a48560e01f}{HAL\_EINVAL}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00945}00945         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aa46085f3e46cbceb46c46b0bde64a6c20}{AH\_FALSE}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00946}00946 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00947}00947 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00948}00948 \textcolor{comment}{/* }}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00949}00949 \textcolor{comment}{ * Common support for getDiagState method.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00950}00950 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00951}00951 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00952}00952 \textcolor{keyword}{static} u\_int}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00953}\mbox{\hyperlink{ah_8c_a92c6f55ca43550dbb433bcb67d894aa1}{00953}} \mbox{\hyperlink{ah_8c_a92c6f55ca43550dbb433bcb67d894aa1}{ath\_hal\_getregdump}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, \textcolor{keyword}{const} \mbox{\hyperlink{structHAL__REGRANGE}{HAL\_REGRANGE}} *regs,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00954}00954         \textcolor{keywordtype}{void} *dstbuf, \textcolor{keywordtype}{int} space)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00955}00955 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00956}00956         uint32\_t *dp = dstbuf;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00957}00957         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00958}00958 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00959}00959         \textcolor{keywordflow}{for} (i = 0; space >= 2*\textcolor{keyword}{sizeof}(uint32\_t); i++) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00960}00960                 uint32\_t r = regs[i].\mbox{\hyperlink{structHAL__REGRANGE_af57023c1a6dfbdcb0af18ebed36b7593}{start}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00961}00961                 uint32\_t e = regs[i].\mbox{\hyperlink{structHAL__REGRANGE_a81a07edca1d8cd6dce3af92cc7f2471e}{end}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00962}00962                 *dp++ = r;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00963}00963                 *dp++ = e;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00964}00964                 space -\/= 2*\textcolor{keyword}{sizeof}(uint32\_t);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00965}00965                 \textcolor{keywordflow}{do} \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00966}00966                         *dp++ = \mbox{\hyperlink{ah__osdep_8h_afded631196d59ba3443fc37addc9a2a6}{OS\_REG\_READ}}(ah, r);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00967}00967                         r += \textcolor{keyword}{sizeof}(uint32\_t);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00968}00968                         space -\/= \textcolor{keyword}{sizeof}(uint32\_t);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00969}00969                 \} \textcolor{keywordflow}{while} (r <= e \&\& space >= \textcolor{keyword}{sizeof}(uint32\_t));}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00970}00970         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00971}00971         \textcolor{keywordflow}{return} (\textcolor{keywordtype}{char} *) dp -\/ (\textcolor{keywordtype}{char} *) dstbuf;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00972}00972 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00973}00973 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00974}00974 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00975}\mbox{\hyperlink{ah_8c_ac2028a5665efa97c5e960036adb36f52}{00975}} \mbox{\hyperlink{ah_8c_ac2028a5665efa97c5e960036adb36f52}{ath\_hal\_setregs}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, \textcolor{keyword}{const} \mbox{\hyperlink{structHAL__REGWRITE}{HAL\_REGWRITE}} *regs, \textcolor{keywordtype}{int} space)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00976}00976 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00977}00977         \textcolor{keywordflow}{while} (space >= \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structHAL__REGWRITE}{HAL\_REGWRITE}})) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00978}00978                 \mbox{\hyperlink{ah__osdep_8h_a8e19d34bdc4596d48a978fc59e1b60fb}{OS\_REG\_WRITE}}(ah, regs-\/>\mbox{\hyperlink{structHAL__REGWRITE_a9d58c5785c4344e6db44f22995f59e7a}{addr}}, regs-\/>\mbox{\hyperlink{structHAL__REGWRITE_a84a41ac585306826b7dc62397c8315d3}{value}});}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00979}00979                 regs++, space -\/= \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structHAL__REGWRITE}{HAL\_REGWRITE}});}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00980}00980         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00981}00981 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00982}00982 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00983}00983 \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39a}{HAL\_BOOL}}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00984}\mbox{\hyperlink{ah_8c_adafdb7040986834de01f95f7b7782885}{00984}} \mbox{\hyperlink{ah_8c_adafdb7040986834de01f95f7b7782885}{ath\_hal\_getdiagstate}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, \textcolor{keywordtype}{int} request,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00985}00985         \textcolor{keyword}{const} \textcolor{keywordtype}{void} *args, uint32\_t argsize,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00986}00986         \textcolor{keywordtype}{void} **result, uint32\_t *resultsize)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00987}00987 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00988}00988 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00989}00989         \textcolor{keywordflow}{switch} (request) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00990}00990         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah__diagcodes_8h_abc5c98fcc1211af2b80116dd6e0a035da1620af5ea1b8f3b769aa44b6f26d3739}{HAL\_DIAG\_REVS}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00991}00991                 *result = \&\mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_devid;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00992}00992                 *resultsize = \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structHAL__REVS}{HAL\_REVS}});}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00993}00993                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aadc898cbb91e577b40c005576c51e8fdb}{AH\_TRUE}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00994}00994         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah__diagcodes_8h_abc5c98fcc1211af2b80116dd6e0a035da99af4836c677a884389948458b205795}{HAL\_DIAG\_REGS}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00995}00995                 *resultsize = \mbox{\hyperlink{ah_8c_a92c6f55ca43550dbb433bcb67d894aa1}{ath\_hal\_getregdump}}(ah, args, *result,*resultsize);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00996}00996                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aadc898cbb91e577b40c005576c51e8fdb}{AH\_TRUE}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00997}00997         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah__diagcodes_8h_abc5c98fcc1211af2b80116dd6e0a035da81834cd247a96df24f0214bf6015c2fd}{HAL\_DIAG\_SETREGS}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00998}00998                 \mbox{\hyperlink{ah_8c_ac2028a5665efa97c5e960036adb36f52}{ath\_hal\_setregs}}(ah, args, argsize);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l00999}00999                 *resultsize = 0;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01000}01000                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aadc898cbb91e577b40c005576c51e8fdb}{AH\_TRUE}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01001}01001         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah__diagcodes_8h_abc5c98fcc1211af2b80116dd6e0a035daca74133401c585f63757f4445bfe433c}{HAL\_DIAG\_FATALERR}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01002}01002                 *result = \&\mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_fatalState[0];}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01003}01003                 *resultsize = \textcolor{keyword}{sizeof}(\mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_fatalState);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01004}01004                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aadc898cbb91e577b40c005576c51e8fdb}{AH\_TRUE}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01005}01005         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah__diagcodes_8h_abc5c98fcc1211af2b80116dd6e0a035dabc0e03934b02b76a445d2039001cdf57}{HAL\_DIAG\_EEREAD}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01006}01006                 \textcolor{keywordflow}{if} (argsize != \textcolor{keyword}{sizeof}(uint16\_t))}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01007}01007                         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aa46085f3e46cbceb46c46b0bde64a6c20}{AH\_FALSE}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01008}01008                 \textcolor{keywordflow}{if} (!\mbox{\hyperlink{ah__internal_8h_ada29ee6563c4bc062cdf1d5dbf3218ed}{ath\_hal\_eepromRead}}(ah, *(\textcolor{keyword}{const} uint16\_t *)args, *result))}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01009}01009                         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aa46085f3e46cbceb46c46b0bde64a6c20}{AH\_FALSE}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01010}01010                 *resultsize = \textcolor{keyword}{sizeof}(uint16\_t);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01011}01011                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aadc898cbb91e577b40c005576c51e8fdb}{AH\_TRUE}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01012}01012 \textcolor{preprocessor}{\#ifdef AH\_PRIVATE\_DIAG}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01013}01013         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah__diagcodes_8h_abc5c98fcc1211af2b80116dd6e0a035daa066d9633bcf15f199dcb603d9362dbc}{HAL\_DIAG\_SETKEY}}: \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01014}01014                 \textcolor{keyword}{const} \mbox{\hyperlink{structHAL__DIAG__KEYVAL}{HAL\_DIAG\_KEYVAL}} *dk;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01015}01015 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01016}01016                 \textcolor{keywordflow}{if} (argsize != \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structHAL__DIAG__KEYVAL}{HAL\_DIAG\_KEYVAL}}))}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01017}01017                         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aa46085f3e46cbceb46c46b0bde64a6c20}{AH\_FALSE}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01018}01018                 dk = (\textcolor{keyword}{const} \mbox{\hyperlink{structHAL__DIAG__KEYVAL}{HAL\_DIAG\_KEYVAL}} *)args;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01019}01019                 \textcolor{keywordflow}{return} ah-\/>\mbox{\hyperlink{structath__hal_a31288766220be41ff0b29416eedec1c0}{ah\_setKeyCacheEntry}}(ah, dk-\/>\mbox{\hyperlink{structHAL__DIAG__KEYVAL_a5c74e046ce50acb08bd5ba4f868aad53}{dk\_keyix}},}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01020}01020                         \&dk-\/>\mbox{\hyperlink{structHAL__DIAG__KEYVAL_a25e9b0595596de7c31b42152787a1303}{dk\_keyval}}, dk-\/>\mbox{\hyperlink{structHAL__DIAG__KEYVAL_addddd2dcf5488c1c0570029cc1e5065d}{dk\_mac}}, dk-\/>\mbox{\hyperlink{structHAL__DIAG__KEYVAL_aa37b5629ac1be82419c065a78044cb5e}{dk\_xor}});}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01021}01021         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01022}01022         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah__diagcodes_8h_abc5c98fcc1211af2b80116dd6e0a035dab4c84e3bf4edb97c9cacd0bdd12503a3}{HAL\_DIAG\_RESETKEY}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01023}01023                 \textcolor{keywordflow}{if} (argsize != \textcolor{keyword}{sizeof}(uint16\_t))}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01024}01024                         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aa46085f3e46cbceb46c46b0bde64a6c20}{AH\_FALSE}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01025}01025                 \textcolor{keywordflow}{return} ah-\/>\mbox{\hyperlink{structath__hal_a6be71036533924642e34724b541649ab}{ah\_resetKeyCacheEntry}}(ah, *(\textcolor{keyword}{const} uint16\_t *)args);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01026}01026 \textcolor{preprocessor}{\#ifdef AH\_SUPPORT\_WRITE\_EEPROM}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01027}01027         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah__diagcodes_8h_abc5c98fcc1211af2b80116dd6e0a035da9f07ec2a4cb8031610f7869b81ef6504}{HAL\_DIAG\_EEWRITE}}: \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01028}01028                 \textcolor{keyword}{const} \mbox{\hyperlink{structHAL__DIAG__EEVAL}{HAL\_DIAG\_EEVAL}} *ee;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01029}01029                 \textcolor{keywordflow}{if} (argsize != \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structHAL__DIAG__EEVAL}{HAL\_DIAG\_EEVAL}}))}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01030}01030                         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aa46085f3e46cbceb46c46b0bde64a6c20}{AH\_FALSE}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01031}01031                 ee = (\textcolor{keyword}{const} \mbox{\hyperlink{structHAL__DIAG__EEVAL}{HAL\_DIAG\_EEVAL}} *)args;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01032}01032                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah__internal_8h_a84e1ce5233e148a2ec35af8fe68c8066}{ath\_hal\_eepromWrite}}(ah, ee-\/>\mbox{\hyperlink{structHAL__DIAG__EEVAL_a24440abf7e9ac315cb47f5e010c48ba6}{ee\_off}}, ee-\/>\mbox{\hyperlink{structHAL__DIAG__EEVAL_ab3d92978983bddf33e7a3174b3bcb02c}{ee\_data}});}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01033}01033         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01034}01034 \textcolor{preprocessor}{\#endif }\textcolor{comment}{/* AH\_SUPPORT\_WRITE\_EEPROM */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01035}01035 \textcolor{preprocessor}{\#endif }\textcolor{comment}{/* AH\_PRIVATE\_DIAG */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01036}01036         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah__diagcodes_8h_abc5c98fcc1211af2b80116dd6e0a035da631c67e506a364f9cb1ddeea3d55b60a}{HAL\_DIAG\_11NCOMPAT}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01037}01037                 \textcolor{keywordflow}{if} (argsize == 0) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01038}01038                         *resultsize = \textcolor{keyword}{sizeof}(uint32\_t);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01039}01039                         *((uint32\_t *)(*result)) =}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01040}01040                                 \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_11nCompat;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01041}01041                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (argsize == \textcolor{keyword}{sizeof}(uint32\_t)) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01042}01042                         \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_11nCompat = *(\textcolor{keyword}{const} uint32\_t *)args;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01043}01043                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01044}01044                         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aa46085f3e46cbceb46c46b0bde64a6c20}{AH\_FALSE}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01045}01045                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aadc898cbb91e577b40c005576c51e8fdb}{AH\_TRUE}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01046}01046         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah__diagcodes_8h_abc5c98fcc1211af2b80116dd6e0a035daa870f55c9e47a6ee777d8a1037f665bb}{HAL\_DIAG\_CHANSURVEY}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01047}01047                 *result = \&\mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_chansurvey;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01048}01048                 *resultsize = \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structHAL__CHANNEL__SURVEY}{HAL\_CHANNEL\_SURVEY}});}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01049}01049                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aadc898cbb91e577b40c005576c51e8fdb}{AH\_TRUE}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01050}01050         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01051}01051         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aa46085f3e46cbceb46c46b0bde64a6c20}{AH\_FALSE}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01052}01052 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01053}01053 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01054}01054 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01055}01055 \textcolor{comment}{ * Set the properties of the tx queue with the parameters}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01056}01056 \textcolor{comment}{ * from qInfo.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01057}01057 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01058}01058 \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39a}{HAL\_BOOL}}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01059}\mbox{\hyperlink{ah_8c_aa6d87b5c86cc6b7d410d5a63169640f3}{01059}} \mbox{\hyperlink{ah_8c_aa6d87b5c86cc6b7d410d5a63169640f3}{ath\_hal\_setTxQProps}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01060}01060         \mbox{\hyperlink{structHAL__TX__QUEUE__INFO}{HAL\_TX\_QUEUE\_INFO}} *qi, \textcolor{keyword}{const} \mbox{\hyperlink{structHAL__TXQ__INFO}{HAL\_TXQ\_INFO}} *qInfo)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01061}01061 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01062}01062         uint32\_t cw;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01063}01063 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01064}01064         \textcolor{keywordflow}{if} (qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_a045bfe7ddeab1657bda69c01e9a0879f}{tqi\_type}} == \mbox{\hyperlink{ah_8h_aaf60eddc5cc72b7c7c1e910395aca900a2fdb0c1b1aab4832cdfaca2b11e3adcb}{HAL\_TX\_QUEUE\_INACTIVE}}) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01065}01065                 \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9ea11b88c0f380d9e6fc9e92f5f472bd133}{HAL\_DEBUG\_TXQUEUE}},}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01066}01066                     \textcolor{stringliteral}{"{}\%s: inactive queue\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01067}01067                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aa46085f3e46cbceb46c46b0bde64a6c20}{AH\_FALSE}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01068}01068         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01069}01069         \textcolor{comment}{/* XXX validate parameters */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01070}01070         qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_a9b0d484d9380e64feecfa2a350f74545}{tqi\_ver}} = qInfo-\/>\mbox{\hyperlink{structHAL__TXQ__INFO_aecdf588858e87609f3f0e5157ea77c3a}{tqi\_ver}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01071}01071         qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_a4d8d07f0d753fe2705a9443cf52e47b1}{tqi\_subtype}} = qInfo-\/>\mbox{\hyperlink{structHAL__TXQ__INFO_a313d21f08c4d22ae97cd1abc0fea3375}{tqi\_subtype}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01072}01072         qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_a814c3be096677b56360a9b6aa73e2674}{tqi\_qflags}} = qInfo-\/>\mbox{\hyperlink{structHAL__TXQ__INFO_a52db06d6cab3ceb677dc14e902c29276}{tqi\_qflags}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01073}01073         qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_ac32920d033a128bd285011786f074191}{tqi\_priority}} = qInfo-\/>\mbox{\hyperlink{structHAL__TXQ__INFO_ac54b5b6b93c06888cf49ec82398fccba}{tqi\_priority}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01074}01074         \textcolor{keywordflow}{if} (qInfo-\/>\mbox{\hyperlink{structHAL__TXQ__INFO_a16027b45d5008812062d8080d3a39fc3}{tqi\_aifs}} != \mbox{\hyperlink{ah_8h_ac06b61600cf8188de4a00416c404d9d5}{HAL\_TXQ\_USEDEFAULT}})}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01075}01075                 qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_a2c99d4bb6174893cfb38a5f7a4a547d3}{tqi\_aifs}} = \mbox{\hyperlink{ah__internal_8h_ac30e119c6b74a0f91da4788b206a3121}{AH\_MIN}}(qInfo-\/>\mbox{\hyperlink{structHAL__TXQ__INFO_a16027b45d5008812062d8080d3a39fc3}{tqi\_aifs}}, 255);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01076}01076         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01077}01077                 qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_a2c99d4bb6174893cfb38a5f7a4a547d3}{tqi\_aifs}} = \mbox{\hyperlink{ah__internal_8h_a6e255a7eb74f3f1274959ac61aef8576}{INIT\_AIFS}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01078}01078         \textcolor{keywordflow}{if} (qInfo-\/>\mbox{\hyperlink{structHAL__TXQ__INFO_a0b5b3eee0402311afe194eb5b9db578e}{tqi\_cwmin}} != \mbox{\hyperlink{ah_8h_ac06b61600cf8188de4a00416c404d9d5}{HAL\_TXQ\_USEDEFAULT}}) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01079}01079                 cw = \mbox{\hyperlink{ah__internal_8h_ac30e119c6b74a0f91da4788b206a3121}{AH\_MIN}}(qInfo-\/>\mbox{\hyperlink{structHAL__TXQ__INFO_a0b5b3eee0402311afe194eb5b9db578e}{tqi\_cwmin}}, 1024);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01080}01080                 \textcolor{comment}{/* make sure that the CWmin is of the form (2\string^n -\/ 1) */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01081}01081                 qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_ad69f73e59c741d56bdc0f56a5a2910b7}{tqi\_cwmin}} = 1;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01082}01082                 \textcolor{keywordflow}{while} (qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_ad69f73e59c741d56bdc0f56a5a2910b7}{tqi\_cwmin}} < cw)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01083}01083                         qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_ad69f73e59c741d56bdc0f56a5a2910b7}{tqi\_cwmin}} = (qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_ad69f73e59c741d56bdc0f56a5a2910b7}{tqi\_cwmin}} << 1) | 1;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01084}01084         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01085}01085                 qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_ad69f73e59c741d56bdc0f56a5a2910b7}{tqi\_cwmin}} = qInfo-\/>\mbox{\hyperlink{structHAL__TXQ__INFO_a0b5b3eee0402311afe194eb5b9db578e}{tqi\_cwmin}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01086}01086         \textcolor{keywordflow}{if} (qInfo-\/>\mbox{\hyperlink{structHAL__TXQ__INFO_a035c1ecbf4e318f13aca42b1e3691ee7}{tqi\_cwmax}} != \mbox{\hyperlink{ah_8h_ac06b61600cf8188de4a00416c404d9d5}{HAL\_TXQ\_USEDEFAULT}}) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01087}01087                 cw = \mbox{\hyperlink{ah__internal_8h_ac30e119c6b74a0f91da4788b206a3121}{AH\_MIN}}(qInfo-\/>\mbox{\hyperlink{structHAL__TXQ__INFO_a035c1ecbf4e318f13aca42b1e3691ee7}{tqi\_cwmax}}, 1024);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01088}01088                 \textcolor{comment}{/* make sure that the CWmax is of the form (2\string^n -\/ 1) */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01089}01089                 qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_ae6612145dd3a6761b142b631bbc36f61}{tqi\_cwmax}} = 1;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01090}01090                 \textcolor{keywordflow}{while} (qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_ae6612145dd3a6761b142b631bbc36f61}{tqi\_cwmax}} < cw)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01091}01091                         qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_ae6612145dd3a6761b142b631bbc36f61}{tqi\_cwmax}} = (qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_ae6612145dd3a6761b142b631bbc36f61}{tqi\_cwmax}} << 1) | 1;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01092}01092         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01093}01093                 qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_ae6612145dd3a6761b142b631bbc36f61}{tqi\_cwmax}} = \mbox{\hyperlink{ah__internal_8h_ad02bb8e1b1dff8ca39889d271fc43f90}{INIT\_CWMAX}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01094}01094         \textcolor{comment}{/* Set retry limit values */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01095}01095         \textcolor{keywordflow}{if} (qInfo-\/>\mbox{\hyperlink{structHAL__TXQ__INFO_acc7b3f895903a07610f59fa40b024ae8}{tqi\_shretry}} != 0)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01096}01096                 qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_a44ddebc1b8731ad48c12f319a0e0a337}{tqi\_shretry}} = \mbox{\hyperlink{ah__internal_8h_ac30e119c6b74a0f91da4788b206a3121}{AH\_MIN}}(qInfo-\/>\mbox{\hyperlink{structHAL__TXQ__INFO_acc7b3f895903a07610f59fa40b024ae8}{tqi\_shretry}}, 15);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01097}01097         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01098}01098                 qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_a44ddebc1b8731ad48c12f319a0e0a337}{tqi\_shretry}} = \mbox{\hyperlink{ah__internal_8h_a6df738510e37cb69a0eecb79afc21a4d}{INIT\_SH\_RETRY}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01099}01099         \textcolor{keywordflow}{if} (qInfo-\/>\mbox{\hyperlink{structHAL__TXQ__INFO_a07f1ec53b1bb167d2a02a4adca6b6238}{tqi\_lgretry}} != 0)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01100}01100                 qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_a1ce9f4eb8cf631e2ce7b7bd5373f5634}{tqi\_lgretry}} = \mbox{\hyperlink{ah__internal_8h_ac30e119c6b74a0f91da4788b206a3121}{AH\_MIN}}(qInfo-\/>\mbox{\hyperlink{structHAL__TXQ__INFO_a07f1ec53b1bb167d2a02a4adca6b6238}{tqi\_lgretry}}, 15);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01101}01101         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01102}01102                 qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_a1ce9f4eb8cf631e2ce7b7bd5373f5634}{tqi\_lgretry}} = \mbox{\hyperlink{ah__internal_8h_a7d754c99625709132a61a0743c5c3db8}{INIT\_LG\_RETRY}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01103}01103         qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_ae1e1f7478040c96ba652e6422c75c00d}{tqi\_cbrPeriod}} = qInfo-\/>\mbox{\hyperlink{structHAL__TXQ__INFO_a5680f36f01b489afabd66e45787a7e6e}{tqi\_cbrPeriod}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01104}01104         qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_a9f5102efd50bc5f4aba8064f3467f0f8}{tqi\_cbrOverflowLimit}} = qInfo-\/>\mbox{\hyperlink{structHAL__TXQ__INFO_ab93c4fa11c46ec5694d85d8eee4e948c}{tqi\_cbrOverflowLimit}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01105}01105         qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_a480313e84f4f607f1b3923717a567b77}{tqi\_burstTime}} = qInfo-\/>\mbox{\hyperlink{structHAL__TXQ__INFO_ad260d715cf7b2b176654f8252fbc62e8}{tqi\_burstTime}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01106}01106         qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_a14aa3d77592637874d6fa577157ad2c4}{tqi\_readyTime}} = qInfo-\/>\mbox{\hyperlink{structHAL__TXQ__INFO_a4874774f6600e54c89497a5e709e6827}{tqi\_readyTime}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01107}01107 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01108}01108         \textcolor{keywordflow}{switch} (qInfo-\/>\mbox{\hyperlink{structHAL__TXQ__INFO_a313d21f08c4d22ae97cd1abc0fea3375}{tqi\_subtype}}) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01109}01109         \textcolor{keywordflow}{case} \mbox{\hyperlink{ah_8h_ab2d69cb1e87983e9f7c7e1ee201ca194ae729ed4f84f254dab206091a636394e3}{HAL\_WME\_UPSD}}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01110}01110                 \textcolor{keywordflow}{if} (qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_a045bfe7ddeab1657bda69c01e9a0879f}{tqi\_type}} == \mbox{\hyperlink{ah_8h_aaf60eddc5cc72b7c7c1e910395aca900a2e04a4635414f6fded7051d71ffa8679}{HAL\_TX\_QUEUE\_DATA}})}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01111}01111                         qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_ae93247b9e4434ecc80af67aaab8f9a1b}{tqi\_intFlags}} = \mbox{\hyperlink{ah__internal_8h_acb8b418190aa3246825e4cfe92d1778f}{HAL\_TXQ\_USE\_LOCKOUT\_BKOFF\_DIS}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01112}01112                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01113}01113         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01114}01114                 \textcolor{keywordflow}{break};          \textcolor{comment}{/* NB: silence compiler */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01115}01115         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01116}01116         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aadc898cbb91e577b40c005576c51e8fdb}{AH\_TRUE}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01117}01117 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01118}01118 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01119}01119 \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39a}{HAL\_BOOL}}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01120}\mbox{\hyperlink{ah_8c_a0c41c0203f1a1125a44767fe010b177c}{01120}} \mbox{\hyperlink{ah_8c_a0c41c0203f1a1125a44767fe010b177c}{ath\_hal\_getTxQProps}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01121}01121         \mbox{\hyperlink{structHAL__TXQ__INFO}{HAL\_TXQ\_INFO}} *qInfo, \textcolor{keyword}{const} \mbox{\hyperlink{structHAL__TX__QUEUE__INFO}{HAL\_TX\_QUEUE\_INFO}} *qi)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01122}01122 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01123}01123         \textcolor{keywordflow}{if} (qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_a045bfe7ddeab1657bda69c01e9a0879f}{tqi\_type}} == \mbox{\hyperlink{ah_8h_aaf60eddc5cc72b7c7c1e910395aca900a2fdb0c1b1aab4832cdfaca2b11e3adcb}{HAL\_TX\_QUEUE\_INACTIVE}}) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01124}01124                 \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9ea11b88c0f380d9e6fc9e92f5f472bd133}{HAL\_DEBUG\_TXQUEUE}},}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01125}01125                     \textcolor{stringliteral}{"{}\%s: inactive queue\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01126}01126                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aa46085f3e46cbceb46c46b0bde64a6c20}{AH\_FALSE}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01127}01127         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01128}01128 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01129}01129         qInfo-\/>\mbox{\hyperlink{structHAL__TXQ__INFO_aecdf588858e87609f3f0e5157ea77c3a}{tqi\_ver}} = qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_a9b0d484d9380e64feecfa2a350f74545}{tqi\_ver}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01130}01130         qInfo-\/>\mbox{\hyperlink{structHAL__TXQ__INFO_a313d21f08c4d22ae97cd1abc0fea3375}{tqi\_subtype}} = qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_a4d8d07f0d753fe2705a9443cf52e47b1}{tqi\_subtype}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01131}01131         qInfo-\/>\mbox{\hyperlink{structHAL__TXQ__INFO_a52db06d6cab3ceb677dc14e902c29276}{tqi\_qflags}} = qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_a814c3be096677b56360a9b6aa73e2674}{tqi\_qflags}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01132}01132         qInfo-\/>\mbox{\hyperlink{structHAL__TXQ__INFO_ac54b5b6b93c06888cf49ec82398fccba}{tqi\_priority}} = qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_ac32920d033a128bd285011786f074191}{tqi\_priority}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01133}01133         qInfo-\/>\mbox{\hyperlink{structHAL__TXQ__INFO_a16027b45d5008812062d8080d3a39fc3}{tqi\_aifs}} = qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_a2c99d4bb6174893cfb38a5f7a4a547d3}{tqi\_aifs}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01134}01134         qInfo-\/>\mbox{\hyperlink{structHAL__TXQ__INFO_a0b5b3eee0402311afe194eb5b9db578e}{tqi\_cwmin}} = qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_ad69f73e59c741d56bdc0f56a5a2910b7}{tqi\_cwmin}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01135}01135         qInfo-\/>\mbox{\hyperlink{structHAL__TXQ__INFO_a035c1ecbf4e318f13aca42b1e3691ee7}{tqi\_cwmax}} = qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_ae6612145dd3a6761b142b631bbc36f61}{tqi\_cwmax}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01136}01136         qInfo-\/>\mbox{\hyperlink{structHAL__TXQ__INFO_acc7b3f895903a07610f59fa40b024ae8}{tqi\_shretry}} = qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_a44ddebc1b8731ad48c12f319a0e0a337}{tqi\_shretry}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01137}01137         qInfo-\/>\mbox{\hyperlink{structHAL__TXQ__INFO_a07f1ec53b1bb167d2a02a4adca6b6238}{tqi\_lgretry}} = qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_a1ce9f4eb8cf631e2ce7b7bd5373f5634}{tqi\_lgretry}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01138}01138         qInfo-\/>\mbox{\hyperlink{structHAL__TXQ__INFO_a5680f36f01b489afabd66e45787a7e6e}{tqi\_cbrPeriod}} = qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_ae1e1f7478040c96ba652e6422c75c00d}{tqi\_cbrPeriod}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01139}01139         qInfo-\/>\mbox{\hyperlink{structHAL__TXQ__INFO_ab93c4fa11c46ec5694d85d8eee4e948c}{tqi\_cbrOverflowLimit}} = qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_a9f5102efd50bc5f4aba8064f3467f0f8}{tqi\_cbrOverflowLimit}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01140}01140         qInfo-\/>\mbox{\hyperlink{structHAL__TXQ__INFO_ad260d715cf7b2b176654f8252fbc62e8}{tqi\_burstTime}} = qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_a480313e84f4f607f1b3923717a567b77}{tqi\_burstTime}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01141}01141         qInfo-\/>\mbox{\hyperlink{structHAL__TXQ__INFO_a4874774f6600e54c89497a5e709e6827}{tqi\_readyTime}} = qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_a14aa3d77592637874d6fa577157ad2c4}{tqi\_readyTime}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01142}01142         qInfo-\/>\mbox{\hyperlink{structHAL__TXQ__INFO_a0624fce9c41183e891d53b69156b578b}{tqi\_compBuf}} = qi-\/>\mbox{\hyperlink{structHAL__TX__QUEUE__INFO_a168f488415d4ce289bc8e7a8835ee18f}{tqi\_physCompBuf}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01143}01143         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aadc898cbb91e577b40c005576c51e8fdb}{AH\_TRUE}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01144}01144 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01145}01145 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01146}01146                                      \textcolor{comment}{/* 11a Turbo  11b  11g  108g */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01147}\mbox{\hyperlink{ah_8c_a63293486ff9e88379e7ac039db3063eb}{01147}} \textcolor{keyword}{static} \textcolor{keyword}{const} int16\_t \mbox{\hyperlink{ah_8c_a63293486ff9e88379e7ac039db3063eb}{NOISE\_FLOOR}}[] = \{ -\/96, -\/93,  -\/98, -\/96,  -\/93 \};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01148}01148 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01149}01149 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01150}01150 \textcolor{comment}{ * Read the current channel noise floor and return.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01151}01151 \textcolor{comment}{ * If nf cal hasn't finished, channel noise floor should be 0}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01152}01152 \textcolor{comment}{ * and we return a nominal value based on band and frequency.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01153}01153 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01154}01154 \textcolor{comment}{ * NB: This is a private routine used by per-\/chip code to}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01155}01155 \textcolor{comment}{ *     implement the ah\_getChanNoise method.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01156}01156 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01157}01157 int16\_t}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01158}\mbox{\hyperlink{ah_8c_a53da81fd7c30a56a84804d530f8b7c42}{01158}} \mbox{\hyperlink{ah_8c_a53da81fd7c30a56a84804d530f8b7c42}{ath\_hal\_getChanNoise}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, \textcolor{keyword}{const} \textcolor{keyword}{struct} ieee80211\_channel *chan)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01159}01159 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01160}01160         \mbox{\hyperlink{structHAL__CHANNEL__INTERNAL}{HAL\_CHANNEL\_INTERNAL}} *ichan;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01161}01161 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01162}01162         ichan = \mbox{\hyperlink{ah__internal_8h_a43ec3662d6186b79cd289c466ed900fe}{ath\_hal\_checkchannel}}(ah, chan);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01163}01163         \textcolor{keywordflow}{if} (ichan == \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}}) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01164}01164                 \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9ea1c869e006c3f735c9931040bd2082f02}{HAL\_DEBUG\_NFCAL}},}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01165}01165                     \textcolor{stringliteral}{"{}\%s: invalid channel \%u/0x\%x; no mapping\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01166}01166                     \_\_func\_\_, chan-\/>ic\_freq, chan-\/>ic\_flags);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01167}01167                 \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01168}01168         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01169}01169         \textcolor{keywordflow}{if} (ichan-\/>\mbox{\hyperlink{structHAL__CHANNEL__INTERNAL_ab819e5371a0ecd59795b007a81df2589}{rawNoiseFloor}} == 0) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01170}01170                 \mbox{\hyperlink{ah_8c_af3e0c98d38c9b4b8b78f40523ae08711}{WIRELESS\_MODE}} mode = \mbox{\hyperlink{ah_8c_ae14a9e814a29b9db3c8a169aec291ff1}{ath\_hal\_chan2wmode}}(ah, chan);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01171}01171 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01172}01172                 \mbox{\hyperlink{ah__internal_8h_abb8bdaf7438fdc315b333ab07ed68c9c}{HALASSERT}}(mode < \mbox{\hyperlink{ah_8c_af3e0c98d38c9b4b8b78f40523ae08711aa75abd0ac5b9a4dfecf282b54c328cce}{WIRELESS\_MODE\_MAX}});}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01173}01173                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8c_a63293486ff9e88379e7ac039db3063eb}{NOISE\_FLOOR}}[mode] + \mbox{\hyperlink{ah__internal_8h_afeee47f2fa37edc3b9a7981211e57d91}{ath\_hal\_getNfAdjust}}(ah, ichan);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01174}01174         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01175}01175                 \textcolor{keywordflow}{return} ichan-\/>\mbox{\hyperlink{structHAL__CHANNEL__INTERNAL_ab819e5371a0ecd59795b007a81df2589}{rawNoiseFloor}} + ichan-\/>\mbox{\hyperlink{structHAL__CHANNEL__INTERNAL_a9cf2e641894e72571647ee98225d285c}{noiseFloorAdjust}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01176}01176 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01177}01177 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01178}01178 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01179}01179 \textcolor{comment}{ * Fetch the current setup of ctl/ext noise floor values.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01180}01180 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01181}01181 \textcolor{comment}{ * If the CHANNEL\_MIMO\_NF\_VALID flag isn't set, the array is simply}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01182}01182 \textcolor{comment}{ * populated with values from NOISE\_FLOOR[] + ath\_hal\_getNfAdjust().}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01183}01183 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01184}01184 \textcolor{comment}{ * The caller must supply ctl/ext NF arrays which are at least}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01185}01185 \textcolor{comment}{ * AH\_MAX\_CHAINS entries long.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01186}01186 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01187}01187 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01188}\mbox{\hyperlink{ah_8c_a80d132deaf60fccaa89d5fea03d349a2}{01188}} \mbox{\hyperlink{ah_8c_a80d132deaf60fccaa89d5fea03d349a2}{ath\_hal\_get\_mimo\_chan\_noise}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01189}01189     \textcolor{keyword}{const} \textcolor{keyword}{struct} ieee80211\_channel *chan, int16\_t *nf\_ctl,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01190}01190     int16\_t *nf\_ext)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01191}01191 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01192}01192         \mbox{\hyperlink{structHAL__CHANNEL__INTERNAL}{HAL\_CHANNEL\_INTERNAL}} *ichan;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01193}01193         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01194}01194 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01195}01195         ichan = \mbox{\hyperlink{ah__internal_8h_a43ec3662d6186b79cd289c466ed900fe}{ath\_hal\_checkchannel}}(ah, chan);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01196}01196         \textcolor{keywordflow}{if} (ichan == \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}}) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01197}01197                 \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9ea1c869e006c3f735c9931040bd2082f02}{HAL\_DEBUG\_NFCAL}},}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01198}01198                     \textcolor{stringliteral}{"{}\%s: invalid channel \%u/0x\%x; no mapping\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01199}01199                     \_\_func\_\_, chan-\/>ic\_freq, chan-\/>ic\_flags);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01200}01200                 \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{ah_8h_a4dc8104f7457734c8a52cb4332a8ad75}{AH\_MAX\_CHAINS}}; i++) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01201}01201                         nf\_ctl[i] = nf\_ext[i] = 0;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01202}01202                 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01203}01203                 \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01204}01204         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01205}01205 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01206}01206         \textcolor{comment}{/* Return 0 if there's no valid MIMO values (yet) */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01207}01207         \textcolor{keywordflow}{if} (! (ichan-\/>\mbox{\hyperlink{structHAL__CHANNEL__INTERNAL_a03eeada9c5ac4201b00fbac87a20cbf0}{privFlags}} \& \mbox{\hyperlink{ah__internal_8h_aa14a3cb27f8507a4f65390061139e2ae}{CHANNEL\_MIMO\_NF\_VALID}})) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01208}01208                 \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{ah_8h_a4dc8104f7457734c8a52cb4332a8ad75}{AH\_MAX\_CHAINS}}; i++) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01209}01209                         nf\_ctl[i] = nf\_ext[i] = 0;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01210}01210                 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01211}01211                 \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01212}01212         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01213}01213         \textcolor{keywordflow}{if} (ichan-\/>\mbox{\hyperlink{structHAL__CHANNEL__INTERNAL_ab819e5371a0ecd59795b007a81df2589}{rawNoiseFloor}} == 0) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01214}01214                 \mbox{\hyperlink{ah_8c_af3e0c98d38c9b4b8b78f40523ae08711}{WIRELESS\_MODE}} mode = \mbox{\hyperlink{ah_8c_ae14a9e814a29b9db3c8a169aec291ff1}{ath\_hal\_chan2wmode}}(ah, chan);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01215}01215                 \mbox{\hyperlink{ah__internal_8h_abb8bdaf7438fdc315b333ab07ed68c9c}{HALASSERT}}(mode < \mbox{\hyperlink{ah_8c_af3e0c98d38c9b4b8b78f40523ae08711aa75abd0ac5b9a4dfecf282b54c328cce}{WIRELESS\_MODE\_MAX}});}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01216}01216                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01217}01217 \textcolor{comment}{                 * See the comment below -\/ this could cause issues for}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01218}01218 \textcolor{comment}{                 * stations which have a very low RSSI, below the}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01219}01219 \textcolor{comment}{                 * 'normalised' NF values in NOISE\_FLOOR[].}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01220}01220 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01221}01221                 \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{ah_8h_a4dc8104f7457734c8a52cb4332a8ad75}{AH\_MAX\_CHAINS}}; i++) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01222}01222                         nf\_ctl[i] = nf\_ext[i] = \mbox{\hyperlink{ah_8c_a63293486ff9e88379e7ac039db3063eb}{NOISE\_FLOOR}}[mode] +}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01223}01223                             \mbox{\hyperlink{ah__internal_8h_afeee47f2fa37edc3b9a7981211e57d91}{ath\_hal\_getNfAdjust}}(ah, ichan);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01224}01224                 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01225}01225                 \textcolor{keywordflow}{return} 1;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01226}01226         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01227}01227                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01228}01228 \textcolor{comment}{                 * The value returned here from a MIMO radio is presumed to be}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01229}01229 \textcolor{comment}{                 * "{}good enough"{} as a NF calculation. As RSSI values are calculated}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01230}01230 \textcolor{comment}{                 * against this, an adjusted NF may be higher than the RSSI value}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01231}01231 \textcolor{comment}{                 * returned from a vary weak station, resulting in an obscenely}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01232}01232 \textcolor{comment}{                 * high signal strength calculation being returned.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01233}01233 \textcolor{comment}{                 *}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01234}01234 \textcolor{comment}{                 * This should be re-\/evaluated at a later date, along with any}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01235}01235 \textcolor{comment}{                 * signal strength calculations which are made. Quite likely the}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01236}01236 \textcolor{comment}{                 * RSSI values will need to be adjusted to ensure the calculations}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01237}01237 \textcolor{comment}{                 * don't "{}wrap"{} when RSSI is less than the "{}adjusted"{} NF value.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01238}01238 \textcolor{comment}{                 * ("{}Adjust"{} here is via ichan-\/>noiseFloorAdjust.)}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01239}01239 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01240}01240                 \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{ah_8h_a4dc8104f7457734c8a52cb4332a8ad75}{AH\_MAX\_CHAINS}}; i++) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01241}01241                         nf\_ctl[i] = ichan-\/>\mbox{\hyperlink{structHAL__CHANNEL__INTERNAL_a89daf95cd5a17b3c7386040c698ac5ad}{noiseFloorCtl}}[i] + \mbox{\hyperlink{ah__internal_8h_afeee47f2fa37edc3b9a7981211e57d91}{ath\_hal\_getNfAdjust}}(ah, ichan);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01242}01242                         nf\_ext[i] = ichan-\/>\mbox{\hyperlink{structHAL__CHANNEL__INTERNAL_a09291e71b185dc8e8e63590a85081a1d}{noiseFloorExt}}[i] + \mbox{\hyperlink{ah__internal_8h_afeee47f2fa37edc3b9a7981211e57d91}{ath\_hal\_getNfAdjust}}(ah, ichan);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01243}01243                 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01244}01244                 \textcolor{keywordflow}{return} 1;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01245}01245         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01246}01246 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01247}01247 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01248}01248 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01249}01249 \textcolor{comment}{ * Process all valid raw noise floors into the dBm noise floor values.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01250}01250 \textcolor{comment}{ * Though our device has no reference for a dBm noise floor, we perform}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01251}01251 \textcolor{comment}{ * a relative minimization of NF's based on the lowest NF found across a}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01252}01252 \textcolor{comment}{ * channel scan.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01253}01253 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01254}01254 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01255}\mbox{\hyperlink{ah_8c_a219a6ca470801ea4cdd7618bc398822a}{01255}} \mbox{\hyperlink{ah_8c_a219a6ca470801ea4cdd7618bc398822a}{ath\_hal\_process\_noisefloor}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01256}01256 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01257}01257         \mbox{\hyperlink{structHAL__CHANNEL__INTERNAL}{HAL\_CHANNEL\_INTERNAL}} *c;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01258}01258         int16\_t correct2, correct5;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01259}01259         int16\_t lowest2, lowest5;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01260}01260         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01261}01261 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01262}01262         \textcolor{comment}{/* }}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01263}01263 \textcolor{comment}{         * Find the lowest 2GHz and 5GHz noise floor values after adjusting}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01264}01264 \textcolor{comment}{         * for statistically recorded NF/channel deviation.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01265}01265 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01266}01266         correct2 = lowest2 = 0;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01267}01267         correct5 = lowest5 = 0;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01268}01268         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_nchan; i++) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01269}01269                 \mbox{\hyperlink{ah_8c_af3e0c98d38c9b4b8b78f40523ae08711}{WIRELESS\_MODE}} mode;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01270}01270                 int16\_t nf;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01271}01271 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01272}01272                 c = \&\mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_channels[i];}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01273}01273                 \textcolor{keywordflow}{if} (c-\/>\mbox{\hyperlink{structHAL__CHANNEL__INTERNAL_ab819e5371a0ecd59795b007a81df2589}{rawNoiseFloor}} >= 0)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01274}01274                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01275}01275                 \textcolor{comment}{/* XXX can't identify proper mode */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01276}01276                 mode = \mbox{\hyperlink{ah__internal_8h_afd778f58a210c170f03ce79e3aaecceb}{IS\_CHAN\_5GHZ}}(c) ? \mbox{\hyperlink{ah_8c_af3e0c98d38c9b4b8b78f40523ae08711ad0b45671fcf961978541967e72f31400}{WIRELESS\_MODE\_11a}} : \mbox{\hyperlink{ah_8c_af3e0c98d38c9b4b8b78f40523ae08711a46f70e247105233ae4d60546fe1179ba}{WIRELESS\_MODE\_11g}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01277}01277                 nf = c-\/>\mbox{\hyperlink{structHAL__CHANNEL__INTERNAL_ab819e5371a0ecd59795b007a81df2589}{rawNoiseFloor}} + \mbox{\hyperlink{ah_8c_a63293486ff9e88379e7ac039db3063eb}{NOISE\_FLOOR}}[mode] +}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01278}01278                         \mbox{\hyperlink{ah__internal_8h_afeee47f2fa37edc3b9a7981211e57d91}{ath\_hal\_getNfAdjust}}(ah, c);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01279}01279                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{ah__internal_8h_afd778f58a210c170f03ce79e3aaecceb}{IS\_CHAN\_5GHZ}}(c)) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01280}01280                         \textcolor{keywordflow}{if} (nf < lowest5) \{ }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01281}01281                                 lowest5 = nf;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01282}01282                                 correct5 = \mbox{\hyperlink{ah_8c_a63293486ff9e88379e7ac039db3063eb}{NOISE\_FLOOR}}[mode] -\/}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01283}01283                                     (c-\/>\mbox{\hyperlink{structHAL__CHANNEL__INTERNAL_ab819e5371a0ecd59795b007a81df2589}{rawNoiseFloor}} + \mbox{\hyperlink{ah__internal_8h_afeee47f2fa37edc3b9a7981211e57d91}{ath\_hal\_getNfAdjust}}(ah, c));}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01284}01284                         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01285}01285                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01286}01286                         \textcolor{keywordflow}{if} (nf < lowest2) \{ }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01287}01287                                 lowest2 = nf;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01288}01288                                 correct2 = \mbox{\hyperlink{ah_8c_a63293486ff9e88379e7ac039db3063eb}{NOISE\_FLOOR}}[mode] -\/}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01289}01289                                     (c-\/>\mbox{\hyperlink{structHAL__CHANNEL__INTERNAL_ab819e5371a0ecd59795b007a81df2589}{rawNoiseFloor}} + \mbox{\hyperlink{ah__internal_8h_afeee47f2fa37edc3b9a7981211e57d91}{ath\_hal\_getNfAdjust}}(ah, c));}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01290}01290                         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01291}01291                 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01292}01292         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01293}01293 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01294}01294         \textcolor{comment}{/* Correct the channels to reach the expected NF value */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01295}01295         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_nchan; i++) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01296}01296                 c = \&\mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_channels[i];}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01297}01297                 \textcolor{keywordflow}{if} (c-\/>\mbox{\hyperlink{structHAL__CHANNEL__INTERNAL_ab819e5371a0ecd59795b007a81df2589}{rawNoiseFloor}} >= 0)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01298}01298                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01299}01299                 \textcolor{comment}{/* Apply correction factor */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01300}01300                 c-\/>\mbox{\hyperlink{structHAL__CHANNEL__INTERNAL_a9cf2e641894e72571647ee98225d285c}{noiseFloorAdjust}} = \mbox{\hyperlink{ah__internal_8h_afeee47f2fa37edc3b9a7981211e57d91}{ath\_hal\_getNfAdjust}}(ah, c) +}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01301}01301                         (\mbox{\hyperlink{ah__internal_8h_afd778f58a210c170f03ce79e3aaecceb}{IS\_CHAN\_5GHZ}}(c) ? correct5 : correct2);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01302}01302                 \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9ea1c869e006c3f735c9931040bd2082f02}{HAL\_DEBUG\_NFCAL}}, \textcolor{stringliteral}{"{}\%u raw nf \%d adjust \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01303}01303                     c-\/>\mbox{\hyperlink{structHAL__CHANNEL__INTERNAL_afb5a6850ca1450448b70ae862d69dcfd}{channel}}, c-\/>\mbox{\hyperlink{structHAL__CHANNEL__INTERNAL_ab819e5371a0ecd59795b007a81df2589}{rawNoiseFloor}}, c-\/>\mbox{\hyperlink{structHAL__CHANNEL__INTERNAL_a9cf2e641894e72571647ee98225d285c}{noiseFloorAdjust}});}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01304}01304         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01305}01305 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01306}01306 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01307}01307 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01308}01308 \textcolor{comment}{ * INI support routines.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01309}01309 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01310}01310 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01311}01311 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01312}\mbox{\hyperlink{ah_8c_ab52bbbccdbd322c7927486ad5c8543b9}{01312}} \mbox{\hyperlink{ah_8c_ab52bbbccdbd322c7927486ad5c8543b9}{ath\_hal\_ini\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, \textcolor{keyword}{const} \mbox{\hyperlink{structHAL__INI__ARRAY}{HAL\_INI\_ARRAY}} *ia,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01313}01313         \textcolor{keywordtype}{int} col, \textcolor{keywordtype}{int} regWr)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01314}01314 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01315}01315         \textcolor{keywordtype}{int} r;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01316}01316 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01317}01317         \mbox{\hyperlink{ah__internal_8h_abb8bdaf7438fdc315b333ab07ed68c9c}{HALASSERT}}(col < ia-\/>cols);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01318}01318         \textcolor{keywordflow}{for} (r = 0; r < ia-\/>\mbox{\hyperlink{structHAL__INI__ARRAY_ab90e8aaf9d729b4fbbe67df80acf702b}{rows}}; r++) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01319}01319                 \mbox{\hyperlink{ah__osdep_8h_a8e19d34bdc4596d48a978fc59e1b60fb}{OS\_REG\_WRITE}}(ah, \mbox{\hyperlink{ah__internal_8h_aa3d19e7ce70291d6a7f1afa799446f71}{HAL\_INI\_VAL}}(ia, r, 0),}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01320}01320                     \mbox{\hyperlink{ah__internal_8h_aa3d19e7ce70291d6a7f1afa799446f71}{HAL\_INI\_VAL}}(ia, r, col));}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01321}01321 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01322}01322                 \textcolor{comment}{/* Analog shift register delay seems needed for Merlin -\/ PR kern/154220 */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01323}01323                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{ah__internal_8h_aa3d19e7ce70291d6a7f1afa799446f71}{HAL\_INI\_VAL}}(ia, r, 0) >= 0x7800 \&\& \mbox{\hyperlink{ah__internal_8h_aa3d19e7ce70291d6a7f1afa799446f71}{HAL\_INI\_VAL}}(ia, r, 0) < 0x7900)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01324}01324                         \mbox{\hyperlink{ah__osdep_8h_a34b88156c4561e13f775e8b9cd9a5374}{OS\_DELAY}}(100);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01325}01325 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01326}01326                 \mbox{\hyperlink{ah__internal_8h_acc01c83f6180ff3001db910888b6e4dc}{DMA\_YIELD}}(regWr);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01327}01327         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01328}01328         \textcolor{keywordflow}{return} regWr;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01329}01329 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01330}01330 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01331}01331 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01332}\mbox{\hyperlink{ah_8c_a9a4cf82d1ec03f6c12a3fb8aeee9b181}{01332}} \mbox{\hyperlink{ah_8c_a9a4cf82d1ec03f6c12a3fb8aeee9b181}{ath\_hal\_ini\_bank\_setup}}(uint32\_t data[], \textcolor{keyword}{const} \mbox{\hyperlink{structHAL__INI__ARRAY}{HAL\_INI\_ARRAY}} *ia, \textcolor{keywordtype}{int} col)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01333}01333 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01334}01334         \textcolor{keywordtype}{int} r;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01335}01335 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01336}01336         \mbox{\hyperlink{ah__internal_8h_abb8bdaf7438fdc315b333ab07ed68c9c}{HALASSERT}}(col < ia-\/>cols);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01337}01337         \textcolor{keywordflow}{for} (r = 0; r < ia-\/>\mbox{\hyperlink{structHAL__INI__ARRAY_ab90e8aaf9d729b4fbbe67df80acf702b}{rows}}; r++)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01338}01338                 data[r] = \mbox{\hyperlink{ah__internal_8h_aa3d19e7ce70291d6a7f1afa799446f71}{HAL\_INI\_VAL}}(ia, r, col);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01339}01339 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01340}01340 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01341}01341 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01342}\mbox{\hyperlink{ah_8c_ae6970e6ce9a827087e7b69fa0fea911f}{01342}} \mbox{\hyperlink{ah_8c_ae6970e6ce9a827087e7b69fa0fea911f}{ath\_hal\_ini\_bank\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, \textcolor{keyword}{const} \mbox{\hyperlink{structHAL__INI__ARRAY}{HAL\_INI\_ARRAY}} *ia,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01343}01343         \textcolor{keyword}{const} uint32\_t data[], \textcolor{keywordtype}{int} regWr)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01344}01344 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01345}01345         \textcolor{keywordtype}{int} r;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01346}01346 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01347}01347         \textcolor{keywordflow}{for} (r = 0; r < ia-\/>\mbox{\hyperlink{structHAL__INI__ARRAY_ab90e8aaf9d729b4fbbe67df80acf702b}{rows}}; r++) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01348}01348                 \mbox{\hyperlink{ah__osdep_8h_a8e19d34bdc4596d48a978fc59e1b60fb}{OS\_REG\_WRITE}}(ah, \mbox{\hyperlink{ah__internal_8h_aa3d19e7ce70291d6a7f1afa799446f71}{HAL\_INI\_VAL}}(ia, r, 0), data[r]);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01349}01349                 \mbox{\hyperlink{ah__internal_8h_acc01c83f6180ff3001db910888b6e4dc}{DMA\_YIELD}}(regWr);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01350}01350         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01351}01351         \textcolor{keywordflow}{return} regWr;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01352}01352 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01353}01353 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01354}01354 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01355}01355 \textcolor{comment}{ * These are EEPROM board related routines which should likely live in}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01356}01356 \textcolor{comment}{ * a helper library of some sort.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01357}01357 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01358}01358 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01359}01359 \textcolor{comment}{/**************************************************************}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01360}01360 \textcolor{comment}{ * ath\_ee\_getLowerUppderIndex}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01361}01361 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01362}01362 \textcolor{comment}{ * Return indices surrounding the value in sorted integer lists.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01363}01363 \textcolor{comment}{ * Requirement: the input list must be monotonically increasing}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01364}01364 \textcolor{comment}{ *     and populated up to the list size}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01365}01365 \textcolor{comment}{ * Returns: match is set if an index in the array matches exactly}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01366}01366 \textcolor{comment}{ *     or a the target is before or after the range of the array.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01367}01367 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01368}01368 \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39a}{HAL\_BOOL}}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01369}\mbox{\hyperlink{ah_8c_aa13cde8d459a0f44bf507d01bca08412}{01369}} \mbox{\hyperlink{ah_8c_aa13cde8d459a0f44bf507d01bca08412}{ath\_ee\_getLowerUpperIndex}}(uint8\_t target, uint8\_t *pList, uint16\_t listSize,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01370}01370                    uint16\_t *indexL, uint16\_t *indexR)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01371}01371 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01372}01372     uint16\_t i;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01373}01373 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01374}01374     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01375}01375 \textcolor{comment}{     * Check first and last elements for beyond ordered array cases.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01376}01376 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01377}01377     \textcolor{keywordflow}{if} (target <= pList[0]) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01378}01378         *indexL = *indexR = 0;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01379}01379         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aadc898cbb91e577b40c005576c51e8fdb}{AH\_TRUE}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01380}01380     \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01381}01381     \textcolor{keywordflow}{if} (target >= pList[listSize-\/1]) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01382}01382         *indexL = *indexR = (uint16\_t)(listSize -\/ 1);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01383}01383         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aadc898cbb91e577b40c005576c51e8fdb}{AH\_TRUE}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01384}01384     \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01385}01385 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01386}01386     \textcolor{comment}{/* look for value being near or between 2 values in list */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01387}01387     \textcolor{keywordflow}{for} (i = 0; i < listSize -\/ 1; i++) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01388}01388         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01389}01389 \textcolor{comment}{         * If value is close to the current value of the list}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01390}01390 \textcolor{comment}{         * then target is not between values, it is one of the values}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01391}01391 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01392}01392         \textcolor{keywordflow}{if} (pList[i] == target) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01393}01393             *indexL = *indexR = i;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01394}01394             \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aadc898cbb91e577b40c005576c51e8fdb}{AH\_TRUE}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01395}01395         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01396}01396         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01397}01397 \textcolor{comment}{         * Look for value being between current value and next value}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01398}01398 \textcolor{comment}{         * if so return these 2 values}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01399}01399 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01400}01400         \textcolor{keywordflow}{if} (target < pList[i + 1]) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01401}01401             *indexL = i;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01402}01402             *indexR = (uint16\_t)(i + 1);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01403}01403             \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aa46085f3e46cbceb46c46b0bde64a6c20}{AH\_FALSE}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01404}01404         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01405}01405     \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01406}01406     \mbox{\hyperlink{ah__internal_8h_abb8bdaf7438fdc315b333ab07ed68c9c}{HALASSERT}}(0);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01407}01407     *indexL = *indexR = 0;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01408}01408     \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aa46085f3e46cbceb46c46b0bde64a6c20}{AH\_FALSE}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01409}01409 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01410}01410 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01411}01411 \textcolor{comment}{/**************************************************************}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01412}01412 \textcolor{comment}{ * ath\_ee\_FillVpdTable}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01413}01413 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01414}01414 \textcolor{comment}{ * Fill the Vpdlist for indices Pmax-\/Pmin}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01415}01415 \textcolor{comment}{ * Note: pwrMin, pwrMax and Vpdlist are all in dBm * 4}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01416}01416 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01417}01417 \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39a}{HAL\_BOOL}}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01418}\mbox{\hyperlink{ah_8c_a005065a0b3294102b4c9e49ea8b946b7}{01418}} \mbox{\hyperlink{ah_8c_a005065a0b3294102b4c9e49ea8b946b7}{ath\_ee\_FillVpdTable}}(uint8\_t pwrMin, uint8\_t pwrMax, uint8\_t *pPwrList,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01419}01419                    uint8\_t *pVpdList, uint16\_t numIntercepts, uint8\_t *pRetVpdList)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01420}01420 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01421}01421     uint16\_t  i, k;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01422}01422     uint8\_t   currPwr = pwrMin;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01423}01423     uint16\_t  idxL, idxR;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01424}01424 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01425}01425     \mbox{\hyperlink{ah__internal_8h_abb8bdaf7438fdc315b333ab07ed68c9c}{HALASSERT}}(pwrMax > pwrMin);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01426}01426     \textcolor{keywordflow}{for} (i = 0; i <= (pwrMax -\/ pwrMin) / 2; i++) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01427}01427         \mbox{\hyperlink{ah_8c_aa13cde8d459a0f44bf507d01bca08412}{ath\_ee\_getLowerUpperIndex}}(currPwr, pPwrList, numIntercepts,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01428}01428                            \&(idxL), \&(idxR));}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01429}01429         \textcolor{keywordflow}{if} (idxR < 1)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01430}01430             idxR = 1;           \textcolor{comment}{/* extrapolate below */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01431}01431         \textcolor{keywordflow}{if} (idxL == numIntercepts -\/ 1)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01432}01432             idxL = (uint16\_t)(numIntercepts -\/ 2);   \textcolor{comment}{/* extrapolate above */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01433}01433         \textcolor{keywordflow}{if} (pPwrList[idxL] == pPwrList[idxR])}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01434}01434             k = pVpdList[idxL];}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01435}01435         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01436}01436             k = (uint16\_t)( ((currPwr -\/ pPwrList[idxL]) * pVpdList[idxR] + (pPwrList[idxR] -\/ currPwr) * pVpdList[idxL]) /}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01437}01437                   (pPwrList[idxR] -\/ pPwrList[idxL]) );}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01438}01438         \mbox{\hyperlink{ah__internal_8h_abb8bdaf7438fdc315b333ab07ed68c9c}{HALASSERT}}(k < 256);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01439}01439         pRetVpdList[i] = (uint8\_t)k;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01440}01440         currPwr += 2;               \textcolor{comment}{/* half dB steps */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01441}01441     \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01442}01442 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01443}01443     \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aadc898cbb91e577b40c005576c51e8fdb}{AH\_TRUE}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01444}01444 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01445}01445 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01446}01446 \textcolor{comment}{/**************************************************************************}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01447}01447 \textcolor{comment}{ * ath\_ee\_interpolate}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01448}01448 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01449}01449 \textcolor{comment}{ * Returns signed interpolated or the scaled up interpolated value}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01450}01450 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01451}01451 int16\_t}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01452}\mbox{\hyperlink{ah_8c_ab80f2f8a8083078bfca3ac9ef1025cfe}{01452}} \mbox{\hyperlink{ah_8c_ab80f2f8a8083078bfca3ac9ef1025cfe}{ath\_ee\_interpolate}}(uint16\_t target, uint16\_t srcLeft, uint16\_t srcRight,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01453}01453             int16\_t targetLeft, int16\_t targetRight)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01454}01454 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01455}01455     int16\_t rv;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01456}01456 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01457}01457     \textcolor{keywordflow}{if} (srcRight == srcLeft) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01458}01458         rv = targetLeft;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01459}01459     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01460}01460         rv = (int16\_t)( ((target -\/ srcLeft) * targetRight +}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01461}01461               (srcRight -\/ target) * targetLeft) / (srcRight -\/ srcLeft) );}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01462}01462     \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01463}01463     \textcolor{keywordflow}{return} rv;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01464}01464 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01465}01465 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01466}01466 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01467}01467 \textcolor{comment}{ * Adjust the TSF.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01468}01468 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01469}01469 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01470}\mbox{\hyperlink{ah_8c_a15430a80ec551da7bdf6af13ec2d7b34}{01470}} \mbox{\hyperlink{ah_8c_a15430a80ec551da7bdf6af13ec2d7b34}{ath\_hal\_adjusttsf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, int32\_t tsfdelta)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01471}01471 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01472}01472         \textcolor{comment}{/* XXX handle wrap/overflow */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01473}01473         \mbox{\hyperlink{ah__osdep_8h_a8e19d34bdc4596d48a978fc59e1b60fb}{OS\_REG\_WRITE}}(ah, \mbox{\hyperlink{ar5210reg_8h_ac9219f86e27e5067ee61ae3b9be36bb0}{AR\_TSF\_L32}}, \mbox{\hyperlink{ah__osdep_8h_afded631196d59ba3443fc37addc9a2a6}{OS\_REG\_READ}}(ah, \mbox{\hyperlink{ar5210reg_8h_ac9219f86e27e5067ee61ae3b9be36bb0}{AR\_TSF\_L32}}) + tsfdelta);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01474}01474 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01475}01475 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01476}01476 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01477}01477 \textcolor{comment}{ * Enable or disable CCA.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01478}01478 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01479}01479 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01480}\mbox{\hyperlink{ah_8c_a5e39cd71cac73abe263934f5dd061413}{01480}} \mbox{\hyperlink{ah_8c_a5e39cd71cac73abe263934f5dd061413}{ath\_hal\_setcca}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, \textcolor{keywordtype}{int} ena)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01481}01481 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01482}01482         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01483}01483 \textcolor{comment}{         * NB: fill me in; this is not provided by default because disabling}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01484}01484 \textcolor{comment}{         *     CCA in most locales violates regulatory.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01485}01485 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01486}01486 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01487}01487 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01488}01488 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01489}01489 \textcolor{comment}{ * Get CCA setting.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01490}01490 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01491}01491 \textcolor{comment}{ * XXX TODO: turn this and the above function into methods}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01492}01492 \textcolor{comment}{ * in case there are chipset differences in handling CCA.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01493}01493 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01494}01494 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01495}\mbox{\hyperlink{ah_8c_acecbfbf1db0502732c832d438efc1917}{01495}} \mbox{\hyperlink{ah_8c_acecbfbf1db0502732c832d438efc1917}{ath\_hal\_getcca}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01496}01496 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01497}01497         u\_int32\_t diag;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01498}01498         \textcolor{keywordflow}{if} (\mbox{\hyperlink{ah_8c_a877a9e397598c763eaf9d14fbbb61ee2}{ath\_hal\_getcapability}}(ah, \mbox{\hyperlink{ah_8h_a4e320f1f029d777f411dcf4ed244b384ab4a8c6fe1782cde00e7c9e5876ec5c16}{HAL\_CAP\_DIAG}}, 0, \&diag) != \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}})}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01499}01499                 \textcolor{keywordflow}{return} 1;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01500}01500         \textcolor{keywordflow}{return} ((diag \& 0x500000) == 0);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01501}01501 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01502}01502 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01503}01503 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01504}01504 \textcolor{comment}{ * Set the current state of self-\/generated ACK and RTS/CTS frames.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01505}01505 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01506}01506 \textcolor{comment}{ * For correct DFS operation, the device should not even /ACK/ frames}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01507}01507 \textcolor{comment}{ * that are sent to it during CAC or CSA.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01508}01508 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01509}01509 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01510}\mbox{\hyperlink{ah_8c_a0f95f1fbb90aaaf721dc5a0e4d9bc3a6}{01510}} \mbox{\hyperlink{ah_8c_a0f95f1fbb90aaaf721dc5a0e4d9bc3a6}{ath\_hal\_set\_dfs\_cac\_tx\_quiet}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39a}{HAL\_BOOL}} ena)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01511}01511 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01512}01512 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01513}01513         \textcolor{keywordflow}{if} (ah-\/>\mbox{\hyperlink{structath__hal_a901cece1e51fb7ec9cca44ceff7fd1c0}{ah\_setDfsCacTxQuiet}} == NULL)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01514}01514                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01515}01515         ah-\/>\mbox{\hyperlink{structath__hal_a901cece1e51fb7ec9cca44ceff7fd1c0}{ah\_setDfsCacTxQuiet}}(ah, ena);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01516}01516 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01517}01517 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01518}01518 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01519}01519 \textcolor{comment}{ * This routine is only needed when supporting EEPROM-\/in-\/RAM setups}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01520}01520 \textcolor{comment}{ * (eg embedded SoCs and on-\/board PCI/PCIe devices.)}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01521}01521 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01522}01522 \textcolor{comment}{/* NB: This is in 16 bit words; not bytes */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01523}01523 \textcolor{comment}{/* XXX This doesn't belong here!  */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01524}\mbox{\hyperlink{ah_8c_a5933c9ef2ccf6900b29c757ea63773b6}{01524}} \textcolor{preprocessor}{\#define ATH\_DATA\_EEPROM\_SIZE    2048}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01525}01525 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01526}01526 \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39a}{HAL\_BOOL}}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01527}\mbox{\hyperlink{ah_8c_a411780ae341967ac5370d6c7c171e9be}{01527}} \mbox{\hyperlink{ah_8c_a411780ae341967ac5370d6c7c171e9be}{ath\_hal\_EepromDataRead}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, u\_int off, uint16\_t *data)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01528}01528 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01529}01529         \textcolor{keywordflow}{if} (ah-\/>\mbox{\hyperlink{structath__hal_aaff82435cd9956b7292191d6996f2835}{ah\_eepromdata}} == \mbox{\hyperlink{ah__internal_8h_ab933afbd431099f80d5e58c5a6271b4a}{AH\_NULL}}) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01530}01530                 \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9ea35506ea938627da4c44204d0895d0bf8}{HAL\_DEBUG\_ANY}}, \textcolor{stringliteral}{"{}\%s: no eeprom data!\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01531}01531                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aa46085f3e46cbceb46c46b0bde64a6c20}{AH\_FALSE}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01532}01532         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01533}01533         \textcolor{keywordflow}{if} (off > \mbox{\hyperlink{ah_8c_a5933c9ef2ccf6900b29c757ea63773b6}{ATH\_DATA\_EEPROM\_SIZE}}) \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01534}01534                 \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9ea35506ea938627da4c44204d0895d0bf8}{HAL\_DEBUG\_ANY}}, \textcolor{stringliteral}{"{}\%s: offset \%x > \%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01535}01535                     \_\_func\_\_, off, \mbox{\hyperlink{ah_8c_a5933c9ef2ccf6900b29c757ea63773b6}{ATH\_DATA\_EEPROM\_SIZE}});}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01536}01536                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aa46085f3e46cbceb46c46b0bde64a6c20}{AH\_FALSE}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01537}01537         \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01538}01538         (*data) = ah-\/>\mbox{\hyperlink{structath__hal_aaff82435cd9956b7292191d6996f2835}{ah\_eepromdata}}[off];}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01539}01539         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aadc898cbb91e577b40c005576c51e8fdb}{AH\_TRUE}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01540}01540 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01541}01541 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01542}01542 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01543}01543 \textcolor{comment}{ * Do a 2GHz specific MHz-\/>IEEE based on the hardware}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01544}01544 \textcolor{comment}{ * frequency.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01545}01545 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01546}01546 \textcolor{comment}{ * This is the unmapped frequency which is programmed into the hardware.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01547}01547 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01548}01548 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01549}\mbox{\hyperlink{ah_8c_a5678d188521ea9d72343db15f9c324b6}{01549}} \mbox{\hyperlink{ah_8c_a5678d188521ea9d72343db15f9c324b6}{ath\_hal\_mhz2ieee\_2ghz}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, \textcolor{keywordtype}{int} freq)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01550}01550 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01551}01551 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01552}01552         \textcolor{keywordflow}{if} (freq == 2484)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01553}01553                 \textcolor{keywordflow}{return} 14;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01554}01554         \textcolor{keywordflow}{if} (freq < 2484)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01555}01555                 \textcolor{keywordflow}{return} ((\textcolor{keywordtype}{int}) freq -\/ 2407) / 5;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01556}01556         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01557}01557                 \textcolor{keywordflow}{return} 15 + ((freq -\/ 2512) / 20);}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01558}01558 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01559}01559 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01560}01560 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01561}01561 \textcolor{comment}{ * Clear the current survey data.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01562}01562 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01563}01563 \textcolor{comment}{ * This should be done during a channel change.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01564}01564 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01565}01565 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01566}\mbox{\hyperlink{ah_8c_ad3478edfab6ca6d026a669e44e68f43b}{01566}} \mbox{\hyperlink{ah_8c_ad3478edfab6ca6d026a669e44e68f43b}{ath\_hal\_survey\_clear}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01567}01567 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01568}01568 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01569}01569         \mbox{\hyperlink{ah__osdep_8h_a7fe5b3aa939ce794d6247468c5389e1a}{OS\_MEMZERO}}(\&\mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_chansurvey,}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01570}01570             \textcolor{keyword}{sizeof}(\mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_chansurvey));}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01571}01571 \}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01572}01572 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01573}01573 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01574}01574 \textcolor{comment}{ * Add a sample to the channel survey.}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01575}01575 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01576}01576 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01577}\mbox{\hyperlink{ah_8c_a17d40b73be5aa5a1bddd682acfc6cc69}{01577}} \mbox{\hyperlink{ah_8c_a17d40b73be5aa5a1bddd682acfc6cc69}{ath\_hal\_survey\_add\_sample}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, \mbox{\hyperlink{structHAL__SURVEY__SAMPLE}{HAL\_SURVEY\_SAMPLE}} *hs)}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01578}01578 \{}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01579}01579         \mbox{\hyperlink{structHAL__CHANNEL__SURVEY}{HAL\_CHANNEL\_SURVEY}} *cs;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01580}01580 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01581}01581         cs = \&\mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_chansurvey;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01582}01582 }
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01583}01583         \mbox{\hyperlink{ah__osdep_8h_af5ef3034fa613f0234b88d076b9ebe75}{OS\_MEMCPY}}(\&cs-\/>\mbox{\hyperlink{structHAL__CHANNEL__SURVEY_a5d6773036159f022c391d8fde5b77a5d}{samples}}[cs-\/>\mbox{\hyperlink{structHAL__CHANNEL__SURVEY_af7892eedfe15af4bcccf9c6997d5ac01}{cur\_sample}}], hs, \textcolor{keyword}{sizeof}(*hs));}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01584}01584         cs-\/>\mbox{\hyperlink{structHAL__CHANNEL__SURVEY_a5d6773036159f022c391d8fde5b77a5d}{samples}}[cs-\/>\mbox{\hyperlink{structHAL__CHANNEL__SURVEY_af7892eedfe15af4bcccf9c6997d5ac01}{cur\_sample}}].\mbox{\hyperlink{structHAL__SURVEY__SAMPLE_a916bb9b2605faffda45c05e8e40b5d8f}{seq\_num}} = cs-\/>\mbox{\hyperlink{structHAL__CHANNEL__SURVEY_a1e3dca9e66893a52e2e1ad0a3ff213cb}{cur\_seq}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01585}01585         cs-\/>\mbox{\hyperlink{structHAL__CHANNEL__SURVEY_af7892eedfe15af4bcccf9c6997d5ac01}{cur\_sample}} = (cs-\/>\mbox{\hyperlink{structHAL__CHANNEL__SURVEY_af7892eedfe15af4bcccf9c6997d5ac01}{cur\_sample}} + 1) \% \mbox{\hyperlink{ah_8h_a468c989a8b7c5267de93a8ac53265e3a}{CHANNEL\_SURVEY\_SAMPLE\_COUNT}};}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01586}01586         cs-\/>\mbox{\hyperlink{structHAL__CHANNEL__SURVEY_a1e3dca9e66893a52e2e1ad0a3ff213cb}{cur\_seq}}++;}
\DoxyCodeLine{\Hypertarget{ah_8c_source_l01587}01587 \}}

\end{DoxyCode}
