\hypertarget{ar5210__recv_8c_source}{}\doxysection{ar5210\+\_\+recv.\+c}
\label{ar5210__recv_8c_source}\index{dev/ath/ath\_hal/ar5210/ar5210\_recv.c@{dev/ath/ath\_hal/ar5210/ar5210\_recv.c}}
\mbox{\hyperlink{ar5210__recv_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: ISC}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2002-\/2008 Sam Leffler, Errno Consulting}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00005}00005 \textcolor{comment}{ * Copyright (c) 2002-\/2004 Atheros Communications, Inc.}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00007}00007 \textcolor{comment}{ * Permission to use, copy, modify, and/or distribute this software for any}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00008}00008 \textcolor{comment}{ * purpose with or without fee is hereby granted, provided that the above}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00009}00009 \textcolor{comment}{ * copyright notice and this permission notice appear in all copies.}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00010}00010 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00011}00011 \textcolor{comment}{ * THE SOFTWARE IS PROVIDED "{}AS IS"{} AND THE AUTHOR DISCLAIMS ALL WARRANTIES}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00012}00012 \textcolor{comment}{ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00013}00013 \textcolor{comment}{ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00014}00014 \textcolor{comment}{ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00015}00015 \textcolor{comment}{ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00016}00016 \textcolor{comment}{ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00017}00017 \textcolor{comment}{ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00018}00018 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00019}00019 \textcolor{comment}{ * \$FreeBSD\$}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00020}00020 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00021}00021 \textcolor{preprocessor}{\#include "{}opt\_ah.h"{}}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00022}00022 }
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00023}00023 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{ah_8h}{ah.h}}"{}}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00024}00024 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{ah__internal_8h}{ah\_internal.h}}"{}}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00025}00025 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{ah__desc_8h}{ah\_desc.h}}"{}}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00026}00026 }
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00027}00027 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{ar5210_8h}{ar5210/ar5210.h}}"{}}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00028}00028 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{ar5210reg_8h}{ar5210/ar5210reg.h}}"{}}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00029}00029 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{ar5210desc_8h}{ar5210/ar5210desc.h}}"{}}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00030}00030 }
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00031}00031 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00032}00032 \textcolor{comment}{ * Get the RXDP.}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00033}00033 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00034}00034 uint32\_t}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00035}\mbox{\hyperlink{ar5210_8h_adf0afd28a24cb83c9639372dd9eef8f9}{00035}} \mbox{\hyperlink{ar5210__recv_8c_aa965dcc9c72da9a102238c46e5a4b7c7}{ar5210GetRxDP}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, \mbox{\hyperlink{ah_8h_a405d6652f03ac935415afef8ae4ba1d2}{HAL\_RX\_QUEUE}} qtype)}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00036}00036 \{}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00037}00037 }
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00038}00038         \mbox{\hyperlink{ah__internal_8h_abb8bdaf7438fdc315b333ab07ed68c9c}{HALASSERT}}(qtype == \mbox{\hyperlink{ah_8h_a405d6652f03ac935415afef8ae4ba1d2afaf5595df9fbc063e7b9278c11859890}{HAL\_RX\_QUEUE\_HP}});}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00039}00039         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah__osdep_8h_afded631196d59ba3443fc37addc9a2a6}{OS\_REG\_READ}}(ah, \mbox{\hyperlink{ar5210reg_8h_a6b3262c8e9489c98e1776289f6baf9ec}{AR\_RXDP}});}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00040}00040 \}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00041}00041 }
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00042}00042 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00043}00043 \textcolor{comment}{ * Set the RxDP.}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00044}00044 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00045}00045 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00046}\mbox{\hyperlink{ar5210_8h_afd3b8de81752d216e13cd0f9a1710955}{00046}} \mbox{\hyperlink{ar5210__recv_8c_a5883f1b96cc185840b0e41e36086aa01}{ar5210SetRxDP}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, uint32\_t rxdp, \mbox{\hyperlink{ah_8h_a405d6652f03ac935415afef8ae4ba1d2}{HAL\_RX\_QUEUE}} qtype)}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00047}00047 \{}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00048}00048 }
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00049}00049         \mbox{\hyperlink{ah__internal_8h_abb8bdaf7438fdc315b333ab07ed68c9c}{HALASSERT}}(qtype == \mbox{\hyperlink{ah_8h_a405d6652f03ac935415afef8ae4ba1d2afaf5595df9fbc063e7b9278c11859890}{HAL\_RX\_QUEUE\_HP}});}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00050}00050         \mbox{\hyperlink{ah__osdep_8h_a8e19d34bdc4596d48a978fc59e1b60fb}{OS\_REG\_WRITE}}(ah, \mbox{\hyperlink{ar5210reg_8h_a6b3262c8e9489c98e1776289f6baf9ec}{AR\_RXDP}}, rxdp);}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00051}00051 \}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00052}00052 }
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00053}00053 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00054}00054 \textcolor{comment}{ * Set Receive Enable bits.}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00055}00055 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00056}00056 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00057}\mbox{\hyperlink{ar5210_8h_a1132c84ba39f51dd35ed31756b720d7c}{00057}} \mbox{\hyperlink{ar5210__recv_8c_abef858954823dbdb64a87f190c4ea943}{ar5210EnableReceive}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah)}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00058}00058 \{}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00059}00059         \mbox{\hyperlink{ah__osdep_8h_a8e19d34bdc4596d48a978fc59e1b60fb}{OS\_REG\_WRITE}}(ah, \mbox{\hyperlink{ar5210reg_8h_ab204112f9d7af5649251541824456ef4}{AR\_CR}}, \mbox{\hyperlink{ar5210reg_8h_ae6de81cbe669216e2b1c37e5df810684}{AR\_CR\_RXE}});}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00060}00060 \}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00061}00061 }
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00062}00062 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00063}00063 \textcolor{comment}{ * Stop Receive at the DMA engine}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00064}00064 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00065}00065 \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39a}{HAL\_BOOL}}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00066}\mbox{\hyperlink{ar5210_8h_a584823f5bda8d0e8554344c74da6c707}{00066}} \mbox{\hyperlink{ar5210__recv_8c_ac8ffb25d521fe2a611bf3761b9e9bcc0}{ar5210StopDmaReceive}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah)}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00067}00067 \{}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00068}00068         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00069}00069 }
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00070}00070         \mbox{\hyperlink{ah__osdep_8h_a8e19d34bdc4596d48a978fc59e1b60fb}{OS\_REG\_WRITE}}(ah, \mbox{\hyperlink{ar5210reg_8h_ab204112f9d7af5649251541824456ef4}{AR\_CR}}, \mbox{\hyperlink{ar5210reg_8h_a8ada8f16b4535a817736ff15964a4964}{AR\_CR\_RXD}});   \textcolor{comment}{/* Set receive disable bit */}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00071}00071         \textcolor{keywordflow}{for} (i = 0; i < 1000; i++) \{}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00072}00072                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{ah__osdep_8h_afded631196d59ba3443fc37addc9a2a6}{OS\_REG\_READ}}(ah, \mbox{\hyperlink{ar5210reg_8h_ab204112f9d7af5649251541824456ef4}{AR\_CR}}) \& \mbox{\hyperlink{ar5210reg_8h_ae6de81cbe669216e2b1c37e5df810684}{AR\_CR\_RXE}}) == 0)}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00073}00073                         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aadc898cbb91e577b40c005576c51e8fdb}{AH\_TRUE}};}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00074}00074                 \mbox{\hyperlink{ah__osdep_8h_a34b88156c4561e13f775e8b9cd9a5374}{OS\_DELAY}}(10);}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00075}00075         \}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00076}00076 \textcolor{preprocessor}{\#ifdef AH\_DEBUG}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00077}00077         \mbox{\hyperlink{ah__osdep_8c_ab05b380aa2dabe9a6f6f1c13c6a482cf}{ath\_hal\_printf}}(ah, \textcolor{stringliteral}{"{}ar5210: dma receive failed to stop in 10ms\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00078}00078         \mbox{\hyperlink{ah__osdep_8c_ab05b380aa2dabe9a6f6f1c13c6a482cf}{ath\_hal\_printf}}(ah, \textcolor{stringliteral}{"{}AR\_CR=0x\%x\(\backslash\)n"{}}, \mbox{\hyperlink{ah__osdep_8h_afded631196d59ba3443fc37addc9a2a6}{OS\_REG\_READ}}(ah, \mbox{\hyperlink{ar5210reg_8h_ab204112f9d7af5649251541824456ef4}{AR\_CR}}));}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00079}00079         \mbox{\hyperlink{ah__osdep_8c_ab05b380aa2dabe9a6f6f1c13c6a482cf}{ath\_hal\_printf}}(ah, \textcolor{stringliteral}{"{}AR\_DIAG\_SW=0x\%x\(\backslash\)n"{}}, \mbox{\hyperlink{ah__osdep_8h_afded631196d59ba3443fc37addc9a2a6}{OS\_REG\_READ}}(ah, \mbox{\hyperlink{ar5210reg_8h_aef907b410f065ff5672fc24bfe844d3e}{AR\_DIAG\_SW}}));}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00080}00080 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00081}00081         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aa46085f3e46cbceb46c46b0bde64a6c20}{AH\_FALSE}};}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00082}00082 \}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00083}00083 }
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00084}00084 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00085}00085 \textcolor{comment}{ * Start Transmit at the PCU engine (unpause receive)}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00086}00086 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00087}00087 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00088}\mbox{\hyperlink{ar5210_8h_a03428173fdfb97d3fba17c05303728ee}{00088}} \mbox{\hyperlink{ar5210__recv_8c_a2fa6e9a028471be8852e36d7c78d8f8c}{ar5210StartPcuReceive}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39a}{HAL\_BOOL}} is\_scanning)}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00089}00089 \{}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00090}00090         \mbox{\hyperlink{ar5210_8h_a4554e243a7cf2663f4e20585e1ce49ca}{ar5210UpdateDiagReg}}(ah,}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00091}00091                 \mbox{\hyperlink{ah__osdep_8h_afded631196d59ba3443fc37addc9a2a6}{OS\_REG\_READ}}(ah, \mbox{\hyperlink{ar5210reg_8h_aef907b410f065ff5672fc24bfe844d3e}{AR\_DIAG\_SW}}) \& \string~(\mbox{\hyperlink{ar5210reg_8h_a0413220b76c3e4de76269d43f571e7af}{AR\_DIAG\_SW\_DIS\_RX}}));}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00092}00092 \}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00093}00093 }
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00094}00094 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00095}00095 \textcolor{comment}{ * Stop Transmit at the PCU engine (pause receive)}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00096}00096 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00097}00097 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00098}\mbox{\hyperlink{ar5210_8h_a34cd38f7b35ace2953121ecbf250a1c7}{00098}} \mbox{\hyperlink{ar5210__recv_8c_a46d28ff6080cef73b01f3b8fda7bb966}{ar5210StopPcuReceive}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah)}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00099}00099 \{}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00100}00100         \mbox{\hyperlink{ar5210_8h_a4554e243a7cf2663f4e20585e1ce49ca}{ar5210UpdateDiagReg}}(ah,}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00101}00101                 \mbox{\hyperlink{ah__osdep_8h_afded631196d59ba3443fc37addc9a2a6}{OS\_REG\_READ}}(ah, \mbox{\hyperlink{ar5210reg_8h_aef907b410f065ff5672fc24bfe844d3e}{AR\_DIAG\_SW}}) | \mbox{\hyperlink{ar5210reg_8h_a0413220b76c3e4de76269d43f571e7af}{AR\_DIAG\_SW\_DIS\_RX}});}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00102}00102 \}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00103}00103 }
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00104}00104 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00105}00105 \textcolor{comment}{ * Set multicast filter 0 (lower 32-\/bits)}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00106}00106 \textcolor{comment}{ *                         filter 1 (upper 32-\/bits)}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00107}00107 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00108}00108 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00109}\mbox{\hyperlink{ar5210_8h_ab57c60450870d8833894c32680ee97dd}{00109}} \mbox{\hyperlink{ar5210__recv_8c_aeb87f9f20159829c9d3f025c4532fecf}{ar5210SetMulticastFilter}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, uint32\_t filter0, uint32\_t filter1)}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00110}00110 \{}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00111}00111         \mbox{\hyperlink{ah__osdep_8h_a8e19d34bdc4596d48a978fc59e1b60fb}{OS\_REG\_WRITE}}(ah, \mbox{\hyperlink{ar5210reg_8h_aeb9878ba942370d9bf43c12ec80d2f08}{AR\_MCAST\_FIL0}}, filter0);}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00112}00112         \mbox{\hyperlink{ah__osdep_8h_a8e19d34bdc4596d48a978fc59e1b60fb}{OS\_REG\_WRITE}}(ah, \mbox{\hyperlink{ar5210reg_8h_a2820abaf1671e5e3f09739e3812107a4}{AR\_MCAST\_FIL1}}, filter1);}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00113}00113 \}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00114}00114 }
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00115}00115 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00116}00116 \textcolor{comment}{ * Clear multicast filter by index}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00117}00117 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00118}00118 \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39a}{HAL\_BOOL}}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00119}\mbox{\hyperlink{ar5210_8h_ad036e63ec7c73b243c20ea07e9766b52}{00119}} \mbox{\hyperlink{ar5210__recv_8c_a5b65aea41b2f75d9b057a04eff878dab}{ar5210ClrMulticastFilterIndex}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, uint32\_t ix)}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00120}00120 \{}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00121}00121         uint32\_t val;}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00122}00122 }
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00123}00123         \textcolor{keywordflow}{if} (ix >= 64)}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00124}00124                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aa46085f3e46cbceb46c46b0bde64a6c20}{AH\_FALSE}};}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00125}00125         \textcolor{keywordflow}{if} (ix >= 32) \{}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00126}00126                 val = \mbox{\hyperlink{ah__osdep_8h_afded631196d59ba3443fc37addc9a2a6}{OS\_REG\_READ}}(ah, \mbox{\hyperlink{ar5210reg_8h_a2820abaf1671e5e3f09739e3812107a4}{AR\_MCAST\_FIL1}});}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00127}00127                 \mbox{\hyperlink{ah__osdep_8h_a8e19d34bdc4596d48a978fc59e1b60fb}{OS\_REG\_WRITE}}(ah, \mbox{\hyperlink{ar5210reg_8h_a2820abaf1671e5e3f09739e3812107a4}{AR\_MCAST\_FIL1}}, (val \&\string~ (1<<(ix-\/32))));}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00128}00128         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00129}00129                 val = \mbox{\hyperlink{ah__osdep_8h_afded631196d59ba3443fc37addc9a2a6}{OS\_REG\_READ}}(ah, \mbox{\hyperlink{ar5210reg_8h_aeb9878ba942370d9bf43c12ec80d2f08}{AR\_MCAST\_FIL0}});}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00130}00130                 \mbox{\hyperlink{ah__osdep_8h_a8e19d34bdc4596d48a978fc59e1b60fb}{OS\_REG\_WRITE}}(ah, \mbox{\hyperlink{ar5210reg_8h_aeb9878ba942370d9bf43c12ec80d2f08}{AR\_MCAST\_FIL0}}, (val \&\string~ (1<<ix)));}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00131}00131         \}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00132}00132         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aadc898cbb91e577b40c005576c51e8fdb}{AH\_TRUE}};}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00133}00133 \}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00134}00134 }
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00135}00135 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00136}00136 \textcolor{comment}{ * Set multicast filter by index}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00137}00137 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00138}00138 \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39a}{HAL\_BOOL}}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00139}\mbox{\hyperlink{ar5210_8h_a3c0b32945dce914340fa70d511744d4a}{00139}} \mbox{\hyperlink{ar5210__recv_8c_a3b1738aa963dfebf0eae1f0e3bb54409}{ar5210SetMulticastFilterIndex}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, uint32\_t ix)}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00140}00140 \{}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00141}00141         uint32\_t val;}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00142}00142 }
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00143}00143         \textcolor{keywordflow}{if} (ix >= 64)}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00144}00144                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aa46085f3e46cbceb46c46b0bde64a6c20}{AH\_FALSE}};}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00145}00145         \textcolor{keywordflow}{if} (ix >= 32) \{}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00146}00146                 val = \mbox{\hyperlink{ah__osdep_8h_afded631196d59ba3443fc37addc9a2a6}{OS\_REG\_READ}}(ah, \mbox{\hyperlink{ar5210reg_8h_a2820abaf1671e5e3f09739e3812107a4}{AR\_MCAST\_FIL1}});}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00147}00147                 \mbox{\hyperlink{ah__osdep_8h_a8e19d34bdc4596d48a978fc59e1b60fb}{OS\_REG\_WRITE}}(ah, \mbox{\hyperlink{ar5210reg_8h_a2820abaf1671e5e3f09739e3812107a4}{AR\_MCAST\_FIL1}}, (val | (1<<(ix-\/32))));}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00148}00148         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00149}00149                 val = \mbox{\hyperlink{ah__osdep_8h_afded631196d59ba3443fc37addc9a2a6}{OS\_REG\_READ}}(ah, \mbox{\hyperlink{ar5210reg_8h_aeb9878ba942370d9bf43c12ec80d2f08}{AR\_MCAST\_FIL0}});}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00150}00150                 \mbox{\hyperlink{ah__osdep_8h_a8e19d34bdc4596d48a978fc59e1b60fb}{OS\_REG\_WRITE}}(ah, \mbox{\hyperlink{ar5210reg_8h_aeb9878ba942370d9bf43c12ec80d2f08}{AR\_MCAST\_FIL0}}, (val | (1<<ix)));}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00151}00151         \}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00152}00152         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aadc898cbb91e577b40c005576c51e8fdb}{AH\_TRUE}};}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00153}00153 \}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00154}00154 }
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00155}00155 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00156}00156 \textcolor{comment}{ * Return the receive packet filter.}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00157}00157 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00158}00158 uint32\_t}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00159}\mbox{\hyperlink{ar5210_8h_adefebc6405090c1f27bab90eadbf9a26}{00159}} \mbox{\hyperlink{ar5210__recv_8c_a14d2c134340e9ff7e7ceb12bc113b3ff}{ar5210GetRxFilter}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah)}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00160}00160 \{}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00161}00161         \textcolor{comment}{/* XXX can't be sure if promiscuous mode is set because of PHYRADAR */}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00162}00162         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah__osdep_8h_afded631196d59ba3443fc37addc9a2a6}{OS\_REG\_READ}}(ah, \mbox{\hyperlink{ar5210reg_8h_acb591449702118ede9077f9c517c920e}{AR\_RX\_FILTER}});}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00163}00163 \}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00164}00164 }
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00165}00165 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00166}00166 \textcolor{comment}{ * Turn off/on bits in the receive packet filter.}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00167}00167 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00168}00168 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00169}\mbox{\hyperlink{ar5210_8h_a8b63b0ac6bb363f9dee52e5e3998d0c4}{00169}} \mbox{\hyperlink{ar5210__recv_8c_a16d96ad0fe212344bb4ab272989e1899}{ar5210SetRxFilter}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, uint32\_t bits)}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00170}00170 \{}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00171}00171         \textcolor{keywordflow}{if} (bits \& \mbox{\hyperlink{ah_8h_a3b7aa67bbd6f7194585c41cb1c2015e9a6dac81e56f7914a74867fb03962c70c2}{HAL\_RX\_FILTER\_PHYRADAR}}) \{}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00172}00172                 \textcolor{comment}{/* must enable promiscuous mode to get radar */}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00173}00173                 bits = (bits \&\string~ HAL\_RX\_FILTER\_PHYRADAR) | \mbox{\hyperlink{ar5210reg_8h_a6a5dfa65f2ece8670e4a0f9fac82af5f}{AR\_RX\_FILTER\_PROMISCUOUS}};}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00174}00174         \}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00175}00175         \mbox{\hyperlink{ah__osdep_8h_a8e19d34bdc4596d48a978fc59e1b60fb}{OS\_REG\_WRITE}}(ah, \mbox{\hyperlink{ar5210reg_8h_acb591449702118ede9077f9c517c920e}{AR\_RX\_FILTER}}, bits);}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00176}00176 \}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00177}00177 }
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00178}00178 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00179}00179 \textcolor{comment}{ * Initialize RX descriptor, by clearing the status and clearing}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00180}00180 \textcolor{comment}{ * the size.  This is not strictly HW dependent, but we want the}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00181}00181 \textcolor{comment}{ * control and status words to be opaque above the hal.}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00182}00182 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00183}00183 \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39a}{HAL\_BOOL}}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00184}\mbox{\hyperlink{ar5210_8h_a2dad277449a5fa01dbfad53a1062a2d4}{00184}} \mbox{\hyperlink{ar5210__recv_8c_ab779a8fd3fb3f3dcabff7cb9a5627ff6}{ar5210SetupRxDesc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, \textcolor{keyword}{struct} \mbox{\hyperlink{structath__desc}{ath\_desc}} *ds,}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00185}00185         uint32\_t size, u\_int flags)}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00186}00186 \{}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00187}00187         \textcolor{keyword}{struct }\mbox{\hyperlink{structar5210__desc}{ar5210\_desc}} *ads = \mbox{\hyperlink{ar5210desc_8h_a9d07e30205c15abcd12baba1eb4a6be5}{AR5210DESC}}(ds);}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00188}00188 }
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00189}00189         (void) flags;}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00190}00190 }
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00191}00191         ads-\/>\mbox{\hyperlink{structar5210__desc_a559682d19eef2ac84aadb4ff30c75fd7}{ds\_ctl0}} = 0;}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00192}00192         ads-\/>\mbox{\hyperlink{structar5210__desc_af946725ef7f1c3b36f27f731a8385873}{ds\_ctl1}} = size \& \mbox{\hyperlink{ar5210desc_8h_ad3f825beb822a9f687dc738d688e2f16}{AR\_BufLen}};}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00193}00193         \textcolor{keywordflow}{if} (ads-\/>\mbox{\hyperlink{structar5210__desc_af946725ef7f1c3b36f27f731a8385873}{ds\_ctl1}} != size) \{}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00194}00194                 \mbox{\hyperlink{ah__internal_8h_ac09ac07206a85dc5f4079553a0520c4e}{HALDEBUG}}(ah, \mbox{\hyperlink{ah__debug_8h_a61dadd085c1777f559549e05962b2c9ea35506ea938627da4c44204d0895d0bf8}{HAL\_DEBUG\_ANY}}, \textcolor{stringliteral}{"{}\%s: buffer size \%u too large\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00195}00195                     \_\_func\_\_, size);}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00196}00196                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aa46085f3e46cbceb46c46b0bde64a6c20}{AH\_FALSE}};}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00197}00197         \}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00198}00198         \textcolor{keywordflow}{if} (flags \& \mbox{\hyperlink{ah__desc_8h_a2ab7a172ff99c18481c4eea23117a5d2}{HAL\_RXDESC\_INTREQ}})}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00199}00199                 ads-\/>\mbox{\hyperlink{structar5210__desc_af946725ef7f1c3b36f27f731a8385873}{ds\_ctl1}} |= \mbox{\hyperlink{ar5210desc_8h_a9cc452cdc3880673596ebe082af527b9}{AR\_RxInterReq}};}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00200}00200         ads-\/>\mbox{\hyperlink{structar5210__desc_a38fac2c1778444798678b79a9f72dd76}{ds\_status0}} = ads-\/>\mbox{\hyperlink{structar5210__desc_a325a7c90d956b6802b6a3d79391daa02}{ds\_status1}} = 0;}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00201}00201 }
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00202}00202         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_ae8793e83d29537653565625006f5c39aadc898cbb91e577b40c005576c51e8fdb}{AH\_TRUE}};}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00203}00203 \}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00204}00204 }
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00205}00205 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00206}00206 \textcolor{comment}{ * Process an RX descriptor, and return the status to the caller.}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00207}00207 \textcolor{comment}{ * Copy some hardware specific items into the software portion}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00208}00208 \textcolor{comment}{ * of the descriptor.}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00209}00209 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00210}00210 \textcolor{comment}{ * NB: the caller is responsible for validating the memory contents}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00211}00211 \textcolor{comment}{ *     of the descriptor (e.g. flushing any cached copy).}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00212}00212 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00213}00213 \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0}{HAL\_STATUS}}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00214}\mbox{\hyperlink{ar5210_8h_a3d55521a32b7aec43b7a31dc6e64cc88}{00214}} \mbox{\hyperlink{ar5210__recv_8c_a5f7b46e3ac0cc26871cbd145508e57d2}{ar5210ProcRxDesc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__hal}{ath\_hal}} *ah, \textcolor{keyword}{struct} \mbox{\hyperlink{structath__desc}{ath\_desc}} *ds,}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00215}00215         uint32\_t pa, \textcolor{keyword}{struct} \mbox{\hyperlink{structath__desc}{ath\_desc}} *nds, uint64\_t tsf,}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00216}00216         \textcolor{keyword}{struct} \mbox{\hyperlink{structath__rx__status}{ath\_rx\_status}} *rs)}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00217}00217 \{}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00218}00218         \textcolor{keyword}{struct }\mbox{\hyperlink{structar5210__desc}{ar5210\_desc}} *ads = \mbox{\hyperlink{ar5210desc_8h_a9d07e30205c15abcd12baba1eb4a6be5}{AR5210DESC}}(ds);}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00219}00219         \textcolor{keyword}{struct }\mbox{\hyperlink{structar5210__desc}{ar5210\_desc}} *ands = \mbox{\hyperlink{ar5210desc_8h_a9d07e30205c15abcd12baba1eb4a6be5}{AR5210DESC}}(nds);}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00220}00220         uint32\_t now, rstamp;}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00221}00221 }
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00222}00222         \textcolor{keywordflow}{if} ((ads-\/>\mbox{\hyperlink{structar5210__desc_a325a7c90d956b6802b6a3d79391daa02}{ds\_status1}} \& \mbox{\hyperlink{ar5210desc_8h_ab1a00f9999ec2a58392a8f45c7662ce9}{AR\_Done}}) == 0)}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00223}00223                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0acaa7335a11773abac3db0afec8188f6d}{HAL\_EINPROGRESS}};}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00224}00224         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00225}00225 \textcolor{comment}{         * Given the use of a self-\/linked tail be very sure that the hw is}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00226}00226 \textcolor{comment}{         * done with this descriptor; the hw may have done this descriptor}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00227}00227 \textcolor{comment}{         * once and picked it up again...make sure the hw has moved on.}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00228}00228 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00229}00229         \textcolor{keywordflow}{if} ((ands-\/>\mbox{\hyperlink{structar5210__desc_a325a7c90d956b6802b6a3d79391daa02}{ds\_status1}} \& \mbox{\hyperlink{ar5210desc_8h_ab1a00f9999ec2a58392a8f45c7662ce9}{AR\_Done}}) == 0 \&\& \mbox{\hyperlink{ah__osdep_8h_afded631196d59ba3443fc37addc9a2a6}{OS\_REG\_READ}}(ah, \mbox{\hyperlink{ar5210reg_8h_a6b3262c8e9489c98e1776289f6baf9ec}{AR\_RXDP}}) == pa)}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00230}00230                 \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0acaa7335a11773abac3db0afec8188f6d}{HAL\_EINPROGRESS}};}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00231}00231 }
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00232}00232         rs-\/>\mbox{\hyperlink{structath__rx__status_a146d6004dd68f6c1c8af26f5b5d228ce}{rs\_datalen}} = ads-\/>\mbox{\hyperlink{structar5210__desc_a38fac2c1778444798678b79a9f72dd76}{ds\_status0}} \& \mbox{\hyperlink{ar5210desc_8h_aa56d48696c9a212dff7c5f8c365b3d04}{AR\_DataLen}};}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00233}00233         rstamp = \mbox{\hyperlink{ah__internal_8h_a3cb92725e12650d7447b06c9db39aac9}{MS}}(ads-\/>\mbox{\hyperlink{structar5210__desc_a325a7c90d956b6802b6a3d79391daa02}{ds\_status1}}, \mbox{\hyperlink{ar5210desc_8h_ab2a9806fee4d2aaf72976b64ac071e08}{AR\_RcvTimestamp}});}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00234}00234         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00235}00235 \textcolor{comment}{         * Convert timestamp.  The value in the}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00236}00236 \textcolor{comment}{         * descriptor is bits [10..22] of the TSF.}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00237}00237 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00238}00238         now = (\mbox{\hyperlink{ah__osdep_8h_afded631196d59ba3443fc37addc9a2a6}{OS\_REG\_READ}}(ah, \mbox{\hyperlink{ar5210reg_8h_ac9219f86e27e5067ee61ae3b9be36bb0}{AR\_TSF\_L32}}) >> 10) \& 0xffff;}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00239}00239         \textcolor{keywordflow}{if} ((now \& 0x1fff) < rstamp)}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00240}00240                 rstamp |= (now -\/ 0x2000) \& 0xffff;}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00241}00241         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00242}00242                 rstamp |= now;}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00243}00243         \textcolor{comment}{/* NB: keep only 15 bits for consistency w/ other chips */}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00244}00244         rs-\/>\mbox{\hyperlink{structath__rx__status_af39c5db1c2d4c113e59892eaaaaf271a}{rs\_tstamp}} = rstamp \& 0x7fff;}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00245}00245         rs-\/>\mbox{\hyperlink{structath__rx__status_a12863a706c180b0b20d0176f894f9b9a}{rs\_status}} = 0;}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00246}00246         \textcolor{keywordflow}{if} ((ads-\/>\mbox{\hyperlink{structar5210__desc_a325a7c90d956b6802b6a3d79391daa02}{ds\_status1}} \& \mbox{\hyperlink{ar5210desc_8h_a8ae4f3b5a72c2105837c5951aed29e98}{AR\_FrmRcvOK}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00247}00247                 \textcolor{keywordflow}{if} (ads-\/>\mbox{\hyperlink{structar5210__desc_a325a7c90d956b6802b6a3d79391daa02}{ds\_status1}} \& \mbox{\hyperlink{ar5210desc_8h_a74b7a54bdfd803779e68f0e8ba0dad4e}{AR\_CRCErr}})}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00248}00248                         rs-\/>\mbox{\hyperlink{structath__rx__status_a12863a706c180b0b20d0176f894f9b9a}{rs\_status}} |= \mbox{\hyperlink{ah__desc_8h_aa7b2e733838278062fb7a6b471b73465}{HAL\_RXERR\_CRC}};}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00249}00249                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (ads-\/>\mbox{\hyperlink{structar5210__desc_a325a7c90d956b6802b6a3d79391daa02}{ds\_status1}} \& \mbox{\hyperlink{ar5210desc_8h_a935800333ce5f654e393377304ba6a1d}{AR\_DecryptCRCErr}})}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00250}00250                         rs-\/>\mbox{\hyperlink{structath__rx__status_a12863a706c180b0b20d0176f894f9b9a}{rs\_status}} |= \mbox{\hyperlink{ah__desc_8h_a55ee611321ff219fcd4738afd9082931}{HAL\_RXERR\_DECRYPT}};}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00251}00251                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (ads-\/>\mbox{\hyperlink{structar5210__desc_a325a7c90d956b6802b6a3d79391daa02}{ds\_status1}} \& \mbox{\hyperlink{ar5210desc_8h_a895275966ba818e376e90da09b89388e}{AR\_FIFOOverrun}})}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00252}00252                         rs-\/>\mbox{\hyperlink{structath__rx__status_a12863a706c180b0b20d0176f894f9b9a}{rs\_status}} |= \mbox{\hyperlink{ah__desc_8h_a28a2d3a8f401bbf49ad086895e0e15dd}{HAL\_RXERR\_FIFO}};}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00253}00253                 \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00254}00254                         rs-\/>\mbox{\hyperlink{structath__rx__status_a12863a706c180b0b20d0176f894f9b9a}{rs\_status}} |= \mbox{\hyperlink{ah__desc_8h_a712727abbad9266e603a2736a59309d7}{HAL\_RXERR\_PHY}};}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00255}00255                         rs-\/>\mbox{\hyperlink{structath__rx__status_a67d1f8972e40212d045d8cdb8b82aacc}{rs\_phyerr}} =}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00256}00256                                 (ads-\/>\mbox{\hyperlink{structar5210__desc_a325a7c90d956b6802b6a3d79391daa02}{ds\_status1}} \& \mbox{\hyperlink{ar5210desc_8h_a2e3a76b2ef6b83b2e72ca7edec9e8ec3}{AR\_PHYErr}}) >> \mbox{\hyperlink{ar5210desc_8h_a72ea6a26da78dce39571e7c6d6e0a59f}{AR\_PHYErr\_S}};}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00257}00257                 \}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00258}00258         \}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00259}00259         \textcolor{comment}{/* XXX what about KeyCacheMiss? */}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00260}00260         rs-\/>\mbox{\hyperlink{structath__rx__status_adede3d7e91231ab3ff926c7c19120327}{rs\_rssi}} = \mbox{\hyperlink{ah__internal_8h_a3cb92725e12650d7447b06c9db39aac9}{MS}}(ads-\/>\mbox{\hyperlink{structar5210__desc_a38fac2c1778444798678b79a9f72dd76}{ds\_status0}}, \mbox{\hyperlink{ar5210desc_8h_abf3b3037d023a49d1dfef3d80ef32e92}{AR\_RcvSigStrength}});}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00261}00261         \textcolor{keywordflow}{if} (ads-\/>\mbox{\hyperlink{structar5210__desc_a325a7c90d956b6802b6a3d79391daa02}{ds\_status1}} \& \mbox{\hyperlink{ar5210desc_8h_a108bcabf60c892a83478d69dbd0baf10}{AR\_KeyIdxValid}})}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00262}00262                 rs-\/>\mbox{\hyperlink{structath__rx__status_a0efb344403ef53e8676321fe5da43af5}{rs\_keyix}} = \mbox{\hyperlink{ah__internal_8h_a3cb92725e12650d7447b06c9db39aac9}{MS}}(ads-\/>\mbox{\hyperlink{structar5210__desc_a325a7c90d956b6802b6a3d79391daa02}{ds\_status1}}, \mbox{\hyperlink{ar5210desc_8h_a0eb2e2b38479c0e794c1e36b5dde9151}{AR\_KeyIdx}});}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00263}00263         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00264}00264                 rs-\/>\mbox{\hyperlink{structath__rx__status_a0efb344403ef53e8676321fe5da43af5}{rs\_keyix}} = \mbox{\hyperlink{ah__desc_8h_a8040ae43fa273c4cf3f4ac892aa5c39c}{HAL\_RXKEYIX\_INVALID}};}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00265}00265         \textcolor{comment}{/* NB: caller expected to do rate table mapping */}}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00266}00266         rs-\/>\mbox{\hyperlink{structath__rx__status_a11b87a9a7361db471c7eace2692aa001}{rs\_rate}} = \mbox{\hyperlink{ah__internal_8h_a3cb92725e12650d7447b06c9db39aac9}{MS}}(ads-\/>\mbox{\hyperlink{structar5210__desc_a38fac2c1778444798678b79a9f72dd76}{ds\_status0}}, \mbox{\hyperlink{ar5210desc_8h_a866ec1b33621ae6f2fdf40f87e5b4c9c}{AR\_RcvRate}});}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00267}00267         rs-\/>\mbox{\hyperlink{structath__rx__status_a7bcbef3e842b8ce95483d2ac96af0f7f}{rs\_antenna}}  = (ads-\/>\mbox{\hyperlink{structar5210__desc_a38fac2c1778444798678b79a9f72dd76}{ds\_status0}} \& \mbox{\hyperlink{ar5210desc_8h_a373b18f77d6573fc2bd6588e7a52a40a}{AR\_RcvAntenna}}) ? 1 : 0;}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00268}00268         rs-\/>\mbox{\hyperlink{structath__rx__status_a631fb77b6c54a8c43693071de942d3a8}{rs\_more}} = (ads-\/>\mbox{\hyperlink{structar5210__desc_a38fac2c1778444798678b79a9f72dd76}{ds\_status0}} \& \mbox{\hyperlink{ar5210desc_8h_ab89bcff4f906b3afdb9fbce47836ce06}{AR\_More}}) ? 1 : 0;}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00269}00269 }
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00270}00270         \textcolor{keywordflow}{return} \mbox{\hyperlink{ah_8h_a064b8990700c1dbc7801f3eb616153b0a6eb724a07061d89a4a2052744e5a3632}{HAL\_OK}};}
\DoxyCodeLine{\Hypertarget{ar5210__recv_8c_source_l00271}00271 \}}

\end{DoxyCode}
