\hypertarget{ar5212__interrupts_8c_source}{}\doxysection{ar5212\+\_\+interrupts.\+c}
\label{ar5212__interrupts_8c_source}\index{dev/ath/ath\_hal/ar5212/ar5212\_interrupts.c@{dev/ath/ath\_hal/ar5212/ar5212\_interrupts.c}}
\mbox{\hyperlink{ar5212__interrupts_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: ISC}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2002-\/2008 Sam Leffler, Errno Consulting}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00005}00005 \textcolor{comment}{ * Copyright (c) 2002-\/2008 Atheros Communications, Inc.}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00007}00007 \textcolor{comment}{ * Permission to use, copy, modify, and/or distribute this software for any}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00008}00008 \textcolor{comment}{ * purpose with or without fee is hereby granted, provided that the above}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00009}00009 \textcolor{comment}{ * copyright notice and this permission notice appear in all copies.}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00010}00010 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00011}00011 \textcolor{comment}{ * THE SOFTWARE IS PROVIDED "{}AS IS"{} AND THE AUTHOR DISCLAIMS ALL WARRANTIES}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00012}00012 \textcolor{comment}{ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00013}00013 \textcolor{comment}{ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00014}00014 \textcolor{comment}{ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00015}00015 \textcolor{comment}{ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00016}00016 \textcolor{comment}{ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00017}00017 \textcolor{comment}{ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00018}00018 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00019}00019 \textcolor{comment}{ * \$FreeBSD\$}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00020}00020 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00021}00021 \textcolor{preprocessor}{\#include "{}opt\_ah.h"{}}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00022}00022 }
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00023}00023 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{ah_8h}{ah.h}}"{}}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00024}00024 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{ah__internal_8h}{ah\_internal.h}}"{}}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00025}00025 }
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00026}00026 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{ar5212_8h}{ar5212/ar5212.h}}"{}}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00027}00027 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{ar5212reg_8h}{ar5212/ar5212reg.h}}"{}}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00028}00028 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{ar5212phy_8h}{ar5212/ar5212phy.h}}"{}}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00029}00029 }
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00030}00030 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00031}00031 \textcolor{comment}{ * Checks to see if an interrupt is pending on our NIC}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00032}00032 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00033}00033 \textcolor{comment}{ * Returns: TRUE    if an interrupt is pending}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00034}00034 \textcolor{comment}{ *          FALSE   if not}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00035}00035 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00036}00036 \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39a}{HAL\_BOOL}}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00037}\mbox{\hyperlink{ar5212_8h_af5cc39881e8eeb1ef35523eab855fd23}{00037}} \mbox{\hyperlink{ar5212__interrupts_8c_af5cc39881e8eeb1ef35523eab855fd23}{ar5212IsInterruptPending}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah)}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00038}00038 \{}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00039}00039         \textcolor{comment}{/* }}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00040}00040 \textcolor{comment}{         * Some platforms trigger our ISR before applying power to}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00041}00041 \textcolor{comment}{         * the card, so make sure the INTPEND is really 1, not 0xffffffff.}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00042}00042 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00043}00043         \textcolor{keywordflow}{return} (\mbox{\hyperlink{ah__osdep_8h_afded631196d59ba3443fc37addc9a2a6}{OS\_REG\_READ}}(ah, \mbox{\hyperlink{ar5210reg_8h_a06e7849e2b090074ff4b004d349b8e0f}{AR\_INTPEND}}) == \mbox{\hyperlink{ar5211reg_8h_a5e677aae1e25ba6011312eff320b3dd1}{AR\_INTPEND\_TRUE}});}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00044}00044 \}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00045}00045 }
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00046}00046 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00047}00047 \textcolor{comment}{ * Reads the Interrupt Status Register value from the NIC, thus deasserting}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00048}00048 \textcolor{comment}{ * the interrupt line, and returns both the masked and unmasked mapped ISR}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00049}00049 \textcolor{comment}{ * values.  The value returned is mapped to abstract the hw-\/specific bit}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00050}00050 \textcolor{comment}{ * locations in the Interrupt Status Register.}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00051}00051 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00052}00052 \textcolor{comment}{ * Returns: A hardware-\/abstracted bitmap of all non-\/masked-\/out}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00053}00053 \textcolor{comment}{ *          interrupts pending, as well as an unmasked value}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00054}00054 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00055}00055 \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39a}{HAL\_BOOL}}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00056}\mbox{\hyperlink{ar5212_8h_a8e89cdb06e380c8cc595107fa20f1198}{00056}} \mbox{\hyperlink{ar5212__interrupts_8c_a5ec6dc677a2c802073cca7e5441cb306}{ar5212GetPendingInterrupts}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, \mbox{\hyperlink{ah_8h_ad57fc46d3ae4be3419a41bc4816a8512}{HAL\_INT}} *masked)}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00057}00057 \{}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00058}00058         uint32\_t isr, isr0, isr1;}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00059}00059         uint32\_t mask2;}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00060}00060         \textcolor{keyword}{struct }\mbox{\hyperlink{structath__hal__5212}{ath\_hal\_5212}} *ahp = \mbox{\hyperlink{ar5212_8h_ab645c6d1aebbc11b13cd2c76c922fab2}{AH5212}}(ah);}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00061}00061 }
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00062}00062         isr = \mbox{\hyperlink{ah__osdep_8h_afded631196d59ba3443fc37addc9a2a6}{OS\_REG\_READ}}(ah, \mbox{\hyperlink{ar5210reg_8h_a3bf709edde279783ef3650f18f0d2230}{AR\_ISR}});}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00063}00063         mask2 = 0;}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00064}00064         \textcolor{keywordflow}{if} (isr \& \mbox{\hyperlink{ar5212reg_8h_accdf0386787029c46c729d433171825d}{AR\_ISR\_BCNMISC}}) \{}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00065}00065                 uint32\_t isr2 = \mbox{\hyperlink{ah__osdep_8h_afded631196d59ba3443fc37addc9a2a6}{OS\_REG\_READ}}(ah, \mbox{\hyperlink{ar5211reg_8h_a08b52db287804ec3b27e077b6197d52b}{AR\_ISR\_S2}});}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00066}00066                 \textcolor{keywordflow}{if} (isr2 \& \mbox{\hyperlink{ar5212reg_8h_a730ef469061ed45d68b6ee6f6c87f135}{AR\_ISR\_S2\_TIM}})}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00067}00067                         mask2 |= \mbox{\hyperlink{ah_8h_ad57fc46d3ae4be3419a41bc4816a8512a2449acc4115bfe4881fa5f7b8a12bf08}{HAL\_INT\_TIM}};}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00068}00068                 \textcolor{keywordflow}{if} (isr2 \& \mbox{\hyperlink{ar5212reg_8h_aaa8342d2439611e58af42cda1f504a4a}{AR\_ISR\_S2\_DTIM}})}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00069}00069                         mask2 |= \mbox{\hyperlink{ah_8h_ad57fc46d3ae4be3419a41bc4816a8512a390fdaaa5c7e895d67c3dd352e6e78d5}{HAL\_INT\_DTIM}};}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00070}00070                 \textcolor{keywordflow}{if} (isr2 \& \mbox{\hyperlink{ar5212reg_8h_a4a40105ae956a6f312b26e507edaf41f}{AR\_ISR\_S2\_DTIMSYNC}})}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00071}00071                         mask2 |= \mbox{\hyperlink{ah_8h_ad57fc46d3ae4be3419a41bc4816a8512a76982c7ea65fe7d33765aad71908153a}{HAL\_INT\_DTIMSYNC}};}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00072}00072                 \textcolor{keywordflow}{if} (isr2 \& \mbox{\hyperlink{ar5212reg_8h_a660ae43f2728e15ad180c723a2534a56}{AR\_ISR\_S2\_CABEND}})}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00073}00073                         mask2 |= \mbox{\hyperlink{ah_8h_ad57fc46d3ae4be3419a41bc4816a8512a6c95a24a5fbce8af1cc5b8e3c2b0296d}{HAL\_INT\_CABEND}};}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00074}00074                 \textcolor{keywordflow}{if} (isr2 \& \mbox{\hyperlink{ar5212reg_8h_ac90a1120cd475f3bd09862243a8e4a76}{AR\_ISR\_S2\_TBTT}})}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00075}00075                         mask2 |= \mbox{\hyperlink{ah_8h_ad57fc46d3ae4be3419a41bc4816a8512a605bcc3d3ff6ec93118ce31a9c3f24a0}{HAL\_INT\_TBTT}};}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00076}00076         \}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00077}00077         isr = \mbox{\hyperlink{ah__osdep_8h_afded631196d59ba3443fc37addc9a2a6}{OS\_REG\_READ}}(ah, \mbox{\hyperlink{ar5211reg_8h_ab4790ee80c7e316a5ca4ef08817e9978}{AR\_ISR\_RAC}});}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00078}00078         \textcolor{keywordflow}{if} (isr == 0xffffffff) \{}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00079}00079                 *masked = 0;}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00080}00080                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aa46085f3e46cbceb46c46b0bde64a6c20}{AH\_FALSE}};}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00081}00081         \}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00082}00082 }
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00083}00083         *masked = isr \& \mbox{\hyperlink{ah_8h_ad57fc46d3ae4be3419a41bc4816a8512a2de059516facac087f53e299f3e59a20}{HAL\_INT\_COMMON}};}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00084}00084 }
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00085}00085         \textcolor{keywordflow}{if} (isr \& \mbox{\hyperlink{ar5211reg_8h_a4d9d8b30de41eff599db95f37873d7d5}{AR\_ISR\_HIUERR}})}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00086}00086                 *masked |= \mbox{\hyperlink{ah_8h_ad57fc46d3ae4be3419a41bc4816a8512a40399fdd756de3999bce8ec7646e8f90}{HAL\_INT\_FATAL}};}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00087}00087         \textcolor{keywordflow}{if} (isr \& (\mbox{\hyperlink{ar5211reg_8h_ab1ad0b454c80512456424429f90a04ba}{AR\_ISR\_RXOK}} | \mbox{\hyperlink{ar5211reg_8h_ab409c2280a72dbc2a42d4a84241aff69}{AR\_ISR\_RXERR}}))}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00088}00088                 *masked |= \mbox{\hyperlink{ah_8h_ad57fc46d3ae4be3419a41bc4816a8512a9e8ac737820fc10d3de4a9df0cabdc0f}{HAL\_INT\_RX}};}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00089}00089         \textcolor{keywordflow}{if} (isr \& (\mbox{\hyperlink{ar5211reg_8h_a8bdbda61849cb960a100a115852a254a}{AR\_ISR\_TXOK}} | \mbox{\hyperlink{ar5211reg_8h_a2dac1d105670776a6d50e74594ffc563}{AR\_ISR\_TXDESC}} | \mbox{\hyperlink{ar5211reg_8h_aa0c3053575854cb892f73e8f98520d7a}{AR\_ISR\_TXERR}} | \mbox{\hyperlink{ar5211reg_8h_a3f406ad77b052277dee93f127b146010}{AR\_ISR\_TXEOL}})) \{}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00090}00090                 *masked |= \mbox{\hyperlink{ah_8h_ad57fc46d3ae4be3419a41bc4816a8512a4f96a13d48b7c2b4cdb9673a5b451b86}{HAL\_INT\_TX}};}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00091}00091                 isr0 = \mbox{\hyperlink{ah__osdep_8h_afded631196d59ba3443fc37addc9a2a6}{OS\_REG\_READ}}(ah, \mbox{\hyperlink{ar5211reg_8h_a100504413d582955e3ac91914c1b7528}{AR\_ISR\_S0\_S}});}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00092}00092                 ahp-\/>\mbox{\hyperlink{structath__hal__5212_aed5215e2b1156cf000a0218eba93c517}{ah\_intrTxqs}} |= \mbox{\hyperlink{ah__internal_8h_a3cb92725e12650d7447b06c9db39aac9}{MS}}(isr0, \mbox{\hyperlink{ar5212reg_8h_a0e3075eff5a4f76c14741af4b3150b9e}{AR\_ISR\_S0\_QCU\_TXOK}});}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00093}00093                 ahp-\/>\mbox{\hyperlink{structath__hal__5212_aed5215e2b1156cf000a0218eba93c517}{ah\_intrTxqs}} |= \mbox{\hyperlink{ah__internal_8h_a3cb92725e12650d7447b06c9db39aac9}{MS}}(isr0, \mbox{\hyperlink{ar5212reg_8h_a228475222f95976385c7ffd4bff21725}{AR\_ISR\_S0\_QCU\_TXDESC}});}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00094}00094                 isr1 = \mbox{\hyperlink{ah__osdep_8h_afded631196d59ba3443fc37addc9a2a6}{OS\_REG\_READ}}(ah, \mbox{\hyperlink{ar5211reg_8h_aa95bbfe6fb62a033cd53b9ecd6d9dcab}{AR\_ISR\_S1\_S}});}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00095}00095                 ahp-\/>\mbox{\hyperlink{structath__hal__5212_aed5215e2b1156cf000a0218eba93c517}{ah\_intrTxqs}} |= \mbox{\hyperlink{ah__internal_8h_a3cb92725e12650d7447b06c9db39aac9}{MS}}(isr1, \mbox{\hyperlink{ar5212reg_8h_a420c5f06e8beeaa3db9be960d07933b0}{AR\_ISR\_S1\_QCU\_TXERR}});}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00096}00096                 ahp-\/>\mbox{\hyperlink{structath__hal__5212_aed5215e2b1156cf000a0218eba93c517}{ah\_intrTxqs}} |= \mbox{\hyperlink{ah__internal_8h_a3cb92725e12650d7447b06c9db39aac9}{MS}}(isr1, \mbox{\hyperlink{ar5212reg_8h_ad65e936f427b706aa3d19793d98edfa2}{AR\_ISR\_S1\_QCU\_TXEOL}});}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00097}00097         \}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00098}00098 }
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00099}00099         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00100}00100 \textcolor{comment}{         * Receive overrun is usually non-\/fatal on Oahu/Spirit.}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00101}00101 \textcolor{comment}{         * BUT on some parts rx could fail and the chip must be reset.}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00102}00102 \textcolor{comment}{         * So we force a hardware reset in all cases.}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00103}00103 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00104}00104         \textcolor{keywordflow}{if} ((isr \& \mbox{\hyperlink{ar5211reg_8h_a40bfe8235834602570c78fae76abadef}{AR\_ISR\_RXORN}}) \&\& \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_rxornIsFatal) \{}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00105}00105                 \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9ea35506ea938627da4c44204d0895d0bf8}{HAL\_DEBUG\_ANY}},}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00106}00106                     \textcolor{stringliteral}{"{}\%s: receive FIFO overrun interrupt\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00107}00107                 *masked |= \mbox{\hyperlink{ah_8h_ad57fc46d3ae4be3419a41bc4816a8512a40399fdd756de3999bce8ec7646e8f90}{HAL\_INT\_FATAL}};}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00108}00108         \}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00109}00109         *masked |= mask2;}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00110}00110 }
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00111}00111         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00112}00112 \textcolor{comment}{         * On fatal errors collect ISR state for debugging.}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00113}00113 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00114}00114         \textcolor{keywordflow}{if} (*masked \& \mbox{\hyperlink{ah_8h_ad57fc46d3ae4be3419a41bc4816a8512a40399fdd756de3999bce8ec7646e8f90}{HAL\_INT\_FATAL}}) \{}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00115}00115                 \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_fatalState[0] = isr;}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00116}00116                 \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_fatalState[1] = \mbox{\hyperlink{ah__osdep_8h_afded631196d59ba3443fc37addc9a2a6}{OS\_REG\_READ}}(ah, \mbox{\hyperlink{ar5211reg_8h_a100504413d582955e3ac91914c1b7528}{AR\_ISR\_S0\_S}});}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00117}00117                 \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_fatalState[2] = \mbox{\hyperlink{ah__osdep_8h_afded631196d59ba3443fc37addc9a2a6}{OS\_REG\_READ}}(ah, \mbox{\hyperlink{ar5211reg_8h_aa95bbfe6fb62a033cd53b9ecd6d9dcab}{AR\_ISR\_S1\_S}});}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00118}00118                 \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_fatalState[3] = \mbox{\hyperlink{ah__osdep_8h_afded631196d59ba3443fc37addc9a2a6}{OS\_REG\_READ}}(ah, \mbox{\hyperlink{ar5211reg_8h_ada1a3bcee875352d379631ff0199dfb6}{AR\_ISR\_S2\_S}});}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00119}00119                 \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_fatalState[4] = \mbox{\hyperlink{ah__osdep_8h_afded631196d59ba3443fc37addc9a2a6}{OS\_REG\_READ}}(ah, \mbox{\hyperlink{ar5211reg_8h_a9222fb4d7f8ca8fb41b20131384d5641}{AR\_ISR\_S3\_S}});}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00120}00120                 \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_fatalState[5] = \mbox{\hyperlink{ah__osdep_8h_afded631196d59ba3443fc37addc9a2a6}{OS\_REG\_READ}}(ah, \mbox{\hyperlink{ar5211reg_8h_a2ec48f313e83e4524d5038b8dfab78fd}{AR\_ISR\_S4\_S}});}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00121}00121                 \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9ea35506ea938627da4c44204d0895d0bf8}{HAL\_DEBUG\_ANY}},}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00122}00122                     \textcolor{stringliteral}{"{}\%s: fatal error, ISR\_RAC=0x\%x ISR\_S2\_S=0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00123}00123                     \_\_func\_\_, isr, \mbox{\hyperlink{ah__internal_8h_a7a57bc6086e9d3ed4c9d81f5d0a136cc}{AH\_PRIVATE}}(ah)-\/>ah\_fatalState[3]);}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00124}00124         \}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00125}00125         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aadc898cbb91e577b40c005576c51e8fdb}{AH\_TRUE}};}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00126}00126 \}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00127}00127 }
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00128}00128 \mbox{\hyperlink{ah_8h_ad57fc46d3ae4be3419a41bc4816a8512}{HAL\_INT}}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00129}\mbox{\hyperlink{ar5212_8h_adef8f1e9522f48516349954b483d5bd0}{00129}} \mbox{\hyperlink{ar5212__interrupts_8c_adef8f1e9522f48516349954b483d5bd0}{ar5212GetInterrupts}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah)}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00130}00130 \{}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00131}00131         \textcolor{keywordflow}{return} \mbox{\hyperlink{ar5212_8h_ab645c6d1aebbc11b13cd2c76c922fab2}{AH5212}}(ah)-\/>ah\_maskReg;}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00132}00132 \}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00133}00133 }
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00134}00134 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00135}00135 \textcolor{comment}{ * Atomically enables NIC interrupts.  Interrupts are passed in}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00136}00136 \textcolor{comment}{ * via the enumerated bitmask in ints.}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00137}00137 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00138}00138 \mbox{\hyperlink{ah_8h_ad57fc46d3ae4be3419a41bc4816a8512}{HAL\_INT}}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00139}\mbox{\hyperlink{ar5212_8h_a90021dbfe3109310585d25230352c13d}{00139}} \mbox{\hyperlink{ar5212__interrupts_8c_a90021dbfe3109310585d25230352c13d}{ar5212SetInterrupts}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, \mbox{\hyperlink{ah_8h_ad57fc46d3ae4be3419a41bc4816a8512}{HAL\_INT}} ints)}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00140}00140 \{}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00141}00141         \textcolor{keyword}{struct }\mbox{\hyperlink{structath__hal__5212}{ath\_hal\_5212}} *ahp = \mbox{\hyperlink{ar5212_8h_ab645c6d1aebbc11b13cd2c76c922fab2}{AH5212}}(ah);}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00142}00142         uint32\_t omask = ahp-\/>\mbox{\hyperlink{structath__hal__5212_a503ffe881a583f89c2af304e0ae05660}{ah\_maskReg}};}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00143}00143         uint32\_t mask, mask2;}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00144}00144 }
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00145}00145         \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9eaee40ece38eb59c2a06f4a563dd15f669}{HAL\_DEBUG\_INTERRUPT}}, \textcolor{stringliteral}{"{}\%s: 0x\%x => 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00146}00146             \_\_func\_\_, omask, ints);}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00147}00147 }
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00148}00148         \textcolor{keywordflow}{if} (omask \& \mbox{\hyperlink{ah_8h_a24e1e02cf3d1c2147caab33049235e6c}{HAL\_INT\_GLOBAL}}) \{}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00149}00149                 \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9eaee40ece38eb59c2a06f4a563dd15f669}{HAL\_DEBUG\_INTERRUPT}}, \textcolor{stringliteral}{"{}\%s: disable IER\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00150}00150                 \mbox{\hyperlink{ah__osdep_8h_a8e19d34bdc4596d48a978fc59e1b60fb}{OS\_REG\_WRITE}}(ah, \mbox{\hyperlink{ar5210reg_8h_af2ed97a1cd2af56bdbaad967855d6985}{AR\_IER}}, \mbox{\hyperlink{ar5210reg_8h_a8be4c4f0090838388b80f0614db2a7e1}{AR\_IER\_DISABLE}});}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00151}00151                 (void) \mbox{\hyperlink{ah__osdep_8h_afded631196d59ba3443fc37addc9a2a6}{OS\_REG\_READ}}(ah, \mbox{\hyperlink{ar5210reg_8h_af2ed97a1cd2af56bdbaad967855d6985}{AR\_IER}});   \textcolor{comment}{/* flush write to HW */}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00152}00152         \}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00153}00153 }
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00154}00154         mask = ints \& \mbox{\hyperlink{ah_8h_ad57fc46d3ae4be3419a41bc4816a8512a2de059516facac087f53e299f3e59a20}{HAL\_INT\_COMMON}};}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00155}00155         mask2 = 0;}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00156}00156         \textcolor{keywordflow}{if} (ints \& \mbox{\hyperlink{ah_8h_ad57fc46d3ae4be3419a41bc4816a8512a4f96a13d48b7c2b4cdb9673a5b451b86}{HAL\_INT\_TX}}) \{}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00157}00157                 \textcolor{keywordflow}{if} (ahp-\/>\mbox{\hyperlink{structath__hal__5212_a6bbe701b1dddac9ee564d8ac71548f31}{ah\_txOkInterruptMask}})}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00158}00158                         mask |= \mbox{\hyperlink{ar5211reg_8h_ad80601bb713128360dd0cc035c2d2369}{AR\_IMR\_TXOK}};}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00159}00159                 \textcolor{keywordflow}{if} (ahp-\/>\mbox{\hyperlink{structath__hal__5212_a7ae3ded77fb2b56d9cc9999418b117ef}{ah\_txErrInterruptMask}})}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00160}00160                         mask |= \mbox{\hyperlink{ar5211reg_8h_a03b98f0f3eb21e0b9a97b905594be412}{AR\_IMR\_TXERR}};}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00161}00161                 \textcolor{keywordflow}{if} (ahp-\/>\mbox{\hyperlink{structath__hal__5212_a33ad8f744b558386c0223355f4ea7b32}{ah\_txDescInterruptMask}})}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00162}00162                         mask |= \mbox{\hyperlink{ar5211reg_8h_abe43c26959e14bdd2dfdf47a4c4e2655}{AR\_IMR\_TXDESC}};}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00163}00163                 \textcolor{keywordflow}{if} (ahp-\/>\mbox{\hyperlink{structath__hal__5212_a17406bd5b2fa7fc9d4dfc054f80ed277}{ah\_txEolInterruptMask}})}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00164}00164                         mask |= \mbox{\hyperlink{ar5211reg_8h_a30b7616545f74689aedeb8ff828fd0b9}{AR\_IMR\_TXEOL}};}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00165}00165         \}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00166}00166         \textcolor{keywordflow}{if} (ints \& \mbox{\hyperlink{ah_8h_ad57fc46d3ae4be3419a41bc4816a8512a9e8ac737820fc10d3de4a9df0cabdc0f}{HAL\_INT\_RX}})}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00167}00167                 mask |= \mbox{\hyperlink{ar5211reg_8h_afa4bf92f7352294ba3fbc0e8df5edf89}{AR\_IMR\_RXOK}} | \mbox{\hyperlink{ar5211reg_8h_a0bb19971f4fb58e247d4b647a5aec227}{AR\_IMR\_RXERR}} | \mbox{\hyperlink{ar5211reg_8h_aac43fd3221d465ad66fd5feb8b2578e7}{AR\_IMR\_RXDESC}};}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00168}00168         \textcolor{keywordflow}{if} (ints \& (\mbox{\hyperlink{ah_8h_ad57fc46d3ae4be3419a41bc4816a8512ad974df39ec5c3e988a392b388fb4b49a}{HAL\_INT\_BMISC}})) \{}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00169}00169                 mask |= \mbox{\hyperlink{ar5212reg_8h_a1a31d027ad3bafeb96e003d882d4d23f}{AR\_IMR\_BCNMISC}};}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00170}00170                 \textcolor{keywordflow}{if} (ints \& \mbox{\hyperlink{ah_8h_ad57fc46d3ae4be3419a41bc4816a8512a2449acc4115bfe4881fa5f7b8a12bf08}{HAL\_INT\_TIM}})}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00171}00171                         mask2 |= \mbox{\hyperlink{ar5212reg_8h_aa33aa4398b12b8165c9afc4341dc89a9}{AR\_IMR\_S2\_TIM}};}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00172}00172                 \textcolor{keywordflow}{if} (ints \& \mbox{\hyperlink{ah_8h_ad57fc46d3ae4be3419a41bc4816a8512a390fdaaa5c7e895d67c3dd352e6e78d5}{HAL\_INT\_DTIM}})}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00173}00173                         mask2 |= \mbox{\hyperlink{ar5212reg_8h_a957cc5e268a4692f06a46fab49ae689a}{AR\_IMR\_S2\_DTIM}};}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00174}00174                 \textcolor{keywordflow}{if} (ints \& \mbox{\hyperlink{ah_8h_ad57fc46d3ae4be3419a41bc4816a8512a76982c7ea65fe7d33765aad71908153a}{HAL\_INT\_DTIMSYNC}})}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00175}00175                         mask2 |= \mbox{\hyperlink{ar5212reg_8h_afa0ee77095e322732b63b65806fd7028}{AR\_IMR\_S2\_DTIMSYNC}};}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00176}00176                 \textcolor{keywordflow}{if} (ints \& \mbox{\hyperlink{ah_8h_ad57fc46d3ae4be3419a41bc4816a8512a6c95a24a5fbce8af1cc5b8e3c2b0296d}{HAL\_INT\_CABEND}})}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00177}00177                         mask2 |= \mbox{\hyperlink{ar5212reg_8h_ada9f8fa40c394817099fdd785ada6c83}{AR\_IMR\_S2\_CABEND}};}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00178}00178                 \textcolor{keywordflow}{if} (ints \& \mbox{\hyperlink{ah_8h_ad57fc46d3ae4be3419a41bc4816a8512a605bcc3d3ff6ec93118ce31a9c3f24a0}{HAL\_INT\_TBTT}})}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00179}00179                         mask2 |= \mbox{\hyperlink{ar5212reg_8h_a993fb261d1eab5edef10d18dc20f3f67}{AR\_IMR\_S2\_TBTT}};}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00180}00180         \}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00181}00181         \textcolor{keywordflow}{if} (ints \& \mbox{\hyperlink{ah_8h_ad57fc46d3ae4be3419a41bc4816a8512a40399fdd756de3999bce8ec7646e8f90}{HAL\_INT\_FATAL}}) \{}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00182}00182                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00183}00183 \textcolor{comment}{                 * NB: ar5212Reset sets MCABT+SSERR+DPERR in AR\_IMR\_S2}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00184}00184 \textcolor{comment}{                 *     so enabling HIUERR enables delivery.}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00185}00185 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00186}00186                 mask |= \mbox{\hyperlink{ar5211reg_8h_a8f7e17b7a6cf2a13f1ccc1f3c46359db}{AR\_IMR\_HIUERR}};}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00187}00187         \}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00188}00188 }
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00189}00189         \textcolor{comment}{/* Write the new IMR and store off our SW copy. */}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00190}00190         \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9eaee40ece38eb59c2a06f4a563dd15f669}{HAL\_DEBUG\_INTERRUPT}}, \textcolor{stringliteral}{"{}\%s: new IMR 0x\%x\(\backslash\)n"{}}, \_\_func\_\_, mask);}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00191}00191         \mbox{\hyperlink{ah__osdep_8h_a8e19d34bdc4596d48a978fc59e1b60fb}{OS\_REG\_WRITE}}(ah, \mbox{\hyperlink{ar5210reg_8h_a904d277c98b9f08a1aba1240dddfe135}{AR\_IMR}}, mask);}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00192}00192         \mbox{\hyperlink{ah__osdep_8h_a8e19d34bdc4596d48a978fc59e1b60fb}{OS\_REG\_WRITE}}(ah, \mbox{\hyperlink{ar5211reg_8h_a5432445835791619b0311984d0e342f9}{AR\_IMR\_S2}},}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00193}00193             (\mbox{\hyperlink{ah__osdep_8h_afded631196d59ba3443fc37addc9a2a6}{OS\_REG\_READ}}(ah, \mbox{\hyperlink{ar5211reg_8h_a5432445835791619b0311984d0e342f9}{AR\_IMR\_S2}}) \&\string~ \mbox{\hyperlink{ar5212reg_8h_a340996789bdd533d58edf09887667eb1}{AR\_IMR\_SR2\_BCNMISC}}) | mask2);}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00194}00194         ahp-\/>\mbox{\hyperlink{structath__hal__5212_a503ffe881a583f89c2af304e0ae05660}{ah\_maskReg}} = ints;}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00195}00195 }
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00196}00196         \textcolor{comment}{/* Re-\/enable interrupts if they were enabled before. */}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00197}00197         \textcolor{keywordflow}{if} (ints \& \mbox{\hyperlink{ah_8h_a24e1e02cf3d1c2147caab33049235e6c}{HAL\_INT\_GLOBAL}}) \{}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00198}00198                 \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9eaee40ece38eb59c2a06f4a563dd15f669}{HAL\_DEBUG\_INTERRUPT}}, \textcolor{stringliteral}{"{}\%s: enable IER\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00199}00199                 \mbox{\hyperlink{ah__osdep_8h_a8e19d34bdc4596d48a978fc59e1b60fb}{OS\_REG\_WRITE}}(ah, \mbox{\hyperlink{ar5210reg_8h_af2ed97a1cd2af56bdbaad967855d6985}{AR\_IER}}, \mbox{\hyperlink{ar5210reg_8h_a4bbcfe51485775892a2e711eea082af3}{AR\_IER\_ENABLE}});}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00200}00200         \}}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00201}00201         \textcolor{keywordflow}{return} omask;}
\DoxyCodeLine{\Hypertarget{ar5212__interrupts_8c_source_l00202}00202 \}}

\end{DoxyCode}
