\hypertarget{if__run_8c_source}{}\doxysection{if\+\_\+run.\+c}
\label{if__run_8c_source}\index{dev/usb/wlan/if\_run.c@{dev/usb/wlan/if\_run.c}}
\mbox{\hyperlink{if__run_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00002}00002 \textcolor{comment}{ * Copyright (c) 2008,2010 Damien Bergamini <damien.bergamini@free.fr>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00003}00003 \textcolor{comment}{ * ported to FreeBSD by Akinori Furukoshi <moonlightakkiy@yahoo.ca>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00004}00004 \textcolor{comment}{ * USB Consulting, Hans Petter Selasky <hselasky@freebsd.org>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00005}00005 \textcolor{comment}{ * Copyright (c) 2013-\/2014 Kevin Lo}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00007}00007 \textcolor{comment}{ * Permission to use, copy, modify, and distribute this software for any}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00008}00008 \textcolor{comment}{ * purpose with or without fee is hereby granted, provided that the above}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00009}00009 \textcolor{comment}{ * copyright notice and this permission notice appear in all copies.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00010}00010 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00011}00011 \textcolor{comment}{ * THE SOFTWARE IS PROVIDED "{}AS IS"{} AND THE AUTHOR DISCLAIMS ALL WARRANTIES}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00012}00012 \textcolor{comment}{ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00013}00013 \textcolor{comment}{ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00014}00014 \textcolor{comment}{ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00015}00015 \textcolor{comment}{ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00016}00016 \textcolor{comment}{ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00017}00017 \textcolor{comment}{ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00018}00018 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00019}00019 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00020}00020 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00021}\mbox{\hyperlink{if__run_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00021}} \mbox{\hyperlink{if__run_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00022}00022 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00023}00023 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00024}00024 \textcolor{comment}{ * Ralink Technology RT2700U/RT2800U/RT3000U/RT3900E chipset driver.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00025}00025 \textcolor{comment}{ * http://www.ralinktech.com/}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00026}00026 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00027}00027 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00028}00028 \textcolor{preprocessor}{\#include "{}opt\_wlan.h"{}}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00029}00029 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00030}00030 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00031}00031 \textcolor{preprocessor}{\#include <sys/eventhandler.h>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00032}00032 \textcolor{preprocessor}{\#include <sys/sockio.h>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00033}00033 \textcolor{preprocessor}{\#include <sys/sysctl.h>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00034}00034 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00035}00035 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00036}00036 \textcolor{preprocessor}{\#include <sys/mbuf.h>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00037}00037 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00038}00038 \textcolor{preprocessor}{\#include <sys/socket.h>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00039}00039 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00040}00040 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00041}00041 \textcolor{preprocessor}{\#include <sys/module.h>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00042}00042 \textcolor{preprocessor}{\#include <sys/bus.h>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00043}00043 \textcolor{preprocessor}{\#include <sys/endian.h>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00044}00044 \textcolor{preprocessor}{\#include <sys/linker.h>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00045}00045 \textcolor{preprocessor}{\#include <sys/firmware.h>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00046}00046 \textcolor{preprocessor}{\#include <sys/kdb.h>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00047}00047 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00048}00048 \textcolor{preprocessor}{\#include <net/bpf.h>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00049}00049 \textcolor{preprocessor}{\#include <net/if.h>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00050}00050 \textcolor{preprocessor}{\#include <net/if\_var.h>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00051}00051 \textcolor{preprocessor}{\#include <net/if\_arp.h>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00052}00052 \textcolor{preprocessor}{\#include <net/ethernet.h>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00053}00053 \textcolor{preprocessor}{\#include <net/if\_dl.h>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00054}00054 \textcolor{preprocessor}{\#include <net/if\_media.h>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00055}00055 \textcolor{preprocessor}{\#include <net/if\_types.h>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00056}00056 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00057}00057 \textcolor{preprocessor}{\#include <netinet/in.h>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00058}00058 \textcolor{preprocessor}{\#include <netinet/in\_systm.h>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00059}00059 \textcolor{preprocessor}{\#include <netinet/in\_var.h>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00060}00060 \textcolor{preprocessor}{\#include <netinet/if\_ether.h>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00061}00061 \textcolor{preprocessor}{\#include <netinet/ip.h>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00062}00062 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00063}00063 \textcolor{preprocessor}{\#include <net80211/ieee80211\_var.h>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00064}00064 \textcolor{preprocessor}{\#include <net80211/ieee80211\_regdomain.h>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00065}00065 \textcolor{preprocessor}{\#include <net80211/ieee80211\_radiotap.h>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00066}00066 \textcolor{preprocessor}{\#include <net80211/ieee80211\_ratectl.h>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00067}00067 \textcolor{preprocessor}{\#ifdef  IEEE80211\_SUPPORT\_SUPERG}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00068}00068 \textcolor{preprocessor}{\#include <net80211/ieee80211\_superg.h>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00069}00069 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00070}00070 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00071}00071 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb_8h}{dev/usb/usb.h}}>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00072}00072 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usbdi_8h}{dev/usb/usbdi.h}}>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00073}00073 \textcolor{preprocessor}{\#include "{}usbdevs.h"{}}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00074}00074 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00075}\mbox{\hyperlink{if__run_8c_a927dd6f59caf10a2991dfb564bcbb1e1}{00075}} \textcolor{preprocessor}{\#define USB\_DEBUG\_VAR   run\_debug}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00076}00076 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__debug_8h}{dev/usb/usb\_debug.h}}>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00077}00077 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__msctest_8h}{dev/usb/usb\_msctest.h}}>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00078}00078 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00079}00079 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{if__runreg_8h}{dev/usb/wlan/if\_runreg.h}}>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00080}00080 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{if__runvar_8h}{dev/usb/wlan/if\_runvar.h}}>}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00081}00081 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00082}00082 \textcolor{preprocessor}{\#ifdef  USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00083}00083 \textcolor{preprocessor}{\#define RUN\_DEBUG}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00084}00084 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00085}00085 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00086}00086 \textcolor{preprocessor}{\#ifdef  RUN\_DEBUG}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00087}00087 \textcolor{keywordtype}{int} run\_debug = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00088}00088 \textcolor{keyword}{static} \mbox{\hyperlink{dwc__otg_8c_a58e125bcf985ce2333baef42f97b33b3}{SYSCTL\_NODE}}(\_hw\_usb, OID\_AUTO, run, CTLFLAG\_RW | CTLFLAG\_MPSAFE, 0,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00089}00089     \textcolor{stringliteral}{"{}USB run"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00090}00090 \mbox{\hyperlink{dwc__otg_8c_a83d020f0b15dc2783f3f1a6966c75e36}{SYSCTL\_INT}}(\_hw\_usb\_run, OID\_AUTO, \mbox{\hyperlink{cfumass_8c_ac3e1795766a80ec63b157951b4b9a7d4}{debug}}, CTLFLAG\_RWTUN, \&run\_debug, 0,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00091}00091     \textcolor{stringliteral}{"{}run debug level"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00092}00092 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00093}00093 \textcolor{keyword}{enum} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00094}00094         RUN\_DEBUG\_XMIT          = 0x00000001,   \textcolor{comment}{/* basic xmit operation */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00095}00095         RUN\_DEBUG\_XMIT\_DESC     = 0x00000002,   \textcolor{comment}{/* xmit descriptors */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00096}00096         RUN\_DEBUG\_RECV          = 0x00000004,   \textcolor{comment}{/* basic recv operation */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00097}00097         RUN\_DEBUG\_RECV\_DESC     = 0x00000008,   \textcolor{comment}{/* recv descriptors */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00098}00098         RUN\_DEBUG\_STATE         = 0x00000010,   \textcolor{comment}{/* 802.11 state transitions */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00099}00099         RUN\_DEBUG\_RATE          = 0x00000020,   \textcolor{comment}{/* rate adaptation */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00100}00100         RUN\_DEBUG\_USB           = 0x00000040,   \textcolor{comment}{/* usb requests */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00101}00101         RUN\_DEBUG\_FIRMWARE      = 0x00000080,   \textcolor{comment}{/* firmware(9) loading debug */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00102}00102         RUN\_DEBUG\_BEACON        = 0x00000100,   \textcolor{comment}{/* beacon handling */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00103}00103         RUN\_DEBUG\_INTR          = 0x00000200,   \textcolor{comment}{/* ISR */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00104}00104         RUN\_DEBUG\_TEMP          = 0x00000400,   \textcolor{comment}{/* temperature calibration */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00105}00105         RUN\_DEBUG\_ROM           = 0x00000800,   \textcolor{comment}{/* various ROM info */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00106}00106         RUN\_DEBUG\_KEY           = 0x00001000,   \textcolor{comment}{/* crypto keys management */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00107}00107         RUN\_DEBUG\_TXPWR         = 0x00002000,   \textcolor{comment}{/* dump Tx power values */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00108}00108         RUN\_DEBUG\_RSSI          = 0x00004000,   \textcolor{comment}{/* dump RSSI lookups */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00109}00109         RUN\_DEBUG\_RESET         = 0x00008000,   \textcolor{comment}{/* initialization progress */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00110}00110         RUN\_DEBUG\_CALIB         = 0x00010000,   \textcolor{comment}{/* calibration progress */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00111}00111         RUN\_DEBUG\_CMD           = 0x00020000,   \textcolor{comment}{/* command queue */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00112}00112         RUN\_DEBUG\_ANY           = 0xffffffff}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00113}00113 \};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00114}00114 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00115}00115 \textcolor{preprocessor}{\#define RUN\_DPRINTF(\_sc, \_m, ...) do \{                  \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00116}00116 \textcolor{preprocessor}{        if (run\_debug \& (\_m))                           \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00117}00117 \textcolor{preprocessor}{                device\_printf((\_sc)-\/>sc\_dev, \_\_VA\_ARGS\_\_);      \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00118}00118 \textcolor{preprocessor}{\} while(0)}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00119}00119 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00120}\mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{00120}} \textcolor{preprocessor}{\#define RUN\_DPRINTF(\_sc, \_m, ...)       do \{ (void) \_sc; \} while (0)}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00121}00121 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00122}00122 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00123}\mbox{\hyperlink{if__run_8c_a5a328256811aa2cbbd1158b54e74fd82}{00123}} \textcolor{preprocessor}{\#define IEEE80211\_HAS\_ADDR4(wh) IEEE80211\_IS\_DSTODS(wh)}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00124}00124 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00125}00125 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00126}00126 \textcolor{comment}{ * Because of LOR in run\_key\_delete(), use atomic instead.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00127}00127 \textcolor{comment}{ * '\& RUN\_CMDQ\_MASQ' is to loop cmdq[].}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00128}00128 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00129}\mbox{\hyperlink{if__run_8c_ab51c04f6574bfdc56c82a56b5800c32b}{00129}} \textcolor{preprocessor}{\#define RUN\_CMDQ\_GET(c) (atomic\_fetchadd\_32((c), 1) \& RUN\_CMDQ\_MASQ)}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00130}00130 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00131}\mbox{\hyperlink{if__run_8c_a1e8b89f5453c6c00d9b38ae3523c0c5e}{00131}} \textcolor{keyword}{static} \textcolor{keyword}{const} \mbox{\hyperlink{usbdi_8h_acf836fd8d6349b66a31f45420728da8d}{STRUCT\_USB\_HOST\_ID}} \mbox{\hyperlink{if__run_8c_a1e8b89f5453c6c00d9b38ae3523c0c5e}{run\_devs}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00132}00132 \textcolor{preprocessor}{\#define RUN\_DEV(v,p)    \{ USB\_VP(USB\_VENDOR\_\#\#v, USB\_PRODUCT\_\#\#v\#\#\_\#\#p) \}}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00133}00133 \textcolor{preprocessor}{\#define RUN\_DEV\_EJECT(v,p)      \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00134}00134 \textcolor{preprocessor}{        \{ USB\_VPI(USB\_VENDOR\_\#\#v, USB\_PRODUCT\_\#\#v\#\#\_\#\#p, RUN\_EJECT) \}}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00135}00135 \textcolor{preprocessor}{\#define RUN\_EJECT       1}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00136}00136     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ABOCOM,              RT2770),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00137}00137     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ABOCOM,              RT2870),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00138}00138     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ABOCOM,              RT3070),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00139}00139     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ABOCOM,              RT3071),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00140}00140     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ABOCOM,              RT3072),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00141}00141     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ABOCOM2,             RT2870\_1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00142}00142     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ACCTON,              RT2770),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00143}00143     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ACCTON,              RT2870\_1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00144}00144     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ACCTON,              RT2870\_2),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00145}00145     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ACCTON,              RT2870\_3),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00146}00146     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ACCTON,              RT2870\_4),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00147}00147     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ACCTON,              RT2870\_5),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00148}00148     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ACCTON,              RT3070),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00149}00149     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ACCTON,              RT3070\_1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00150}00150     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ACCTON,              RT3070\_2),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00151}00151     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ACCTON,              RT3070\_3),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00152}00152     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ACCTON,              RT3070\_4),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00153}00153     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ACCTON,              RT3070\_5),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00154}00154     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(AIRTIES,             RT3070),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00155}00155     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ALLWIN,              RT2070),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00156}00156     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ALLWIN,              RT2770),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00157}00157     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ALLWIN,              RT2870),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00158}00158     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ALLWIN,              RT3070),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00159}00159     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ALLWIN,              RT3071),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00160}00160     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ALLWIN,              RT3072),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00161}00161     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ALLWIN,              RT3572),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00162}00162     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(AMIGO,               RT2870\_1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00163}00163     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(AMIGO,               RT2870\_2),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00164}00164     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(AMIT,                CGWLUSB2GNR),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00165}00165     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(AMIT,                RT2870\_1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00166}00166     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(AMIT2,               RT2870),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00167}00167     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ASUS,                RT2870\_1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00168}00168     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ASUS,                RT2870\_2),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00169}00169     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ASUS,                RT2870\_3),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00170}00170     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ASUS,                RT2870\_4),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00171}00171     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ASUS,                RT2870\_5),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00172}00172     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ASUS,                USBN13),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00173}00173     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ASUS,                RT3070\_1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00174}00174     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ASUS,                USBN66),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00175}00175     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ASUS,                USB\_N53),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00176}00176     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ASUS,                USBN14),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00177}00177     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ASUS2,               USBN11),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00178}00178     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(AZUREWAVE,           RT2870\_1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00179}00179     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(AZUREWAVE,           RT2870\_2),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00180}00180     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(AZUREWAVE,           RT3070\_1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00181}00181     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(AZUREWAVE,           RT3070\_2),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00182}00182     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(AZUREWAVE,           RT3070\_3),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00183}00183     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(BELKIN,              F9L1103),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00184}00184     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(BELKIN,              F5D8053V3),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00185}00185     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(BELKIN,              F5D8055),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00186}00186     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(BELKIN,              F5D8055V2),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00187}00187     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(BELKIN,              F6D4050V1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00188}00188     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(BELKIN,              F6D4050V2),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00189}00189     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(BELKIN,              RT2870\_1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00190}00190     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(BELKIN,              RT2870\_2),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00191}00191     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(CISCOLINKSYS,        AE1000),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00192}00192     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(CISCOLINKSYS2,       RT3070),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00193}00193     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(CISCOLINKSYS3,       RT3070),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00194}00194     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(CONCEPTRONIC2,       RT2870\_1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00195}00195     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(CONCEPTRONIC2,       RT2870\_2),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00196}00196     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(CONCEPTRONIC2,       RT2870\_3),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00197}00197     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(CONCEPTRONIC2,       RT2870\_4),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00198}00198     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(CONCEPTRONIC2,       RT2870\_5),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00199}00199     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(CONCEPTRONIC2,       RT2870\_6),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00200}00200     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(CONCEPTRONIC2,       RT2870\_7),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00201}00201     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(CONCEPTRONIC2,       RT2870\_8),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00202}00202     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(CONCEPTRONIC2,       RT3070\_1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00203}00203     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(CONCEPTRONIC2,       RT3070\_2),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00204}00204     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(CONCEPTRONIC2,       VIGORN61),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00205}00205     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(COREGA,              CGWLUSB300GNM),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00206}00206     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(COREGA,              RT2870\_1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00207}00207     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(COREGA,              RT2870\_2),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00208}00208     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(COREGA,              RT2870\_3),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00209}00209     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(COREGA,              RT3070),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00210}00210     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(CYBERTAN,            RT2870),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00211}00211     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(DLINK,               RT2870),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00212}00212     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(DLINK,               RT3072),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00213}00213     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(DLINK,               DWA125A3),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00214}00214     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(DLINK,               DWA127),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00215}00215     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(DLINK,               DWA140B3),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00216}00216     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(DLINK,               DWA160B2),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00217}00217     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(DLINK,               DWA140D1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00218}00218     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(DLINK,               DWA130F1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00219}00219     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(DLINK,               DWA162),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00220}00220     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(DLINK2,              DWA130),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00221}00221     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(DLINK2,              RT2870\_1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00222}00222     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(DLINK2,              RT2870\_2),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00223}00223     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(DLINK2,              RT3070\_1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00224}00224     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(DLINK2,              RT3070\_2),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00225}00225     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(DLINK2,              RT3070\_3),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00226}00226     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(DLINK2,              RT3070\_4),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00227}00227     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(DLINK2,              RT3070\_5),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00228}00228     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(DLINK2,              RT3072),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00229}00229     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(DLINK2,              RT3072\_1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00230}00230     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(EDIMAX,              EW7717),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00231}00231     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(EDIMAX,              EW7718),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00232}00232     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(EDIMAX,              EW7733UND),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00233}00233     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(EDIMAX,              RT2870\_1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00234}00234     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ENCORE,              RT3070\_1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00235}00235     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ENCORE,              RT3070\_2),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00236}00236     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ENCORE,              RT3070\_3),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00237}00237     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(GIGABYTE,            GNWB31N),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00238}00238     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(GIGABYTE,            GNWB32L),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00239}00239     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(GIGABYTE,            RT2870\_1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00240}00240     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(GIGASET,             RT3070\_1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00241}00241     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(GIGASET,             RT3070\_2),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00242}00242     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(GUILLEMOT,           HWNU300),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00243}00243     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(HAWKING,             HWUN2),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00244}00244     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(HAWKING,             RT2870\_1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00245}00245     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(HAWKING,             RT2870\_2),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00246}00246     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(HAWKING,             RT3070),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00247}00247     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(IODATA,              RT3072\_1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00248}00248     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(IODATA,              RT3072\_2),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00249}00249     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(IODATA,              RT3072\_3),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00250}00250     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(IODATA,              RT3072\_4),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00251}00251     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(LINKSYS4,            RT3070),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00252}00252     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(LINKSYS4,            WUSB100),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00253}00253     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(LINKSYS4,            WUSB54GCV3),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00254}00254     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(LINKSYS4,            WUSB600N),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00255}00255     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(LINKSYS4,            WUSB600NV2),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00256}00256     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(LOGITEC,             RT2870\_1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00257}00257     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(LOGITEC,             RT2870\_2),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00258}00258     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(LOGITEC,             RT2870\_3),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00259}00259     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(LOGITEC,             LANW300NU2),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00260}00260     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(LOGITEC,             LANW150NU2),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00261}00261     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(LOGITEC,             LANW300NU2S),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00262}00262     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(MELCO,               WLIUCG300HP),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00263}00263     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(MELCO,               RT2870\_2),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00264}00264     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(MELCO,               WLIUCAG300N),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00265}00265     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(MELCO,               WLIUCG300N),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00266}00266     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(MELCO,               WLIUCG301N),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00267}00267     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(MELCO,               WLIUCGN),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00268}00268     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(MELCO,               WLIUCGNM),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00269}00269     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(MELCO,               WLIUCG300HPV1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00270}00270     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(MELCO,               WLIUCGNM2),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00271}00271     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(MOTOROLA4,           RT2770),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00272}00272     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(MOTOROLA4,           RT3070),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00273}00273     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(MSI,         RT3070\_1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00274}00274     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(MSI,         RT3070\_2),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00275}00275     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(MSI,         RT3070\_3),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00276}00276     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(MSI,         RT3070\_4),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00277}00277     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(MSI,         RT3070\_5),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00278}00278     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(MSI,         RT3070\_6),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00279}00279     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(MSI,         RT3070\_7),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00280}00280     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(MSI,         RT3070\_8),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00281}00281     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(MSI,         RT3070\_9),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00282}00282     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(MSI,         RT3070\_10),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00283}00283     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(MSI,         RT3070\_11),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00284}00284     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(NETGEAR,             WNDA4100),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00285}00285     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(OVISLINK,            RT3072),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00286}00286     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(PARA,                RT3070),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00287}00287     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(PEGATRON,            RT2870),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00288}00288     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(PEGATRON,            RT3070),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00289}00289     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(PEGATRON,            RT3070\_2),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00290}00290     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(PEGATRON,            RT3070\_3),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00291}00291     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(PHILIPS,             RT2870),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00292}00292     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(PLANEX2,             GWUS300MINIS),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00293}00293     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(PLANEX2,             GWUSMICRON),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00294}00294     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(PLANEX2,             RT2870),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00295}00295     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(PLANEX2,             RT3070),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00296}00296     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(QCOM,                RT2870),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00297}00297     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(QUANTA,              RT3070),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00298}00298     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(RALINK,              RT2070),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00299}00299     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(RALINK,              RT2770),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00300}00300     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(RALINK,              RT2870),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00301}00301     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(RALINK,              RT3070),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00302}00302     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(RALINK,              RT3071),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00303}00303     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(RALINK,              RT3072),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00304}00304     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(RALINK,              RT3370),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00305}00305     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(RALINK,              RT3572),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00306}00306     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(RALINK,              RT3573),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00307}00307     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(RALINK,              RT5370),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00308}00308     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(RALINK,              RT5372),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00309}00309     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(RALINK,              RT5572),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00310}00310     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(RALINK,              RT8070),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00311}00311     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(SAMSUNG,             WIS09ABGN),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00312}00312     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(SAMSUNG2,            RT2870\_1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00313}00313     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(SENAO,               RT2870\_1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00314}00314     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(SENAO,               RT2870\_2),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00315}00315     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(SENAO,               RT2870\_3),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00316}00316     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(SENAO,               RT2870\_4),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00317}00317     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(SENAO,               RT3070),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00318}00318     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(SENAO,               RT3071),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00319}00319     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(SENAO,               RT3072\_1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00320}00320     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(SENAO,               RT3072\_2),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00321}00321     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(SENAO,               RT3072\_3),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00322}00322     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(SENAO,               RT3072\_4),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00323}00323     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(SENAO,               RT3072\_5),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00324}00324     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(SITECOMEU,           RT2770),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00325}00325     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(SITECOMEU,           RT2870\_1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00326}00326     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(SITECOMEU,           RT2870\_2),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00327}00327     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(SITECOMEU,           RT2870\_3),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00328}00328     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(SITECOMEU,           RT2870\_4),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00329}00329     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(SITECOMEU,           RT3070),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00330}00330     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(SITECOMEU,           RT3070\_2),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00331}00331     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(SITECOMEU,           RT3070\_3),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00332}00332     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(SITECOMEU,           RT3070\_4),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00333}00333     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(SITECOMEU,           RT3071),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00334}00334     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(SITECOMEU,           RT3072\_1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00335}00335     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(SITECOMEU,           RT3072\_2),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00336}00336     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(SITECOMEU,           RT3072\_3),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00337}00337     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(SITECOMEU,           RT3072\_4),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00338}00338     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(SITECOMEU,           RT3072\_5),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00339}00339     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(SITECOMEU,           RT3072\_6),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00340}00340     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(SITECOMEU,           WL608),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00341}00341     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(SPARKLAN,            RT2870\_1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00342}00342     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(SPARKLAN,            RT3070),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00343}00343     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(SWEEX2,              LW153),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00344}00344     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(SWEEX2,              LW303),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00345}00345     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(SWEEX2,              LW313),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00346}00346     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(TOSHIBA,             RT3070),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00347}00347     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(UMEDIA,              RT2870\_1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00348}00348     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ZCOM,                RT2870\_1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00349}00349     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ZCOM,                RT2870\_2),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00350}00350     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ZINWELL,             RT2870\_1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00351}00351     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ZINWELL,             RT2870\_2),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00352}00352     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ZINWELL,             RT3070),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00353}00353     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ZINWELL,             RT3072\_1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00354}00354     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ZINWELL,             RT3072\_2),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00355}00355     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ZYXEL,               RT2870\_1),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00356}00356     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ZYXEL,               RT2870\_2),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00357}00357     \mbox{\hyperlink{if__run_8c_a1ae2521589150cb8470ce736f96b364f}{RUN\_DEV}}(ZYXEL,               RT3070),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00358}00358     \mbox{\hyperlink{if__run_8c_a69f40304e2d8c73c33a8fbef6101cf3c}{RUN\_DEV\_EJECT}}(ZYXEL,   NWD2705),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00359}00359     \mbox{\hyperlink{if__run_8c_a69f40304e2d8c73c33a8fbef6101cf3c}{RUN\_DEV\_EJECT}}(RALINK,  RT\_STOR),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00360}00360 \textcolor{preprocessor}{\#undef RUN\_DEV\_EJECT}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00361}00361 \textcolor{preprocessor}{\#undef RUN\_DEV}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00362}00362 \};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00363}00363 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00364}\mbox{\hyperlink{if__run_8c_a7c26c3293f94869f80a14924088a86a6}{00364}} \textcolor{keyword}{static} device\_probe\_t   \mbox{\hyperlink{if__run_8c_a7c26c3293f94869f80a14924088a86a6}{run\_match}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00365}\mbox{\hyperlink{if__run_8c_ad4656d747624142de37fbd4be73ef445}{00365}} \textcolor{keyword}{static} device\_attach\_t  \mbox{\hyperlink{if__run_8c_ad4656d747624142de37fbd4be73ef445}{run\_attach}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00366}\mbox{\hyperlink{if__run_8c_a1056dc878808b1a2ebd164bf869702a6}{00366}} \textcolor{keyword}{static} device\_detach\_t  \mbox{\hyperlink{if__run_8c_a1056dc878808b1a2ebd164bf869702a6}{run\_detach}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00367}00367 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00368}\mbox{\hyperlink{if__run_8c_a0c59ee8391f88a1fabda6fb232859f53}{00368}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}}     \mbox{\hyperlink{if__run_8c_a0c59ee8391f88a1fabda6fb232859f53}{run\_bulk\_rx\_callback}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00369}\mbox{\hyperlink{if__run_8c_aafa71d7f3ada8d87c618402f598bb5da}{00369}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}}     \mbox{\hyperlink{if__run_8c_aafa71d7f3ada8d87c618402f598bb5da}{run\_bulk\_tx\_callback0}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00370}\mbox{\hyperlink{if__run_8c_a8ba3b6f4900b86e9f6ff66ea1e490e30}{00370}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}}     \mbox{\hyperlink{if__run_8c_a8ba3b6f4900b86e9f6ff66ea1e490e30}{run\_bulk\_tx\_callback1}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00371}\mbox{\hyperlink{if__run_8c_a850f0dcc5cf0b79e53a6968e06aa91b2}{00371}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}}     \mbox{\hyperlink{if__run_8c_a850f0dcc5cf0b79e53a6968e06aa91b2}{run\_bulk\_tx\_callback2}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00372}\mbox{\hyperlink{if__run_8c_a8288bd9419c280c37b38c345c364fb42}{00372}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}}     \mbox{\hyperlink{if__run_8c_a8288bd9419c280c37b38c345c364fb42}{run\_bulk\_tx\_callback3}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00373}\mbox{\hyperlink{if__run_8c_a9a5aa933295549f3c220158c39a27670}{00373}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}}     \mbox{\hyperlink{if__run_8c_a9a5aa933295549f3c220158c39a27670}{run\_bulk\_tx\_callback4}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00374}\mbox{\hyperlink{if__run_8c_a0fe0129a05063060ab96b67d850aec30}{00374}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}}     \mbox{\hyperlink{if__run_8c_a0fe0129a05063060ab96b67d850aec30}{run\_bulk\_tx\_callback5}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00375}00375 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00376}00376 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a8dfd57e42f63dee56f2b06a311e0b5a7}{run\_autoinst}}(\textcolor{keywordtype}{void} *, \textcolor{keyword}{struct} \mbox{\hyperlink{structusb__device}{usb\_device}} *,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00377}00377                     \textcolor{keyword}{struct} \mbox{\hyperlink{structusb__attach__arg}{usb\_attach\_arg}} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00378}00378 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__run_8c_a6427c344957ce71350405e194b801696}{run\_driver\_loaded}}(\textcolor{keyword}{struct} module *, \textcolor{keywordtype}{int}, \textcolor{keywordtype}{void} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00379}00379 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a518d4f99558cc289f394735408072a3f}{run\_bulk\_tx\_callbackN}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00380}00380                     \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}, u\_int index);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00381}00381 \textcolor{keyword}{static} \textcolor{keyword}{struct }ieee80211vap *\mbox{\hyperlink{if__run_8c_af747a63ba9911057d4e0ad582a275869}{run\_vap\_create}}(\textcolor{keyword}{struct} ieee80211com *,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00382}00382                     \textcolor{keyword}{const} \textcolor{keywordtype}{char} [IFNAMSIZ], \textcolor{keywordtype}{int}, \textcolor{keyword}{enum} ieee80211\_opmode, \textcolor{keywordtype}{int},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00383}00383                     \textcolor{keyword}{const} uint8\_t [IEEE80211\_ADDR\_LEN],}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00384}00384                     \textcolor{keyword}{const} uint8\_t [IEEE80211\_ADDR\_LEN]);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00385}00385 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a9de9d42b5fa916ccf8fa8ec463e344bc}{run\_vap\_delete}}(\textcolor{keyword}{struct} ieee80211vap *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00386}00386 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_ac86bc117be389325cd91ae96a57da520}{run\_cmdq\_cb}}(\textcolor{keywordtype}{void} *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00387}00387 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a1a000f85f61f73152030a297f4b687ee}{run\_setup\_tx\_list}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00388}00388                     \textcolor{keyword}{struct} \mbox{\hyperlink{structrun__endpoint__queue}{run\_endpoint\_queue}} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00389}00389 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a965be32210d84ec046de36c0bff35244}{run\_unsetup\_tx\_list}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00390}00390                     \textcolor{keyword}{struct} \mbox{\hyperlink{structrun__endpoint__queue}{run\_endpoint\_queue}} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00391}00391 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__run_8c_a6296048b322ee04d4142b6d24107fd8a}{run\_load\_microcode}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00392}00392 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__run_8c_a23c664f4215314d704c3170d94c81c3f}{run\_reset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00393}00393 \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__run_8c_af41f05fc75b7bb03dce2bea6c0485782}{run\_do\_request}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00394}00394                     \textcolor{keyword}{struct} \mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} *, \textcolor{keywordtype}{void} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00395}00395 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, uint16\_t, uint32\_t *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00396}00396 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__run_8c_a4e4209826999dd13a18401725612b197}{run\_read\_region\_1}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, uint16\_t, uint8\_t *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00397}00397 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__run_8c_a82466993aacab1c275bdc6b0177f8b99}{run\_write\_2}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, uint16\_t, uint16\_t);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00398}00398 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, uint16\_t, uint32\_t);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00399}00399 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__run_8c_a366ce11d14b4e5e3700232866441c12c}{run\_write\_region\_1}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, uint16\_t,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00400}00400                     \textcolor{keyword}{const} uint8\_t *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00401}00401 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__run_8c_a841976387f67bac56bbf1a8e8a5efe6f}{run\_set\_region\_4}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, uint16\_t, uint32\_t, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00402}00402 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__run_8c_a9c64940d705ae76b070ec09042a17a32}{run\_efuse\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, uint16\_t, uint16\_t *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00403}00403 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__run_8c_acc326af0772d9d71f42578f15726fc77}{run\_efuse\_read\_2}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, uint16\_t, uint16\_t *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00404}00404 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__run_8c_a5d77657d4432faf03a91628cb7dd5919}{run\_eeprom\_read\_2}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, uint16\_t, uint16\_t *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00405}00405 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__run_8c_aa4820cee28f4577e3b1b557d3e730d37}{run\_rt2870\_rf\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, uint32\_t);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00406}00406 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, uint8\_t, uint8\_t *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00407}00407 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, uint8\_t, uint8\_t);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00408}00408 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__run_8c_abc20e1ae73e45e6ffade8618697f6b8a}{run\_bbp\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, uint8\_t, uint8\_t *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00409}00409 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, uint8\_t, uint8\_t);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00410}00410 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__run_8c_af551890d568e683ea5614e905506fb1e}{run\_mcu\_cmd}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, uint8\_t, uint16\_t);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00411}00411 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{if__run_8c_ad1f32b5f304ab3db46fef3475d340c5a}{run\_get\_rf}}(uint16\_t);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00412}00412 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a96810676beb232c6a82f0c3b4d0828ad}{run\_rt3593\_get\_txpower}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00413}00413 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a7ab212dde497095390f39eedc35c3235}{run\_get\_txpower}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00414}00414 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__run_8c_aa919aa8c98302d7536f9e8b61b6b8474}{run\_read\_eeprom}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00415}00415 \textcolor{keyword}{static} \textcolor{keyword}{struct }ieee80211\_node *\mbox{\hyperlink{if__run_8c_a289208baaa1c9fc2d1629fe72e82c2a6}{run\_node\_alloc}}(\textcolor{keyword}{struct} ieee80211vap *,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00416}00416                             \textcolor{keyword}{const} uint8\_t mac[IEEE80211\_ADDR\_LEN]);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00417}00417 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__run_8c_ae68dc7a107c157aa04dc6ce246693e2f}{run\_media\_change}}(\textcolor{keyword}{struct} ifnet *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00418}00418 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__run_8c_aec5eab1bf9993e2e263473e59fc11f2c}{run\_newstate}}(\textcolor{keyword}{struct} ieee80211vap *, \textcolor{keyword}{enum} ieee80211\_state, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00419}00419 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__run_8c_ae1599ee317cac52df7634d21e795d55b}{run\_wme\_update}}(\textcolor{keyword}{struct} ieee80211com *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00420}00420 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_ac335070a726c14fe934027d7558c6d87}{run\_key\_set\_cb}}(\textcolor{keywordtype}{void} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00421}00421 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__run_8c_a4976ef424eb55ce1725ec5e83e18bbb3}{run\_key\_set}}(\textcolor{keyword}{struct} ieee80211vap *, \textcolor{keyword}{struct} ieee80211\_key *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00422}00422 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a2581ffa2432efa59ac1924b87070df6f}{run\_key\_delete\_cb}}(\textcolor{keywordtype}{void} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00423}00423 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__run_8c_afd4c92318d98961ae6a7a2499a582b75}{run\_key\_delete}}(\textcolor{keyword}{struct} ieee80211vap *, \textcolor{keyword}{struct} ieee80211\_key *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00424}00424 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_adb1c4b53cf605d51ea807c6cbd2bb652}{run\_ratectl\_to}}(\textcolor{keywordtype}{void} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00425}00425 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a8983cbd523a2f27d1ef5b981fc3cf958}{run\_ratectl\_cb}}(\textcolor{keywordtype}{void} *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00426}00426 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_acf69017c5ef131e134a4f7d189c87972}{run\_drain\_fifo}}(\textcolor{keywordtype}{void} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00427}00427 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_aa717b9d9f02d0c8eb29e72e7807fa01e}{run\_iter\_func}}(\textcolor{keywordtype}{void} *, \textcolor{keyword}{struct} ieee80211\_node *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00428}00428 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a202eee94b9de1b14fcd353200c847be3}{run\_newassoc\_cb}}(\textcolor{keywordtype}{void} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00429}00429 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_af308b9211fac9d7835fb14b86394c9b2}{run\_newassoc}}(\textcolor{keyword}{struct} ieee80211\_node *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00430}00430 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a1cd17eb60f1863517cc6b147aa5295cd}{run\_recv\_mgmt}}(\textcolor{keyword}{struct} ieee80211\_node *, \textcolor{keyword}{struct} mbuf *, \textcolor{keywordtype}{int},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00431}00431                     \textcolor{keyword}{const} \textcolor{keyword}{struct} ieee80211\_rx\_stats *, \textcolor{keywordtype}{int}, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00432}00432 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_ab31fa41390612cdec3ae76e877c2bf31}{run\_rx\_frame}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, \textcolor{keyword}{struct} mbuf *, uint32\_t);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00433}00433 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_ad959590591a9bf96e930e7341ba1915d}{run\_tx\_free}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__endpoint__queue}{run\_endpoint\_queue}} *pq,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00434}00434                     \textcolor{keyword}{struct} \mbox{\hyperlink{structrun__tx__data}{run\_tx\_data}} *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00435}00435 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_ade3e6fd8ad25e51c5ba7ccfd8710659e}{run\_set\_tx\_desc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, \textcolor{keyword}{struct} \mbox{\hyperlink{structrun__tx__data}{run\_tx\_data}} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00436}00436 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__run_8c_ac7493d1363b4737f63c1181104f46bf8}{run\_tx}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, \textcolor{keyword}{struct} mbuf *,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00437}00437                     \textcolor{keyword}{struct} ieee80211\_node *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00438}00438 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__run_8c_a8882cb6e98f3c5c3c334ab4792039fd8}{run\_tx\_mgt}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, \textcolor{keyword}{struct} mbuf *,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00439}00439                     \textcolor{keyword}{struct} ieee80211\_node *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00440}00440 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__run_8c_ab60dfbf6c5be456a48a956b10b9947e9}{run\_sendprot}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, \textcolor{keyword}{const} \textcolor{keyword}{struct} mbuf *,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00441}00441                     \textcolor{keyword}{struct} ieee80211\_node *, \textcolor{keywordtype}{int}, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00442}00442 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__run_8c_a5de455b0ca5ef596124d541fc46c9f0e}{run\_tx\_param}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, \textcolor{keyword}{struct} mbuf *,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00443}00443                     \textcolor{keyword}{struct} ieee80211\_node *,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00444}00444                     \textcolor{keyword}{const} \textcolor{keyword}{struct} ieee80211\_bpf\_params *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00445}00445 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__run_8c_a14b65c9fea714353ef4afcb368fd439a}{run\_raw\_xmit}}(\textcolor{keyword}{struct} ieee80211\_node *, \textcolor{keyword}{struct} mbuf *,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00446}00446                     \textcolor{keyword}{const} \textcolor{keyword}{struct} ieee80211\_bpf\_params *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00447}00447 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__run_8c_a8f7a93a2fb57b9f408f7a5766257e79c}{run\_transmit}}(\textcolor{keyword}{struct} ieee80211com *, \textcolor{keyword}{struct} mbuf *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00448}00448 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a3796fad2a883e74f7f5f4a1cb3b7ef6d}{run\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00449}00449 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_acabc0677be5e1d636515af3261d400ed}{run\_parent}}(\textcolor{keyword}{struct} ieee80211com *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00450}00450 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a2689dd01ea1f8d7c4a19861a285732a4}{run\_iq\_calib}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, u\_int);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00451}00451 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_afc43e0d31008e8039dd33dd43ca6c6ab}{run\_set\_agc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, uint8\_t);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00452}00452 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_acfca3112a6a8420399bce9ac5f2cfa24}{run\_select\_chan\_group}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00453}00453 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a2d792cd77b7547b682d6a2ae161458fe}{run\_set\_rx\_antenna}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00454}00454 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a110cbd1d9701a3de2015969e851f9867}{run\_rt2870\_set\_chan}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, u\_int);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00455}00455 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a73d0f4681b58c5d82b674044ea2d8b4d}{run\_rt3070\_set\_chan}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, u\_int);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00456}00456 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a10d963c4d5bfa529db0aab57a0b329b4}{run\_rt3572\_set\_chan}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, u\_int);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00457}00457 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_aac9f7b8769745236b69d70e0e55f3d6b}{run\_rt3593\_set\_chan}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, u\_int);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00458}00458 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a20f50fe7da9e189e0670738f5695544d}{run\_rt5390\_set\_chan}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, u\_int);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00459}00459 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a2153e3c2b8ca1c7a060065650e9ec32e}{run\_rt5592\_set\_chan}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, u\_int);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00460}00460 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__run_8c_a717abe8d9850e16225bcf651852059ec}{run\_set\_chan}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, \textcolor{keyword}{struct} ieee80211\_channel *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00461}00461 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a69f5d157ebc62993cb2ae9f44c8f01bf}{run\_set\_channel}}(\textcolor{keyword}{struct} ieee80211com *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00462}00462 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_afb7c8db84ef9e15393a681b15e2f25d4}{run\_getradiocaps}}(\textcolor{keyword}{struct} ieee80211com *, \textcolor{keywordtype}{int}, \textcolor{keywordtype}{int} *,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00463}00463                     \textcolor{keyword}{struct} ieee80211\_channel[]);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00464}00464 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a0e08633473c486c9bb7c1f9e04c07d4e}{run\_scan\_start}}(\textcolor{keyword}{struct} ieee80211com *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00465}00465 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a4b6060a46c3e742249986bb8bc5bbe58}{run\_scan\_end}}(\textcolor{keyword}{struct} ieee80211com *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00466}00466 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a4b03d589a18e3ff1f9538cdaf953f669}{run\_update\_beacon}}(\textcolor{keyword}{struct} ieee80211vap *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00467}00467 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a5f68509146f99c809c969ba8d5ef40a8}{run\_update\_beacon\_cb}}(\textcolor{keywordtype}{void} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00468}00468 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_af6e347625bddc484ddc8a5a00c0edfb4}{run\_updateprot}}(\textcolor{keyword}{struct} ieee80211com *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00469}00469 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a91c6c1e62ce1500100420f9eb39970e3}{run\_updateprot\_cb}}(\textcolor{keywordtype}{void} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00470}00470 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a4ab9667b9d26855695ced3803230299c}{run\_usb\_timeout\_cb}}(\textcolor{keywordtype}{void} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00471}00471 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a1a5622645062abcde09a94e9808f48ef}{run\_reset\_livelock}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00472}00472 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a919f3dd64163f08124102ccb41930014}{run\_enable\_tsf\_sync}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00473}00473 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a1176c339f5e95c5b7303ae4a22deac19}{run\_enable\_tsf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00474}00474 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a4b9834f174786bcc92da7d8e788d0c4c}{run\_disable\_tsf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00475}00475 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_aa39011516ed36cb19887392317b22550}{run\_get\_tsf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, uint64\_t *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00476}00476 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_adafc9cad1627a76fba3a974d1907b745}{run\_enable\_mrr}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00477}00477 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_adb61534f0d29aac4a9880b31de3f9739}{run\_set\_txpreamble}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00478}00478 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a831ad16498909189c7ab5a1f7bb35035}{run\_set\_basicrates}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00479}00479 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a3132e4277bc63d116dca25932f0369a0}{run\_set\_leds}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, uint16\_t);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00480}00480 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a4516b912a2489e9939a535b1b99a1bdf}{run\_set\_bssid}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, \textcolor{keyword}{const} uint8\_t *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00481}00481 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a44e4296a3e0c838c5fd661d8455b48c1}{run\_set\_macaddr}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, \textcolor{keyword}{const} uint8\_t *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00482}00482 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a5f9ad8fd4a1febc68b268bbeeba9fac2}{run\_updateslot}}(\textcolor{keyword}{struct} ieee80211com *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00483}00483 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_addf8ff63ec1f9ba36c23ed0aee6f7d06}{run\_updateslot\_cb}}(\textcolor{keywordtype}{void} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00484}00484 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a7449a410ba5722fd4db17ccda585f0c3}{run\_update\_mcast}}(\textcolor{keyword}{struct} ieee80211com *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00485}00485 \textcolor{keyword}{static} int8\_t   \mbox{\hyperlink{if__run_8c_a77af8f1d76fccdc9ff424438a540f2be}{run\_rssi2dbm}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, uint8\_t, uint8\_t);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00486}00486 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_aff14172871a208dbc4da28b9479709c9}{run\_update\_promisc\_locked}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00487}00487 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_ab852b8342790898b05f6789785740695}{run\_update\_promisc}}(\textcolor{keyword}{struct} ieee80211com *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00488}00488 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_afd4e28fc9c134bfc5eaa7a0e32731f34}{run\_rt5390\_bbp\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00489}00489 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__run_8c_a81cf4ed4a69e89e426c64586c482683c}{run\_bbp\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00490}00490 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__run_8c_a74c64a3c1c957baeeb9b56fa2478364d}{run\_rt3070\_rf\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00491}00491 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_ae747a162160887d02459eda30014d3c5}{run\_rt3593\_rf\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00492}00492 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_aea0cea64a7e3036fffbc43a80ae3d964}{run\_rt5390\_rf\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00493}00493 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__run_8c_a01763cefa819c6aa83d236ce19ae5b72}{run\_rt3070\_filter\_calib}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, uint8\_t, uint8\_t,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00494}00494                     uint8\_t *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00495}00495 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_acc541e040039abe18399a47ca6986963}{run\_rt3070\_rf\_setup}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00496}00496 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a504ca58c2546d85be1dc24ccc7f885dd}{run\_rt3593\_rf\_setup}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00497}00497 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a42f22247abb6785fb01fb554cda7d1a0}{run\_rt5390\_rf\_setup}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00498}00498 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__run_8c_a7458d1d2f4d37157fd6f5610c7cfe01e}{run\_txrx\_enable}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00499}00499 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a2ca1d8df0375e88d4b7bdd067485284a}{run\_adjust\_freq\_offset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00500}00500 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a11a486139db80fe5b329e49a70faaed0}{run\_init\_locked}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00501}00501 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a70abcd6419cad126379ea12f8aac4bce}{run\_stop}}(\textcolor{keywordtype}{void} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00502}00502 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a92b12f7b350001cb12d558c3fb85e0c5}{run\_delay}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *, u\_int);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00503}00503 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__run_8c_a7acbcb2596379a4728a864809a71a605}{run\_update\_chw}}(\textcolor{keyword}{struct} ieee80211com *ic);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00504}00504 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__run_8c_a58368cfb88d4d91f6b2045ba4111f7fd}{run\_ampdu\_enable}}(\textcolor{keyword}{struct} ieee80211\_node *ni,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00505}00505                     \textcolor{keyword}{struct} ieee80211\_tx\_ampdu *tap);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00506}00506 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00507}\mbox{\hyperlink{if__run_8c_ae14b91891e4ecfa87763b3e88a207a27}{00507}} \textcolor{keyword}{static} eventhandler\_tag \mbox{\hyperlink{if__run_8c_ae14b91891e4ecfa87763b3e88a207a27}{run\_etag}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00508}00508 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00509}\mbox{\hyperlink{structrt2860__rate}{00509}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structrt2860__rate}{rt2860\_rate}} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00510}\mbox{\hyperlink{structrt2860__rate_a57d0e6f274f6fff45d5424c4ba852d21}{00510}}         uint8\_t         \mbox{\hyperlink{structrt2860__rate_a57d0e6f274f6fff45d5424c4ba852d21}{rate}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00511}\mbox{\hyperlink{structrt2860__rate_a76fdb7acbca2d34fb076e317377dc06c}{00511}}         uint8\_t         \mbox{\hyperlink{structrt2860__rate_a76fdb7acbca2d34fb076e317377dc06c}{mcs}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00512}\mbox{\hyperlink{structrt2860__rate_a4f6fae18ebab17d28a2dd1337da25415}{00512}}         \textcolor{keyword}{enum}            ieee80211\_phytype \mbox{\hyperlink{structrt2860__rate_a4f6fae18ebab17d28a2dd1337da25415}{phy}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00513}\mbox{\hyperlink{structrt2860__rate_a323407f34d0b850071cdabe47e4d62f7}{00513}}         uint8\_t         \mbox{\hyperlink{structrt2860__rate_a323407f34d0b850071cdabe47e4d62f7}{ctl\_ridx}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00514}\mbox{\hyperlink{structrt2860__rate_af91df3ed1940eedfa1c110f5bfab3ee6}{00514}}         uint16\_t        \mbox{\hyperlink{structrt2860__rate_af91df3ed1940eedfa1c110f5bfab3ee6}{sp\_ack\_dur}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00515}\mbox{\hyperlink{structrt2860__rate_a2ec1ccf8f9aaa27a82f294b9558eb1d5}{00515}}         uint16\_t        \mbox{\hyperlink{structrt2860__rate_a2ec1ccf8f9aaa27a82f294b9558eb1d5}{lp\_ack\_dur}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00516}00516 \} \mbox{\hyperlink{if__run_8c_ab543147498aaf00bd04fe0a18a6c6a74}{rt2860\_rates}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00517}00517         \textcolor{comment}{/* CCK rates (11b) */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00518}00518         \{   2, 0, IEEE80211\_T\_DS,   0, 314, 314 \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00519}00519         \{   4, 1, IEEE80211\_T\_DS,   1, 258, 162 \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00520}00520         \{  11, 2, IEEE80211\_T\_DS,   2, 223, 127 \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00521}00521         \{  22, 3, IEEE80211\_T\_DS,   3, 213, 117 \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00522}00522 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00523}00523         \textcolor{comment}{/* OFDM rates (11a / 11g) */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00524}00524         \{  12, 0, IEEE80211\_T\_OFDM, 4,  60,  60 \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00525}00525         \{  18, 1, IEEE80211\_T\_OFDM, 4,  52,  52 \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00526}00526         \{  24, 2, IEEE80211\_T\_OFDM, 6,  48,  48 \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00527}00527         \{  36, 3, IEEE80211\_T\_OFDM, 6,  44,  44 \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00528}00528         \{  48, 4, IEEE80211\_T\_OFDM, 8,  44,  44 \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00529}00529         \{  72, 5, IEEE80211\_T\_OFDM, 8,  40,  40 \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00530}00530         \{  96, 6, IEEE80211\_T\_OFDM, 8,  40,  40 \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00531}00531         \{ 108, 7, IEEE80211\_T\_OFDM, 8,  40,  40 \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00532}00532 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00533}00533         \textcolor{comment}{/* MCS -\/ single stream */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00534}00534         \{  0x80, 0, IEEE80211\_T\_HT, 4, 60, 60 \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00535}00535         \{  0x81, 1, IEEE80211\_T\_HT, 4, 60, 60 \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00536}00536         \{  0x82, 2, IEEE80211\_T\_HT, 4, 60, 60 \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00537}00537         \{  0x83, 3, IEEE80211\_T\_HT, 4, 60, 60 \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00538}00538         \{  0x84, 4, IEEE80211\_T\_HT, 4, 60, 60 \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00539}00539         \{  0x85, 5, IEEE80211\_T\_HT, 4, 60, 60 \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00540}00540         \{  0x86, 6, IEEE80211\_T\_HT, 4, 60, 60 \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00541}00541         \{  0x87, 7, IEEE80211\_T\_HT, 4, 60, 60 \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00542}00542 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00543}00543         \textcolor{comment}{/* MCS -\/ 2 streams */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00544}00544         \{  0x88, 8, IEEE80211\_T\_HT, 4, 60, 60 \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00545}00545         \{  0x89, 9, IEEE80211\_T\_HT, 4, 60, 60 \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00546}00546         \{  0x8a, 10, IEEE80211\_T\_HT, 4, 60, 60 \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00547}00547         \{  0x8b, 11, IEEE80211\_T\_HT, 4, 60, 60 \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00548}00548         \{  0x8c, 12, IEEE80211\_T\_HT, 4, 60, 60 \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00549}00549         \{  0x8d, 13, IEEE80211\_T\_HT, 4, 60, 60 \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00550}00550         \{  0x8e, 14, IEEE80211\_T\_HT, 4, 60, 60 \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00551}00551         \{  0x8f, 15, IEEE80211\_T\_HT, 4, 60, 60 \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00552}00552 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00553}00553         \textcolor{comment}{/* MCS -\/ 3 streams */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00554}00554         \{  0x90, 16, IEEE80211\_T\_HT, 4, 60, 60 \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00555}00555         \{  0x91, 17, IEEE80211\_T\_HT, 4, 60, 60 \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00556}00556         \{  0x92, 18, IEEE80211\_T\_HT, 4, 60, 60 \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00557}00557         \{  0x93, 19, IEEE80211\_T\_HT, 4, 60, 60 \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00558}00558         \{  0x94, 20, IEEE80211\_T\_HT, 4, 60, 60 \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00559}00559         \{  0x95, 21, IEEE80211\_T\_HT, 4, 60, 60 \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00560}00560         \{  0x96, 22, IEEE80211\_T\_HT, 4, 60, 60 \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00561}00561         \{  0x97, 23, IEEE80211\_T\_HT, 4, 60, 60 \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00562}\mbox{\hyperlink{if__run_8c_ab543147498aaf00bd04fe0a18a6c6a74}{00562}} \};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00563}00563 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00564}00564 \textcolor{comment}{/* These are indexes into the above rt2860\_rates[] array */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00565}\mbox{\hyperlink{if__run_8c_a422a4d05e17982d11e390dd6455f07c0}{00565}} \textcolor{preprocessor}{\#define RT2860\_RIDX\_CCK1                0}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00566}\mbox{\hyperlink{if__run_8c_af9c77c0ca9c12f7d1c530bae6bb1edcf}{00566}} \textcolor{preprocessor}{\#define RT2860\_RIDX\_CCK11               3}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00567}\mbox{\hyperlink{if__run_8c_a7cd8380edf7054526c4a83dfc0ba4fe7}{00567}} \textcolor{preprocessor}{\#define RT2860\_RIDX\_OFDM6               4}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00568}\mbox{\hyperlink{if__run_8c_a60efd347c2c4277683627143b2807ee1}{00568}} \textcolor{preprocessor}{\#define RT2860\_RIDX\_MCS0                12}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00569}\mbox{\hyperlink{if__run_8c_a6dd9f14db793abbf67fd4417b35108f9}{00569}} \textcolor{preprocessor}{\#define RT2860\_RIDX\_MAX                 36}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00570}00570 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00571}00571 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00572}\mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{00572}}         uint16\_t        \mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00573}\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{00573}}         uint32\_t        \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00574}00574 \} \mbox{\hyperlink{if__run_8c_ab548eccb2e3ec4e7e7aa04ad629e7194}{rt2870\_def\_mac}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00575}00575         \mbox{\hyperlink{if__runreg_8h_a6b1211b344695917d4278f2548f028e2}{RT2870\_DEF\_MAC}}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00576}\mbox{\hyperlink{if__run_8c_ab548eccb2e3ec4e7e7aa04ad629e7194}{00576}} \};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00577}00577 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00578}00578 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00579}00579         uint8\_t \mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00580}00580         uint8\_t \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00581}00581 \} \mbox{\hyperlink{if__run_8c_a78f3b45d56fe081d860a037eaab5c3df}{rt2860\_def\_bbp}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00582}00582         \mbox{\hyperlink{if__runreg_8h_a39e8656601790d4dd5ec8ee140a25076}{RT2860\_DEF\_BBP}}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00583}\mbox{\hyperlink{if__run_8c_a78f3b45d56fe081d860a037eaab5c3df}{00583}} \},\mbox{\hyperlink{if__run_8c_a1e6e71e283cb4eeb86a01e49e50434dc}{rt5390\_def\_bbp}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00584}00584         \mbox{\hyperlink{if__runreg_8h_a0384ed33472ed26a151890dc161d25a9}{RT5390\_DEF\_BBP}}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00585}\mbox{\hyperlink{if__run_8c_a1e6e71e283cb4eeb86a01e49e50434dc}{00585}} \},\mbox{\hyperlink{if__run_8c_a6ff73e84a0539633598fdf4ca862f7af}{rt5592\_def\_bbp}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00586}00586         \mbox{\hyperlink{if__runreg_8h_acc66a03fc63f9582a6513b22d81a8bc4}{RT5592\_DEF\_BBP}}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00587}\mbox{\hyperlink{if__run_8c_a6ff73e84a0539633598fdf4ca862f7af}{00587}} \};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00588}00588 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00589}00589 \textcolor{comment}{/* }}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00590}00590 \textcolor{comment}{ * Default values for BBP register R196 for RT5592.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00591}00591 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00592}\mbox{\hyperlink{if__run_8c_a7a6a54dfc66a08981804cd13e66cc410}{00592}} \textcolor{keyword}{static} \textcolor{keyword}{const} uint8\_t \mbox{\hyperlink{if__run_8c_a7a6a54dfc66a08981804cd13e66cc410}{rt5592\_bbp\_r196}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00593}00593         0xe0, 0x1f, 0x38, 0x32, 0x08, 0x28, 0x19, 0x0a, 0xff, 0x00,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00594}00594         0x16, 0x10, 0x10, 0x0b, 0x36, 0x2c, 0x26, 0x24, 0x42, 0x36,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00595}00595         0x30, 0x2d, 0x4c, 0x46, 0x3d, 0x40, 0x3e, 0x42, 0x3d, 0x40,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00596}00596         0x3c, 0x34, 0x2c, 0x2f, 0x3c, 0x35, 0x2e, 0x2a, 0x49, 0x41,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00597}00597         0x36, 0x31, 0x30, 0x30, 0x0e, 0x0d, 0x28, 0x21, 0x1c, 0x16,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00598}00598         0x50, 0x4a, 0x43, 0x40, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00599}00599         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00600}00600         0x00, 0x00, 0x7d, 0x14, 0x32, 0x2c, 0x36, 0x4c, 0x43, 0x2c,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00601}00601         0x2e, 0x36, 0x30, 0x6e}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00602}00602 \};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00603}00603 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00604}00604 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structrfprog}{rfprog}} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00605}00605         uint8\_t         \mbox{\hyperlink{structrfprog_a91693b9f9d0a9caa67fbf864247d332a}{chan}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00606}00606         uint32\_t        \mbox{\hyperlink{structrfprog_a45ae86a0a2aab878e8d4c720e2c5c2a3}{r1}}, \mbox{\hyperlink{structrfprog_a33ebe04489e7fbc32e8582ed43d06a66}{r2}}, \mbox{\hyperlink{structrfprog_a277f4d6c802c1a04a7f620ad88975b60}{r3}}, \mbox{\hyperlink{structrfprog_a9b195486d18a49ce1bb820b350277abe}{r4}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00607}00607 \} \mbox{\hyperlink{if__run_8c_a629ef14775e7a7e5fdf4b976ce7e9e2e}{rt2860\_rf2850}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00608}00608         \mbox{\hyperlink{if__runreg_8h_a740b4d1d8b851d9c5381b367afce45fc}{RT2860\_RF2850}}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00609}\mbox{\hyperlink{if__run_8c_a629ef14775e7a7e5fdf4b976ce7e9e2e}{00609}} \};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00610}00610 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00611}00611 \textcolor{keyword}{struct }\{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00612}\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{00612}}         uint8\_t \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}}, \mbox{\hyperlink{if__run_8c_a4c5c6ceb8ed33456261fa907136e0c3a}{r}}, \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00613}00613 \} \mbox{\hyperlink{if__run_8c_ae7effc96316b76e45b7bbc41a2f3b482}{rt3070\_freqs}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00614}00614         \mbox{\hyperlink{if__runreg_8h_ac3abd723ad34a367b7d1a661473264a4}{RT3070\_RF3052}}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00615}\mbox{\hyperlink{if__run_8c_ae7effc96316b76e45b7bbc41a2f3b482}{00615}} \};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00616}00616 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00617}\mbox{\hyperlink{structrt5592__freqs}{00617}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structrt5592__freqs}{rt5592\_freqs}} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00618}\mbox{\hyperlink{structrt5592__freqs_a273f23abe2ea105c0b53e11330d472eb}{00618}}         uint16\_t        \mbox{\hyperlink{structrt5592__freqs_a273f23abe2ea105c0b53e11330d472eb}{n}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00619}\mbox{\hyperlink{structrt5592__freqs_a7c889b550d6c13cbf11e48d1a1407205}{00619}}         uint8\_t         \mbox{\hyperlink{structrt5592__freqs_a7c889b550d6c13cbf11e48d1a1407205}{k}}, \mbox{\hyperlink{structrt5592__freqs_a3480bfb78c9029805cf7f00c6dd6ff4a}{m}}, \mbox{\hyperlink{structrt5592__freqs_ab3f393f3ce55b2acbb5a0ea1f02ae4eb}{r}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00620}00620 \} \mbox{\hyperlink{if__run_8c_ac2c1690169c76805324d2bfb70408dbc}{rt5592\_freqs\_20mhz}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00621}00621         \mbox{\hyperlink{if__runreg_8h_aa1ce007344ecd7ea5e5ab40edf4bc85e}{RT5592\_RF5592\_20MHZ}}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00622}\mbox{\hyperlink{if__run_8c_ac2c1690169c76805324d2bfb70408dbc}{00622}} \},\mbox{\hyperlink{if__run_8c_a6c83077c6dbbe4f2ed61ffb365d1ee8b}{rt5592\_freqs\_40mhz}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00623}00623         \mbox{\hyperlink{if__runreg_8h_af3905a3b05814040e05a36ccdc2cd705}{RT5592\_RF5592\_40MHZ}}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00624}\mbox{\hyperlink{if__run_8c_a6c83077c6dbbe4f2ed61ffb365d1ee8b}{00624}} \};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00625}00625 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00626}00626 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00627}00627         uint8\_t \mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00628}00628         uint8\_t \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00629}00629 \} \mbox{\hyperlink{if__run_8c_a41fc6caa59f0e0cc6823f694c3433c54}{rt3070\_def\_rf}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00630}00630         \mbox{\hyperlink{if__runreg_8h_a252a8cac783b864aebc78b21f5869c5e}{RT3070\_DEF\_RF}}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00631}\mbox{\hyperlink{if__run_8c_a41fc6caa59f0e0cc6823f694c3433c54}{00631}} \},\mbox{\hyperlink{if__run_8c_aefebbb0ddb336d592947c569b381ed23}{rt3572\_def\_rf}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00632}00632         \mbox{\hyperlink{if__runreg_8h_aef4f0684c96b622f40b4fc07871dea75}{RT3572\_DEF\_RF}}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00633}\mbox{\hyperlink{if__run_8c_aefebbb0ddb336d592947c569b381ed23}{00633}} \},\mbox{\hyperlink{if__run_8c_a04bf8a0662f881eb58716e4c128f41fe}{rt3593\_def\_rf}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00634}00634         \mbox{\hyperlink{if__runreg_8h_a9f6c1ee1eb5708694bafe570e6d5e326}{RT3593\_DEF\_RF}}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00635}\mbox{\hyperlink{if__run_8c_a04bf8a0662f881eb58716e4c128f41fe}{00635}} \},\mbox{\hyperlink{if__run_8c_a947a373951668cbaa9907d7ead5c8f4c}{rt5390\_def\_rf}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00636}00636         \mbox{\hyperlink{if__runreg_8h_a26a90237c9c8ce06d756d973356551fe}{RT5390\_DEF\_RF}}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00637}\mbox{\hyperlink{if__run_8c_a947a373951668cbaa9907d7ead5c8f4c}{00637}} \},\mbox{\hyperlink{if__run_8c_a5fd9cc738d75e4e7313333245601802f}{rt5392\_def\_rf}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00638}00638         \mbox{\hyperlink{if__runreg_8h_aad28ccf2ee14e01b13c5a0833c7c0608}{RT5392\_DEF\_RF}}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00639}\mbox{\hyperlink{if__run_8c_a5fd9cc738d75e4e7313333245601802f}{00639}} \},\mbox{\hyperlink{if__run_8c_a76858d3605eff27e3a814129e7d67454}{rt5592\_def\_rf}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00640}00640         \mbox{\hyperlink{if__runreg_8h_af8726650dded33617bdc56c0f80a2296}{RT5592\_DEF\_RF}}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00641}\mbox{\hyperlink{if__run_8c_a76858d3605eff27e3a814129e7d67454}{00641}} \},\mbox{\hyperlink{if__run_8c_a87eef2fb4459e7793e7347c36d99ab65}{rt5592\_2ghz\_def\_rf}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00642}00642         \mbox{\hyperlink{if__runreg_8h_acc3872d814c1683f18769b5eea1f9690}{RT5592\_2GHZ\_DEF\_RF}}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00643}\mbox{\hyperlink{if__run_8c_a87eef2fb4459e7793e7347c36d99ab65}{00643}} \},\mbox{\hyperlink{if__run_8c_a89e475b21fb6422459b48a2985d96e2f}{rt5592\_5ghz\_def\_rf}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00644}00644         \mbox{\hyperlink{if__runreg_8h_a3bf1541334b5518dfeceae3ecde346be}{RT5592\_5GHZ\_DEF\_RF}}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00645}\mbox{\hyperlink{if__run_8c_a89e475b21fb6422459b48a2985d96e2f}{00645}} \};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00646}00646 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00647}00647 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00648}\mbox{\hyperlink{if__run_8c_ada52957e7cb74b184a843692b2be05d3}{00648}}         u\_int   \mbox{\hyperlink{if__run_8c_ada52957e7cb74b184a843692b2be05d3}{firstchan}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00649}\mbox{\hyperlink{if__run_8c_a4d7900db2bf6fd45f7e7d347bd8e9c96}{00649}}         u\_int   \mbox{\hyperlink{if__run_8c_a4d7900db2bf6fd45f7e7d347bd8e9c96}{lastchan}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00650}00650         uint8\_t \mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00651}00651         uint8\_t \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00652}00652 \} \mbox{\hyperlink{if__run_8c_a1379ee8f4def3b95616896346f9d51f0}{rt5592\_chan\_5ghz}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00653}00653         \mbox{\hyperlink{if__runreg_8h_a3d2ac5afadbbb48b923e6faaac492828}{RT5592\_CHAN\_5GHZ}}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00654}\mbox{\hyperlink{if__run_8c_a1379ee8f4def3b95616896346f9d51f0}{00654}} \};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00655}00655 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00656}\mbox{\hyperlink{if__run_8c_aba14bf8beb3c63d6213496a073a61952}{00656}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__config}{usb\_config}} \mbox{\hyperlink{if__run_8c_aba14bf8beb3c63d6213496a073a61952}{run\_config}}[\mbox{\hyperlink{if__runvar_8h_a098384b0034af0daa7c9c5c82b563567a30a078c211986bca094dbe9f1a298eb7}{RUN\_N\_XFER}}] = \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00657}00657     [\mbox{\hyperlink{if__runvar_8h_a098384b0034af0daa7c9c5c82b563567aa3785165b9b4473f3410c324b05147ce}{RUN\_BULK\_TX\_BE}}] = \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00658}00658         .\mbox{\hyperlink{structusb__config_a5bd5d569870291a54d9bed8377ed8b10}{type}} = \mbox{\hyperlink{usb_8h_a25240fc009aa67bb7a2b635d2e9401e4}{UE\_BULK}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00659}00659         .endpoint = \mbox{\hyperlink{usb_8h_a1e8d1f402536e634471569b83f603197}{UE\_ADDR\_ANY}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00660}00660         .ep\_index = 0,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00661}00661         .direction = \mbox{\hyperlink{usb_8h_a9a98e1bc9388db2ab5213e9d6496e851}{UE\_DIR\_OUT}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00662}00662         .bufsize = \mbox{\hyperlink{if__runvar_8h_a7a4a30dffdd33bb6127fb3683641b847}{RUN\_MAX\_TXSZ}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00663}00663         .flags = \{.pipe\_bof = 1,.force\_short\_xfer = 1,\},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00664}00664         .callback = \mbox{\hyperlink{if__run_8c_aafa71d7f3ada8d87c618402f598bb5da}{run\_bulk\_tx\_callback0}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00665}00665         .timeout = 5000,        \textcolor{comment}{/* ms */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00666}00666     \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00667}00667     [\mbox{\hyperlink{if__runvar_8h_a098384b0034af0daa7c9c5c82b563567a17c69ab123ccc0c11ee6868f86b6fd38}{RUN\_BULK\_TX\_BK}}] = \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00668}00668         .type = \mbox{\hyperlink{usb_8h_a25240fc009aa67bb7a2b635d2e9401e4}{UE\_BULK}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00669}00669         .endpoint = \mbox{\hyperlink{usb_8h_a1e8d1f402536e634471569b83f603197}{UE\_ADDR\_ANY}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00670}00670         .direction = \mbox{\hyperlink{usb_8h_a9a98e1bc9388db2ab5213e9d6496e851}{UE\_DIR\_OUT}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00671}00671         .ep\_index = 1,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00672}00672         .bufsize = \mbox{\hyperlink{if__runvar_8h_a7a4a30dffdd33bb6127fb3683641b847}{RUN\_MAX\_TXSZ}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00673}00673         .flags = \{.pipe\_bof = 1,.force\_short\_xfer = 1,\},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00674}00674         .callback = \mbox{\hyperlink{if__run_8c_a8ba3b6f4900b86e9f6ff66ea1e490e30}{run\_bulk\_tx\_callback1}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00675}00675         .timeout = 5000,        \textcolor{comment}{/* ms */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00676}00676     \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00677}00677     [\mbox{\hyperlink{if__runvar_8h_a098384b0034af0daa7c9c5c82b563567ae5cc1cb0ef0b72a0102e70869d5b0069}{RUN\_BULK\_TX\_VI}}] = \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00678}00678         .type = \mbox{\hyperlink{usb_8h_a25240fc009aa67bb7a2b635d2e9401e4}{UE\_BULK}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00679}00679         .endpoint = \mbox{\hyperlink{usb_8h_a1e8d1f402536e634471569b83f603197}{UE\_ADDR\_ANY}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00680}00680         .direction = \mbox{\hyperlink{usb_8h_a9a98e1bc9388db2ab5213e9d6496e851}{UE\_DIR\_OUT}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00681}00681         .ep\_index = 2,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00682}00682         .bufsize = \mbox{\hyperlink{if__runvar_8h_a7a4a30dffdd33bb6127fb3683641b847}{RUN\_MAX\_TXSZ}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00683}00683         .flags = \{.pipe\_bof = 1,.force\_short\_xfer = 1,\},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00684}00684         .callback = \mbox{\hyperlink{if__run_8c_a850f0dcc5cf0b79e53a6968e06aa91b2}{run\_bulk\_tx\_callback2}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00685}00685         .timeout = 5000,        \textcolor{comment}{/* ms */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00686}00686     \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00687}00687     [\mbox{\hyperlink{if__runvar_8h_a098384b0034af0daa7c9c5c82b563567aff9447777ffa3f7b38cb4cad5c15c5e3}{RUN\_BULK\_TX\_VO}}] = \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00688}00688         .type = \mbox{\hyperlink{usb_8h_a25240fc009aa67bb7a2b635d2e9401e4}{UE\_BULK}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00689}00689         .endpoint = \mbox{\hyperlink{usb_8h_a1e8d1f402536e634471569b83f603197}{UE\_ADDR\_ANY}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00690}00690         .direction = \mbox{\hyperlink{usb_8h_a9a98e1bc9388db2ab5213e9d6496e851}{UE\_DIR\_OUT}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00691}00691         .ep\_index = 3,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00692}00692         .bufsize = \mbox{\hyperlink{if__runvar_8h_a7a4a30dffdd33bb6127fb3683641b847}{RUN\_MAX\_TXSZ}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00693}00693         .flags = \{.pipe\_bof = 1,.force\_short\_xfer = 1,\},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00694}00694         .callback = \mbox{\hyperlink{if__run_8c_a8288bd9419c280c37b38c345c364fb42}{run\_bulk\_tx\_callback3}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00695}00695         .timeout = 5000,        \textcolor{comment}{/* ms */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00696}00696     \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00697}00697     [\mbox{\hyperlink{if__runvar_8h_a098384b0034af0daa7c9c5c82b563567a8ec7212c8b87b4719edd9f282977dd71}{RUN\_BULK\_TX\_HCCA}}] = \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00698}00698         .type = \mbox{\hyperlink{usb_8h_a25240fc009aa67bb7a2b635d2e9401e4}{UE\_BULK}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00699}00699         .endpoint = \mbox{\hyperlink{usb_8h_a1e8d1f402536e634471569b83f603197}{UE\_ADDR\_ANY}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00700}00700         .direction = \mbox{\hyperlink{usb_8h_a9a98e1bc9388db2ab5213e9d6496e851}{UE\_DIR\_OUT}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00701}00701         .ep\_index = 4,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00702}00702         .bufsize = \mbox{\hyperlink{if__runvar_8h_a7a4a30dffdd33bb6127fb3683641b847}{RUN\_MAX\_TXSZ}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00703}00703         .flags = \{.pipe\_bof = 1,.force\_short\_xfer = 1,.no\_pipe\_ok = 1,\},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00704}00704         .callback = \mbox{\hyperlink{if__run_8c_a9a5aa933295549f3c220158c39a27670}{run\_bulk\_tx\_callback4}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00705}00705         .timeout = 5000,        \textcolor{comment}{/* ms */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00706}00706     \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00707}00707     [\mbox{\hyperlink{if__runvar_8h_a098384b0034af0daa7c9c5c82b563567ade5549438d7647f31dffe88bf2fbc3f2}{RUN\_BULK\_TX\_PRIO}}] = \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00708}00708         .type = \mbox{\hyperlink{usb_8h_a25240fc009aa67bb7a2b635d2e9401e4}{UE\_BULK}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00709}00709         .endpoint = \mbox{\hyperlink{usb_8h_a1e8d1f402536e634471569b83f603197}{UE\_ADDR\_ANY}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00710}00710         .direction = \mbox{\hyperlink{usb_8h_a9a98e1bc9388db2ab5213e9d6496e851}{UE\_DIR\_OUT}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00711}00711         .ep\_index = 5,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00712}00712         .bufsize = \mbox{\hyperlink{if__runvar_8h_a7a4a30dffdd33bb6127fb3683641b847}{RUN\_MAX\_TXSZ}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00713}00713         .flags = \{.pipe\_bof = 1,.force\_short\_xfer = 1,.no\_pipe\_ok = 1,\},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00714}00714         .callback = \mbox{\hyperlink{if__run_8c_a0fe0129a05063060ab96b67d850aec30}{run\_bulk\_tx\_callback5}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00715}00715         .timeout = 5000,        \textcolor{comment}{/* ms */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00716}00716     \},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00717}00717     [\mbox{\hyperlink{if__runvar_8h_a098384b0034af0daa7c9c5c82b563567ad44a010f81779263fd6933fada7c7f96}{RUN\_BULK\_RX}}] = \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00718}00718         .type = \mbox{\hyperlink{usb_8h_a25240fc009aa67bb7a2b635d2e9401e4}{UE\_BULK}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00719}00719         .endpoint = \mbox{\hyperlink{usb_8h_a1e8d1f402536e634471569b83f603197}{UE\_ADDR\_ANY}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00720}00720         .direction = \mbox{\hyperlink{usb_8h_a72bb077a860132c175c166f344c75893}{UE\_DIR\_IN}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00721}00721         .bufsize = \mbox{\hyperlink{if__runvar_8h_a6e0c0113648892ddd41a644efa8f2cff}{RUN\_MAX\_RXSZ}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00722}00722         .flags = \{.pipe\_bof = 1,.short\_xfer\_ok = 1,\},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00723}00723         .callback = \mbox{\hyperlink{if__run_8c_a0c59ee8391f88a1fabda6fb232859f53}{run\_bulk\_rx\_callback}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00724}00724     \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00725}00725 \};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00726}00726 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00727}00727 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00728}\mbox{\hyperlink{if__run_8c_a8dfd57e42f63dee56f2b06a311e0b5a7}{00728}} \mbox{\hyperlink{if__run_8c_a8dfd57e42f63dee56f2b06a311e0b5a7}{run\_autoinst}}(\textcolor{keywordtype}{void} *arg, \textcolor{keyword}{struct} \mbox{\hyperlink{structusb__device}{usb\_device}} *udev,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00729}00729     \textcolor{keyword}{struct} \mbox{\hyperlink{structusb__attach__arg}{usb\_attach\_arg}} *uaa)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00730}00730 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00731}00731         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__interface}{usb\_interface}} *iface;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00732}00732         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__interface__descriptor}{usb\_interface\_descriptor}} *\mbox{\hyperlink{if__usievar_8h_a1e6927fa1486224044e568f9c370519b}{id}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00733}00733 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00734}00734         \textcolor{keywordflow}{if} (uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a2b48f36369d07d7452d70d4a923a35ae}{dev\_state}} != \mbox{\hyperlink{usbdi_8h_a635711fa84ca8e34068c774ff5518450}{UAA\_DEV\_READY}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00735}00735                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00736}00736 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00737}00737         iface = \mbox{\hyperlink{usb__device_8c_ad241549c2225f6ccb72345851d5b9ed8}{usbd\_get\_iface}}(udev, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00738}00738         \textcolor{keywordflow}{if} (iface == NULL)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00739}00739                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00740}00740         \textcolor{keywordtype}{id} = iface-\/>\mbox{\hyperlink{structusb__interface_aa5cea795ac14467ffdbe70b7f59beaba}{idesc}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00741}00741         \textcolor{keywordflow}{if} (\textcolor{keywordtype}{id} == NULL || \mbox{\hyperlink{if__usievar_8h_a1e6927fa1486224044e568f9c370519b}{id}}-\/>bInterfaceClass != \mbox{\hyperlink{usb_8h_ae81b41321fc379102099b7f2e5c9739e}{UICLASS\_MASS}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00742}00742                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00743}00743         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__lookup_8c_aa691ad42d532498716f358cb1c994fb2}{usbd\_lookup\_id\_by\_uaa}}(\mbox{\hyperlink{if__run_8c_a1e8b89f5453c6c00d9b38ae3523c0c5e}{run\_devs}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{if__run_8c_a1e8b89f5453c6c00d9b38ae3523c0c5e}{run\_devs}}), uaa))}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00744}00744                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00745}00745 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00746}00746         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__msctest_8c_abf4a74e71cb01d6dc314e510be89e691}{usb\_msc\_eject}}(udev, 0, \mbox{\hyperlink{usb__msctest_8h_a4f126a0a9b1d8c6a8f46a051ef8830bbab8870899bd88d2193b378c727bf6b548}{MSC\_EJECT\_STOPUNIT}}) == 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00747}00747                 uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a2b48f36369d07d7452d70d4a923a35ae}{dev\_state}} = \mbox{\hyperlink{usbdi_8h_af0a1ac09514bfda3e5418bcb253b5221}{UAA\_DEV\_EJECTING}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00748}00748 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00749}00749 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00750}00750 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00751}\mbox{\hyperlink{if__run_8c_a6427c344957ce71350405e194b801696}{00751}} \mbox{\hyperlink{if__run_8c_a6427c344957ce71350405e194b801696}{run\_driver\_loaded}}(\textcolor{keyword}{struct} module *mod, \textcolor{keywordtype}{int} what, \textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00752}00752 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00753}00753         \textcolor{keywordflow}{switch} (what) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00754}00754         \textcolor{keywordflow}{case} MOD\_LOAD:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00755}00755                 \mbox{\hyperlink{if__run_8c_ae14b91891e4ecfa87763b3e88a207a27}{run\_etag}} = EVENTHANDLER\_REGISTER(usb\_dev\_configured,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00756}00756                     \mbox{\hyperlink{if__run_8c_a8dfd57e42f63dee56f2b06a311e0b5a7}{run\_autoinst}}, NULL, EVENTHANDLER\_PRI\_ANY);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00757}00757                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00758}00758         \textcolor{keywordflow}{case} MOD\_UNLOAD:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00759}00759                 EVENTHANDLER\_DEREGISTER(usb\_dev\_configured, \mbox{\hyperlink{if__run_8c_ae14b91891e4ecfa87763b3e88a207a27}{run\_etag}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00760}00760                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00761}00761         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00762}00762                 \textcolor{keywordflow}{return} (EOPNOTSUPP);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00763}00763         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00764}00764         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00765}00765 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00766}00766 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00767}00767 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00768}\mbox{\hyperlink{if__run_8c_a56171e874f5d683f96d3aa1ce2d2d83c}{00768}} \mbox{\hyperlink{if__run_8c_a7c26c3293f94869f80a14924088a86a6}{run\_match}}(device\_t self)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00769}00769 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00770}00770         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__attach__arg}{usb\_attach\_arg}} *uaa = device\_get\_ivars(self);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00771}00771 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00772}00772         \textcolor{keywordflow}{if} (uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a246691e99681281d3113d63e81b7e4f0}{usb\_mode}} != \mbox{\hyperlink{usb_8h_a9bc559812598988121896dceb483806ba1c7091216cfa9c9f4a252b0825ed32cb}{USB\_MODE\_HOST}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00773}00773                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00774}00774         \textcolor{keywordflow}{if} (uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a66c2afc71fce73cc432f7d58593e1f26}{info}}.\mbox{\hyperlink{structusbd__lookup__info_a9e2af2c9a58f0df11559c7679185b0e8}{bConfigIndex}} != 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00775}00775                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00776}00776         \textcolor{keywordflow}{if} (uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a66c2afc71fce73cc432f7d58593e1f26}{info}}.\mbox{\hyperlink{structusbd__lookup__info_a50a68740a4c82f1a9b999d4a7994b550}{bIfaceIndex}} != \mbox{\hyperlink{if__runreg_8h_a245aacf6c5dd130db6454f9562cc77c5}{RT2860\_IFACE\_INDEX}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00777}00777                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00778}00778 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00779}00779         \textcolor{keywordflow}{return} (\mbox{\hyperlink{usb__lookup_8c_aa691ad42d532498716f358cb1c994fb2}{usbd\_lookup\_id\_by\_uaa}}(\mbox{\hyperlink{if__run_8c_a1e8b89f5453c6c00d9b38ae3523c0c5e}{run\_devs}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{if__run_8c_a1e8b89f5453c6c00d9b38ae3523c0c5e}{run\_devs}}), uaa));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00780}00780 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00781}00781 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00782}00782 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00783}\mbox{\hyperlink{if__run_8c_a60d646a139811b8be7b2c38ef606d70f}{00783}} \mbox{\hyperlink{if__run_8c_ad4656d747624142de37fbd4be73ef445}{run\_attach}}(device\_t self)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00784}00784 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00785}00785         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *sc = device\_get\_softc(self);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00786}00786         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__attach__arg}{usb\_attach\_arg}} *uaa = device\_get\_ivars(self);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00787}00787         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structrun__softc_a475dfeb97bf5936fa250323fa6a1e6ae}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00788}00788         uint32\_t ver;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00789}00789         uint8\_t iface\_index;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00790}00790         \textcolor{keywordtype}{int} ntries, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00791}00791 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00792}00792         \mbox{\hyperlink{usb__util_8c_a2f65a197990caa1a69a16691ce4dc66a}{device\_set\_usb\_desc}}(self);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00793}00793         sc-\/>\mbox{\hyperlink{structrun__softc_a9b1516af9abf677299e91addf3590697}{sc\_udev}} = uaa-\/>\mbox{\hyperlink{structusb__attach__arg_ac86557d3eaf77874d436ce38648b0276}{device}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00794}00794         sc-\/>\mbox{\hyperlink{structrun__softc_a11422e8a9e276cfaea3662dc74f6fc84}{sc\_dev}} = self;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00795}00795         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usbdi_8h_ad61be4846786fb86de5691968d1e9b66}{USB\_GET\_DRIVER\_INFO}}(uaa) != \mbox{\hyperlink{if__run_8c_a420bd3c375b905a5629d3ccdab8c5f50}{RUN\_EJECT}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00796}00796                 sc-\/>\mbox{\hyperlink{structrun__softc_ae1260c15661b04d2cc04867c70e3df41}{sc\_flags}} |= \mbox{\hyperlink{if__runvar_8h_a569c973366e92aaf4060926e20cc30b2}{RUN\_FLAG\_FWLOAD\_NEEDED}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00797}00797 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00798}00798         mtx\_init(\&sc-\/>\mbox{\hyperlink{structrun__softc_a5a51534f63edf520da3cbc2cc2ca484c}{sc\_mtx}}, device\_get\_nameunit(sc-\/>\mbox{\hyperlink{structrun__softc_a11422e8a9e276cfaea3662dc74f6fc84}{sc\_dev}}),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00799}00799             MTX\_NETWORK\_LOCK, MTX\_DEF);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00800}00800         mbufq\_init(\&sc-\/>\mbox{\hyperlink{structrun__softc_a338a1523731bc34512da29b789fc18dc}{sc\_snd}}, ifqmaxlen);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00801}00801 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00802}00802         iface\_index = \mbox{\hyperlink{if__runreg_8h_a245aacf6c5dd130db6454f9562cc77c5}{RT2860\_IFACE\_INDEX}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00803}00803 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00804}00804         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{usb__transfer_8c_a7494c04fae5c5e7ef1af436308670a21}{usbd\_transfer\_setup}}(uaa-\/>\mbox{\hyperlink{structusb__attach__arg_ac86557d3eaf77874d436ce38648b0276}{device}}, \&iface\_index,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00805}00805             sc-\/>\mbox{\hyperlink{structrun__softc_a8522ea9d5483b98283b7629e41c31eac}{sc\_xfer}}, \mbox{\hyperlink{if__run_8c_aba14bf8beb3c63d6213496a073a61952}{run\_config}}, \mbox{\hyperlink{if__runvar_8h_a098384b0034af0daa7c9c5c82b563567a30a078c211986bca094dbe9f1a298eb7}{RUN\_N\_XFER}}, sc, \&sc-\/>\mbox{\hyperlink{structrun__softc_a5a51534f63edf520da3cbc2cc2ca484c}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00806}00806         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00807}00807                 device\_printf(self, \textcolor{stringliteral}{"{}could not allocate USB transfers, "{}}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00808}00808                     \textcolor{stringliteral}{"{}err=\%s\(\backslash\)n"{}}, \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00809}00809                 \textcolor{keywordflow}{goto} detach;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00810}00810         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00811}00811 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00812}00812         \mbox{\hyperlink{if__runvar_8h_afb83ba5b9cfa86e30eb1e74fe2267cea}{RUN\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00813}00813 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00814}00814         \textcolor{comment}{/* wait for the chip to settle */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00815}00815         \textcolor{keywordflow}{for} (ntries = 0; ntries < 100; ntries++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00816}00816                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_acefb3dfe4f68bda874362bd2b3f80c71}{RT2860\_ASIC\_VER\_ID}}, \&ver) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00817}00817                         \mbox{\hyperlink{if__runvar_8h_a45d3b538b97178f8fe93284ed57e2cd5}{RUN\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00818}00818                         \textcolor{keywordflow}{goto} detach;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00819}00819                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00820}00820                 \textcolor{keywordflow}{if} (ver != 0 \&\& ver != 0xffffffff)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00821}00821                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00822}00822                 \mbox{\hyperlink{if__run_8c_a92b12f7b350001cb12d558c3fb85e0c5}{run\_delay}}(sc, 10);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00823}00823         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00824}00824         \textcolor{keywordflow}{if} (ntries == 100) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00825}00825                 device\_printf(sc-\/>\mbox{\hyperlink{structrun__softc_a11422e8a9e276cfaea3662dc74f6fc84}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00826}00826                     \textcolor{stringliteral}{"{}timeout waiting for NIC to initialize\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00827}00827                 \mbox{\hyperlink{if__runvar_8h_a45d3b538b97178f8fe93284ed57e2cd5}{RUN\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00828}00828                 \textcolor{keywordflow}{goto} detach;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00829}00829         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00830}00830         sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} = ver >> 16;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00831}00831         sc-\/>\mbox{\hyperlink{structrun__softc_af4f2d5358072bd02994b64bcbe7d6f4d}{mac\_rev}} = ver \& 0xffff;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00832}00832 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00833}00833         \textcolor{comment}{/* retrieve RF rev. no and various other things from EEPROM */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00834}00834         \mbox{\hyperlink{if__run_8c_aa919aa8c98302d7536f9e8b61b6b8474}{run\_read\_eeprom}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00835}00835 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00836}00836         device\_printf(sc-\/>\mbox{\hyperlink{structrun__softc_a11422e8a9e276cfaea3662dc74f6fc84}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00837}00837             \textcolor{stringliteral}{"{}MAC/BBP RT\%04X (rev 0x\%04X), RF \%s (MIMO \%dT\%dR), address \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00838}00838             sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}}, sc-\/>\mbox{\hyperlink{structrun__softc_af4f2d5358072bd02994b64bcbe7d6f4d}{mac\_rev}}, \mbox{\hyperlink{if__run_8c_ad1f32b5f304ab3db46fef3475d340c5a}{run\_get\_rf}}(sc-\/>\mbox{\hyperlink{structrun__softc_a1a20cab629806dd03e9caebd2bdab962}{rf\_rev}}),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00839}00839             sc-\/>\mbox{\hyperlink{structrun__softc_a67c3c37459a1133495cd627be4037ca6}{ntxchains}}, sc-\/>\mbox{\hyperlink{structrun__softc_abeb252728ca242db18b1574c2687b788}{nrxchains}}, ether\_sprintf(ic-\/>ic\_macaddr));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00840}00840 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00841}00841         \mbox{\hyperlink{if__runvar_8h_a45d3b538b97178f8fe93284ed57e2cd5}{RUN\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00842}00842 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00843}00843         ic-\/>ic\_softc = sc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00844}00844         ic-\/>ic\_name = device\_get\_nameunit(self);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00845}00845         ic-\/>ic\_phytype = IEEE80211\_T\_OFDM;      \textcolor{comment}{/* not only, but not used */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00846}00846         ic-\/>ic\_opmode = IEEE80211\_M\_STA;        \textcolor{comment}{/* default to BSS mode */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00847}00847 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00848}00848         \textcolor{comment}{/* set device capabilities */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00849}00849         ic-\/>ic\_caps =}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00850}00850             IEEE80211\_C\_STA |           \textcolor{comment}{/* station mode supported */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00851}00851             IEEE80211\_C\_MONITOR |       \textcolor{comment}{/* monitor mode supported */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00852}00852             IEEE80211\_C\_IBSS |}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00853}00853             IEEE80211\_C\_HOSTAP |}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00854}00854             IEEE80211\_C\_WDS |           \textcolor{comment}{/* 4-\/address traffic works */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00855}00855             IEEE80211\_C\_MBSS |}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00856}00856             IEEE80211\_C\_SHPREAMBLE |    \textcolor{comment}{/* short preamble supported */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00857}00857             IEEE80211\_C\_SHSLOT |        \textcolor{comment}{/* short slot time supported */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00858}00858             IEEE80211\_C\_SWAMSDUTX |     \textcolor{comment}{/* Do software A-\/MSDU TX */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00859}00859             IEEE80211\_C\_FF |            \textcolor{comment}{/* Atheros fast-\/frames */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00860}00860             IEEE80211\_C\_WME |           \textcolor{comment}{/* WME */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00861}00861             IEEE80211\_C\_WPA;            \textcolor{comment}{/* WPA1|WPA2(RSN) */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00862}00862 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00863}00863         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00864}00864 \textcolor{comment}{         * RF2020 is not an 11n device.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00865}00865 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00866}00866         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1a20cab629806dd03e9caebd2bdab962}{rf\_rev}} != \mbox{\hyperlink{if__runreg_8h_aff045a547d03206f2d6235560bc5f0e5}{RT3070\_RF\_2020}}) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00867}00867                 device\_printf(sc-\/>\mbox{\hyperlink{structrun__softc_a11422e8a9e276cfaea3662dc74f6fc84}{sc\_dev}}, \textcolor{stringliteral}{"{}[HT] Enabling 802.11n\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00868}00868                 ic-\/>ic\_htcaps =}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00869}00869                             IEEE80211\_HTC\_HT |}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00870}00870                             IEEE80211\_HTC\_AMPDU |}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00871}00871                             IEEE80211\_HTC\_AMSDU |}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00872}00872                             IEEE80211\_HTCAP\_MAXAMSDU\_3839 |}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00873}00873                             IEEE80211\_HTCAP\_SMPS\_OFF;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00874}00874 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00875}00875                 ic-\/>ic\_rxstream = sc-\/>\mbox{\hyperlink{structrun__softc_abeb252728ca242db18b1574c2687b788}{nrxchains}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00876}00876                 ic-\/>ic\_txstream = sc-\/>\mbox{\hyperlink{structrun__softc_a67c3c37459a1133495cd627be4037ca6}{ntxchains}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00877}00877         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00878}00878 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00879}00879         ic-\/>ic\_cryptocaps =}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00880}00880             IEEE80211\_CRYPTO\_WEP |}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00881}00881             IEEE80211\_CRYPTO\_AES\_CCM |}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00882}00882             IEEE80211\_CRYPTO\_TKIPMIC |}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00883}00883             IEEE80211\_CRYPTO\_TKIP;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00884}00884 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00885}00885         ic-\/>ic\_flags |= IEEE80211\_F\_DATAPAD;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00886}00886         ic-\/>ic\_flags\_ext |= IEEE80211\_FEXT\_SWBMISS;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00887}00887 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00888}00888         \mbox{\hyperlink{if__run_8c_afb7c8db84ef9e15393a681b15e2f25d4}{run\_getradiocaps}}(ic, IEEE80211\_CHAN\_MAX, \&ic-\/>ic\_nchans,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00889}00889             ic-\/>ic\_channels);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00890}00890 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00891}00891         ieee80211\_ifattach(ic);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00892}00892 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00893}00893         ic-\/>ic\_scan\_start = \mbox{\hyperlink{if__run_8c_a0e08633473c486c9bb7c1f9e04c07d4e}{run\_scan\_start}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00894}00894         ic-\/>ic\_scan\_end = \mbox{\hyperlink{if__run_8c_a4b6060a46c3e742249986bb8bc5bbe58}{run\_scan\_end}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00895}00895         ic-\/>ic\_set\_channel = \mbox{\hyperlink{if__run_8c_a69f5d157ebc62993cb2ae9f44c8f01bf}{run\_set\_channel}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00896}00896         ic-\/>ic\_getradiocaps = \mbox{\hyperlink{if__run_8c_afb7c8db84ef9e15393a681b15e2f25d4}{run\_getradiocaps}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00897}00897         ic-\/>ic\_node\_alloc = \mbox{\hyperlink{if__run_8c_a289208baaa1c9fc2d1629fe72e82c2a6}{run\_node\_alloc}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00898}00898         ic-\/>ic\_newassoc = \mbox{\hyperlink{if__run_8c_af308b9211fac9d7835fb14b86394c9b2}{run\_newassoc}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00899}00899         ic-\/>ic\_updateslot = \mbox{\hyperlink{if__run_8c_a5f9ad8fd4a1febc68b268bbeeba9fac2}{run\_updateslot}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00900}00900         ic-\/>ic\_update\_mcast = \mbox{\hyperlink{if__run_8c_a7449a410ba5722fd4db17ccda585f0c3}{run\_update\_mcast}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00901}00901         ic-\/>ic\_wme.wme\_update = \mbox{\hyperlink{if__run_8c_ae1599ee317cac52df7634d21e795d55b}{run\_wme\_update}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00902}00902         ic-\/>ic\_raw\_xmit = \mbox{\hyperlink{if__run_8c_a14b65c9fea714353ef4afcb368fd439a}{run\_raw\_xmit}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00903}00903         ic-\/>ic\_update\_promisc = \mbox{\hyperlink{if__run_8c_ab852b8342790898b05f6789785740695}{run\_update\_promisc}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00904}00904         ic-\/>ic\_vap\_create = \mbox{\hyperlink{if__run_8c_af747a63ba9911057d4e0ad582a275869}{run\_vap\_create}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00905}00905         ic-\/>ic\_vap\_delete = \mbox{\hyperlink{if__run_8c_a9de9d42b5fa916ccf8fa8ec463e344bc}{run\_vap\_delete}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00906}00906         ic-\/>ic\_transmit = \mbox{\hyperlink{if__run_8c_a8f7a93a2fb57b9f408f7a5766257e79c}{run\_transmit}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00907}00907         ic-\/>ic\_parent = \mbox{\hyperlink{if__run_8c_acabc0677be5e1d636515af3261d400ed}{run\_parent}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00908}00908         ic-\/>ic\_update\_chw = \mbox{\hyperlink{if__run_8c_a7acbcb2596379a4728a864809a71a605}{run\_update\_chw}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00909}00909         ic-\/>ic\_ampdu\_enable = \mbox{\hyperlink{if__run_8c_a58368cfb88d4d91f6b2045ba4111f7fd}{run\_ampdu\_enable}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00910}00910 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00911}00911         ieee80211\_radiotap\_attach(ic,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00912}00912             \&sc-\/>sc\_txtap.wt\_ihdr, \textcolor{keyword}{sizeof}(sc-\/>sc\_txtap),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00913}00913                 \mbox{\hyperlink{if__runvar_8h_a809423e79e8732ef5de71a55172b1fe7}{RUN\_TX\_RADIOTAP\_PRESENT}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00914}00914             \&sc-\/>sc\_rxtap.wr\_ihdr, \textcolor{keyword}{sizeof}(sc-\/>sc\_rxtap),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00915}00915                 \mbox{\hyperlink{if__runvar_8h_a248f35a2f023ed30a8a902b33378ca94}{RUN\_RX\_RADIOTAP\_PRESENT}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00916}00916 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00917}00917         TASK\_INIT(\&sc-\/>\mbox{\hyperlink{structrun__softc_ae805f800f38298655ad01aa36980dc38}{cmdq\_task}}, 0, \mbox{\hyperlink{if__run_8c_ac86bc117be389325cd91ae96a57da520}{run\_cmdq\_cb}}, sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00918}00918         TASK\_INIT(\&sc-\/>\mbox{\hyperlink{structrun__softc_a4b4953611c0999b028402994ae31ef87}{ratectl\_task}}, 0, \mbox{\hyperlink{if__run_8c_a8983cbd523a2f27d1ef5b981fc3cf958}{run\_ratectl\_cb}}, sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00919}00919         \mbox{\hyperlink{usbdi_8h_a1f241362056f1ed3d4c4b5cfb63ce8e5}{usb\_callout\_init\_mtx}}(\&sc-\/>\mbox{\hyperlink{structrun__softc_a4df8b5a8e9e18c43fc38313f096a5076}{ratectl\_ch}}, \&sc-\/>\mbox{\hyperlink{structrun__softc_a5a51534f63edf520da3cbc2cc2ca484c}{sc\_mtx}}, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00920}00920 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00921}00921         \textcolor{keywordflow}{if} (bootverbose)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00922}00922                 ieee80211\_announce(ic);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00923}00923 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00924}00924         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00925}00925 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00926}00926 detach:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00927}00927         \mbox{\hyperlink{if__run_8c_a1056dc878808b1a2ebd164bf869702a6}{run\_detach}}(self);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00928}00928         \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00929}00929 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00930}00930 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00931}00931 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00932}\mbox{\hyperlink{if__run_8c_a6a4d8727d6e26ce108e272c396086450}{00932}} \mbox{\hyperlink{if__run_8c_a6a4d8727d6e26ce108e272c396086450}{run\_drain\_mbufq}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00933}00933 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00934}00934         \textcolor{keyword}{struct }mbuf *m;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00935}00935         \textcolor{keyword}{struct }ieee80211\_node *ni;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00936}00936 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00937}00937         \mbox{\hyperlink{if__runvar_8h_a46923988c8f3d1896339650dd4bf5f53}{RUN\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00938}00938         \textcolor{keywordflow}{while} ((m = mbufq\_dequeue(\&sc-\/>\mbox{\hyperlink{structrun__softc_a338a1523731bc34512da29b789fc18dc}{sc\_snd}})) != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00939}00939                 ni = (\textcolor{keyword}{struct }ieee80211\_node *)m-\/>m\_pkthdr.rcvif;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00940}00940                 m-\/>m\_pkthdr.rcvif = NULL;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00941}00941                 ieee80211\_free\_node(ni);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00942}00942                 m\_freem(m);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00943}00943         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00944}00944 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00945}00945 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00946}00946 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00947}\mbox{\hyperlink{if__run_8c_af379ab36d50c317230def8df028f1fc5}{00947}} \mbox{\hyperlink{if__run_8c_a1056dc878808b1a2ebd164bf869702a6}{run\_detach}}(device\_t self)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00948}00948 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00949}00949         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *sc = device\_get\_softc(self);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00950}00950         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structrun__softc_a475dfeb97bf5936fa250323fa6a1e6ae}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00951}00951         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00952}00952 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00953}00953         \mbox{\hyperlink{if__runvar_8h_afb83ba5b9cfa86e30eb1e74fe2267cea}{RUN\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00954}00954         sc-\/>\mbox{\hyperlink{structrun__softc_a6a25bd6228c91c902fefbc1f49a01f97}{sc\_detached}} = 1;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00955}00955         \mbox{\hyperlink{if__runvar_8h_a45d3b538b97178f8fe93284ed57e2cd5}{RUN\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00956}00956 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00957}00957         \textcolor{comment}{/* stop all USB transfers */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00958}00958         \mbox{\hyperlink{usb__transfer_8c_a2f5ab55bfe7f356bb7a7505ff35c9741}{usbd\_transfer\_unsetup}}(sc-\/>\mbox{\hyperlink{structrun__softc_a8522ea9d5483b98283b7629e41c31eac}{sc\_xfer}}, \mbox{\hyperlink{if__runvar_8h_a098384b0034af0daa7c9c5c82b563567a30a078c211986bca094dbe9f1a298eb7}{RUN\_N\_XFER}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00959}00959 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00960}00960         \mbox{\hyperlink{if__runvar_8h_afb83ba5b9cfa86e30eb1e74fe2267cea}{RUN\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00961}00961         sc-\/>\mbox{\hyperlink{structrun__softc_a62dd21cab90620634cc0d338870dc49f}{ratectl\_run}} = \mbox{\hyperlink{if__runvar_8h_a2c96ec83349e59ee2ff6b2a95b3b20f9}{RUN\_RATECTL\_OFF}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00962}00962         sc-\/>\mbox{\hyperlink{structrun__softc_a80ae37469cb0af8bf5f1e59107243d21}{cmdq\_run}} = sc-\/>\mbox{\hyperlink{structrun__softc_acc6c8fb6fc13ea995d2c54bdb372a6c1}{cmdq\_key\_set}} = \mbox{\hyperlink{if__runvar_8h_a233c07afae960cba67aaaceeb1e09ee4}{RUN\_CMDQ\_ABORT}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00963}00963 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00964}00964         \textcolor{comment}{/* free TX list, if any */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00965}00965         \textcolor{keywordflow}{for} (i = 0; i != \mbox{\hyperlink{if__runvar_8h_a07469f73b7222ee6c525c62df2629de3}{RUN\_EP\_QUEUES}}; i++)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00966}00966                 \mbox{\hyperlink{if__run_8c_a965be32210d84ec046de36c0bff35244}{run\_unsetup\_tx\_list}}(sc, \&sc-\/>\mbox{\hyperlink{structrun__softc_ac32a4e4f9bda8c035f10a84ae91b68eb}{sc\_epq}}[i]);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00967}00967 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00968}00968         \textcolor{comment}{/* Free TX queue */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00969}00969         \mbox{\hyperlink{if__run_8c_a6a4d8727d6e26ce108e272c396086450}{run\_drain\_mbufq}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00970}00970         \mbox{\hyperlink{if__runvar_8h_a45d3b538b97178f8fe93284ed57e2cd5}{RUN\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00971}00971 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00972}00972         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a475dfeb97bf5936fa250323fa6a1e6ae}{sc\_ic}}.ic\_softc == sc) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00973}00973                 \textcolor{comment}{/* drain tasks */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00974}00974                 \mbox{\hyperlink{usbdi_8h_a828c4d79b0d9b11c8dcb77899a2bffda}{usb\_callout\_drain}}(\&sc-\/>\mbox{\hyperlink{structrun__softc_a4df8b5a8e9e18c43fc38313f096a5076}{ratectl\_ch}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00975}00975                 ieee80211\_draintask(ic, \&sc-\/>\mbox{\hyperlink{structrun__softc_ae805f800f38298655ad01aa36980dc38}{cmdq\_task}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00976}00976                 ieee80211\_draintask(ic, \&sc-\/>\mbox{\hyperlink{structrun__softc_a4b4953611c0999b028402994ae31ef87}{ratectl\_task}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00977}00977                 ieee80211\_ifdetach(ic);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00978}00978         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00979}00979 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00980}00980         mtx\_destroy(\&sc-\/>\mbox{\hyperlink{structrun__softc_a5a51534f63edf520da3cbc2cc2ca484c}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00981}00981 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00982}00982         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00983}00983 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00984}00984 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00985}00985 \textcolor{keyword}{static} \textcolor{keyword}{struct }ieee80211vap *}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00986}\mbox{\hyperlink{if__run_8c_af747a63ba9911057d4e0ad582a275869}{00986}} \mbox{\hyperlink{if__run_8c_af747a63ba9911057d4e0ad582a275869}{run\_vap\_create}}(\textcolor{keyword}{struct} ieee80211com *ic, \textcolor{keyword}{const} \textcolor{keywordtype}{char} name[IFNAMSIZ], \textcolor{keywordtype}{int} unit,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00987}00987     \textcolor{keyword}{enum} ieee80211\_opmode opmode, \textcolor{keywordtype}{int} flags,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00988}00988     \textcolor{keyword}{const} uint8\_t bssid[IEEE80211\_ADDR\_LEN],}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00989}00989     \textcolor{keyword}{const} uint8\_t mac[IEEE80211\_ADDR\_LEN])}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00990}00990 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00991}00991         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00992}00992         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__vap}{run\_vap}} *rvp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00993}00993         \textcolor{keyword}{struct }ieee80211vap *vap;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00994}00994         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00995}00995 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00996}00996         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_ac8eca37dc53b73408f99d028e07fea66}{rvp\_cnt}} >= \mbox{\hyperlink{if__runvar_8h_a93630e73de260e728c90f5ddc38c796b}{RUN\_VAP\_MAX}}) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00997}00997                 device\_printf(sc-\/>\mbox{\hyperlink{structrun__softc_a11422e8a9e276cfaea3662dc74f6fc84}{sc\_dev}}, \textcolor{stringliteral}{"{}number of VAPs maxed out\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00998}00998                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l00999}00999         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01000}01000 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01001}01001         \textcolor{keywordflow}{switch} (opmode) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01002}01002         \textcolor{keywordflow}{case} IEEE80211\_M\_STA:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01003}01003                 \textcolor{comment}{/* enable s/w bmiss handling for sta mode */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01004}01004                 flags |= IEEE80211\_CLONE\_NOBEACONS; }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01005}01005                 \textcolor{comment}{/* fall though */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01006}01006         \textcolor{keywordflow}{case} IEEE80211\_M\_IBSS:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01007}01007         \textcolor{keywordflow}{case} IEEE80211\_M\_MONITOR:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01008}01008         \textcolor{keywordflow}{case} IEEE80211\_M\_HOSTAP:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01009}01009         \textcolor{keywordflow}{case} IEEE80211\_M\_MBSS:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01010}01010                 \textcolor{comment}{/* other than WDS vaps, only one at a time */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01011}01011                 \textcolor{keywordflow}{if} (!TAILQ\_EMPTY(\&ic-\/>ic\_vaps))}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01012}01012                         \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01013}01013                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01014}01014         \textcolor{keywordflow}{case} IEEE80211\_M\_WDS:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01015}01015                 TAILQ\_FOREACH(vap, \&ic-\/>ic\_vaps, iv\_next)\{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01016}01016                         \textcolor{keywordflow}{if}(vap-\/>iv\_opmode != IEEE80211\_M\_HOSTAP)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01017}01017                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01018}01018                         \textcolor{comment}{/* WDS vap's always share the local mac address. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01019}01019                         flags \&= \string~IEEE80211\_CLONE\_BSSID;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01020}01020                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01021}01021                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01022}01022                 \textcolor{keywordflow}{if} (vap == NULL) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01023}01023                         device\_printf(sc-\/>\mbox{\hyperlink{structrun__softc_a11422e8a9e276cfaea3662dc74f6fc84}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01024}01024                             \textcolor{stringliteral}{"{}wds only supported in ap mode\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01025}01025                         \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01026}01026                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01027}01027                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01028}01028         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01029}01029                 device\_printf(sc-\/>\mbox{\hyperlink{structrun__softc_a11422e8a9e276cfaea3662dc74f6fc84}{sc\_dev}}, \textcolor{stringliteral}{"{}unknown opmode \%d\(\backslash\)n"{}}, opmode);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01030}01030                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01031}01031         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01032}01032 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01033}01033         rvp = malloc(\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__vap}{run\_vap}}), M\_80211\_VAP, M\_WAITOK | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01034}01034         vap = \&rvp-\/>\mbox{\hyperlink{structrun__vap_a486ec51658db5e3e238fc907e1e4f0bf}{vap}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01035}01035 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01036}01036         \textcolor{keywordflow}{if} (ieee80211\_vap\_setup(ic, vap, name, unit, opmode, flags,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01037}01037             bssid) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01038}01038                 \textcolor{comment}{/* out of memory */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01039}01039                 free(rvp, M\_80211\_VAP);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01040}01040                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01041}01041         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01042}01042 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01043}01043         vap-\/>iv\_update\_beacon = \mbox{\hyperlink{if__run_8c_a4b03d589a18e3ff1f9538cdaf953f669}{run\_update\_beacon}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01044}01044         vap-\/>iv\_max\_aid = \mbox{\hyperlink{if__runvar_8h_a62d030b0e29e0863a6917def731081db}{RT2870\_WCID\_MAX}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01045}01045 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01046}01046         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01047}01047 \textcolor{comment}{         * The linux rt2800 driver limits 1 stream devices to a 32KB}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01048}01048 \textcolor{comment}{         * RX AMPDU.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01049}01049 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01050}01050         \textcolor{keywordflow}{if} (ic-\/>ic\_rxstream > 1)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01051}01051                 vap-\/>iv\_ampdu\_rxmax = IEEE80211\_HTCAP\_MAXRXAMPDU\_64K;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01052}01052         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01053}01053                 vap-\/>iv\_ampdu\_rxmax = IEEE80211\_HTCAP\_MAXRXAMPDU\_32K;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01054}01054         vap-\/>iv\_ampdu\_density = IEEE80211\_HTCAP\_MPDUDENSITY\_2; \textcolor{comment}{/* 2uS */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01055}01055 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01056}01056         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01057}01057 \textcolor{comment}{         * To delete the right key from h/w, we need wcid.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01058}01058 \textcolor{comment}{         * Luckily, there is unused space in ieee80211\_key\{\}, wk\_pad,}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01059}01059 \textcolor{comment}{         * and matching wcid will be written into there. So, cast}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01060}01060 \textcolor{comment}{         * some spells to remove 'const' from ieee80211\_key\{\}}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01061}01061 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01062}01062         vap-\/>iv\_key\_delete = (\textcolor{keywordtype}{void} *)\mbox{\hyperlink{if__run_8c_afd4c92318d98961ae6a7a2499a582b75}{run\_key\_delete}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01063}01063         vap-\/>iv\_key\_set = (\textcolor{keywordtype}{void} *)\mbox{\hyperlink{if__run_8c_a4976ef424eb55ce1725ec5e83e18bbb3}{run\_key\_set}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01064}01064 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01065}01065         \textcolor{comment}{/* override state transition machine */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01066}01066         rvp-\/>\mbox{\hyperlink{structrun__vap_a5730b341e0dd3e7ff8dce9a3f1cd9ca6}{newstate}} = vap-\/>iv\_newstate;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01067}01067         vap-\/>iv\_newstate = \mbox{\hyperlink{if__run_8c_aec5eab1bf9993e2e263473e59fc11f2c}{run\_newstate}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01068}01068         \textcolor{keywordflow}{if} (opmode == IEEE80211\_M\_IBSS) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01069}01069                 rvp-\/>\mbox{\hyperlink{structrun__vap_a1d90e3160b0832169f981472eb6a0d52}{recv\_mgmt}} = vap-\/>iv\_recv\_mgmt;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01070}01070                 vap-\/>iv\_recv\_mgmt = \mbox{\hyperlink{if__run_8c_a1cd17eb60f1863517cc6b147aa5295cd}{run\_recv\_mgmt}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01071}01071         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01072}01072 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01073}01073         ieee80211\_ratectl\_init(vap);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01074}01074         ieee80211\_ratectl\_setinterval(vap, 1000 \textcolor{comment}{/* 1 sec */});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01075}01075 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01076}01076         \textcolor{comment}{/* complete setup */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01077}01077         ieee80211\_vap\_attach(vap, \mbox{\hyperlink{if__run_8c_ae68dc7a107c157aa04dc6ce246693e2f}{run\_media\_change}}, ieee80211\_media\_status,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01078}01078             mac);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01079}01079 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01080}01080         \textcolor{comment}{/* make sure id is always unique */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01081}01081         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{if__runvar_8h_a93630e73de260e728c90f5ddc38c796b}{RUN\_VAP\_MAX}}; i++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01082}01082                 \textcolor{keywordflow}{if}((sc-\/>\mbox{\hyperlink{structrun__softc_abedfe0a316891088702715529acece9e}{rvp\_bmap}} \& 1 << i) == 0)\{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01083}01083                         sc-\/>\mbox{\hyperlink{structrun__softc_abedfe0a316891088702715529acece9e}{rvp\_bmap}} |= 1 << i;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01084}01084                         rvp-\/>\mbox{\hyperlink{structrun__vap_a8ffa8613b55b52ad41c7d293cb35ec63}{rvp\_id}} = i;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01085}01085                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01086}01086                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01087}01087         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01088}01088         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_ac8eca37dc53b73408f99d028e07fea66}{rvp\_cnt}}++ == 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01089}01089                 ic-\/>ic\_opmode = opmode;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01090}01090 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01091}01091         \textcolor{keywordflow}{if} (opmode == IEEE80211\_M\_HOSTAP)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01092}01092                 sc-\/>\mbox{\hyperlink{structrun__softc_a80ae37469cb0af8bf5f1e59107243d21}{cmdq\_run}} = \mbox{\hyperlink{if__runvar_8h_abc29e6edc22c9ba09e2a3e35e48c94c3}{RUN\_CMDQ\_GO}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01093}01093 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01094}01094         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_STATE, \textcolor{stringliteral}{"{}rvp\_id=\%d bmap=\%x rvp\_cnt=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01095}01095             rvp-\/>\mbox{\hyperlink{structrun__vap_a8ffa8613b55b52ad41c7d293cb35ec63}{rvp\_id}}, sc-\/>\mbox{\hyperlink{structrun__softc_abedfe0a316891088702715529acece9e}{rvp\_bmap}}, sc-\/>\mbox{\hyperlink{structrun__softc_ac8eca37dc53b73408f99d028e07fea66}{rvp\_cnt}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01096}01096 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01097}01097         \textcolor{keywordflow}{return} (vap);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01098}01098 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01099}01099 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01100}01100 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01101}\mbox{\hyperlink{if__run_8c_a9de9d42b5fa916ccf8fa8ec463e344bc}{01101}} \mbox{\hyperlink{if__run_8c_a9de9d42b5fa916ccf8fa8ec463e344bc}{run\_vap\_delete}}(\textcolor{keyword}{struct} ieee80211vap *vap)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01102}01102 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01103}01103         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__vap}{run\_vap}} *rvp = \mbox{\hyperlink{if__runvar_8h_a04216c15e7dce0789f22dc3831e15869}{RUN\_VAP}}(\mbox{\hyperlink{structrun__vap_a486ec51658db5e3e238fc907e1e4f0bf}{vap}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01104}01104         \textcolor{keyword}{struct }ieee80211com *ic;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01105}01105         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01106}01106         uint8\_t rvp\_id;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01107}01107 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01108}01108         \textcolor{keywordflow}{if} (vap == NULL)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01109}01109                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01110}01110 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01111}01111         ic = vap-\/>iv\_ic;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01112}01112         sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01113}01113 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01114}01114         \mbox{\hyperlink{if__runvar_8h_afb83ba5b9cfa86e30eb1e74fe2267cea}{RUN\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01115}01115 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01116}01116         m\_freem(rvp-\/>\mbox{\hyperlink{structrun__vap_ae4fdb0538e4abb3d28b3ecd67b8a8f09}{beacon\_mbuf}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01117}01117         rvp-\/>\mbox{\hyperlink{structrun__vap_ae4fdb0538e4abb3d28b3ecd67b8a8f09}{beacon\_mbuf}} = NULL;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01118}01118 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01119}01119         rvp\_id = rvp-\/>\mbox{\hyperlink{structrun__vap_a8ffa8613b55b52ad41c7d293cb35ec63}{rvp\_id}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01120}01120         sc-\/>\mbox{\hyperlink{structrun__softc_a62dd21cab90620634cc0d338870dc49f}{ratectl\_run}} \&= \string~(1 << rvp\_id);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01121}01121         sc-\/>\mbox{\hyperlink{structrun__softc_abedfe0a316891088702715529acece9e}{rvp\_bmap}} \&= \string~(1 << rvp\_id);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01122}01122         \mbox{\hyperlink{if__run_8c_a841976387f67bac56bbf1a8e8a5efe6f}{run\_set\_region\_4}}(sc, \mbox{\hyperlink{if__runreg_8h_aea2084a71f6d675386b6955c74ae0c4d}{RT2860\_SKEY}}(rvp\_id, 0), 0, 128);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01123}01123         \mbox{\hyperlink{if__run_8c_a841976387f67bac56bbf1a8e8a5efe6f}{run\_set\_region\_4}}(sc, \mbox{\hyperlink{if__runreg_8h_affdbbb6a91de61c6cb45a1e829599d18}{RT2860\_BCN\_BASE}}(rvp\_id), 0, 512);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01124}01124         -\/-\/sc-\/>\mbox{\hyperlink{structrun__softc_ac8eca37dc53b73408f99d028e07fea66}{rvp\_cnt}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01125}01125 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01126}01126         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_STATE,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01127}01127             \textcolor{stringliteral}{"{}vap=\%p rvp\_id=\%d bmap=\%x rvp\_cnt=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01128}01128             vap, rvp\_id, sc-\/>\mbox{\hyperlink{structrun__softc_abedfe0a316891088702715529acece9e}{rvp\_bmap}}, sc-\/>\mbox{\hyperlink{structrun__softc_ac8eca37dc53b73408f99d028e07fea66}{rvp\_cnt}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01129}01129 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01130}01130         \mbox{\hyperlink{if__runvar_8h_a45d3b538b97178f8fe93284ed57e2cd5}{RUN\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01131}01131 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01132}01132         ieee80211\_ratectl\_deinit(vap);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01133}01133         ieee80211\_vap\_detach(vap);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01134}01134         free(rvp, M\_80211\_VAP);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01135}01135 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01136}01136 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01137}01137 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01138}01138 \textcolor{comment}{ * There are numbers of functions need to be called in context thread.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01139}01139 \textcolor{comment}{ * Rather than creating taskqueue event for each of those functions,}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01140}01140 \textcolor{comment}{ * here is all-\/for-\/one taskqueue callback function. This function}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01141}01141 \textcolor{comment}{ * guarantees deferred functions are executed in the same order they}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01142}01142 \textcolor{comment}{ * were enqueued.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01143}01143 \textcolor{comment}{ * '\& RUN\_CMDQ\_MASQ' is to loop cmdq[].}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01144}01144 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01145}01145 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01146}\mbox{\hyperlink{if__run_8c_ac86bc117be389325cd91ae96a57da520}{01146}} \mbox{\hyperlink{if__run_8c_ac86bc117be389325cd91ae96a57da520}{run\_cmdq\_cb}}(\textcolor{keywordtype}{void} *arg, \textcolor{keywordtype}{int} pending)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01147}01147 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01148}01148         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *sc = arg;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01149}01149         uint8\_t i;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01150}01150 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01151}01151         \textcolor{comment}{/* call cmdq[].func locked */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01152}01152         \mbox{\hyperlink{if__runvar_8h_afb83ba5b9cfa86e30eb1e74fe2267cea}{RUN\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01153}01153         \textcolor{keywordflow}{for} (i = sc-\/>\mbox{\hyperlink{structrun__softc_a0f131ff5f32a45f2cd4170f9a398e1b4}{cmdq\_exec}}; sc-\/>\mbox{\hyperlink{structrun__softc_a9500a13eb58aab1b19d1149c55235640}{cmdq}}[i].\mbox{\hyperlink{structrun__cmdq_a8bd79bf0dffc9ec5341a2d955f19f31e}{func}} \&\& pending;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01154}01154             i = sc-\/>\mbox{\hyperlink{structrun__softc_a0f131ff5f32a45f2cd4170f9a398e1b4}{cmdq\_exec}}, pending-\/-\/) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01155}01155                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_CMD, \textcolor{stringliteral}{"{}cmdq\_exec=\%d pending=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01156}01156                     i, pending);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01157}01157                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a80ae37469cb0af8bf5f1e59107243d21}{cmdq\_run}} == \mbox{\hyperlink{if__runvar_8h_abc29e6edc22c9ba09e2a3e35e48c94c3}{RUN\_CMDQ\_GO}}) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01158}01158                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01159}01159 \textcolor{comment}{                         * If arg0 is NULL, callback func needs more}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01160}01160 \textcolor{comment}{                         * than one arg. So, pass ptr to cmdq struct.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01161}01161 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01162}01162                         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a9500a13eb58aab1b19d1149c55235640}{cmdq}}[i].\mbox{\hyperlink{structrun__cmdq_a44148050f8e128fac3651617eecad099}{arg0}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01163}01163                                 sc-\/>\mbox{\hyperlink{structrun__softc_a9500a13eb58aab1b19d1149c55235640}{cmdq}}[i].\mbox{\hyperlink{structrun__cmdq_a8bd79bf0dffc9ec5341a2d955f19f31e}{func}}(sc-\/>\mbox{\hyperlink{structrun__softc_a9500a13eb58aab1b19d1149c55235640}{cmdq}}[i].\mbox{\hyperlink{structrun__cmdq_a44148050f8e128fac3651617eecad099}{arg0}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01164}01164                         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01165}01165                                 sc-\/>\mbox{\hyperlink{structrun__softc_a9500a13eb58aab1b19d1149c55235640}{cmdq}}[i].\mbox{\hyperlink{structrun__cmdq_a8bd79bf0dffc9ec5341a2d955f19f31e}{func}}(\&sc-\/>\mbox{\hyperlink{structrun__softc_a9500a13eb58aab1b19d1149c55235640}{cmdq}}[i]);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01166}01166                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01167}01167                 sc-\/>\mbox{\hyperlink{structrun__softc_a9500a13eb58aab1b19d1149c55235640}{cmdq}}[i].\mbox{\hyperlink{structrun__cmdq_a44148050f8e128fac3651617eecad099}{arg0}} = NULL;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01168}01168                 sc-\/>\mbox{\hyperlink{structrun__softc_a9500a13eb58aab1b19d1149c55235640}{cmdq}}[i].\mbox{\hyperlink{structrun__cmdq_a8bd79bf0dffc9ec5341a2d955f19f31e}{func}} = NULL;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01169}01169                 sc-\/>\mbox{\hyperlink{structrun__softc_a0f131ff5f32a45f2cd4170f9a398e1b4}{cmdq\_exec}}++;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01170}01170                 sc-\/>\mbox{\hyperlink{structrun__softc_a0f131ff5f32a45f2cd4170f9a398e1b4}{cmdq\_exec}} \&= \mbox{\hyperlink{if__runvar_8h_a16a5b75733dc91c0bdff6e44634f6d37}{RUN\_CMDQ\_MASQ}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01171}01171         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01172}01172         \mbox{\hyperlink{if__runvar_8h_a45d3b538b97178f8fe93284ed57e2cd5}{RUN\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01173}01173 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01174}01174 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01175}01175 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01176}\mbox{\hyperlink{if__run_8c_a1a000f85f61f73152030a297f4b687ee}{01176}} \mbox{\hyperlink{if__run_8c_a1a000f85f61f73152030a297f4b687ee}{run\_setup\_tx\_list}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structrun__endpoint__queue}{run\_endpoint\_queue}} *pq)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01177}01177 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01178}01178         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__tx__data}{run\_tx\_data}} *data;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01179}01179 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01180}01180         memset(pq, 0, \textcolor{keyword}{sizeof}(*pq));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01181}01181 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01182}01182         STAILQ\_INIT(\&pq-\/>\mbox{\hyperlink{structrun__endpoint__queue_a653ce1228c9cf40b5c3540a174da8043}{tx\_qh}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01183}01183         STAILQ\_INIT(\&pq-\/>\mbox{\hyperlink{structrun__endpoint__queue_a1db0efb561505e806b51e94d5ec9d9e4}{tx\_fh}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01184}01184 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01185}01185         \textcolor{keywordflow}{for} (data = \&pq-\/>\mbox{\hyperlink{structrun__endpoint__queue_affeb147c81e2ffd2507f06691c10e026}{tx\_data}}[0];}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01186}01186             data < \&pq-\/>tx\_data[\mbox{\hyperlink{if__runvar_8h_a7aef91982728fb09e3be24be55a0cbbf}{RUN\_TX\_RING\_COUNT}}]; data++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01187}01187                 data-\/>sc = \mbox{\hyperlink{structrun__tx__data_a257e90a7054b82c1fee4749e6bbb5a97}{sc}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01188}01188                 STAILQ\_INSERT\_TAIL(\&pq-\/>\mbox{\hyperlink{structrun__endpoint__queue_a1db0efb561505e806b51e94d5ec9d9e4}{tx\_fh}}, data, \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01189}01189         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01190}01190         pq-\/>\mbox{\hyperlink{structrun__endpoint__queue_ad10831fe0433aa4f7a641b45bc670098}{tx\_nfree}} = \mbox{\hyperlink{if__runvar_8h_a7aef91982728fb09e3be24be55a0cbbf}{RUN\_TX\_RING\_COUNT}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01191}01191 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01192}01192 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01193}01193 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01194}\mbox{\hyperlink{if__run_8c_a965be32210d84ec046de36c0bff35244}{01194}} \mbox{\hyperlink{if__run_8c_a965be32210d84ec046de36c0bff35244}{run\_unsetup\_tx\_list}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *\mbox{\hyperlink{structrun__tx__data_a257e90a7054b82c1fee4749e6bbb5a97}{sc}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structrun__endpoint__queue}{run\_endpoint\_queue}} *pq)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01195}01195 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01196}01196         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__tx__data}{run\_tx\_data}} *data;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01197}01197 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01198}01198         \textcolor{comment}{/* make sure any subsequent use of the queues will fail */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01199}01199         pq-\/>\mbox{\hyperlink{structrun__endpoint__queue_ad10831fe0433aa4f7a641b45bc670098}{tx\_nfree}} = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01200}01200         STAILQ\_INIT(\&pq-\/>\mbox{\hyperlink{structrun__endpoint__queue_a1db0efb561505e806b51e94d5ec9d9e4}{tx\_fh}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01201}01201         STAILQ\_INIT(\&pq-\/>\mbox{\hyperlink{structrun__endpoint__queue_a653ce1228c9cf40b5c3540a174da8043}{tx\_qh}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01202}01202 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01203}01203         \textcolor{comment}{/* free up all node references and mbufs */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01204}01204         \textcolor{keywordflow}{for} (data = \&pq-\/>\mbox{\hyperlink{structrun__endpoint__queue_affeb147c81e2ffd2507f06691c10e026}{tx\_data}}[0];}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01205}01205             data < \&pq-\/>tx\_data[\mbox{\hyperlink{if__runvar_8h_a7aef91982728fb09e3be24be55a0cbbf}{RUN\_TX\_RING\_COUNT}}]; data++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01206}01206                 \textcolor{keywordflow}{if} (data-\/>m != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01207}01207                         m\_freem(data-\/>m);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01208}01208                         data-\/>m = NULL;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01209}01209                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01210}01210                 \textcolor{keywordflow}{if} (data-\/>ni != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01211}01211                         ieee80211\_free\_node(data-\/>ni);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01212}01212                         data-\/>ni = NULL;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01213}01213                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01214}01214         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01215}01215 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01216}01216 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01217}01217 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01218}\mbox{\hyperlink{if__run_8c_a6296048b322ee04d4142b6d24107fd8a}{01218}} \mbox{\hyperlink{if__run_8c_a6296048b322ee04d4142b6d24107fd8a}{run\_load\_microcode}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *\mbox{\hyperlink{structrun__tx__data_a257e90a7054b82c1fee4749e6bbb5a97}{sc}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01219}01219 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01220}01220         \mbox{\hyperlink{structusb__device__request}{usb\_device\_request\_t}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01221}01221         \textcolor{keyword}{const} \textcolor{keyword}{struct }firmware *fw;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01222}01222         \textcolor{keyword}{const} u\_char *base;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01223}01223         uint32\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01224}01224         \textcolor{keywordtype}{int} ntries, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01225}01225         \textcolor{keyword}{const} uint64\_t *temp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01226}01226         uint64\_t bytes;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01227}01227 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01228}01228         \mbox{\hyperlink{if__runvar_8h_a45d3b538b97178f8fe93284ed57e2cd5}{RUN\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01229}01229         fw = firmware\_get(\textcolor{stringliteral}{"{}runfw"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01230}01230         \mbox{\hyperlink{if__runvar_8h_afb83ba5b9cfa86e30eb1e74fe2267cea}{RUN\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01231}01231         \textcolor{keywordflow}{if} (fw == NULL) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01232}01232                 device\_printf(sc-\/>\mbox{\hyperlink{structrun__softc_a11422e8a9e276cfaea3662dc74f6fc84}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01233}01233                     \textcolor{stringliteral}{"{}failed loadfirmware of file \%s\(\backslash\)n"{}}, \textcolor{stringliteral}{"{}runfw"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01234}01234                 \textcolor{keywordflow}{return} ENOENT;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01235}01235         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01236}01236 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01237}01237         \textcolor{keywordflow}{if} (fw-\/>datasize != 8192) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01238}01238                 device\_printf(sc-\/>\mbox{\hyperlink{structrun__softc_a11422e8a9e276cfaea3662dc74f6fc84}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01239}01239                     \textcolor{stringliteral}{"{}invalid firmware size (should be 8KB)\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01240}01240                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = EINVAL;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01241}01241                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01242}01242         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01243}01243 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01244}01244         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01245}01245 \textcolor{comment}{         * RT3071/RT3072 use a different firmware}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01246}01246 \textcolor{comment}{         * run-\/rt2870 (8KB) contains both,}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01247}01247 \textcolor{comment}{         * first half (4KB) is for rt2870,}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01248}01248 \textcolor{comment}{         * last half is for rt3071.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01249}01249 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01250}01250         base = fw-\/>data;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01251}01251         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}}) != 0x2860 \&\&}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01252}01252             (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}}) != 0x2872 \&\&}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01253}01253             (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}}) != 0x3070) \{ }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01254}01254                 base += 4096;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01255}01255         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01256}01256 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01257}01257         \textcolor{comment}{/* cheap sanity check */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01258}01258         temp = fw-\/>data;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01259}01259         bytes = *temp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01260}01260         \textcolor{keywordflow}{if} (bytes != be64toh(0xffffff0210280210ULL)) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01261}01261                 device\_printf(sc-\/>\mbox{\hyperlink{structrun__softc_a11422e8a9e276cfaea3662dc74f6fc84}{sc\_dev}}, \textcolor{stringliteral}{"{}firmware checksum failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01262}01262                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = EINVAL;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01263}01263                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01264}01264         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01265}01265 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01266}01266         \textcolor{comment}{/* write microcode image */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01267}01267         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_ae1260c15661b04d2cc04867c70e3df41}{sc\_flags}} \& \mbox{\hyperlink{if__runvar_8h_a569c973366e92aaf4060926e20cc30b2}{RUN\_FLAG\_FWLOAD\_NEEDED}}) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01268}01268                 \mbox{\hyperlink{if__run_8c_a366ce11d14b4e5e3700232866441c12c}{run\_write\_region\_1}}(sc, \mbox{\hyperlink{if__runreg_8h_afe61e59034848f8eb9359f31e60806c3}{RT2870\_FW\_BASE}}, base, 4096);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01269}01269                 \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a5034498e3c4e311e4d6c0bb88a38bf9c}{RT2860\_H2M\_MAILBOX\_CID}}, 0xffffffff);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01270}01270                 \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a2ec718da187fba7b5fbea54e32d537f0}{RT2860\_H2M\_MAILBOX\_STATUS}}, 0xffffffff);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01271}01271         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01272}01272 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01273}01273         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bmRequestType = \mbox{\hyperlink{usb_8h_a6aafebff48631e00449299005c4a858c}{UT\_WRITE\_VENDOR\_DEVICE}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01274}01274         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bRequest = \mbox{\hyperlink{if__runreg_8h_ae9296e2e45e5d8db8e5dfbd9f7ae81bf}{RT2870\_RESET}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01275}01275         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wValue, 8);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01276}01276         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01277}01277         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wLength, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01278}01278         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{usbdi_8h_adf0c9751da27fa2e6a3b52a9bfd5f7d1}{usbd\_do\_request}}(sc-\/>\mbox{\hyperlink{structrun__softc_a9b1516af9abf677299e91addf3590697}{sc\_udev}}, \&sc-\/>\mbox{\hyperlink{structrun__softc_a5a51534f63edf520da3cbc2cc2ca484c}{sc\_mtx}}, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, NULL))}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01279}01279             != 0) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01280}01280                 device\_printf(sc-\/>\mbox{\hyperlink{structrun__softc_a11422e8a9e276cfaea3662dc74f6fc84}{sc\_dev}}, \textcolor{stringliteral}{"{}firmware reset failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01281}01281                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01282}01282         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01283}01283 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01284}01284         \mbox{\hyperlink{if__run_8c_a92b12f7b350001cb12d558c3fb85e0c5}{run\_delay}}(sc, 10);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01285}01285 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01286}01286         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a83b701b4ce7774131f4ba65e156fa8ee}{RT2860\_H2M\_BBPAGENT}}, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01287}01287         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a1657b7fa6a2c2b41bcd6f3e41a051379}{RT2860\_H2M\_MAILBOX}}, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01288}01288         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a02bde8fcbf1cf3a75a64ccaabe6add46}{RT2860\_H2M\_INTSRC}}, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01289}01289         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__run_8c_af551890d568e683ea5614e905506fb1e}{run\_mcu\_cmd}}(sc, \mbox{\hyperlink{if__runreg_8h_a48e56d089e5b978827922a7f61da7765}{RT2860\_MCU\_CMD\_RFRESET}}, 0)) != 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01290}01290                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01291}01291 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01292}01292         \textcolor{comment}{/* wait until microcontroller is ready */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01293}01293         \textcolor{keywordflow}{for} (ntries = 0; ntries < 1000; ntries++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01294}01294                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a9529937deef6ff6ce566296877ac3288}{RT2860\_SYS\_CTRL}}, \&tmp)) != 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01295}01295                         \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01296}01296                 \textcolor{keywordflow}{if} (tmp \& \mbox{\hyperlink{if__runreg_8h_a90eaee2e7f742ee55e713c63a7600979}{RT2860\_MCU\_READY}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01297}01297                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01298}01298                 \mbox{\hyperlink{if__run_8c_a92b12f7b350001cb12d558c3fb85e0c5}{run\_delay}}(sc, 10);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01299}01299         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01300}01300         \textcolor{keywordflow}{if} (ntries == 1000) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01301}01301                 device\_printf(sc-\/>\mbox{\hyperlink{structrun__softc_a11422e8a9e276cfaea3662dc74f6fc84}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01302}01302                     \textcolor{stringliteral}{"{}timeout waiting for MCU to initialize\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01303}01303                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = ETIMEDOUT;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01304}01304                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01305}01305         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01306}01306         device\_printf(sc-\/>\mbox{\hyperlink{structrun__softc_a11422e8a9e276cfaea3662dc74f6fc84}{sc\_dev}}, \textcolor{stringliteral}{"{}firmware \%s ver. \%u.\%u loaded\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01307}01307             (base == fw-\/>data) ? \textcolor{stringliteral}{"{}RT2870"{}} : \textcolor{stringliteral}{"{}RT3071"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01308}01308             *(base + 4092), *(base + 4093));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01309}01309 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01310}01310 \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}}:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01311}01311         firmware\_put(fw, FIRMWARE\_UNLOAD);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01312}01312         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01313}01313 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01314}01314 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01315}01315 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01316}\mbox{\hyperlink{if__run_8c_a23c664f4215314d704c3170d94c81c3f}{01316}} \mbox{\hyperlink{if__run_8c_a23c664f4215314d704c3170d94c81c3f}{run\_reset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01317}01317 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01318}01318         \mbox{\hyperlink{structusb__device__request}{usb\_device\_request\_t}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01319}01319 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01320}01320         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bmRequestType = \mbox{\hyperlink{usb_8h_a6aafebff48631e00449299005c4a858c}{UT\_WRITE\_VENDOR\_DEVICE}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01321}01321         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bRequest = \mbox{\hyperlink{if__runreg_8h_ae9296e2e45e5d8db8e5dfbd9f7ae81bf}{RT2870\_RESET}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01322}01322         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wValue, 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01323}01323         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01324}01324         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wLength, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01325}01325         \textcolor{keywordflow}{return} (\mbox{\hyperlink{usbdi_8h_adf0c9751da27fa2e6a3b52a9bfd5f7d1}{usbd\_do\_request}}(sc-\/>\mbox{\hyperlink{structrun__softc_a9b1516af9abf677299e91addf3590697}{sc\_udev}}, \&sc-\/>\mbox{\hyperlink{structrun__softc_a5a51534f63edf520da3cbc2cc2ca484c}{sc\_mtx}}, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, NULL));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01326}01326 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01327}01327 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01328}01328 \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01329}\mbox{\hyperlink{if__run_8c_af41f05fc75b7bb03dce2bea6c0485782}{01329}} \mbox{\hyperlink{if__run_8c_af41f05fc75b7bb03dce2bea6c0485782}{run\_do\_request}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01330}01330     \textcolor{keyword}{struct} \mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} *\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, \textcolor{keywordtype}{void} *data)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01331}01331 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01332}01332         \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} err;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01333}01333         \textcolor{keywordtype}{int} ntries = 10;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01334}01334 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01335}01335         \mbox{\hyperlink{if__runvar_8h_a46923988c8f3d1896339650dd4bf5f53}{RUN\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01336}01336 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01337}01337         \textcolor{keywordflow}{while} (ntries-\/-\/) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01338}01338                 err = \mbox{\hyperlink{usb__request_8c_ae914a46bd63666caf7f4d8c182fa5e71}{usbd\_do\_request\_flags}}(sc-\/>\mbox{\hyperlink{structrun__softc_a9b1516af9abf677299e91addf3590697}{sc\_udev}}, \&sc-\/>\mbox{\hyperlink{structrun__softc_a5a51534f63edf520da3cbc2cc2ca484c}{sc\_mtx}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01339}01339                     \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, data, 0, NULL, 250 \textcolor{comment}{/* ms */});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01340}01340                 \textcolor{keywordflow}{if} (err == 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01341}01341                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01342}01342                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_USB,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01343}01343                     \textcolor{stringliteral}{"{}Control request failed, \%s (retrying)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01344}01344                     \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(err));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01345}01345                 \mbox{\hyperlink{if__run_8c_a92b12f7b350001cb12d558c3fb85e0c5}{run\_delay}}(sc, 10);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01346}01346         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01347}01347         \textcolor{keywordflow}{return} (err);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01348}01348 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01349}01349 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01350}01350 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01351}\mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{01351}} \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, uint16\_t \mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, uint32\_t *\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01352}01352 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01353}01353         uint32\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01354}01354         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01355}01355 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01356}01356         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__run_8c_a4e4209826999dd13a18401725612b197}{run\_read\_region\_1}}(sc, \mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, (uint8\_t *)\&tmp, \textcolor{keyword}{sizeof} tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01357}01357         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} == 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01358}01358                 *\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = le32toh(tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01359}01359         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01360}01360                 *\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = 0xffffffff;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01361}01361         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01362}01362 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01363}01363 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01364}01364 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01365}\mbox{\hyperlink{if__run_8c_a4e4209826999dd13a18401725612b197}{01365}} \mbox{\hyperlink{if__run_8c_a4e4209826999dd13a18401725612b197}{run\_read\_region\_1}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, uint16\_t \mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, uint8\_t *buf, \textcolor{keywordtype}{int} \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01366}01366 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01367}01367         \mbox{\hyperlink{structusb__device__request}{usb\_device\_request\_t}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01368}01368 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01369}01369         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bmRequestType = \mbox{\hyperlink{usb_8h_a6da49500e864a3c33c9eed3dd49d3e59}{UT\_READ\_VENDOR\_DEVICE}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01370}01370         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bRequest = \mbox{\hyperlink{if__runreg_8h_ac3e75ae4e85ecd5aef14688d89eb6811}{RT2870\_READ\_REGION\_1}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01371}01371         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wValue, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01372}01372         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex, \mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01373}01373         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wLength, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01374}01374 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01375}01375         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__run_8c_af41f05fc75b7bb03dce2bea6c0485782}{run\_do\_request}}(sc, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, buf));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01376}01376 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01377}01377 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01378}01378 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01379}\mbox{\hyperlink{if__run_8c_a82466993aacab1c275bdc6b0177f8b99}{01379}} \mbox{\hyperlink{if__run_8c_a82466993aacab1c275bdc6b0177f8b99}{run\_write\_2}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, uint16\_t \mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, uint16\_t \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01380}01380 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01381}01381         \mbox{\hyperlink{structusb__device__request}{usb\_device\_request\_t}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01382}01382 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01383}01383         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bmRequestType = \mbox{\hyperlink{usb_8h_a6aafebff48631e00449299005c4a858c}{UT\_WRITE\_VENDOR\_DEVICE}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01384}01384         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bRequest = \mbox{\hyperlink{if__runreg_8h_acc7e40a6c985d67fdfa222e8cde81ca5}{RT2870\_WRITE\_2}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01385}01385         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wValue, \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01386}01386         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex, \mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01387}01387         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wLength, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01388}01388 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01389}01389         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__run_8c_af41f05fc75b7bb03dce2bea6c0485782}{run\_do\_request}}(sc, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, NULL));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01390}01390 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01391}01391 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01392}01392 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01393}\mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{01393}} \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, uint16\_t \mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, uint32\_t \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01394}01394 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01395}01395         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01396}01396 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01397}01397         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__run_8c_a82466993aacab1c275bdc6b0177f8b99}{run\_write\_2}}(sc, \mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0xffff)) == 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01398}01398                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__run_8c_a82466993aacab1c275bdc6b0177f8b99}{run\_write\_2}}(sc, \mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} + 2, \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >> 16);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01399}01399         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01400}01400 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01401}01401 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01402}01402 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01403}\mbox{\hyperlink{if__run_8c_a366ce11d14b4e5e3700232866441c12c}{01403}} \mbox{\hyperlink{if__run_8c_a366ce11d14b4e5e3700232866441c12c}{run\_write\_region\_1}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, uint16\_t \mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, \textcolor{keyword}{const} uint8\_t *buf,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01404}01404     \textcolor{keywordtype}{int} \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01405}01405 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01406}01406 \textcolor{preprocessor}{\#if 1}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01407}01407         \textcolor{keywordtype}{int} i, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01408}01408         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01409}01409 \textcolor{comment}{         * NB: the WRITE\_REGION\_1 command is not stable on RT2860.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01410}01410 \textcolor{comment}{         * We thus issue multiple WRITE\_2 commands instead.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01411}01411 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01412}01412         KASSERT((\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} \& 1) == 0, (\textcolor{stringliteral}{"{}run\_write\_region\_1: Data too long.\(\backslash\)n"{}}));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01413}01413         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} \&\& \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} == 0; i += 2)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01414}01414                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__run_8c_a82466993aacab1c275bdc6b0177f8b99}{run\_write\_2}}(sc, \mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} + i, buf[i] | buf[i + 1] << 8);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01415}01415         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01416}01416 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01417}01417         \mbox{\hyperlink{structusb__device__request}{usb\_device\_request\_t}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01418}01418         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01419}01419 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01420}01420         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01421}01421 \textcolor{comment}{         * NOTE: It appears the WRITE\_REGION\_1 command cannot be}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01422}01422 \textcolor{comment}{         * passed a huge amount of data, which will crash the}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01423}01423 \textcolor{comment}{         * firmware. Limit amount of data passed to 64-\/bytes at a}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01424}01424 \textcolor{comment}{         * time.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01425}01425 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01426}01426         \textcolor{keywordflow}{while} (\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} > 0) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01427}01427                 \textcolor{keywordtype}{int} delta = 64;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01428}01428                 \textcolor{keywordflow}{if} (delta > \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01429}01429                         delta = \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01430}01430 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01431}01431                 \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bmRequestType = \mbox{\hyperlink{usb_8h_a6aafebff48631e00449299005c4a858c}{UT\_WRITE\_VENDOR\_DEVICE}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01432}01432                 \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bRequest = \mbox{\hyperlink{if__runreg_8h_ad290fd542ea22d2650b56d19193a97bb}{RT2870\_WRITE\_REGION\_1}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01433}01433                 \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wValue, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01434}01434                 \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex, \mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01435}01435                 \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wLength, delta);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01436}01436                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__run_8c_af41f05fc75b7bb03dce2bea6c0485782}{run\_do\_request}}(sc, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, \_\_DECONST(uint8\_t *, buf));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01437}01437                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01438}01438                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01439}01439                 \mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} += delta;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01440}01440                 buf += delta;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01441}01441                 \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} -\/= delta;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01442}01442         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01443}01443         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01444}01444 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01445}01445 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01446}01446 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01447}01447 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01448}\mbox{\hyperlink{if__run_8c_a841976387f67bac56bbf1a8e8a5efe6f}{01448}} \mbox{\hyperlink{if__run_8c_a841976387f67bac56bbf1a8e8a5efe6f}{run\_set\_region\_4}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, uint16\_t \mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, uint32\_t \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, \textcolor{keywordtype}{int} \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01449}01449 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01450}01450         \textcolor{keywordtype}{int} i, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01451}01451 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01452}01452         KASSERT((\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} \& 3) == 0, (\textcolor{stringliteral}{"{}run\_set\_region\_4: Invalid data length.\(\backslash\)n"{}}));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01453}01453         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} \&\& \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} == 0; i += 4)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01454}01454                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} + i, \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01455}01455         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01456}01456 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01457}01457 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01458}01458 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01459}\mbox{\hyperlink{if__run_8c_a9c64940d705ae76b070ec09042a17a32}{01459}} \mbox{\hyperlink{if__run_8c_a9c64940d705ae76b070ec09042a17a32}{run\_efuse\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, uint16\_t addr, uint16\_t *\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, \textcolor{keywordtype}{int} count)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01460}01460 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01461}01461         uint32\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01462}01462         uint16\_t \mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01463}01463         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}, ntries;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01464}01464 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01465}01465         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a8b564e16078195ce18105c45631d5519}{RT3070\_EFUSE\_CTRL}}, \&tmp)) != 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01466}01466                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01467}01467 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01468}01468         \textcolor{keywordflow}{if} (count == 2)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01469}01469                 addr *= 2;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01470}01470         \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01471}01471 \textcolor{comment}{         * Read one 16-\/byte block into registers EFUSE\_DATA[0-\/3]:}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01472}01472 \textcolor{comment}{         * DATA0: F E D C}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01473}01473 \textcolor{comment}{         * DATA1: B A 9 8}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01474}01474 \textcolor{comment}{         * DATA2: 7 6 5 4}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01475}01475 \textcolor{comment}{         * DATA3: 3 2 1 0}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01476}01476 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01477}01477         tmp \&= \string~(\mbox{\hyperlink{if__runreg_8h_a6fd817d66415df99b7d253621796a9f9}{RT3070\_EFSROM\_MODE\_MASK}} | \mbox{\hyperlink{if__runreg_8h_ae74fe4030174a24a44f79aa740eea22f}{RT3070\_EFSROM\_AIN\_MASK}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01478}01478         tmp |= (addr \& \string~0xf) << \mbox{\hyperlink{if__runreg_8h_a480e82ec4555ebadad601200909bd229}{RT3070\_EFSROM\_AIN\_SHIFT}} | \mbox{\hyperlink{if__runreg_8h_a58c1f2dae6a38c7452a6be35df71cf99}{RT3070\_EFSROM\_KICK}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01479}01479         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a8b564e16078195ce18105c45631d5519}{RT3070\_EFUSE\_CTRL}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01480}01480         \textcolor{keywordflow}{for} (ntries = 0; ntries < 100; ntries++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01481}01481                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a8b564e16078195ce18105c45631d5519}{RT3070\_EFUSE\_CTRL}}, \&tmp)) != 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01482}01482                         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01483}01483                 \textcolor{keywordflow}{if} (!(tmp \& \mbox{\hyperlink{if__runreg_8h_a58c1f2dae6a38c7452a6be35df71cf99}{RT3070\_EFSROM\_KICK}}))}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01484}01484                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01485}01485                 \mbox{\hyperlink{if__run_8c_a92b12f7b350001cb12d558c3fb85e0c5}{run\_delay}}(sc, 2);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01486}01486         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01487}01487         \textcolor{keywordflow}{if} (ntries == 100)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01488}01488                 \textcolor{keywordflow}{return} (ETIMEDOUT);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01489}01489 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01490}01490         \textcolor{keywordflow}{if} ((tmp \& \mbox{\hyperlink{if__runreg_8h_aefda1e2f6f9591bcc086ef4330353a87}{RT3070\_EFUSE\_AOUT\_MASK}}) == \mbox{\hyperlink{if__runreg_8h_aefda1e2f6f9591bcc086ef4330353a87}{RT3070\_EFUSE\_AOUT\_MASK}}) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01491}01491                 *\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = 0xffff;       \textcolor{comment}{/* address not found */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01492}01492                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01493}01493         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01494}01494         \textcolor{comment}{/* determine to which 32-\/bit register our 16-\/bit word belongs */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01495}01495         \mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} = \mbox{\hyperlink{if__runreg_8h_add1df9212c8dcdf803a16bc4f6f40eca}{RT3070\_EFUSE\_DATA3}} -\/ (addr \& 0xc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01496}01496         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, \&tmp)) != 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01497}01497                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01498}01498 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01499}01499         tmp >>= (8 * (addr \& 0x3));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01500}01500         *\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = (addr \& 1) ? tmp >> 16 : tmp \& 0xffff;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01501}01501 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01502}01502         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01503}01503 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01504}01504 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01505}01505 \textcolor{comment}{/* Read 16-\/bit from eFUSE ROM for RT3xxx. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01506}01506 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01507}\mbox{\hyperlink{if__run_8c_acc326af0772d9d71f42578f15726fc77}{01507}} \mbox{\hyperlink{if__run_8c_acc326af0772d9d71f42578f15726fc77}{run\_efuse\_read\_2}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, uint16\_t addr, uint16\_t *\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01508}01508 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01509}01509         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__run_8c_a9c64940d705ae76b070ec09042a17a32}{run\_efuse\_read}}(sc, addr, \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, 2));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01510}01510 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01511}01511 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01512}01512 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01513}\mbox{\hyperlink{if__run_8c_a5d77657d4432faf03a91628cb7dd5919}{01513}} \mbox{\hyperlink{if__run_8c_a5d77657d4432faf03a91628cb7dd5919}{run\_eeprom\_read\_2}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, uint16\_t addr, uint16\_t *\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01514}01514 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01515}01515         \mbox{\hyperlink{structusb__device__request}{usb\_device\_request\_t}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01516}01516         uint16\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01517}01517         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01518}01518 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01519}01519         addr *= 2;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01520}01520         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bmRequestType = \mbox{\hyperlink{usb_8h_a6da49500e864a3c33c9eed3dd49d3e59}{UT\_READ\_VENDOR\_DEVICE}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01521}01521         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bRequest = \mbox{\hyperlink{if__runreg_8h_af989cb70d51c9ab6f8dbdea6ba4d4ae3}{RT2870\_EEPROM\_READ}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01522}01522         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wValue, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01523}01523         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex, addr);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01524}01524         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wLength, \textcolor{keyword}{sizeof}(tmp));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01525}01525 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01526}01526         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{usbdi_8h_adf0c9751da27fa2e6a3b52a9bfd5f7d1}{usbd\_do\_request}}(sc-\/>\mbox{\hyperlink{structrun__softc_a9b1516af9abf677299e91addf3590697}{sc\_udev}}, \&sc-\/>\mbox{\hyperlink{structrun__softc_a5a51534f63edf520da3cbc2cc2ca484c}{sc\_mtx}}, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, \&tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01527}01527         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} == 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01528}01528                 *\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = le16toh(tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01529}01529         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01530}01530                 *\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = 0xffff;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01531}01531         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01532}01532 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01533}01533 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01534}01534 \textcolor{keyword}{static} \_\_inline \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01535}\mbox{\hyperlink{if__run_8c_aa6850150f01cce57d4bee13cd75cafc5}{01535}} \mbox{\hyperlink{if__run_8c_aa6850150f01cce57d4bee13cd75cafc5}{run\_srom\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, uint16\_t addr, uint16\_t *\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01536}01536 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01537}01537         \textcolor{comment}{/* either eFUSE ROM or EEPROM */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01538}01538         \textcolor{keywordflow}{return} sc-\/>\mbox{\hyperlink{structrun__softc_a3190cba02eedf547fd231ef346311e76}{sc\_srom\_read}}(sc, addr, \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01539}01539 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01540}01540 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01541}01541 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01542}\mbox{\hyperlink{if__run_8c_aa4820cee28f4577e3b1b557d3e730d37}{01542}} \mbox{\hyperlink{if__run_8c_aa4820cee28f4577e3b1b557d3e730d37}{run\_rt2870\_rf\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, uint32\_t \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01543}01543 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01544}01544         uint32\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01545}01545         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}, ntries;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01546}01546 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01547}01547         \textcolor{keywordflow}{for} (ntries = 0; ntries < 10; ntries++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01548}01548                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_acd74d6b283dd16e31288d2c57487e450}{RT2860\_RF\_CSR\_CFG0}}, \&tmp)) != 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01549}01549                         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01550}01550                 \textcolor{keywordflow}{if} (!(tmp \& \mbox{\hyperlink{if__runreg_8h_aef371047b404433f8c0ef0a2c68bba77}{RT2860\_RF\_REG\_CTRL}}))}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01551}01551                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01552}01552         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01553}01553         \textcolor{keywordflow}{if} (ntries == 10)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01554}01554                 \textcolor{keywordflow}{return} (ETIMEDOUT);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01555}01555 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01556}01556         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_acd74d6b283dd16e31288d2c57487e450}{RT2860\_RF\_CSR\_CFG0}}, \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01557}01557 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01558}01558 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01559}01559 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01560}\mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{01560}} \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, uint8\_t \mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, uint8\_t *\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01561}01561 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01562}01562         uint32\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01563}01563         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}, ntries;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01564}01564 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01565}01565         \textcolor{keywordflow}{for} (ntries = 0; ntries < 100; ntries++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01566}01566                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_aadd3861a17702fcf4789a13ffaa55ebf}{RT3070\_RF\_CSR\_CFG}}, \&tmp)) != 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01567}01567                         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01568}01568                 \textcolor{keywordflow}{if} (!(tmp \& \mbox{\hyperlink{if__runreg_8h_a80c08dadd126c15d937212f85b2936ed}{RT3070\_RF\_KICK}}))}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01569}01569                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01570}01570         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01571}01571         \textcolor{keywordflow}{if} (ntries == 100)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01572}01572                 \textcolor{keywordflow}{return} (ETIMEDOUT);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01573}01573 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01574}01574         tmp = \mbox{\hyperlink{if__runreg_8h_a80c08dadd126c15d937212f85b2936ed}{RT3070\_RF\_KICK}} | \mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} << 8;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01575}01575         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_aadd3861a17702fcf4789a13ffaa55ebf}{RT3070\_RF\_CSR\_CFG}}, tmp)) != 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01576}01576                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01577}01577 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01578}01578         \textcolor{keywordflow}{for} (ntries = 0; ntries < 100; ntries++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01579}01579                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_aadd3861a17702fcf4789a13ffaa55ebf}{RT3070\_RF\_CSR\_CFG}}, \&tmp)) != 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01580}01580                         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01581}01581                 \textcolor{keywordflow}{if} (!(tmp \& \mbox{\hyperlink{if__runreg_8h_a80c08dadd126c15d937212f85b2936ed}{RT3070\_RF\_KICK}}))}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01582}01582                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01583}01583         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01584}01584         \textcolor{keywordflow}{if} (ntries == 100)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01585}01585                 \textcolor{keywordflow}{return} (ETIMEDOUT);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01586}01586 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01587}01587         *\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = tmp \& 0xff;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01588}01588         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01589}01589 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01590}01590 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01591}01591 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01592}\mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{01592}} \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, uint8\_t \mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, uint8\_t \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01593}01593 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01594}01594         uint32\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01595}01595         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}, ntries;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01596}01596 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01597}01597         \textcolor{keywordflow}{for} (ntries = 0; ntries < 10; ntries++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01598}01598                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_aadd3861a17702fcf4789a13ffaa55ebf}{RT3070\_RF\_CSR\_CFG}}, \&tmp)) != 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01599}01599                         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01600}01600                 \textcolor{keywordflow}{if} (!(tmp \& \mbox{\hyperlink{if__runreg_8h_a80c08dadd126c15d937212f85b2936ed}{RT3070\_RF\_KICK}}))}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01601}01601                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01602}01602         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01603}01603         \textcolor{keywordflow}{if} (ntries == 10)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01604}01604                 \textcolor{keywordflow}{return} (ETIMEDOUT);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01605}01605 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01606}01606         tmp = \mbox{\hyperlink{if__runreg_8h_a0d55b98b3ed058380bcdcdfac72aee7a}{RT3070\_RF\_WRITE}} | \mbox{\hyperlink{if__runreg_8h_a80c08dadd126c15d937212f85b2936ed}{RT3070\_RF\_KICK}} | \mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} << 8 | \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01607}01607         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_aadd3861a17702fcf4789a13ffaa55ebf}{RT3070\_RF\_CSR\_CFG}}, tmp));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01608}01608 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01609}01609 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01610}01610 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01611}\mbox{\hyperlink{if__run_8c_abc20e1ae73e45e6ffade8618697f6b8a}{01611}} \mbox{\hyperlink{if__run_8c_abc20e1ae73e45e6ffade8618697f6b8a}{run\_bbp\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, uint8\_t \mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, uint8\_t *\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01612}01612 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01613}01613         uint32\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01614}01614         \textcolor{keywordtype}{int} ntries, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01615}01615 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01616}01616         \textcolor{keywordflow}{for} (ntries = 0; ntries < 10; ntries++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01617}01617                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_ade468ff342706b2ad6c67ba299c8a5bd}{RT2860\_BBP\_CSR\_CFG}}, \&tmp)) != 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01618}01618                         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01619}01619                 \textcolor{keywordflow}{if} (!(tmp \& \mbox{\hyperlink{if__runreg_8h_a15778cd88089d1d2b45c2b19694298d1}{RT2860\_BBP\_CSR\_KICK}}))}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01620}01620                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01621}01621         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01622}01622         \textcolor{keywordflow}{if} (ntries == 10)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01623}01623                 \textcolor{keywordflow}{return} (ETIMEDOUT);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01624}01624 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01625}01625         tmp = \mbox{\hyperlink{if__runreg_8h_afe2c6398c40970f655c437924250efa8}{RT2860\_BBP\_CSR\_READ}} | \mbox{\hyperlink{if__runreg_8h_a15778cd88089d1d2b45c2b19694298d1}{RT2860\_BBP\_CSR\_KICK}} | \mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} << 8;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01626}01626         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_ade468ff342706b2ad6c67ba299c8a5bd}{RT2860\_BBP\_CSR\_CFG}}, tmp)) != 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01627}01627                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01628}01628 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01629}01629         \textcolor{keywordflow}{for} (ntries = 0; ntries < 10; ntries++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01630}01630                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_ade468ff342706b2ad6c67ba299c8a5bd}{RT2860\_BBP\_CSR\_CFG}}, \&tmp)) != 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01631}01631                         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01632}01632                 \textcolor{keywordflow}{if} (!(tmp \& \mbox{\hyperlink{if__runreg_8h_a15778cd88089d1d2b45c2b19694298d1}{RT2860\_BBP\_CSR\_KICK}}))}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01633}01633                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01634}01634         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01635}01635         \textcolor{keywordflow}{if} (ntries == 10)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01636}01636                 \textcolor{keywordflow}{return} (ETIMEDOUT);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01637}01637 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01638}01638         *\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = tmp \& 0xff;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01639}01639         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01640}01640 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01641}01641 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01642}01642 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01643}\mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{01643}} \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, uint8\_t \mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, uint8\_t \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01644}01644 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01645}01645         uint32\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01646}01646         \textcolor{keywordtype}{int} ntries, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01647}01647 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01648}01648         \textcolor{keywordflow}{for} (ntries = 0; ntries < 10; ntries++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01649}01649                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_ade468ff342706b2ad6c67ba299c8a5bd}{RT2860\_BBP\_CSR\_CFG}}, \&tmp)) != 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01650}01650                         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01651}01651                 \textcolor{keywordflow}{if} (!(tmp \& \mbox{\hyperlink{if__runreg_8h_a15778cd88089d1d2b45c2b19694298d1}{RT2860\_BBP\_CSR\_KICK}}))}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01652}01652                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01653}01653         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01654}01654         \textcolor{keywordflow}{if} (ntries == 10)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01655}01655                 \textcolor{keywordflow}{return} (ETIMEDOUT);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01656}01656 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01657}01657         tmp = \mbox{\hyperlink{if__runreg_8h_a15778cd88089d1d2b45c2b19694298d1}{RT2860\_BBP\_CSR\_KICK}} | \mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} << 8 | \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01658}01658         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_ade468ff342706b2ad6c67ba299c8a5bd}{RT2860\_BBP\_CSR\_CFG}}, tmp));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01659}01659 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01660}01660 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01661}01661 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01662}01662 \textcolor{comment}{ * Send a command to the 8051 microcontroller unit.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01663}01663 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01664}01664 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01665}\mbox{\hyperlink{if__run_8c_af551890d568e683ea5614e905506fb1e}{01665}} \mbox{\hyperlink{if__run_8c_af551890d568e683ea5614e905506fb1e}{run\_mcu\_cmd}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, uint8\_t cmd, uint16\_t arg)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01666}01666 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01667}01667         uint32\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01668}01668         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}, ntries;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01669}01669 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01670}01670         \textcolor{keywordflow}{for} (ntries = 0; ntries < 100; ntries++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01671}01671                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a1657b7fa6a2c2b41bcd6f3e41a051379}{RT2860\_H2M\_MAILBOX}}, \&tmp)) != 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01672}01672                         \textcolor{keywordflow}{return} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01673}01673                 \textcolor{keywordflow}{if} (!(tmp \& \mbox{\hyperlink{if__runreg_8h_a03a1cce56a50da23b08e8506997d9de8}{RT2860\_H2M\_BUSY}}))}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01674}01674                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01675}01675         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01676}01676         \textcolor{keywordflow}{if} (ntries == 100)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01677}01677                 \textcolor{keywordflow}{return} ETIMEDOUT;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01678}01678 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01679}01679         tmp = \mbox{\hyperlink{if__runreg_8h_a03a1cce56a50da23b08e8506997d9de8}{RT2860\_H2M\_BUSY}} | \mbox{\hyperlink{if__runreg_8h_a7463a2612c6d9b6379fbd66385ac3e3a}{RT2860\_TOKEN\_NO\_INTR}} << 16 | arg;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01680}01680         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a1657b7fa6a2c2b41bcd6f3e41a051379}{RT2860\_H2M\_MAILBOX}}, tmp)) == 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01681}01681                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a86f516f19058e4a7f19e9671ae5420c8}{RT2860\_HOST\_CMD}}, cmd);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01682}01682         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01683}01683 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01684}01684 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01685}01685 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01686}01686 \textcolor{comment}{ * Add `delta' (signed) to each 4-\/bit sub-\/word of a 32-\/bit word.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01687}01687 \textcolor{comment}{ * Used to adjust per-\/rate Tx power registers.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01688}01688 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01689}01689 \textcolor{keyword}{static} \_\_inline uint32\_t}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01690}\mbox{\hyperlink{if__run_8c_a5617c8a3094d6a7c318aae84cb163df0}{01690}} \mbox{\hyperlink{if__run_8c_a5617c8a3094d6a7c318aae84cb163df0}{b4inc}}(uint32\_t b32, int8\_t delta)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01691}01691 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01692}01692         int8\_t i, b4;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01693}01693 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01694}01694         \textcolor{keywordflow}{for} (i = 0; i < 8; i++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01695}01695                 b4 = b32 \& 0xf;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01696}01696                 b4 += delta;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01697}01697                 \textcolor{keywordflow}{if} (b4 < 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01698}01698                         b4 = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01699}01699                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (b4 > 0xf)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01700}01700                         b4 = 0xf;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01701}01701                 b32 = b32 >> 4 | b4 << 28;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01702}01702         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01703}01703         \textcolor{keywordflow}{return} (b32);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01704}01704 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01705}01705 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01706}01706 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01707}\mbox{\hyperlink{if__run_8c_ad1f32b5f304ab3db46fef3475d340c5a}{01707}} \mbox{\hyperlink{if__run_8c_ad1f32b5f304ab3db46fef3475d340c5a}{run\_get\_rf}}(uint16\_t rev)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01708}01708 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01709}01709         \textcolor{keywordflow}{switch} (rev) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01710}01710         \textcolor{keywordflow}{case} \mbox{\hyperlink{if__runreg_8h_a3ea8843ebf83d8a7c132ba8fb77e301b}{RT2860\_RF\_2820}}:      \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}RT2820"{}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01711}01711         \textcolor{keywordflow}{case} \mbox{\hyperlink{if__runreg_8h_aeafca53d5188b4446e24974818a73865}{RT2860\_RF\_2850}}:      \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}RT2850"{}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01712}01712         \textcolor{keywordflow}{case} \mbox{\hyperlink{if__runreg_8h_aa4c5c99be38ac65b23768bbc0daf63a4}{RT2860\_RF\_2720}}:      \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}RT2720"{}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01713}01713         \textcolor{keywordflow}{case} \mbox{\hyperlink{if__runreg_8h_a750bb27d3442343b236f2b33752f6958}{RT2860\_RF\_2750}}:      \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}RT2750"{}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01714}01714         \textcolor{keywordflow}{case} \mbox{\hyperlink{if__runreg_8h_ab2fc381907c76f8f0e2df8bc49b16f65}{RT3070\_RF\_3020}}:      \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}RT3020"{}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01715}01715         \textcolor{keywordflow}{case} \mbox{\hyperlink{if__runreg_8h_aff045a547d03206f2d6235560bc5f0e5}{RT3070\_RF\_2020}}:      \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}RT2020"{}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01716}01716         \textcolor{keywordflow}{case} \mbox{\hyperlink{if__runreg_8h_af96c6a537cd04f2b505372e3cea1e219}{RT3070\_RF\_3021}}:      \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}RT3021"{}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01717}01717         \textcolor{keywordflow}{case} \mbox{\hyperlink{if__runreg_8h_ad763f4710a22fffa2c8b6c41b4cda2ec}{RT3070\_RF\_3022}}:      \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}RT3022"{}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01718}01718         \textcolor{keywordflow}{case} \mbox{\hyperlink{if__runreg_8h_a89435118bb436be0bb0839a16fab636c}{RT3070\_RF\_3052}}:      \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}RT3052"{}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01719}01719         \textcolor{keywordflow}{case} \mbox{\hyperlink{if__runreg_8h_afc4d0b9aa7848176cce382ee9c95136b}{RT3593\_RF\_3053}}:      \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}RT3053"{}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01720}01720         \textcolor{keywordflow}{case} \mbox{\hyperlink{if__runreg_8h_ada3c3d76bed60493ac0849aacf68c459}{RT5592\_RF\_5592}}:      \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}RT5592"{}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01721}01721         \textcolor{keywordflow}{case} \mbox{\hyperlink{if__runreg_8h_add9aa109750e8500846a3de98132af35}{RT5390\_RF\_5370}}:      \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}RT5370"{}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01722}01722         \textcolor{keywordflow}{case} \mbox{\hyperlink{if__runreg_8h_a298db3319b6053d65181fa00187d17a0}{RT5390\_RF\_5372}}:      \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}RT5372"{}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01723}01723         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01724}01724         \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}unknown"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01725}01725 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01726}01726 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01727}01727 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01728}\mbox{\hyperlink{if__run_8c_a96810676beb232c6a82f0c3b4d0828ad}{01728}} \mbox{\hyperlink{if__run_8c_a96810676beb232c6a82f0c3b4d0828ad}{run\_rt3593\_get\_txpower}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01729}01729 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01730}01730         uint16\_t addr, \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01731}01731         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01732}01732 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01733}01733         \textcolor{comment}{/* Read power settings for 2GHz channels. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01734}01734         \textcolor{keywordflow}{for} (i = 0; i < 14; i += 2) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01735}01735                 addr = (sc-\/>\mbox{\hyperlink{structrun__softc_a67c3c37459a1133495cd627be4037ca6}{ntxchains}} == 3) ? \mbox{\hyperlink{if__runreg_8h_a8548c484578983e1288f31409e6afc10}{RT3593\_EEPROM\_PWR2GHZ\_BASE1}} :}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01736}01736                     \mbox{\hyperlink{if__runreg_8h_a820366544fdc6700c6de0f0238a3de45}{RT2860\_EEPROM\_PWR2GHZ\_BASE1}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01737}01737                 \mbox{\hyperlink{if__run_8c_aa6850150f01cce57d4bee13cd75cafc5}{run\_srom\_read}}(sc, addr + i / 2, \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01738}01738                 sc-\/>\mbox{\hyperlink{structrun__softc_a54e52fa21c554e60b35ec045ac001a25}{txpow1}}[i + 0] = (int8\_t)(\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0xff);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01739}01739                 sc-\/>\mbox{\hyperlink{structrun__softc_a54e52fa21c554e60b35ec045ac001a25}{txpow1}}[i + 1] = (int8\_t)(\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >> 8);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01740}01740 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01741}01741                 addr = (sc-\/>\mbox{\hyperlink{structrun__softc_a67c3c37459a1133495cd627be4037ca6}{ntxchains}} == 3) ? \mbox{\hyperlink{if__runreg_8h_abe832f1a2f2fa9c55af3b452bb1adc39}{RT3593\_EEPROM\_PWR2GHZ\_BASE2}} :}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01742}01742                     \mbox{\hyperlink{if__runreg_8h_a96d3ee28d757b288ab603b29b2ebff65}{RT2860\_EEPROM\_PWR2GHZ\_BASE2}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01743}01743                 \mbox{\hyperlink{if__run_8c_aa6850150f01cce57d4bee13cd75cafc5}{run\_srom\_read}}(sc, addr + i / 2, \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01744}01744                 sc-\/>\mbox{\hyperlink{structrun__softc_aeeaa3e34d3d92d422fcd7285425c2fe0}{txpow2}}[i + 0] = (int8\_t)(\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0xff);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01745}01745                 sc-\/>\mbox{\hyperlink{structrun__softc_aeeaa3e34d3d92d422fcd7285425c2fe0}{txpow2}}[i + 1] = (int8\_t)(\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >> 8);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01746}01746 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01747}01747                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a67c3c37459a1133495cd627be4037ca6}{ntxchains}} == 3) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01748}01748                         \mbox{\hyperlink{if__run_8c_aa6850150f01cce57d4bee13cd75cafc5}{run\_srom\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_ad163a9596462190ee7f8ebc2459e57f7}{RT3593\_EEPROM\_PWR2GHZ\_BASE3}} + i / 2,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01749}01749                             \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01750}01750                         sc-\/>\mbox{\hyperlink{structrun__softc_afe16ec82adf5ccec4c203fea4cf8ece5}{txpow3}}[i + 0] = (int8\_t)(\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0xff);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01751}01751                         sc-\/>\mbox{\hyperlink{structrun__softc_afe16ec82adf5ccec4c203fea4cf8ece5}{txpow3}}[i + 1] = (int8\_t)(\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >> 8);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01752}01752                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01753}01753         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01754}01754         \textcolor{comment}{/* Fix broken Tx power entries. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01755}01755         \textcolor{keywordflow}{for} (i = 0; i < 14; i++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01756}01756                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a54e52fa21c554e60b35ec045ac001a25}{txpow1}}[i] > 31)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01757}01757                         sc-\/>\mbox{\hyperlink{structrun__softc_a54e52fa21c554e60b35ec045ac001a25}{txpow1}}[i] = 5;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01758}01758                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_aeeaa3e34d3d92d422fcd7285425c2fe0}{txpow2}}[i] > 31)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01759}01759                         sc-\/>\mbox{\hyperlink{structrun__softc_aeeaa3e34d3d92d422fcd7285425c2fe0}{txpow2}}[i] = 5;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01760}01760                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a67c3c37459a1133495cd627be4037ca6}{ntxchains}} == 3) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01761}01761                         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_afe16ec82adf5ccec4c203fea4cf8ece5}{txpow3}}[i] > 31)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01762}01762                                 sc-\/>\mbox{\hyperlink{structrun__softc_afe16ec82adf5ccec4c203fea4cf8ece5}{txpow3}}[i] = 5;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01763}01763                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01764}01764         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01765}01765         \textcolor{comment}{/* Read power settings for 5GHz channels. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01766}01766         \textcolor{keywordflow}{for} (i = 0; i < 40; i += 2) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01767}01767                 \mbox{\hyperlink{if__run_8c_aa6850150f01cce57d4bee13cd75cafc5}{run\_srom\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_ae5ab7c43b21f57fb75b81aef64ef28bd}{RT3593\_EEPROM\_PWR5GHZ\_BASE1}} + i / 2, \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01768}01768                 sc-\/>\mbox{\hyperlink{structrun__softc_a54e52fa21c554e60b35ec045ac001a25}{txpow1}}[i + 14] = (int8\_t)(\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0xff);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01769}01769                 sc-\/>\mbox{\hyperlink{structrun__softc_a54e52fa21c554e60b35ec045ac001a25}{txpow1}}[i + 15] = (int8\_t)(\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >> 8);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01770}01770 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01771}01771                 \mbox{\hyperlink{if__run_8c_aa6850150f01cce57d4bee13cd75cafc5}{run\_srom\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a5734e6426770c9c6dc653381b23b34fc}{RT3593\_EEPROM\_PWR5GHZ\_BASE2}} + i / 2, \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01772}01772                 sc-\/>\mbox{\hyperlink{structrun__softc_aeeaa3e34d3d92d422fcd7285425c2fe0}{txpow2}}[i + 14] = (int8\_t)(\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0xff);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01773}01773                 sc-\/>\mbox{\hyperlink{structrun__softc_aeeaa3e34d3d92d422fcd7285425c2fe0}{txpow2}}[i + 15] = (int8\_t)(\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >> 8);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01774}01774 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01775}01775                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a67c3c37459a1133495cd627be4037ca6}{ntxchains}} == 3) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01776}01776                         \mbox{\hyperlink{if__run_8c_aa6850150f01cce57d4bee13cd75cafc5}{run\_srom\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a3504fbb056761d6fd039f333664feafe}{RT3593\_EEPROM\_PWR5GHZ\_BASE3}} + i / 2,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01777}01777                             \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01778}01778                         sc-\/>\mbox{\hyperlink{structrun__softc_afe16ec82adf5ccec4c203fea4cf8ece5}{txpow3}}[i + 14] = (int8\_t)(\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0xff);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01779}01779                         sc-\/>\mbox{\hyperlink{structrun__softc_afe16ec82adf5ccec4c203fea4cf8ece5}{txpow3}}[i + 15] = (int8\_t)(\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >> 8);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01780}01780                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01781}01781         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01782}01782 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01783}01783 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01784}01784 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01785}\mbox{\hyperlink{if__run_8c_a7ab212dde497095390f39eedc35c3235}{01785}} \mbox{\hyperlink{if__run_8c_a7ab212dde497095390f39eedc35c3235}{run\_get\_txpower}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01786}01786 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01787}01787         uint16\_t \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01788}01788         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01789}01789 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01790}01790         \textcolor{comment}{/* Read power settings for 2GHz channels. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01791}01791         \textcolor{keywordflow}{for} (i = 0; i < 14; i += 2) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01792}01792                 \mbox{\hyperlink{if__run_8c_aa6850150f01cce57d4bee13cd75cafc5}{run\_srom\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a820366544fdc6700c6de0f0238a3de45}{RT2860\_EEPROM\_PWR2GHZ\_BASE1}} + i / 2, \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01793}01793                 sc-\/>\mbox{\hyperlink{structrun__softc_a54e52fa21c554e60b35ec045ac001a25}{txpow1}}[i + 0] = (int8\_t)(\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0xff);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01794}01794                 sc-\/>\mbox{\hyperlink{structrun__softc_a54e52fa21c554e60b35ec045ac001a25}{txpow1}}[i + 1] = (int8\_t)(\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >> 8);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01795}01795 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01796}01796                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} != 0x5390) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01797}01797                         \mbox{\hyperlink{if__run_8c_aa6850150f01cce57d4bee13cd75cafc5}{run\_srom\_read}}(sc,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01798}01798                             \mbox{\hyperlink{if__runreg_8h_a96d3ee28d757b288ab603b29b2ebff65}{RT2860\_EEPROM\_PWR2GHZ\_BASE2}} + i / 2, \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01799}01799                         sc-\/>\mbox{\hyperlink{structrun__softc_aeeaa3e34d3d92d422fcd7285425c2fe0}{txpow2}}[i + 0] = (int8\_t)(\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0xff);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01800}01800                         sc-\/>\mbox{\hyperlink{structrun__softc_aeeaa3e34d3d92d422fcd7285425c2fe0}{txpow2}}[i + 1] = (int8\_t)(\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >> 8);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01801}01801                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01802}01802         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01803}01803         \textcolor{comment}{/* Fix broken Tx power entries. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01804}01804         \textcolor{keywordflow}{for} (i = 0; i < 14; i++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01805}01805                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} >= 0x5390) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01806}01806                         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a54e52fa21c554e60b35ec045ac001a25}{txpow1}}[i] < 0 || sc-\/>\mbox{\hyperlink{structrun__softc_a54e52fa21c554e60b35ec045ac001a25}{txpow1}}[i] > 39)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01807}01807                                 sc-\/>\mbox{\hyperlink{structrun__softc_a54e52fa21c554e60b35ec045ac001a25}{txpow1}}[i] = 5;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01808}01808                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01809}01809                         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a54e52fa21c554e60b35ec045ac001a25}{txpow1}}[i] < 0 || sc-\/>\mbox{\hyperlink{structrun__softc_a54e52fa21c554e60b35ec045ac001a25}{txpow1}}[i] > 31)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01810}01810                                 sc-\/>\mbox{\hyperlink{structrun__softc_a54e52fa21c554e60b35ec045ac001a25}{txpow1}}[i] = 5;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01811}01811                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01812}01812                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} > 0x5390) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01813}01813                         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_aeeaa3e34d3d92d422fcd7285425c2fe0}{txpow2}}[i] < 0 || sc-\/>\mbox{\hyperlink{structrun__softc_aeeaa3e34d3d92d422fcd7285425c2fe0}{txpow2}}[i] > 39)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01814}01814                                 sc-\/>\mbox{\hyperlink{structrun__softc_aeeaa3e34d3d92d422fcd7285425c2fe0}{txpow2}}[i] = 5;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01815}01815                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} < 0x5390) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01816}01816                         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_aeeaa3e34d3d92d422fcd7285425c2fe0}{txpow2}}[i] < 0 || sc-\/>\mbox{\hyperlink{structrun__softc_aeeaa3e34d3d92d422fcd7285425c2fe0}{txpow2}}[i] > 31)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01817}01817                                 sc-\/>\mbox{\hyperlink{structrun__softc_aeeaa3e34d3d92d422fcd7285425c2fe0}{txpow2}}[i] = 5;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01818}01818                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01819}01819                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_TXPWR,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01820}01820                     \textcolor{stringliteral}{"{}chan \%d: power1=\%d, power2=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01821}01821                     \mbox{\hyperlink{if__run_8c_a629ef14775e7a7e5fdf4b976ce7e9e2e}{rt2860\_rf2850}}[i].\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}}, sc-\/>\mbox{\hyperlink{structrun__softc_a54e52fa21c554e60b35ec045ac001a25}{txpow1}}[i], sc-\/>\mbox{\hyperlink{structrun__softc_aeeaa3e34d3d92d422fcd7285425c2fe0}{txpow2}}[i]);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01822}01822         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01823}01823         \textcolor{comment}{/* Read power settings for 5GHz channels. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01824}01824         \textcolor{keywordflow}{for} (i = 0; i < 40; i += 2) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01825}01825                 \mbox{\hyperlink{if__run_8c_aa6850150f01cce57d4bee13cd75cafc5}{run\_srom\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a467084312575f23006682cfa3dd4bf6b}{RT2860\_EEPROM\_PWR5GHZ\_BASE1}} + i / 2, \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01826}01826                 sc-\/>\mbox{\hyperlink{structrun__softc_a54e52fa21c554e60b35ec045ac001a25}{txpow1}}[i + 14] = (int8\_t)(\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0xff);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01827}01827                 sc-\/>\mbox{\hyperlink{structrun__softc_a54e52fa21c554e60b35ec045ac001a25}{txpow1}}[i + 15] = (int8\_t)(\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >> 8);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01828}01828 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01829}01829                 \mbox{\hyperlink{if__run_8c_aa6850150f01cce57d4bee13cd75cafc5}{run\_srom\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a258f82bde1221fb7dd2a48d3e0e357d7}{RT2860\_EEPROM\_PWR5GHZ\_BASE2}} + i / 2, \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01830}01830                 sc-\/>\mbox{\hyperlink{structrun__softc_aeeaa3e34d3d92d422fcd7285425c2fe0}{txpow2}}[i + 14] = (int8\_t)(\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0xff);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01831}01831                 sc-\/>\mbox{\hyperlink{structrun__softc_aeeaa3e34d3d92d422fcd7285425c2fe0}{txpow2}}[i + 15] = (int8\_t)(\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >> 8);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01832}01832         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01833}01833         \textcolor{comment}{/* Fix broken Tx power entries. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01834}01834         \textcolor{keywordflow}{for} (i = 0; i < 40; i++ ) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01835}01835                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} != 0x5592) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01836}01836                         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a54e52fa21c554e60b35ec045ac001a25}{txpow1}}[14 + i] < -\/7 || sc-\/>\mbox{\hyperlink{structrun__softc_a54e52fa21c554e60b35ec045ac001a25}{txpow1}}[14 + i] > 15)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01837}01837                                 sc-\/>\mbox{\hyperlink{structrun__softc_a54e52fa21c554e60b35ec045ac001a25}{txpow1}}[14 + i] = 5;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01838}01838                         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_aeeaa3e34d3d92d422fcd7285425c2fe0}{txpow2}}[14 + i] < -\/7 || sc-\/>\mbox{\hyperlink{structrun__softc_aeeaa3e34d3d92d422fcd7285425c2fe0}{txpow2}}[14 + i] > 15)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01839}01839                                 sc-\/>\mbox{\hyperlink{structrun__softc_aeeaa3e34d3d92d422fcd7285425c2fe0}{txpow2}}[14 + i] = 5;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01840}01840                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01841}01841                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_TXPWR,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01842}01842                     \textcolor{stringliteral}{"{}chan \%d: power1=\%d, power2=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01843}01843                     \mbox{\hyperlink{if__run_8c_a629ef14775e7a7e5fdf4b976ce7e9e2e}{rt2860\_rf2850}}[14 + i].\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}}, sc-\/>\mbox{\hyperlink{structrun__softc_a54e52fa21c554e60b35ec045ac001a25}{txpow1}}[14 + i],}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01844}01844                     sc-\/>\mbox{\hyperlink{structrun__softc_aeeaa3e34d3d92d422fcd7285425c2fe0}{txpow2}}[14 + i]);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01845}01845         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01846}01846 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01847}01847 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01848}01848 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01849}\mbox{\hyperlink{if__run_8c_aa919aa8c98302d7536f9e8b61b6b8474}{01849}} \mbox{\hyperlink{if__run_8c_aa919aa8c98302d7536f9e8b61b6b8474}{run\_read\_eeprom}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01850}01850 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01851}01851         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structrun__softc_a475dfeb97bf5936fa250323fa6a1e6ae}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01852}01852         int8\_t delta\_2ghz, delta\_5ghz;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01853}01853         uint32\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01854}01854         uint16\_t \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01855}01855         \textcolor{keywordtype}{int} ridx, ant, i;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01856}01856 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01857}01857         \textcolor{comment}{/* check whether the ROM is eFUSE ROM or EEPROM */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01858}01858         sc-\/>\mbox{\hyperlink{structrun__softc_a3190cba02eedf547fd231ef346311e76}{sc\_srom\_read}} = \mbox{\hyperlink{if__run_8c_a5d77657d4432faf03a91628cb7dd5919}{run\_eeprom\_read\_2}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01859}01859         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} >= 0x3070) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01860}01860                 \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a8b564e16078195ce18105c45631d5519}{RT3070\_EFUSE\_CTRL}}, \&tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01861}01861                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_ROM, \textcolor{stringliteral}{"{}EFUSE\_CTRL=0x\%08x\(\backslash\)n"{}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01862}01862                 \textcolor{keywordflow}{if} ((tmp \& \mbox{\hyperlink{if__runreg_8h_a6606eba83dbaec7f33c0a41d24c06d83}{RT3070\_SEL\_EFUSE}}) || sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3593)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01863}01863                         sc-\/>\mbox{\hyperlink{structrun__softc_a3190cba02eedf547fd231ef346311e76}{sc\_srom\_read}} = \mbox{\hyperlink{if__run_8c_acc326af0772d9d71f42578f15726fc77}{run\_efuse\_read\_2}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01864}01864         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01865}01865 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01866}01866         \textcolor{comment}{/* read ROM version */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01867}01867         \mbox{\hyperlink{if__run_8c_aa6850150f01cce57d4bee13cd75cafc5}{run\_srom\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a7d91584d6cb6cfc3081f33fe375e9e80}{RT2860\_EEPROM\_VERSION}}, \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01868}01868         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_ROM,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01869}01869             \textcolor{stringliteral}{"{}EEPROM rev=\%d, FAE=\%d\(\backslash\)n"{}}, \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >> 8, \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0xff);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01870}01870 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01871}01871         \textcolor{comment}{/* read MAC address */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01872}01872         \mbox{\hyperlink{if__run_8c_aa6850150f01cce57d4bee13cd75cafc5}{run\_srom\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a8b343d17a8f276810efe10c9cc261628}{RT2860\_EEPROM\_MAC01}}, \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01873}01873         ic-\/>ic\_macaddr[0] = \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0xff;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01874}01874         ic-\/>ic\_macaddr[1] = \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >> 8;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01875}01875         \mbox{\hyperlink{if__run_8c_aa6850150f01cce57d4bee13cd75cafc5}{run\_srom\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a407d331fedbc20f4b019e05841f5a3bd}{RT2860\_EEPROM\_MAC23}}, \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01876}01876         ic-\/>ic\_macaddr[2] = \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0xff;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01877}01877         ic-\/>ic\_macaddr[3] = \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >> 8;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01878}01878         \mbox{\hyperlink{if__run_8c_aa6850150f01cce57d4bee13cd75cafc5}{run\_srom\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_ad9eb883c36c646abd07e5fd62eaa01e4}{RT2860\_EEPROM\_MAC45}}, \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01879}01879         ic-\/>ic\_macaddr[4] = \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0xff;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01880}01880         ic-\/>ic\_macaddr[5] = \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >> 8;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01881}01881 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01882}01882         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} < 0x3593) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01883}01883                 \textcolor{comment}{/* read vender BBP settings */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01884}01884                 \textcolor{keywordflow}{for} (i = 0; i < 10; i++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01885}01885                         \mbox{\hyperlink{if__run_8c_aa6850150f01cce57d4bee13cd75cafc5}{run\_srom\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_ab058c52ec209980c0739666e9c7c2fbd}{RT2860\_EEPROM\_BBP\_BASE}} + i, \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01886}01886                         sc-\/>\mbox{\hyperlink{structrun__softc_adc6b518a9c057be70517be3287dfaa14}{bbp}}[i].\mbox{\hyperlink{structrun__softc_a5a55cfcb35ed87643fa25ec86d6836ea}{val}} = \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0xff;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01887}01887                         sc-\/>\mbox{\hyperlink{structrun__softc_adc6b518a9c057be70517be3287dfaa14}{bbp}}[i].\mbox{\hyperlink{structrun__softc_abf4f75e9f00e989fd8e8e71739317e9e}{reg}} = \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >> 8;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01888}01888                         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_ROM,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01889}01889                             \textcolor{stringliteral}{"{}BBP\%d=0x\%02x\(\backslash\)n"{}}, sc-\/>\mbox{\hyperlink{structrun__softc_adc6b518a9c057be70517be3287dfaa14}{bbp}}[i].\mbox{\hyperlink{structrun__softc_abf4f75e9f00e989fd8e8e71739317e9e}{reg}}, sc-\/>\mbox{\hyperlink{structrun__softc_adc6b518a9c057be70517be3287dfaa14}{bbp}}[i].\mbox{\hyperlink{structrun__softc_a5a55cfcb35ed87643fa25ec86d6836ea}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01890}01890                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01891}01891                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} >= 0x3071) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01892}01892                         \textcolor{comment}{/* read vendor RF settings */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01893}01893                         \textcolor{keywordflow}{for} (i = 0; i < 10; i++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01894}01894                                 \mbox{\hyperlink{if__run_8c_aa6850150f01cce57d4bee13cd75cafc5}{run\_srom\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_afb174b78c7fc6ca126e6a768f73b82a0}{RT3071\_EEPROM\_RF\_BASE}} + i,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01895}01895                                    \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01896}01896                                 sc-\/>\mbox{\hyperlink{structrun__softc_a586279abda96375150288ec7f04c62b2}{rf}}[i].\mbox{\hyperlink{structrun__softc_a5a55cfcb35ed87643fa25ec86d6836ea}{val}} = \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0xff;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01897}01897                                 sc-\/>\mbox{\hyperlink{structrun__softc_a586279abda96375150288ec7f04c62b2}{rf}}[i].\mbox{\hyperlink{structrun__softc_abf4f75e9f00e989fd8e8e71739317e9e}{reg}} = \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >> 8;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01898}01898                                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_ROM, \textcolor{stringliteral}{"{}RF\%d=0x\%02x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01899}01899                                     sc-\/>\mbox{\hyperlink{structrun__softc_a586279abda96375150288ec7f04c62b2}{rf}}[i].\mbox{\hyperlink{structrun__softc_abf4f75e9f00e989fd8e8e71739317e9e}{reg}}, sc-\/>\mbox{\hyperlink{structrun__softc_a586279abda96375150288ec7f04c62b2}{rf}}[i].\mbox{\hyperlink{structrun__softc_a5a55cfcb35ed87643fa25ec86d6836ea}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01900}01900                         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01901}01901                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01902}01902         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01903}01903 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01904}01904         \textcolor{comment}{/* read RF frequency offset from EEPROM */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01905}01905         \mbox{\hyperlink{if__run_8c_aa6850150f01cce57d4bee13cd75cafc5}{run\_srom\_read}}(sc, (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} != 0x3593) ? \mbox{\hyperlink{if__runreg_8h_a9eddf32726577a5b0f72255f881abca3}{RT2860\_EEPROM\_FREQ\_LEDS}} :}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01906}01906             \mbox{\hyperlink{if__runreg_8h_ab6de78e7384fd1aaf8ab23a79e6760d8}{RT3593\_EEPROM\_FREQ}}, \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01907}01907         sc-\/>\mbox{\hyperlink{structrun__softc_a0dacefc883d5e8c77983176277bbf773}{freq}} = ((\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0xff) != 0xff) ? \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0xff : 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01908}01908         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_ROM, \textcolor{stringliteral}{"{}EEPROM freq offset \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01909}01909             sc-\/>\mbox{\hyperlink{structrun__softc_a0dacefc883d5e8c77983176277bbf773}{freq}} \& 0xff);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01910}01910 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01911}01911         \mbox{\hyperlink{if__run_8c_aa6850150f01cce57d4bee13cd75cafc5}{run\_srom\_read}}(sc, (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} != 0x3593) ? \mbox{\hyperlink{if__runreg_8h_a9eddf32726577a5b0f72255f881abca3}{RT2860\_EEPROM\_FREQ\_LEDS}} :}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01912}01912             \mbox{\hyperlink{if__runreg_8h_a3fd62b38fd5815209a3417726f798bec}{RT3593\_EEPROM\_FREQ\_LEDS}}, \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01913}01913         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >> 8 != 0xff) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01914}01914                 \textcolor{comment}{/* read LEDs operating mode */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01915}01915                 sc-\/>\mbox{\hyperlink{structrun__softc_a3def4fdd1a5651dbce367ade28a2f7e6}{leds}} = \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >> 8;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01916}01916                 \mbox{\hyperlink{if__run_8c_aa6850150f01cce57d4bee13cd75cafc5}{run\_srom\_read}}(sc, (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} != 0x3593) ? \mbox{\hyperlink{if__runreg_8h_a9ae172c7cdce68dfd6510fcb9aec8e32}{RT2860\_EEPROM\_LED1}} :}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01917}01917                     \mbox{\hyperlink{if__runreg_8h_a77159f57a96f00be89649002b8d4d433}{RT3593\_EEPROM\_LED1}}, \&sc-\/>\mbox{\hyperlink{structrun__softc_a5ca2e82eeafb7854d717500e31f20b6c}{led}}[0]);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01918}01918                 \mbox{\hyperlink{if__run_8c_aa6850150f01cce57d4bee13cd75cafc5}{run\_srom\_read}}(sc, (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} != 0x3593) ? \mbox{\hyperlink{if__runreg_8h_a356543eb44ab0045f463c42c7faddd23}{RT2860\_EEPROM\_LED2}} :}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01919}01919                     \mbox{\hyperlink{if__runreg_8h_a1b88c64302de7d8d943f737f77cba556}{RT3593\_EEPROM\_LED2}}, \&sc-\/>\mbox{\hyperlink{structrun__softc_a5ca2e82eeafb7854d717500e31f20b6c}{led}}[1]);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01920}01920                 \mbox{\hyperlink{if__run_8c_aa6850150f01cce57d4bee13cd75cafc5}{run\_srom\_read}}(sc, (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} != 0x3593) ? \mbox{\hyperlink{if__runreg_8h_a6b855e5ffec10dba7b725b32a3ff1a76}{RT2860\_EEPROM\_LED3}} :}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01921}01921                     \mbox{\hyperlink{if__runreg_8h_ac79a378d26896daeb7fc74d56aef8f05}{RT3593\_EEPROM\_LED3}}, \&sc-\/>\mbox{\hyperlink{structrun__softc_a5ca2e82eeafb7854d717500e31f20b6c}{led}}[2]);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01922}01922         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01923}01923                 \textcolor{comment}{/* broken EEPROM, use default settings */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01924}01924                 sc-\/>\mbox{\hyperlink{structrun__softc_a3def4fdd1a5651dbce367ade28a2f7e6}{leds}} = 0x01;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01925}01925                 sc-\/>\mbox{\hyperlink{structrun__softc_a5ca2e82eeafb7854d717500e31f20b6c}{led}}[0] = 0x5555;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01926}01926                 sc-\/>\mbox{\hyperlink{structrun__softc_a5ca2e82eeafb7854d717500e31f20b6c}{led}}[1] = 0x2221;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01927}01927                 sc-\/>\mbox{\hyperlink{structrun__softc_a5ca2e82eeafb7854d717500e31f20b6c}{led}}[2] = 0x5627; \textcolor{comment}{/* differs from RT2860 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01928}01928         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01929}01929         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_ROM,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01930}01930             \textcolor{stringliteral}{"{}EEPROM LED mode=0x\%02x, LEDs=0x\%04x/0x\%04x/0x\%04x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01931}01931             sc-\/>\mbox{\hyperlink{structrun__softc_a3def4fdd1a5651dbce367ade28a2f7e6}{leds}}, sc-\/>\mbox{\hyperlink{structrun__softc_a5ca2e82eeafb7854d717500e31f20b6c}{led}}[0], sc-\/>\mbox{\hyperlink{structrun__softc_a5ca2e82eeafb7854d717500e31f20b6c}{led}}[1], sc-\/>\mbox{\hyperlink{structrun__softc_a5ca2e82eeafb7854d717500e31f20b6c}{led}}[2]);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01932}01932 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01933}01933         \textcolor{comment}{/* read RF information */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01934}01934         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x5390 || sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} ==0x5392)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01935}01935                 \mbox{\hyperlink{if__run_8c_aa6850150f01cce57d4bee13cd75cafc5}{run\_srom\_read}}(sc, 0x00, \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01936}01936         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01937}01937                 \mbox{\hyperlink{if__run_8c_aa6850150f01cce57d4bee13cd75cafc5}{run\_srom\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_ac1454d9171d9559ab8f808d27c76a4d2}{RT2860\_EEPROM\_ANTENNA}}, \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01938}01938 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01939}01939         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} == 0xffff) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01940}01940                 device\_printf(sc-\/>\mbox{\hyperlink{structrun__softc_a11422e8a9e276cfaea3662dc74f6fc84}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01941}01941                     \textcolor{stringliteral}{"{}invalid EEPROM antenna info, using default\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01942}01942                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3572) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01943}01943                         \textcolor{comment}{/* default to RF3052 2T2R */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01944}01944                         sc-\/>\mbox{\hyperlink{structrun__softc_a1a20cab629806dd03e9caebd2bdab962}{rf\_rev}} = \mbox{\hyperlink{if__runreg_8h_a89435118bb436be0bb0839a16fab636c}{RT3070\_RF\_3052}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01945}01945                         sc-\/>\mbox{\hyperlink{structrun__softc_a67c3c37459a1133495cd627be4037ca6}{ntxchains}} = 2;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01946}01946                         sc-\/>\mbox{\hyperlink{structrun__softc_abeb252728ca242db18b1574c2687b788}{nrxchains}} = 2;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01947}01947                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} >= 0x3070) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01948}01948                         \textcolor{comment}{/* default to RF3020 1T1R */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01949}01949                         sc-\/>\mbox{\hyperlink{structrun__softc_a1a20cab629806dd03e9caebd2bdab962}{rf\_rev}} = \mbox{\hyperlink{if__runreg_8h_ab2fc381907c76f8f0e2df8bc49b16f65}{RT3070\_RF\_3020}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01950}01950                         sc-\/>\mbox{\hyperlink{structrun__softc_a67c3c37459a1133495cd627be4037ca6}{ntxchains}} = 1;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01951}01951                         sc-\/>\mbox{\hyperlink{structrun__softc_abeb252728ca242db18b1574c2687b788}{nrxchains}} = 1;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01952}01952                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01953}01953                         \textcolor{comment}{/* default to RF2820 1T2R */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01954}01954                         sc-\/>\mbox{\hyperlink{structrun__softc_a1a20cab629806dd03e9caebd2bdab962}{rf\_rev}} = \mbox{\hyperlink{if__runreg_8h_a3ea8843ebf83d8a7c132ba8fb77e301b}{RT2860\_RF\_2820}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01955}01955                         sc-\/>\mbox{\hyperlink{structrun__softc_a67c3c37459a1133495cd627be4037ca6}{ntxchains}} = 1;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01956}01956                         sc-\/>\mbox{\hyperlink{structrun__softc_abeb252728ca242db18b1574c2687b788}{nrxchains}} = 2;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01957}01957                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01958}01958         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01959}01959                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x5390 || sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} ==0x5392) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01960}01960                         sc-\/>\mbox{\hyperlink{structrun__softc_a1a20cab629806dd03e9caebd2bdab962}{rf\_rev}} = \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01961}01961                         \mbox{\hyperlink{if__run_8c_aa6850150f01cce57d4bee13cd75cafc5}{run\_srom\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_ac1454d9171d9559ab8f808d27c76a4d2}{RT2860\_EEPROM\_ANTENNA}}, \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01962}01962                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01963}01963                         sc-\/>\mbox{\hyperlink{structrun__softc_a1a20cab629806dd03e9caebd2bdab962}{rf\_rev}} = (\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >> 8) \& 0xf;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01964}01964                 sc-\/>\mbox{\hyperlink{structrun__softc_a67c3c37459a1133495cd627be4037ca6}{ntxchains}} = (\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >> 4) \& 0xf;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01965}01965                 sc-\/>\mbox{\hyperlink{structrun__softc_abeb252728ca242db18b1574c2687b788}{nrxchains}} = \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0xf;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01966}01966         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01967}01967         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_ROM, \textcolor{stringliteral}{"{}EEPROM RF rev=0x\%04x chains=\%dT\%dR\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01968}01968             sc-\/>\mbox{\hyperlink{structrun__softc_a1a20cab629806dd03e9caebd2bdab962}{rf\_rev}}, sc-\/>\mbox{\hyperlink{structrun__softc_a67c3c37459a1133495cd627be4037ca6}{ntxchains}}, sc-\/>\mbox{\hyperlink{structrun__softc_abeb252728ca242db18b1574c2687b788}{nrxchains}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01969}01969 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01970}01970         \textcolor{comment}{/* check if RF supports automatic Tx access gain control */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01971}01971         \mbox{\hyperlink{if__run_8c_aa6850150f01cce57d4bee13cd75cafc5}{run\_srom\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a0701f725ec95f523357e30902a741b7b}{RT2860\_EEPROM\_CONFIG}}, \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01972}01972         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_ROM, \textcolor{stringliteral}{"{}EEPROM CFG 0x\%04x\(\backslash\)n"{}}, \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01973}01973         \textcolor{comment}{/* check if driver should patch the DAC issue */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01974}01974         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >> 8) != 0xff)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01975}01975                 sc-\/>\mbox{\hyperlink{structrun__softc_a2bcb7021de5d7c6e267c6ea0d09c6645}{patch\_dac}} = (\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >> 15) \& 1;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01976}01976         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0xff) != 0xff) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01977}01977                 sc-\/>\mbox{\hyperlink{structrun__softc_a11efa2d8422855290bba1a8c92a722cc}{ext\_5ghz\_lna}} = (\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >> 3) \& 1;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01978}01978                 sc-\/>\mbox{\hyperlink{structrun__softc_a8d5b36cf0df34a66df73a332d405da0a}{ext\_2ghz\_lna}} = (\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >> 2) \& 1;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01979}01979                 \textcolor{comment}{/* check if RF supports automatic Tx access gain control */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01980}01980                 sc-\/>\mbox{\hyperlink{structrun__softc_af3cc3e9889f7b615775f6a372286fdc6}{calib\_2ghz}} = sc-\/>\mbox{\hyperlink{structrun__softc_a9c30639cdd5078c51fb33aa7d1229405}{calib\_5ghz}} = (\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >> 1) \& 1;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01981}01981                 \textcolor{comment}{/* check if we have a hardware radio switch */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01982}01982                 sc-\/>\mbox{\hyperlink{structrun__softc_aa15d7944f5740bd7e5db201670d04f1b}{rfswitch}} = \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 1;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01983}01983         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01984}01984 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01985}01985         \textcolor{comment}{/* Read Tx power settings. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01986}01986         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3593)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01987}01987                 \mbox{\hyperlink{if__run_8c_a96810676beb232c6a82f0c3b4d0828ad}{run\_rt3593\_get\_txpower}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01988}01988         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01989}01989                 \mbox{\hyperlink{if__run_8c_a7ab212dde497095390f39eedc35c3235}{run\_get\_txpower}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01990}01990 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01991}01991         \textcolor{comment}{/* read Tx power compensation for each Tx rate */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01992}01992         \mbox{\hyperlink{if__run_8c_aa6850150f01cce57d4bee13cd75cafc5}{run\_srom\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a148741820f1b76c8fd08830d79c96c9c}{RT2860\_EEPROM\_DELTAPWR}}, \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01993}01993         delta\_2ghz = delta\_5ghz = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01994}01994         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0xff) != 0xff \&\& (\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0x80)) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01995}01995                 delta\_2ghz = \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0xf;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01996}01996                 \textcolor{keywordflow}{if} (!(\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0x40))   \textcolor{comment}{/* negative number */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01997}01997                         delta\_2ghz = -\/delta\_2ghz;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01998}01998         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l01999}01999         \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >>= 8;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02000}02000         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0xff) != 0xff \&\& (\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0x80)) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02001}02001                 delta\_5ghz = \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0xf;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02002}02002                 \textcolor{keywordflow}{if} (!(\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0x40))   \textcolor{comment}{/* negative number */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02003}02003                         delta\_5ghz = -\/delta\_5ghz;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02004}02004         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02005}02005         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_ROM | RUN\_DEBUG\_TXPWR,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02006}02006             \textcolor{stringliteral}{"{}power compensation=\%d (2GHz), \%d (5GHz)\(\backslash\)n"{}}, delta\_2ghz, delta\_5ghz);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02007}02007 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02008}02008         \textcolor{keywordflow}{for} (ridx = 0; ridx < 5; ridx++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02009}02009                 uint32\_t \mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02010}02010 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02011}02011                 \mbox{\hyperlink{if__run_8c_aa6850150f01cce57d4bee13cd75cafc5}{run\_srom\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_aa001ad1ee9aa6e17906569665c4e48e7}{RT2860\_EEPROM\_RPWR}} + ridx * 2, \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02012}02012                 \mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} = \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02013}02013                 \mbox{\hyperlink{if__run_8c_aa6850150f01cce57d4bee13cd75cafc5}{run\_srom\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_aa001ad1ee9aa6e17906569665c4e48e7}{RT2860\_EEPROM\_RPWR}} + ridx * 2 + 1, \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02014}02014                 \mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} |= (uint32\_t)\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} << 16;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02015}02015 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02016}02016                 sc-\/>\mbox{\hyperlink{structrun__softc_a5ee46e92f41eb323c2db673f3d4e78d2}{txpow20mhz}}[ridx] = \mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02017}02017                 sc-\/>\mbox{\hyperlink{structrun__softc_a968df104f7a33634492bfb281f37f7f1}{txpow40mhz\_2ghz}}[ridx] = \mbox{\hyperlink{if__run_8c_a5617c8a3094d6a7c318aae84cb163df0}{b4inc}}(\mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, delta\_2ghz);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02018}02018                 sc-\/>\mbox{\hyperlink{structrun__softc_a1eae54760491b7f0172971fc3bbc9f7d}{txpow40mhz\_5ghz}}[ridx] = \mbox{\hyperlink{if__run_8c_a5617c8a3094d6a7c318aae84cb163df0}{b4inc}}(\mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, delta\_5ghz);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02019}02019 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02020}02020                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_ROM | RUN\_DEBUG\_TXPWR,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02021}02021                     \textcolor{stringliteral}{"{}ridx \%d: power 20MHz=0x\%08x, 40MHz/2GHz=0x\%08x, "{}}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02022}02022                     \textcolor{stringliteral}{"{}40MHz/5GHz=0x\%08x\(\backslash\)n"{}}, ridx, sc-\/>\mbox{\hyperlink{structrun__softc_a5ee46e92f41eb323c2db673f3d4e78d2}{txpow20mhz}}[ridx],}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02023}02023                     sc-\/>\mbox{\hyperlink{structrun__softc_a968df104f7a33634492bfb281f37f7f1}{txpow40mhz\_2ghz}}[ridx], sc-\/>\mbox{\hyperlink{structrun__softc_a1eae54760491b7f0172971fc3bbc9f7d}{txpow40mhz\_5ghz}}[ridx]);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02024}02024         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02025}02025 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02026}02026         \textcolor{comment}{/* Read RSSI offsets and LNA gains from EEPROM. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02027}02027         \mbox{\hyperlink{if__run_8c_aa6850150f01cce57d4bee13cd75cafc5}{run\_srom\_read}}(sc, (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} != 0x3593) ? \mbox{\hyperlink{if__runreg_8h_ad566b5e97355bccbac6bdaf1cc66690b}{RT2860\_EEPROM\_RSSI1\_2GHZ}} :}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02028}02028             \mbox{\hyperlink{if__runreg_8h_a15db6aca222963e59014b0b597d99194}{RT3593\_EEPROM\_RSSI1\_2GHZ}}, \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02029}02029         sc-\/>\mbox{\hyperlink{structrun__softc_ab419928156f63d9250382e07863883d1}{rssi\_2ghz}}[0] = \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0xff;      \textcolor{comment}{/* Ant A */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02030}02030         sc-\/>\mbox{\hyperlink{structrun__softc_ab419928156f63d9250382e07863883d1}{rssi\_2ghz}}[1] = \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >> 8;        \textcolor{comment}{/* Ant B */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02031}02031         \mbox{\hyperlink{if__run_8c_aa6850150f01cce57d4bee13cd75cafc5}{run\_srom\_read}}(sc, (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} != 0x3593) ? \mbox{\hyperlink{if__runreg_8h_aa6c086c8a3d6e720cd8b3248248ef893}{RT2860\_EEPROM\_RSSI2\_2GHZ}} :}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02032}02032             \mbox{\hyperlink{if__runreg_8h_a09db89d638527f824827d352f81e54a7}{RT3593\_EEPROM\_RSSI2\_2GHZ}}, \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02033}02033         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} >= 0x3070) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02034}02034                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3593) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02035}02035                         sc-\/>\mbox{\hyperlink{structrun__softc_ae4a114cd9059a92fdd68d0a613416cab}{txmixgain\_2ghz}} = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02036}02036                         sc-\/>\mbox{\hyperlink{structrun__softc_ab419928156f63d9250382e07863883d1}{rssi\_2ghz}}[2] = \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0xff;      \textcolor{comment}{/* Ant C */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02037}02037                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02038}02038                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02039}02039 \textcolor{comment}{                         * On RT3070 chips (limited to 2 Rx chains), this ROM}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02040}02040 \textcolor{comment}{                         * field contains the Tx mixer gain for the 2GHz band.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02041}02041 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02042}02042                         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0xff) != 0xff)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02043}02043                                 sc-\/>\mbox{\hyperlink{structrun__softc_ae4a114cd9059a92fdd68d0a613416cab}{txmixgain\_2ghz}} = \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0x7;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02044}02044                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02045}02045                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_ROM, \textcolor{stringliteral}{"{}tx mixer gain=\%u (2GHz)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02046}02046                     sc-\/>\mbox{\hyperlink{structrun__softc_ae4a114cd9059a92fdd68d0a613416cab}{txmixgain\_2ghz}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02047}02047         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02048}02048                 sc-\/>\mbox{\hyperlink{structrun__softc_ab419928156f63d9250382e07863883d1}{rssi\_2ghz}}[2] = \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0xff;      \textcolor{comment}{/* Ant C */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02049}02049         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3593)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02050}02050                 \mbox{\hyperlink{if__run_8c_aa6850150f01cce57d4bee13cd75cafc5}{run\_srom\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_afbd4706d5f0ca8af5b528acefd014475}{RT3593\_EEPROM\_LNA\_5GHZ}}, \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02051}02051         sc-\/>\mbox{\hyperlink{structrun__softc_ab87cb627c86925dc5c5331c6de3b1536}{lna}}[2] = \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >> 8;            \textcolor{comment}{/* channel group 2 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02052}02052 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02053}02053         \mbox{\hyperlink{if__run_8c_aa6850150f01cce57d4bee13cd75cafc5}{run\_srom\_read}}(sc, (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} != 0x3593) ? \mbox{\hyperlink{if__runreg_8h_ae76f21666f1fbc45a4872c70553ad8f5}{RT2860\_EEPROM\_RSSI1\_5GHZ}} :}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02054}02054             \mbox{\hyperlink{if__runreg_8h_a64ee4e0f26a1582e2b86a74548904f67}{RT3593\_EEPROM\_RSSI1\_5GHZ}}, \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02055}02055         sc-\/>\mbox{\hyperlink{structrun__softc_a15cd296140c95180cd3280084329df31}{rssi\_5ghz}}[0] = \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0xff;      \textcolor{comment}{/* Ant A */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02056}02056         sc-\/>\mbox{\hyperlink{structrun__softc_a15cd296140c95180cd3280084329df31}{rssi\_5ghz}}[1] = \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >> 8;        \textcolor{comment}{/* Ant B */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02057}02057         \mbox{\hyperlink{if__run_8c_aa6850150f01cce57d4bee13cd75cafc5}{run\_srom\_read}}(sc, (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} != 0x3593) ? \mbox{\hyperlink{if__runreg_8h_a472a97298d6060565ef9caaff7389c1c}{RT2860\_EEPROM\_RSSI2\_5GHZ}} :}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02058}02058             \mbox{\hyperlink{if__runreg_8h_ac4549c3f94fbdefd2251b99f92aa9fba}{RT3593\_EEPROM\_RSSI2\_5GHZ}}, \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02059}02059         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3572) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02060}02060                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02061}02061 \textcolor{comment}{                 * On RT3572 chips (limited to 2 Rx chains), this ROM}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02062}02062 \textcolor{comment}{                 * field contains the Tx mixer gain for the 5GHz band.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02063}02063 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02064}02064                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0xff) != 0xff)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02065}02065                         sc-\/>\mbox{\hyperlink{structrun__softc_a46408054487e1e244b44af83932b6dda}{txmixgain\_5ghz}} = \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0x7;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02066}02066                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_ROM, \textcolor{stringliteral}{"{}tx mixer gain=\%u (5GHz)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02067}02067                     sc-\/>\mbox{\hyperlink{structrun__softc_a46408054487e1e244b44af83932b6dda}{txmixgain\_5ghz}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02068}02068         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02069}02069                 sc-\/>\mbox{\hyperlink{structrun__softc_a15cd296140c95180cd3280084329df31}{rssi\_5ghz}}[2] = \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0xff;      \textcolor{comment}{/* Ant C */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02070}02070         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3593) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02071}02071                 sc-\/>\mbox{\hyperlink{structrun__softc_a46408054487e1e244b44af83932b6dda}{txmixgain\_5ghz}} = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02072}02072                 \mbox{\hyperlink{if__run_8c_aa6850150f01cce57d4bee13cd75cafc5}{run\_srom\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_afbd4706d5f0ca8af5b528acefd014475}{RT3593\_EEPROM\_LNA\_5GHZ}}, \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02073}02073         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02074}02074         sc-\/>\mbox{\hyperlink{structrun__softc_ab87cb627c86925dc5c5331c6de3b1536}{lna}}[3] = \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >> 8;            \textcolor{comment}{/* channel group 3 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02075}02075 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02076}02076         \mbox{\hyperlink{if__run_8c_aa6850150f01cce57d4bee13cd75cafc5}{run\_srom\_read}}(sc, (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} != 0x3593) ? \mbox{\hyperlink{if__runreg_8h_ad78345a7cf46857b1be6899281ec67f9}{RT2860\_EEPROM\_LNA}} :}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02077}02077             \mbox{\hyperlink{if__runreg_8h_ad4a8cab88956637c6d947e07a8d6bd26}{RT3593\_EEPROM\_LNA}}, \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02078}02078         sc-\/>\mbox{\hyperlink{structrun__softc_ab87cb627c86925dc5c5331c6de3b1536}{lna}}[0] = \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0xff;  \textcolor{comment}{/* channel group 0 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02079}02079         sc-\/>\mbox{\hyperlink{structrun__softc_ab87cb627c86925dc5c5331c6de3b1536}{lna}}[1] = \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >> 8;            \textcolor{comment}{/* channel group 1 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02080}02080 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02081}02081         \textcolor{comment}{/* fix broken 5GHz LNA entries */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02082}02082         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_ab87cb627c86925dc5c5331c6de3b1536}{lna}}[2] == 0 || sc-\/>\mbox{\hyperlink{structrun__softc_ab87cb627c86925dc5c5331c6de3b1536}{lna}}[2] == 0xff) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02083}02083                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_ROM,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02084}02084                     \textcolor{stringliteral}{"{}invalid LNA for channel group \%d\(\backslash\)n"{}}, 2);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02085}02085                 sc-\/>\mbox{\hyperlink{structrun__softc_ab87cb627c86925dc5c5331c6de3b1536}{lna}}[2] = sc-\/>\mbox{\hyperlink{structrun__softc_ab87cb627c86925dc5c5331c6de3b1536}{lna}}[1];}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02086}02086         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02087}02087         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_ab87cb627c86925dc5c5331c6de3b1536}{lna}}[3] == 0 || sc-\/>\mbox{\hyperlink{structrun__softc_ab87cb627c86925dc5c5331c6de3b1536}{lna}}[3] == 0xff) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02088}02088                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_ROM,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02089}02089                     \textcolor{stringliteral}{"{}invalid LNA for channel group \%d\(\backslash\)n"{}}, 3);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02090}02090                 sc-\/>\mbox{\hyperlink{structrun__softc_ab87cb627c86925dc5c5331c6de3b1536}{lna}}[3] = sc-\/>\mbox{\hyperlink{structrun__softc_ab87cb627c86925dc5c5331c6de3b1536}{lna}}[1];}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02091}02091         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02092}02092 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02093}02093         \textcolor{comment}{/* fix broken RSSI offset entries */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02094}02094         \textcolor{keywordflow}{for} (ant = 0; ant < 3; ant++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02095}02095                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_ab419928156f63d9250382e07863883d1}{rssi\_2ghz}}[ant] < -\/10 || sc-\/>\mbox{\hyperlink{structrun__softc_ab419928156f63d9250382e07863883d1}{rssi\_2ghz}}[ant] > 10) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02096}02096                         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_ROM | RUN\_DEBUG\_RSSI,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02097}02097                             \textcolor{stringliteral}{"{}invalid RSSI\%d offset: \%d (2GHz)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02098}02098                             ant + 1, sc-\/>\mbox{\hyperlink{structrun__softc_ab419928156f63d9250382e07863883d1}{rssi\_2ghz}}[ant]);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02099}02099                         sc-\/>\mbox{\hyperlink{structrun__softc_ab419928156f63d9250382e07863883d1}{rssi\_2ghz}}[ant] = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02100}02100                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02101}02101                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a15cd296140c95180cd3280084329df31}{rssi\_5ghz}}[ant] < -\/10 || sc-\/>\mbox{\hyperlink{structrun__softc_a15cd296140c95180cd3280084329df31}{rssi\_5ghz}}[ant] > 10) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02102}02102                         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_ROM | RUN\_DEBUG\_RSSI,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02103}02103                             \textcolor{stringliteral}{"{}invalid RSSI\%d offset: \%d (5GHz)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02104}02104                             ant + 1, sc-\/>\mbox{\hyperlink{structrun__softc_a15cd296140c95180cd3280084329df31}{rssi\_5ghz}}[ant]);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02105}02105                         sc-\/>\mbox{\hyperlink{structrun__softc_a15cd296140c95180cd3280084329df31}{rssi\_5ghz}}[ant] = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02106}02106                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02107}02107         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02108}02108         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02109}02109 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02110}02110 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02111}02111 \textcolor{keyword}{static} \textcolor{keyword}{struct }ieee80211\_node *}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02112}\mbox{\hyperlink{if__run_8c_a289208baaa1c9fc2d1629fe72e82c2a6}{02112}} \mbox{\hyperlink{if__run_8c_a289208baaa1c9fc2d1629fe72e82c2a6}{run\_node\_alloc}}(\textcolor{keyword}{struct} ieee80211vap *vap, \textcolor{keyword}{const} uint8\_t mac[IEEE80211\_ADDR\_LEN])}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02113}02113 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02114}02114         \textcolor{keywordflow}{return} malloc(\textcolor{keyword}{sizeof} (\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__node}{run\_node}}), M\_80211\_NODE,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02115}02115             M\_NOWAIT | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02116}02116 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02117}02117 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02118}02118 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02119}\mbox{\hyperlink{if__run_8c_ae68dc7a107c157aa04dc6ce246693e2f}{02119}} \mbox{\hyperlink{if__run_8c_ae68dc7a107c157aa04dc6ce246693e2f}{run\_media\_change}}(\textcolor{keyword}{struct} ifnet *ifp)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02120}02120 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02121}02121         \textcolor{keyword}{struct }ieee80211vap *vap = ifp-\/>if\_softc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02122}02122         \textcolor{keyword}{struct }ieee80211com *ic = vap-\/>iv\_ic;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02123}02123         \textcolor{keyword}{const} \textcolor{keyword}{struct }ieee80211\_txparam *tp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02124}02124         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02125}02125         uint8\_t rate, ridx;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02126}02126         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02127}02127 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02128}02128         \mbox{\hyperlink{if__runvar_8h_afb83ba5b9cfa86e30eb1e74fe2267cea}{RUN\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02129}02129 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02130}02130         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = ieee80211\_media\_change(ifp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02131}02131         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != 0) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02132}02132                 \mbox{\hyperlink{if__runvar_8h_a45d3b538b97178f8fe93284ed57e2cd5}{RUN\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02133}02133                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02134}02134         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02135}02135 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02136}02136         tp = \&vap-\/>iv\_txparms[ieee80211\_chan2mode(ic-\/>ic\_curchan)];}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02137}02137         \textcolor{keywordflow}{if} (tp-\/>ucastrate != IEEE80211\_FIXED\_RATE\_NONE) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02138}02138                 \textcolor{keyword}{struct }ieee80211\_node *ni;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02139}02139                 \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__node}{run\_node}} *rn;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02140}02140 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02141}02141                 \textcolor{comment}{/* XXX TODO: methodize with MCS rates */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02142}02142                 rate = ic-\/>ic\_sup\_rates[ic-\/>ic\_curmode].}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02143}02143                     rs\_rates[tp-\/>ucastrate] \& IEEE80211\_RATE\_VAL;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02144}02144                 \textcolor{keywordflow}{for} (ridx = 0; ridx < \mbox{\hyperlink{if__run_8c_a6dd9f14db793abbf67fd4417b35108f9}{RT2860\_RIDX\_MAX}}; ridx++)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02145}02145                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_ab543147498aaf00bd04fe0a18a6c6a74}{rt2860\_rates}}[ridx].rate == rate)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02146}02146                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02147}02147 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02148}02148                 \mbox{\hyperlink{structrun__node_a47e98d22d90417737401b60b33b779f5}{ni}} = ieee80211\_ref\_node(vap-\/>iv\_bss);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02149}02149                 rn = \mbox{\hyperlink{if__runvar_8h_a60a610e15c59350c228a2d8f390118e3}{RUN\_NODE}}(\mbox{\hyperlink{structrun__node_a47e98d22d90417737401b60b33b779f5}{ni}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02150}02150                 rn-\/>\mbox{\hyperlink{structrun__node_ad481d1dbd5da4d03d044c883628c6453}{fix\_ridx}} = ridx;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02151}02151                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_RATE, \textcolor{stringliteral}{"{}rate=\%d, fix\_ridx=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02152}02152                     rate, rn-\/>\mbox{\hyperlink{structrun__node_ad481d1dbd5da4d03d044c883628c6453}{fix\_ridx}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02153}02153                 ieee80211\_free\_node(\mbox{\hyperlink{structrun__node_a47e98d22d90417737401b60b33b779f5}{ni}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02154}02154         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02155}02155 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02156}02156 \textcolor{preprocessor}{\#if 0}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02157}02157         \textcolor{keywordflow}{if} ((ifp-\/>if\_flags \& IFF\_UP) \&\&}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02158}02158             (ifp-\/>if\_drv\_flags \&  \mbox{\hyperlink{if__runvar_8h_a4d0bc8a7e4cf8003139e1ee4d3d6930e}{RUN\_RUNNING}}))\{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02159}02159                 \mbox{\hyperlink{if__run_8c_a11a486139db80fe5b329e49a70faaed0}{run\_init\_locked}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02160}02160         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02161}02161 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02162}02162 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02163}02163         \mbox{\hyperlink{if__runvar_8h_a45d3b538b97178f8fe93284ed57e2cd5}{RUN\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02164}02164 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02165}02165         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02166}02166 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02167}02167 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02168}02168 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02169}\mbox{\hyperlink{if__run_8c_aec5eab1bf9993e2e263473e59fc11f2c}{02169}} \mbox{\hyperlink{if__run_8c_aec5eab1bf9993e2e263473e59fc11f2c}{run\_newstate}}(\textcolor{keyword}{struct} ieee80211vap *vap, \textcolor{keyword}{enum} ieee80211\_state nstate, \textcolor{keywordtype}{int} arg)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02170}02170 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02171}02171         \textcolor{keyword}{const} \textcolor{keyword}{struct }ieee80211\_txparam *tp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02172}02172         \textcolor{keyword}{struct }ieee80211com *ic = vap-\/>iv\_ic;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02173}02173         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02174}02174         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__vap}{run\_vap}} *rvp = \mbox{\hyperlink{if__runvar_8h_a04216c15e7dce0789f22dc3831e15869}{RUN\_VAP}}(\mbox{\hyperlink{structrun__vap_a486ec51658db5e3e238fc907e1e4f0bf}{vap}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02175}02175         \textcolor{keyword}{enum} ieee80211\_state ostate;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02176}02176         uint32\_t sta[3];}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02177}02177         uint8\_t ratectl;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02178}02178         uint8\_t restart\_ratectl = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02179}02179         uint8\_t bid = 1 << rvp-\/>\mbox{\hyperlink{structrun__vap_a8ffa8613b55b52ad41c7d293cb35ec63}{rvp\_id}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02180}02180 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02181}02181         ostate = \mbox{\hyperlink{structrun__vap_a486ec51658db5e3e238fc907e1e4f0bf}{vap}}-\/>iv\_state;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02182}02182         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_STATE, \textcolor{stringliteral}{"{}\%s -\/> \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02183}02183                 ieee80211\_state\_name[ostate],}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02184}02184                 ieee80211\_state\_name[nstate]);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02185}02185 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02186}02186         IEEE80211\_UNLOCK(ic);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02187}02187         \mbox{\hyperlink{if__runvar_8h_afb83ba5b9cfa86e30eb1e74fe2267cea}{RUN\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02188}02188 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02189}02189         ratectl = sc-\/>\mbox{\hyperlink{structrun__softc_a62dd21cab90620634cc0d338870dc49f}{ratectl\_run}}; \textcolor{comment}{/* remember current state */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02190}02190         sc-\/>\mbox{\hyperlink{structrun__softc_a62dd21cab90620634cc0d338870dc49f}{ratectl\_run}} = \mbox{\hyperlink{if__runvar_8h_a2c96ec83349e59ee2ff6b2a95b3b20f9}{RUN\_RATECTL\_OFF}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02191}02191         \mbox{\hyperlink{usbdi_8h_ad74dd2f25febf2ba5083574711e4101a}{usb\_callout\_stop}}(\&sc-\/>\mbox{\hyperlink{structrun__softc_a4df8b5a8e9e18c43fc38313f096a5076}{ratectl\_ch}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02192}02192 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02193}02193         \textcolor{keywordflow}{if} (ostate == IEEE80211\_S\_RUN) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02194}02194                 \textcolor{comment}{/* turn link LED off */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02195}02195                 \mbox{\hyperlink{if__run_8c_a3132e4277bc63d116dca25932f0369a0}{run\_set\_leds}}(sc, \mbox{\hyperlink{if__runreg_8h_a766804f840b0afeba28a4b5d0bcf6508}{RT2860\_LED\_RADIO}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02196}02196         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02197}02197 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02198}02198         \textcolor{keywordflow}{switch} (nstate) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02199}02199         \textcolor{keywordflow}{case} IEEE80211\_S\_INIT:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02200}02200                 restart\_ratectl = 1;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02201}02201 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02202}02202                 \textcolor{keywordflow}{if} (ostate != IEEE80211\_S\_RUN)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02203}02203                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02204}02204 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02205}02205                 ratectl \&= \string~bid;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02206}02206                 sc-\/>\mbox{\hyperlink{structrun__softc_a99dbb5d751ea9f79daa4b0c3034eec18}{runbmap}} \&= \string~bid;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02207}02207 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02208}02208                 \textcolor{comment}{/* abort TSF synchronization if there is no vap running */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02209}02209                 \textcolor{keywordflow}{if} (-\/-\/sc-\/>\mbox{\hyperlink{structrun__softc_a426dce59e9fe7313bf7040346751ac40}{running}} == 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02210}02210                         \mbox{\hyperlink{if__run_8c_a4b9834f174786bcc92da7d8e788d0c4c}{run\_disable\_tsf}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02211}02211                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02212}02212 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02213}02213         \textcolor{keywordflow}{case} IEEE80211\_S\_RUN:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02214}02214                 \textcolor{keywordflow}{if} (!(sc-\/>\mbox{\hyperlink{structrun__softc_a99dbb5d751ea9f79daa4b0c3034eec18}{runbmap}} \& bid)) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02215}02215                         \textcolor{keywordflow}{if}(sc-\/>\mbox{\hyperlink{structrun__softc_a426dce59e9fe7313bf7040346751ac40}{running}}++)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02216}02216                                 restart\_ratectl = 1;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02217}02217                         sc-\/>\mbox{\hyperlink{structrun__softc_a99dbb5d751ea9f79daa4b0c3034eec18}{runbmap}} |= bid;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02218}02218                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02219}02219 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02220}02220                 m\_freem(rvp-\/>\mbox{\hyperlink{structrun__vap_ae4fdb0538e4abb3d28b3ecd67b8a8f09}{beacon\_mbuf}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02221}02221                 rvp-\/>\mbox{\hyperlink{structrun__vap_ae4fdb0538e4abb3d28b3ecd67b8a8f09}{beacon\_mbuf}} = NULL;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02222}02222 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02223}02223                 \textcolor{keywordflow}{switch} (\mbox{\hyperlink{structrun__vap_a486ec51658db5e3e238fc907e1e4f0bf}{vap}}-\/>iv\_opmode) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02224}02224                 \textcolor{keywordflow}{case} IEEE80211\_M\_HOSTAP:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02225}02225                 \textcolor{keywordflow}{case} IEEE80211\_M\_MBSS:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02226}02226                         sc-\/>\mbox{\hyperlink{structrun__softc_aa1e04fc685546ee0701b6fd51088d665}{ap\_running}} |= bid;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02227}02227                         ic-\/>ic\_opmode = \mbox{\hyperlink{structrun__vap_a486ec51658db5e3e238fc907e1e4f0bf}{vap}}-\/>iv\_opmode;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02228}02228                         \mbox{\hyperlink{if__run_8c_a5f68509146f99c809c969ba8d5ef40a8}{run\_update\_beacon\_cb}}(\mbox{\hyperlink{structrun__vap_a486ec51658db5e3e238fc907e1e4f0bf}{vap}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02229}02229                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02230}02230                 \textcolor{keywordflow}{case} IEEE80211\_M\_IBSS:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02231}02231                         sc-\/>\mbox{\hyperlink{structrun__softc_a93bea3a8c5eb08c17d7e9a0aa7d53afb}{adhoc\_running}} |= bid;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02232}02232                         \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structrun__softc_aa1e04fc685546ee0701b6fd51088d665}{ap\_running}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02233}02233                                 ic-\/>ic\_opmode = \mbox{\hyperlink{structrun__vap_a486ec51658db5e3e238fc907e1e4f0bf}{vap}}-\/>iv\_opmode;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02234}02234                         \mbox{\hyperlink{if__run_8c_a5f68509146f99c809c969ba8d5ef40a8}{run\_update\_beacon\_cb}}(\mbox{\hyperlink{structrun__vap_a486ec51658db5e3e238fc907e1e4f0bf}{vap}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02235}02235                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02236}02236                 \textcolor{keywordflow}{case} IEEE80211\_M\_STA:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02237}02237                         sc-\/>\mbox{\hyperlink{structrun__softc_a23ff5068d4726eced7f5224dec908fd7}{sta\_running}} |= bid;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02238}02238                         \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structrun__softc_aa1e04fc685546ee0701b6fd51088d665}{ap\_running}} \&\& !sc-\/>\mbox{\hyperlink{structrun__softc_a93bea3a8c5eb08c17d7e9a0aa7d53afb}{adhoc\_running}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02239}02239                                 ic-\/>ic\_opmode = \mbox{\hyperlink{structrun__vap_a486ec51658db5e3e238fc907e1e4f0bf}{vap}}-\/>iv\_opmode;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02240}02240 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02241}02241                         \textcolor{comment}{/* read statistic counters (clear on read) */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02242}02242                         \mbox{\hyperlink{if__run_8c_a4e4209826999dd13a18401725612b197}{run\_read\_region\_1}}(sc, \mbox{\hyperlink{if__runreg_8h_a8544d1439e402a9f30b9004ea2114bb9}{RT2860\_TX\_STA\_CNT0}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02243}02243                             (uint8\_t *)sta, \textcolor{keyword}{sizeof} sta);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02244}02244 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02245}02245                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02246}02246                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02247}02247                         ic-\/>ic\_opmode = \mbox{\hyperlink{structrun__vap_a486ec51658db5e3e238fc907e1e4f0bf}{vap}}-\/>iv\_opmode;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02248}02248                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02249}02249                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02250}02250 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02251}02251                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structrun__vap_a486ec51658db5e3e238fc907e1e4f0bf}{vap}}-\/>iv\_opmode != IEEE80211\_M\_MONITOR) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02252}02252                         \textcolor{keyword}{struct }ieee80211\_node *ni;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02253}02253 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02254}02254                         \textcolor{keywordflow}{if} (ic-\/>ic\_bsschan == IEEE80211\_CHAN\_ANYC) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02255}02255                                 \mbox{\hyperlink{if__runvar_8h_a45d3b538b97178f8fe93284ed57e2cd5}{RUN\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02256}02256                                 IEEE80211\_LOCK(ic);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02257}02257                                 \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02258}02258                         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02259}02259                         \mbox{\hyperlink{if__run_8c_a5f9ad8fd4a1febc68b268bbeeba9fac2}{run\_updateslot}}(ic);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02260}02260                         \mbox{\hyperlink{if__run_8c_adafc9cad1627a76fba3a974d1907b745}{run\_enable\_mrr}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02261}02261                         \mbox{\hyperlink{if__run_8c_adb61534f0d29aac4a9880b31de3f9739}{run\_set\_txpreamble}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02262}02262                         \mbox{\hyperlink{if__run_8c_a831ad16498909189c7ab5a1f7bb35035}{run\_set\_basicrates}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02263}02263                         ni = ieee80211\_ref\_node(vap-\/>iv\_bss);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02264}02264                         IEEE80211\_ADDR\_COPY(sc-\/>\mbox{\hyperlink{structrun__softc_ae60c005a84561cfc167b3ca4161b3e33}{sc\_bssid}}, ni-\/>ni\_bssid);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02265}02265                         \mbox{\hyperlink{if__run_8c_a4516b912a2489e9939a535b1b99a1bdf}{run\_set\_bssid}}(sc, sc-\/>\mbox{\hyperlink{structrun__softc_ae60c005a84561cfc167b3ca4161b3e33}{sc\_bssid}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02266}02266                         ieee80211\_free\_node(ni);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02267}02267                         \mbox{\hyperlink{if__run_8c_a919f3dd64163f08124102ccb41930014}{run\_enable\_tsf\_sync}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02268}02268 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02269}02269                         \textcolor{comment}{/* enable automatic rate adaptation */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02270}02270                         tp = \&vap-\/>iv\_txparms[ieee80211\_chan2mode(ic-\/>ic\_curchan)];}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02271}02271                         \textcolor{keywordflow}{if} (tp-\/>ucastrate == IEEE80211\_FIXED\_RATE\_NONE)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02272}02272                                 ratectl |= bid;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02273}02273                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02274}02274                         \mbox{\hyperlink{if__run_8c_a1176c339f5e95c5b7303ae4a22deac19}{run\_enable\_tsf}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02275}02275 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02276}02276                 \textcolor{comment}{/* turn link LED on */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02277}02277                 \mbox{\hyperlink{if__run_8c_a3132e4277bc63d116dca25932f0369a0}{run\_set\_leds}}(sc, \mbox{\hyperlink{if__runreg_8h_a766804f840b0afeba28a4b5d0bcf6508}{RT2860\_LED\_RADIO}} |}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02278}02278                     (IEEE80211\_IS\_CHAN\_2GHZ(ic-\/>ic\_curchan) ?}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02279}02279                      \mbox{\hyperlink{if__runreg_8h_a1da01f5ed869e2d1e84f1c02550e415b}{RT2860\_LED\_LINK\_2GHZ}} : \mbox{\hyperlink{if__runreg_8h_a27ea42200824297761f4c5b7232eb86e}{RT2860\_LED\_LINK\_5GHZ}}));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02280}02280 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02281}02281                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02282}02282         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02283}02283                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_STATE, \textcolor{stringliteral}{"{}undefined state\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02284}02284                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02285}02285         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02286}02286 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02287}02287         \textcolor{comment}{/* restart amrr for running VAPs */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02288}02288         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structrun__softc_a62dd21cab90620634cc0d338870dc49f}{ratectl\_run}} = ratectl) \&\& restart\_ratectl)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02289}02289                 \mbox{\hyperlink{usbdi_8h_a5ba556ca3595eb8006822a123ac9d54f}{usb\_callout\_reset}}(\&sc-\/>\mbox{\hyperlink{structrun__softc_a4df8b5a8e9e18c43fc38313f096a5076}{ratectl\_ch}}, hz, \mbox{\hyperlink{if__run_8c_adb1c4b53cf605d51ea807c6cbd2bb652}{run\_ratectl\_to}}, sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02290}02290 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02291}02291         \mbox{\hyperlink{if__runvar_8h_a45d3b538b97178f8fe93284ed57e2cd5}{RUN\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02292}02292         IEEE80211\_LOCK(ic);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02293}02293 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02294}02294         \textcolor{keywordflow}{return}(rvp-\/>\mbox{\hyperlink{structrun__vap_a5730b341e0dd3e7ff8dce9a3f1cd9ca6}{newstate}}(vap, nstate, arg));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02295}02295 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02296}02296 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02297}02297 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02298}\mbox{\hyperlink{if__run_8c_ae1599ee317cac52df7634d21e795d55b}{02298}} \mbox{\hyperlink{if__run_8c_ae1599ee317cac52df7634d21e795d55b}{run\_wme\_update}}(\textcolor{keyword}{struct} ieee80211com *ic)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02299}02299 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02300}02300         \textcolor{keyword}{struct }chanAccParams chp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02301}02301         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02302}02302         \textcolor{keyword}{const} \textcolor{keyword}{struct }wmeParams *ac;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02303}02303         \textcolor{keywordtype}{int} aci, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02304}02304 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02305}02305         ieee80211\_wme\_ic\_getparams(ic, \&chp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02306}02306         ac = chp.cap\_wmeParams;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02307}02307 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02308}02308         \textcolor{comment}{/* update MAC TX configuration registers */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02309}02309         \mbox{\hyperlink{if__runvar_8h_afb83ba5b9cfa86e30eb1e74fe2267cea}{RUN\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02310}02310         \textcolor{keywordflow}{for} (aci = 0; aci < WME\_NUM\_AC; aci++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02311}02311                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a918b6e556857be214e9032a0a1552a93}{RT2860\_EDCA\_AC\_CFG}}(aci),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02312}02312                     ac[aci].wmep\_logcwmax << 16 |}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02313}02313                     ac[aci].wmep\_logcwmin << 12 |}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02314}02314                     ac[aci].wmep\_aifsn    <<  8 |}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02315}02315                     ac[aci].wmep\_txopLimit);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02316}02316                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}) \textcolor{keywordflow}{goto} err;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02317}02317         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02318}02318 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02319}02319         \textcolor{comment}{/* update SCH/DMA registers too */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02320}02320         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a706e406ecba2e398aae3281235af3e7f}{RT2860\_WMM\_AIFSN\_CFG}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02321}02321             ac[WME\_AC\_VO].wmep\_aifsn  << 12 |}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02322}02322             ac[WME\_AC\_VI].wmep\_aifsn  <<  8 |}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02323}02323             ac[WME\_AC\_BK].wmep\_aifsn  <<  4 |}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02324}02324             ac[WME\_AC\_BE].wmep\_aifsn);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02325}02325         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}) \textcolor{keywordflow}{goto} err;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02326}02326         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a997ca35f76d69850fc48db8e16d3c0a1}{RT2860\_WMM\_CWMIN\_CFG}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02327}02327             ac[WME\_AC\_VO].wmep\_logcwmin << 12 |}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02328}02328             ac[WME\_AC\_VI].wmep\_logcwmin <<  8 |}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02329}02329             ac[WME\_AC\_BK].wmep\_logcwmin <<  4 |}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02330}02330             ac[WME\_AC\_BE].wmep\_logcwmin);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02331}02331         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}) \textcolor{keywordflow}{goto} err;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02332}02332         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_ab14cdf2b86ec707bdeb97bf6d1be2eb0}{RT2860\_WMM\_CWMAX\_CFG}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02333}02333             ac[WME\_AC\_VO].wmep\_logcwmax << 12 |}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02334}02334             ac[WME\_AC\_VI].wmep\_logcwmax <<  8 |}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02335}02335             ac[WME\_AC\_BK].wmep\_logcwmax <<  4 |}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02336}02336             ac[WME\_AC\_BE].wmep\_logcwmax);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02337}02337         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}) \textcolor{keywordflow}{goto} err;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02338}02338         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_ab4b83a417f37e2a6e59071dbc7dd6def}{RT2860\_WMM\_TXOP0\_CFG}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02339}02339             ac[WME\_AC\_BK].wmep\_txopLimit << 16 |}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02340}02340             ac[WME\_AC\_BE].wmep\_txopLimit);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02341}02341         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}) \textcolor{keywordflow}{goto} err;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02342}02342         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a5b102774f140c774e1250dec29b805ca}{RT2860\_WMM\_TXOP1\_CFG}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02343}02343             ac[WME\_AC\_VO].wmep\_txopLimit << 16 |}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02344}02344             ac[WME\_AC\_VI].wmep\_txopLimit);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02345}02345 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02346}02346 err:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02347}02347         \mbox{\hyperlink{if__runvar_8h_a45d3b538b97178f8fe93284ed57e2cd5}{RUN\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02348}02348         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02349}02349                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_USB, \textcolor{stringliteral}{"{}WME update failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02350}02350 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02351}02351         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02352}02352 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02353}02353 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02354}02354 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02355}\mbox{\hyperlink{if__run_8c_ac335070a726c14fe934027d7558c6d87}{02355}} \mbox{\hyperlink{if__run_8c_ac335070a726c14fe934027d7558c6d87}{run\_key\_set\_cb}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02356}02356 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02357}02357         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__cmdq}{run\_cmdq}} *cmdq = arg;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02358}02358         \textcolor{keyword}{struct }ieee80211vap *vap = cmdq-\/>\mbox{\hyperlink{structrun__cmdq_a2dac1ae8f77e3aa8f1512b4e41692d07}{arg1}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02359}02359         \textcolor{keyword}{struct }ieee80211\_key *\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}} = cmdq-\/>\mbox{\hyperlink{structrun__cmdq_a7c57deebcd4c9be60ec69e7270809d3c}{k}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02360}02360         \textcolor{keyword}{struct }ieee80211com *ic = vap-\/>iv\_ic;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02361}02361         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02362}02362         \textcolor{keyword}{struct }ieee80211\_node *ni;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02363}02363         u\_int cipher = \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_cipher-\/>ic\_cipher;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02364}02364         uint32\_t attr;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02365}02365         uint16\_t base, associd;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02366}02366         uint8\_t mode, wcid, iv[8];}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02367}02367 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02368}02368         \mbox{\hyperlink{if__runvar_8h_a46923988c8f3d1896339650dd4bf5f53}{RUN\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02369}02369 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02370}02370         \textcolor{keywordflow}{if} (vap-\/>iv\_opmode == IEEE80211\_M\_HOSTAP)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02371}02371                 ni = ieee80211\_find\_vap\_node(\&ic-\/>ic\_sta, vap, cmdq-\/>\mbox{\hyperlink{structrun__cmdq_ae93342e401da29d9590902649a61cd4e}{mac}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02372}02372         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02373}02373                 ni = vap-\/>iv\_bss;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02374}02374         associd = (ni != NULL) ? ni-\/>ni\_associd : 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02375}02375 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02376}02376         \textcolor{comment}{/* map net80211 cipher to RT2860 security mode */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02377}02377         switch (cipher) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02378}02378         \textcolor{keywordflow}{case} IEEE80211\_CIPHER\_WEP:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02379}02379                 \textcolor{keywordflow}{if}(\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_keylen < 8)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02380}02380                         mode = \mbox{\hyperlink{if__runreg_8h_a0f0aea58a4822de8407cf9a0141b8451}{RT2860\_MODE\_WEP40}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02381}02381                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02382}02382                         mode = \mbox{\hyperlink{if__runreg_8h_add960a3c037123f779a9e531e03a2e98}{RT2860\_MODE\_WEP104}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02383}02383                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02384}02384         \textcolor{keywordflow}{case} IEEE80211\_CIPHER\_TKIP:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02385}02385                 mode = \mbox{\hyperlink{if__runreg_8h_a11b71a5274992ee45af85067a49c81de}{RT2860\_MODE\_TKIP}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02386}02386                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02387}02387         \textcolor{keywordflow}{case} IEEE80211\_CIPHER\_AES\_CCM:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02388}02388                 mode = \mbox{\hyperlink{if__runreg_8h_ab99c18703e3e3624aef609f629ca0be4}{RT2860\_MODE\_AES\_CCMP}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02389}02389                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02390}02390         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02391}02391                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_KEY, \textcolor{stringliteral}{"{}undefined case\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02392}02392                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02393}02393         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02394}02394 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02395}02395         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_KEY,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02396}02396             \textcolor{stringliteral}{"{}associd=\%x, keyix=\%d, mode=\%x, type=\%s, tx=\%s, rx=\%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02397}02397             associd, \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_keyix, mode,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02398}02398             (\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_flags \& IEEE80211\_KEY\_GROUP) ? \textcolor{stringliteral}{"{}group"{}} : \textcolor{stringliteral}{"{}pairwise"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02399}02399             (\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_flags \& IEEE80211\_KEY\_XMIT) ? \textcolor{stringliteral}{"{}on"{}} : \textcolor{stringliteral}{"{}off"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02400}02400             (\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_flags \& IEEE80211\_KEY\_RECV) ? \textcolor{stringliteral}{"{}on"{}} : \textcolor{stringliteral}{"{}off"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02401}02401 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02402}02402         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_flags \& IEEE80211\_KEY\_GROUP) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02403}02403                 wcid = 0;       \textcolor{comment}{/* NB: update WCID0 for group keys */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02404}02404                 base = \mbox{\hyperlink{if__runreg_8h_aea2084a71f6d675386b6955c74ae0c4d}{RT2860\_SKEY}}(\mbox{\hyperlink{if__runvar_8h_a04216c15e7dce0789f22dc3831e15869}{RUN\_VAP}}(vap)-\/>rvp\_id, \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_keyix);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02405}02405         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02406}02406                 wcid = (vap-\/>iv\_opmode == IEEE80211\_M\_STA) ?}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02407}02407                     1 : \mbox{\hyperlink{if__runvar_8h_ae4c2a1ac815b010f11451d0e57db2081}{RUN\_AID2WCID}}(associd);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02408}02408                 base = \mbox{\hyperlink{if__runreg_8h_af7cba39cee605e5c10224758b1e11b74}{RT2860\_PKEY}}(wcid);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02409}02409         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02410}02410 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02411}02411         \textcolor{keywordflow}{if} (cipher == IEEE80211\_CIPHER\_TKIP) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02412}02412                 \textcolor{keywordflow}{if}(\mbox{\hyperlink{if__run_8c_a366ce11d14b4e5e3700232866441c12c}{run\_write\_region\_1}}(sc, base, \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_key, 16))}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02413}02413                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02414}02414                 \textcolor{keywordflow}{if}(\mbox{\hyperlink{if__run_8c_a366ce11d14b4e5e3700232866441c12c}{run\_write\_region\_1}}(sc, base + 16, \&\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_key[16], 8))     \textcolor{comment}{/* wk\_txmic */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02415}02415                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02416}02416                 \textcolor{keywordflow}{if}(\mbox{\hyperlink{if__run_8c_a366ce11d14b4e5e3700232866441c12c}{run\_write\_region\_1}}(sc, base + 24, \&\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_key[24], 8))     \textcolor{comment}{/* wk\_rxmic */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02417}02417                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02418}02418         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02419}02419                 \textcolor{comment}{/* roundup len to 16-\/bit: XXX fix write\_region\_1() instead */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02420}02420                 \textcolor{keywordflow}{if}(\mbox{\hyperlink{if__run_8c_a366ce11d14b4e5e3700232866441c12c}{run\_write\_region\_1}}(sc, base, \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_key, (\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_keylen + 1) \& \string~1))}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02421}02421                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02422}02422         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02423}02423 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02424}02424         \textcolor{keywordflow}{if} (!(\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_flags \& IEEE80211\_KEY\_GROUP) ||}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02425}02425             (\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_flags \& (IEEE80211\_KEY\_XMIT | IEEE80211\_KEY\_RECV))) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02426}02426                 \textcolor{comment}{/* set initial packet number in IV+EIV */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02427}02427                 \textcolor{keywordflow}{if} (cipher == IEEE80211\_CIPHER\_WEP) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02428}02428                         memset(iv, 0, \textcolor{keyword}{sizeof} iv);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02429}02429                         iv[3] = vap-\/>iv\_def\_txkey << 6;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02430}02430                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02431}02431                         \textcolor{keywordflow}{if} (cipher == IEEE80211\_CIPHER\_TKIP) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02432}02432                                 iv[0] = \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_keytsc >> 8;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02433}02433                                 iv[1] = (iv[0] | 0x20) \& 0x7f;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02434}02434                                 iv[2] = \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_keytsc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02435}02435                         \} \textcolor{keywordflow}{else} \textcolor{comment}{/* CCMP */} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02436}02436                                 iv[0] = \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_keytsc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02437}02437                                 iv[1] = \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_keytsc >> 8;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02438}02438                                 iv[2] = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02439}02439                         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02440}02440                         iv[3] = \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_keyix << 6 | IEEE80211\_WEP\_EXTIV;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02441}02441                         iv[4] = \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_keytsc >> 16;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02442}02442                         iv[5] = \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_keytsc >> 24;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02443}02443                         iv[6] = \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_keytsc >> 32;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02444}02444                         iv[7] = \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_keytsc >> 40;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02445}02445                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02446}02446                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_a366ce11d14b4e5e3700232866441c12c}{run\_write\_region\_1}}(sc, \mbox{\hyperlink{if__runreg_8h_acb5e02ee64878911a8e934661fbfbbc6}{RT2860\_IVEIV}}(wcid), iv, 8))}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02447}02447                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02448}02448         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02449}02449 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02450}02450         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_flags \& IEEE80211\_KEY\_GROUP) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02451}02451                 \textcolor{comment}{/* install group key */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02452}02452                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a8a6e7e3601ec1d38edf4652b20fe2538}{RT2860\_SKEY\_MODE\_0\_7}}, \&attr))}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02453}02453                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02454}02454                 attr \&= \string~(0xf << (\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_keyix * 4));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02455}02455                 attr |= mode << (\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_keyix * 4);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02456}02456                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a8a6e7e3601ec1d38edf4652b20fe2538}{RT2860\_SKEY\_MODE\_0\_7}}, attr))}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02457}02457                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02458}02458         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02459}02459                 \textcolor{comment}{/* install pairwise key */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02460}02460                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_ab8b75442b4116865eac7e88f691c0885}{RT2860\_WCID\_ATTR}}(wcid), \&attr))}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02461}02461                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02462}02462                 attr = (attr \& \string~0xf) | (mode << 1) | \mbox{\hyperlink{if__runreg_8h_ac2e35f10eb8d1793c78826426d430c18}{RT2860\_RX\_PKEY\_EN}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02463}02463                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_ab8b75442b4116865eac7e88f691c0885}{RT2860\_WCID\_ATTR}}(wcid), attr))}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02464}02464                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02465}02465         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02466}02466 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02467}02467         \textcolor{comment}{/* TODO create a pass-\/thru key entry? */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02468}02468 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02469}02469         \textcolor{comment}{/* need wcid to delete the right key later */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02470}02470         \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_pad = wcid;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02471}02471 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02472}02472 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02473}02473 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02474}02474 \textcolor{comment}{ * Don't have to be deferred, but in order to keep order of}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02475}02475 \textcolor{comment}{ * execution, i.e. with run\_key\_delete(), defer this and let}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02476}02476 \textcolor{comment}{ * run\_cmdq\_cb() maintain the order.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02477}02477 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02478}02478 \textcolor{comment}{ * return 0 on error}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02479}02479 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02480}02480 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02481}\mbox{\hyperlink{if__run_8c_a4976ef424eb55ce1725ec5e83e18bbb3}{02481}} \mbox{\hyperlink{if__run_8c_a4976ef424eb55ce1725ec5e83e18bbb3}{run\_key\_set}}(\textcolor{keyword}{struct} ieee80211vap *vap, \textcolor{keyword}{struct} ieee80211\_key *\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02482}02482 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02483}02483         \textcolor{keyword}{struct }ieee80211com *ic = vap-\/>iv\_ic;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02484}02484         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02485}02485         uint32\_t i;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02486}02486 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02487}02487         i = \mbox{\hyperlink{if__run_8c_ab51c04f6574bfdc56c82a56b5800c32b}{RUN\_CMDQ\_GET}}(\&sc-\/>\mbox{\hyperlink{structrun__softc_aa15ecf9db15b3ffda49a044842caf644}{cmdq\_store}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02488}02488         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_KEY, \textcolor{stringliteral}{"{}cmdq\_store=\%d\(\backslash\)n"{}}, i);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02489}02489         sc-\/>\mbox{\hyperlink{structrun__softc_a9500a13eb58aab1b19d1149c55235640}{cmdq}}[i].\mbox{\hyperlink{structrun__cmdq_a8bd79bf0dffc9ec5341a2d955f19f31e}{func}} = \mbox{\hyperlink{if__run_8c_ac335070a726c14fe934027d7558c6d87}{run\_key\_set\_cb}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02490}02490         sc-\/>\mbox{\hyperlink{structrun__softc_a9500a13eb58aab1b19d1149c55235640}{cmdq}}[i].\mbox{\hyperlink{structrun__cmdq_a44148050f8e128fac3651617eecad099}{arg0}} = NULL;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02491}02491         sc-\/>\mbox{\hyperlink{structrun__softc_a9500a13eb58aab1b19d1149c55235640}{cmdq}}[i].\mbox{\hyperlink{structrun__cmdq_a2dac1ae8f77e3aa8f1512b4e41692d07}{arg1}} = vap;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02492}02492         sc-\/>\mbox{\hyperlink{structrun__softc_a9500a13eb58aab1b19d1149c55235640}{cmdq}}[i].\mbox{\hyperlink{structrun__cmdq_a7c57deebcd4c9be60ec69e7270809d3c}{k}} = \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02493}02493         IEEE80211\_ADDR\_COPY(sc-\/>\mbox{\hyperlink{structrun__softc_a9500a13eb58aab1b19d1149c55235640}{cmdq}}[i].\mbox{\hyperlink{structrun__cmdq_ae93342e401da29d9590902649a61cd4e}{mac}}, \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_macaddr);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02494}02494         ieee80211\_runtask(ic, \&sc-\/>\mbox{\hyperlink{structrun__softc_ae805f800f38298655ad01aa36980dc38}{cmdq\_task}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02495}02495 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02496}02496         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02497}02497 \textcolor{comment}{         * To make sure key will be set when hostapd}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02498}02498 \textcolor{comment}{         * calls iv\_key\_set() before if\_init().}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02499}02499 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02500}02500         \textcolor{keywordflow}{if} (vap-\/>iv\_opmode == IEEE80211\_M\_HOSTAP) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02501}02501                 \mbox{\hyperlink{if__runvar_8h_afb83ba5b9cfa86e30eb1e74fe2267cea}{RUN\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02502}02502                 sc-\/>\mbox{\hyperlink{structrun__softc_acc6c8fb6fc13ea995d2c54bdb372a6c1}{cmdq\_key\_set}} = \mbox{\hyperlink{if__runvar_8h_abc29e6edc22c9ba09e2a3e35e48c94c3}{RUN\_CMDQ\_GO}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02503}02503                 \mbox{\hyperlink{if__runvar_8h_a45d3b538b97178f8fe93284ed57e2cd5}{RUN\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02504}02504         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02505}02505 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02506}02506         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02507}02507 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02508}02508 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02509}02509 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02510}02510 \textcolor{comment}{ * If wlan is destroyed without being brought down i.e. without}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02511}02511 \textcolor{comment}{ * wlan down or wpa\_cli terminate, this function is called after}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02512}02512 \textcolor{comment}{ * vap is gone. Don't refer it.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02513}02513 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02514}02514 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02515}\mbox{\hyperlink{if__run_8c_a2581ffa2432efa59ac1924b87070df6f}{02515}} \mbox{\hyperlink{if__run_8c_a2581ffa2432efa59ac1924b87070df6f}{run\_key\_delete\_cb}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02516}02516 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02517}02517         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__cmdq}{run\_cmdq}} *cmdq = arg;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02518}02518         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *sc = \mbox{\hyperlink{structrun__softc_a9500a13eb58aab1b19d1149c55235640}{cmdq}}-\/>\mbox{\hyperlink{structrun__cmdq_a2dac1ae8f77e3aa8f1512b4e41692d07}{arg1}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02519}02519         \textcolor{keyword}{struct }ieee80211\_key *\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}} = \&cmdq-\/>\mbox{\hyperlink{structrun__cmdq_a33c52a68937b6226576120d093f45481}{key}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02520}02520         uint32\_t attr;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02521}02521         uint8\_t wcid;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02522}02522 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02523}02523         \mbox{\hyperlink{if__runvar_8h_a46923988c8f3d1896339650dd4bf5f53}{RUN\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02524}02524 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02525}02525         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_flags \& IEEE80211\_KEY\_GROUP) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02526}02526                 \textcolor{comment}{/* remove group key */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02527}02527                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_KEY, \textcolor{stringliteral}{"{}removing group key\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02528}02528                 \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a8a6e7e3601ec1d38edf4652b20fe2538}{RT2860\_SKEY\_MODE\_0\_7}}, \&attr);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02529}02529                 attr \&= \string~(0xf << (\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_keyix * 4));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02530}02530                 \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a8a6e7e3601ec1d38edf4652b20fe2538}{RT2860\_SKEY\_MODE\_0\_7}}, attr);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02531}02531         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02532}02532                 \textcolor{comment}{/* remove pairwise key */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02533}02533                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_KEY,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02534}02534                     \textcolor{stringliteral}{"{}removing key for wcid \%x\(\backslash\)n"{}}, \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_pad);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02535}02535                 \textcolor{comment}{/* matching wcid was written to wk\_pad in run\_key\_set() */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02536}02536                 wcid = \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_pad;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02537}02537                 \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_ab8b75442b4116865eac7e88f691c0885}{RT2860\_WCID\_ATTR}}(wcid), \&attr);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02538}02538                 attr \&= \string~0xf;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02539}02539                 \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_ab8b75442b4116865eac7e88f691c0885}{RT2860\_WCID\_ATTR}}(wcid), attr);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02540}02540                 \mbox{\hyperlink{if__run_8c_a841976387f67bac56bbf1a8e8a5efe6f}{run\_set\_region\_4}}(sc, \mbox{\hyperlink{if__runreg_8h_a2e311d38c5f274619dec121a176298f0}{RT2860\_WCID\_ENTRY}}(wcid), 0, 8);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02541}02541         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02542}02542 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02543}02543         \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_pad = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02544}02544 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02545}02545 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02546}02546 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02547}02547 \textcolor{comment}{ * return 0 on error}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02548}02548 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02549}02549 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02550}\mbox{\hyperlink{if__run_8c_afd4c92318d98961ae6a7a2499a582b75}{02550}} \mbox{\hyperlink{if__run_8c_afd4c92318d98961ae6a7a2499a582b75}{run\_key\_delete}}(\textcolor{keyword}{struct} ieee80211vap *vap, \textcolor{keyword}{struct} ieee80211\_key *\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02551}02551 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02552}02552         \textcolor{keyword}{struct }ieee80211com *ic = vap-\/>iv\_ic;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02553}02553         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02554}02554         \textcolor{keyword}{struct }ieee80211\_key *k0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02555}02555         uint32\_t i;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02556}02556 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02557}02557         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02558}02558 \textcolor{comment}{         * When called back, key might be gone. So, make a copy}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02559}02559 \textcolor{comment}{         * of some values need to delete keys before deferring.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02560}02560 \textcolor{comment}{         * But, because of LOR with node lock, cannot use lock here.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02561}02561 \textcolor{comment}{         * So, use atomic instead.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02562}02562 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02563}02563         i = \mbox{\hyperlink{if__run_8c_ab51c04f6574bfdc56c82a56b5800c32b}{RUN\_CMDQ\_GET}}(\&sc-\/>\mbox{\hyperlink{structrun__softc_aa15ecf9db15b3ffda49a044842caf644}{cmdq\_store}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02564}02564         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_KEY, \textcolor{stringliteral}{"{}cmdq\_store=\%d\(\backslash\)n"{}}, i);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02565}02565         sc-\/>\mbox{\hyperlink{structrun__softc_a9500a13eb58aab1b19d1149c55235640}{cmdq}}[i].\mbox{\hyperlink{structrun__cmdq_a8bd79bf0dffc9ec5341a2d955f19f31e}{func}} = \mbox{\hyperlink{if__run_8c_a2581ffa2432efa59ac1924b87070df6f}{run\_key\_delete\_cb}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02566}02566         sc-\/>\mbox{\hyperlink{structrun__softc_a9500a13eb58aab1b19d1149c55235640}{cmdq}}[i].\mbox{\hyperlink{structrun__cmdq_a44148050f8e128fac3651617eecad099}{arg0}} = NULL;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02567}02567         sc-\/>\mbox{\hyperlink{structrun__softc_a9500a13eb58aab1b19d1149c55235640}{cmdq}}[i].\mbox{\hyperlink{structrun__cmdq_a2dac1ae8f77e3aa8f1512b4e41692d07}{arg1}} = sc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02568}02568         k0 = \&sc-\/>\mbox{\hyperlink{structrun__softc_a9500a13eb58aab1b19d1149c55235640}{cmdq}}[i].\mbox{\hyperlink{structrun__cmdq_a33c52a68937b6226576120d093f45481}{key}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02569}02569         k0-\/>wk\_flags = \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_flags;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02570}02570         k0-\/>wk\_keyix = \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_keyix;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02571}02571         \textcolor{comment}{/* matching wcid was written to wk\_pad in run\_key\_set() */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02572}02572         k0-\/>wk\_pad = \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_pad;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02573}02573         ieee80211\_runtask(ic, \&sc-\/>\mbox{\hyperlink{structrun__softc_ae805f800f38298655ad01aa36980dc38}{cmdq\_task}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02574}02574         \textcolor{keywordflow}{return} (1);     \textcolor{comment}{/* return fake success */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02575}02575 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02576}02576 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02577}02577 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02578}02578 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02579}\mbox{\hyperlink{if__run_8c_adb1c4b53cf605d51ea807c6cbd2bb652}{02579}} \mbox{\hyperlink{if__run_8c_adb1c4b53cf605d51ea807c6cbd2bb652}{run\_ratectl\_to}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02580}02580 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02581}02581         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *sc = arg;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02582}02582 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02583}02583         \textcolor{comment}{/* do it in a process context, so it can go sleep */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02584}02584         ieee80211\_runtask(\&sc-\/>\mbox{\hyperlink{structrun__softc_a475dfeb97bf5936fa250323fa6a1e6ae}{sc\_ic}}, \&sc-\/>\mbox{\hyperlink{structrun__softc_a4b4953611c0999b028402994ae31ef87}{ratectl\_task}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02585}02585         \textcolor{comment}{/* next timeout will be rescheduled in the callback task */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02586}02586 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02587}02587 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02588}02588 \textcolor{comment}{/* ARGSUSED */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02589}02589 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02590}\mbox{\hyperlink{if__run_8c_a8983cbd523a2f27d1ef5b981fc3cf958}{02590}} \mbox{\hyperlink{if__run_8c_a8983cbd523a2f27d1ef5b981fc3cf958}{run\_ratectl\_cb}}(\textcolor{keywordtype}{void} *arg, \textcolor{keywordtype}{int} pending)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02591}02591 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02592}02592         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *sc = arg;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02593}02593         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structrun__softc_a475dfeb97bf5936fa250323fa6a1e6ae}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02594}02594         \textcolor{keyword}{struct }ieee80211vap *vap = TAILQ\_FIRST(\&ic-\/>ic\_vaps);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02595}02595 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02596}02596         \textcolor{keywordflow}{if} (vap == NULL)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02597}02597                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02598}02598 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02599}02599         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_ac8eca37dc53b73408f99d028e07fea66}{rvp\_cnt}} > 1 || vap-\/>iv\_opmode != IEEE80211\_M\_STA) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02600}02600                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02601}02601 \textcolor{comment}{                 * run\_reset\_livelock() doesn't do anything with AMRR,}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02602}02602 \textcolor{comment}{                 * but Ralink wants us to call it every 1 sec. So, we}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02603}02603 \textcolor{comment}{                 * piggyback here rather than creating another callout.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02604}02604 \textcolor{comment}{                 * Livelock may occur only in HOSTAP or IBSS mode}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02605}02605 \textcolor{comment}{                 * (when h/w is sending beacons).}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02606}02606 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02607}02607                 \mbox{\hyperlink{if__runvar_8h_afb83ba5b9cfa86e30eb1e74fe2267cea}{RUN\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02608}02608                 \mbox{\hyperlink{if__run_8c_a1a5622645062abcde09a94e9808f48ef}{run\_reset\_livelock}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02609}02609                 \textcolor{comment}{/* just in case, there are some stats to drain */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02610}02610                 \mbox{\hyperlink{if__run_8c_acf69017c5ef131e134a4f7d189c87972}{run\_drain\_fifo}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02611}02611                 \mbox{\hyperlink{if__runvar_8h_a45d3b538b97178f8fe93284ed57e2cd5}{RUN\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02612}02612         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02613}02613 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02614}02614         ieee80211\_iterate\_nodes(\&ic-\/>ic\_sta, \mbox{\hyperlink{if__run_8c_aa717b9d9f02d0c8eb29e72e7807fa01e}{run\_iter\_func}}, sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02615}02615 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02616}02616         \mbox{\hyperlink{if__runvar_8h_afb83ba5b9cfa86e30eb1e74fe2267cea}{RUN\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02617}02617         \textcolor{keywordflow}{if}(sc-\/>\mbox{\hyperlink{structrun__softc_a62dd21cab90620634cc0d338870dc49f}{ratectl\_run}} != \mbox{\hyperlink{if__runvar_8h_a2c96ec83349e59ee2ff6b2a95b3b20f9}{RUN\_RATECTL\_OFF}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02618}02618                 \mbox{\hyperlink{usbdi_8h_a5ba556ca3595eb8006822a123ac9d54f}{usb\_callout\_reset}}(\&sc-\/>\mbox{\hyperlink{structrun__softc_a4df8b5a8e9e18c43fc38313f096a5076}{ratectl\_ch}}, hz, \mbox{\hyperlink{if__run_8c_adb1c4b53cf605d51ea807c6cbd2bb652}{run\_ratectl\_to}}, sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02619}02619         \mbox{\hyperlink{if__runvar_8h_a45d3b538b97178f8fe93284ed57e2cd5}{RUN\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02620}02620 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02621}02621 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02622}02622 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02623}\mbox{\hyperlink{if__run_8c_acf69017c5ef131e134a4f7d189c87972}{02623}} \mbox{\hyperlink{if__run_8c_acf69017c5ef131e134a4f7d189c87972}{run\_drain\_fifo}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02624}02624 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02625}02625         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *sc = arg;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02626}02626         uint32\_t stat;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02627}02627         uint16\_t (*wstat)[3];}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02628}02628         uint8\_t wcid, mcs, pid;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02629}02629         int8\_t \mbox{\hyperlink{if__runreg_8h_a84d98c1273f31ffccb7266bea38d8e83}{retry}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02630}02630 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02631}02631         \mbox{\hyperlink{if__runvar_8h_a46923988c8f3d1896339650dd4bf5f53}{RUN\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02632}02632 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02633}02633         \textcolor{keywordflow}{for} (;;) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02634}02634                 \textcolor{comment}{/* drain Tx status FIFO (maxsize = 16) */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02635}02635                 \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_afe30efe87a2d55603bf06df3a11479df}{RT2860\_TX\_STAT\_FIFO}}, \&stat);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02636}02636                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_XMIT, \textcolor{stringliteral}{"{}tx stat 0x\%08x\(\backslash\)n"{}}, stat);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02637}02637                 \textcolor{keywordflow}{if} (!(stat \& \mbox{\hyperlink{if__runreg_8h_abaa7e854d5a680eb686cf1a4f4f9dbc5}{RT2860\_TXQ\_VLD}}))}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02638}02638                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02639}02639 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02640}02640                 wcid = (stat >> \mbox{\hyperlink{if__runreg_8h_a60a4e0960b1344c00e3b6fd9ed95229c}{RT2860\_TXQ\_WCID\_SHIFT}}) \& 0xff;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02641}02641 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02642}02642                 \textcolor{comment}{/* if no ACK was requested, no feedback is available */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02643}02643                 \textcolor{keywordflow}{if} (!(stat \& \mbox{\hyperlink{if__runreg_8h_a9d5e26287d33d8f9f9fdc837836d5305}{RT2860\_TXQ\_ACKREQ}}) || wcid > \mbox{\hyperlink{if__runvar_8h_a62d030b0e29e0863a6917def731081db}{RT2870\_WCID\_MAX}} ||}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02644}02644                     wcid == 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02645}02645                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02646}02646 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02647}02647                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02648}02648 \textcolor{comment}{                 * Even though each stat is Tx-\/complete-\/status like format,}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02649}02649 \textcolor{comment}{                 * the device can poll stats. Because there is no guarantee}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02650}02650 \textcolor{comment}{                 * that the referring node is still around when read the stats.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02651}02651 \textcolor{comment}{                 * So that, if we use ieee80211\_ratectl\_tx\_update(), we will}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02652}02652 \textcolor{comment}{                 * have hard time not to refer already freed node.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02653}02653 \textcolor{comment}{                 *}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02654}02654 \textcolor{comment}{                 * To eliminate such page faults, we poll stats in softc.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02655}02655 \textcolor{comment}{                 * Then, update the rates later with ieee80211\_ratectl\_tx\_update().}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02656}02656 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02657}02657                 wstat = \&(sc-\/>\mbox{\hyperlink{structrun__softc_a5059ab1b3fc770012dffe1ff99c64dbb}{wcid\_stats}}[wcid]);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02658}02658                 (*wstat)[\mbox{\hyperlink{if__runvar_8h_a527a390cb8590660e751dbf55a146aba}{RUN\_TXCNT}}]++;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02659}02659                 \textcolor{keywordflow}{if} (stat \& \mbox{\hyperlink{if__runreg_8h_a4cd20f88c01baae59c0f1c8a09d59b80}{RT2860\_TXQ\_OK}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02660}02660                         (*wstat)[\mbox{\hyperlink{if__runvar_8h_af80a179b63ee79156a5418f8b69c4277}{RUN\_SUCCESS}}]++;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02661}02661                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02662}02662                         counter\_u64\_add(sc-\/>\mbox{\hyperlink{structrun__softc_a475dfeb97bf5936fa250323fa6a1e6ae}{sc\_ic}}.ic\_oerrors, 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02663}02663                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02664}02664 \textcolor{comment}{                 * Check if there were retries, ie if the Tx success rate is}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02665}02665 \textcolor{comment}{                 * different from the requested rate. Note that it works only}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02666}02666 \textcolor{comment}{                 * because we do not allow rate fallback from OFDM to CCK.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02667}02667 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02668}02668                 mcs = (stat >> \mbox{\hyperlink{if__runreg_8h_a5d3d83408344561bb6fbf41f7d0e9cc6}{RT2860\_TXQ\_MCS\_SHIFT}}) \& 0x7f;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02669}02669                 pid = (stat >> \mbox{\hyperlink{if__runreg_8h_a9d2c42e7244442d40c54774eadef836c}{RT2860\_TXQ\_PID\_SHIFT}}) \& 0xf;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02670}02670                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{if__runreg_8h_a84d98c1273f31ffccb7266bea38d8e83}{retry}} = pid -\/1 -\/ mcs) > 0) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02671}02671                         (*wstat)[\mbox{\hyperlink{if__runvar_8h_a527a390cb8590660e751dbf55a146aba}{RUN\_TXCNT}}] += \mbox{\hyperlink{if__runreg_8h_a84d98c1273f31ffccb7266bea38d8e83}{retry}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02672}02672                         (*wstat)[\mbox{\hyperlink{if__runvar_8h_ad4e962b4f3542b5b30a43d4d91c8b226}{RUN\_RETRY}}] += \mbox{\hyperlink{if__runreg_8h_a84d98c1273f31ffccb7266bea38d8e83}{retry}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02673}02673                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02674}02674         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02675}02675         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_XMIT, \textcolor{stringliteral}{"{}count=\%d\(\backslash\)n"{}}, sc-\/>\mbox{\hyperlink{structrun__softc_ad758026e953bd272c786099076e725e4}{fifo\_cnt}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02676}02676 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02677}02677         sc-\/>\mbox{\hyperlink{structrun__softc_ad758026e953bd272c786099076e725e4}{fifo\_cnt}} = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02678}02678 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02679}02679 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02680}02680 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02681}\mbox{\hyperlink{if__run_8c_aa717b9d9f02d0c8eb29e72e7807fa01e}{02681}} \mbox{\hyperlink{if__run_8c_aa717b9d9f02d0c8eb29e72e7807fa01e}{run\_iter\_func}}(\textcolor{keywordtype}{void} *arg, \textcolor{keyword}{struct} ieee80211\_node *ni)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02682}02682 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02683}02683         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *sc = arg;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02684}02684         \textcolor{keyword}{struct }ieee80211\_ratectl\_tx\_stats *txs = \&sc-\/>\mbox{\hyperlink{structrun__softc_abc1e30ef5463d997b6f697ec05a397bd}{sc\_txs}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02685}02685         \textcolor{keyword}{struct }ieee80211vap *vap = ni-\/>ni\_vap;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02686}02686         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__node}{run\_node}} *rn = \mbox{\hyperlink{if__runvar_8h_a60a610e15c59350c228a2d8f390118e3}{RUN\_NODE}}(\mbox{\hyperlink{structrun__node_a47e98d22d90417737401b60b33b779f5}{ni}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02687}02687         \textcolor{keyword}{union }\mbox{\hyperlink{unionrun__stats}{run\_stats}} sta[2];}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02688}02688         uint16\_t (*wstat)[3];}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02689}02689         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}, ridx;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02690}02690 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02691}02691         \mbox{\hyperlink{if__runvar_8h_afb83ba5b9cfa86e30eb1e74fe2267cea}{RUN\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02692}02692 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02693}02693         \textcolor{comment}{/* Check for special case */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02694}02694         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_ac8eca37dc53b73408f99d028e07fea66}{rvp\_cnt}} <= 1 \&\& vap-\/>iv\_opmode == IEEE80211\_M\_STA \&\&}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02695}02695             ni != vap-\/>iv\_bss)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02696}02696                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02697}02697 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02698}02698         txs-\/>flags = IEEE80211\_RATECTL\_TX\_STATS\_NODE |}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02699}02699                      IEEE80211\_RATECTL\_TX\_STATS\_RETRIES;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02700}02700         txs-\/>ni = ni;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02701}02701         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_ac8eca37dc53b73408f99d028e07fea66}{rvp\_cnt}} <= 1 \&\& (vap-\/>iv\_opmode == IEEE80211\_M\_IBSS ||}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02702}02702             vap-\/>iv\_opmode == IEEE80211\_M\_STA)) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02703}02703                 \textcolor{comment}{/* read statistic counters (clear on read) and update AMRR state */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02704}02704                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__run_8c_a4e4209826999dd13a18401725612b197}{run\_read\_region\_1}}(sc, \mbox{\hyperlink{if__runreg_8h_a8544d1439e402a9f30b9004ea2114bb9}{RT2860\_TX\_STA\_CNT0}}, (uint8\_t *)sta,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02705}02705                     \textcolor{keyword}{sizeof} sta);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02706}02706                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02707}02707                         \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02708}02708 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02709}02709                 \textcolor{comment}{/* count failed TX as errors */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02710}02710                 if\_inc\_counter(vap-\/>iv\_ifp, IFCOUNTER\_OERRORS,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02711}02711                     le16toh(sta[0].\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}.fail));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02712}02712 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02713}02713                 txs-\/>nretries = le16toh(sta[1].\mbox{\hyperlink{if__runreg_8h_a2bf3366a5ada8172ffca744154ce72a6}{tx}}.retry);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02714}02714                 txs-\/>nsuccess = le16toh(sta[1].\mbox{\hyperlink{if__runreg_8h_a2bf3366a5ada8172ffca744154ce72a6}{tx}}.success);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02715}02715                 \textcolor{comment}{/* nretries??? */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02716}02716                 txs-\/>nframes = txs-\/>nretries + txs-\/>nsuccess +}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02717}02717                     le16toh(sta[0].\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}.fail);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02718}02718 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02719}02719                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_RATE,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02720}02720                     \textcolor{stringliteral}{"{}retrycnt=\%d success=\%d failcnt=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02721}02721                     txs-\/>nretries, txs-\/>nsuccess, le16toh(sta[0].\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}.fail));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02722}02722         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02723}02723                 wstat = \&(sc-\/>\mbox{\hyperlink{structrun__softc_a5059ab1b3fc770012dffe1ff99c64dbb}{wcid\_stats}}[\mbox{\hyperlink{if__runvar_8h_ae4c2a1ac815b010f11451d0e57db2081}{RUN\_AID2WCID}}(ni-\/>ni\_associd)]);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02724}02724 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02725}02725                 \textcolor{keywordflow}{if} (wstat == \&(sc-\/>\mbox{\hyperlink{structrun__softc_a5059ab1b3fc770012dffe1ff99c64dbb}{wcid\_stats}}[0]) ||}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02726}02726                     wstat > \&(sc-\/>\mbox{\hyperlink{structrun__softc_a5059ab1b3fc770012dffe1ff99c64dbb}{wcid\_stats}}[\mbox{\hyperlink{if__runvar_8h_a62d030b0e29e0863a6917def731081db}{RT2870\_WCID\_MAX}}]))}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02727}02727                         \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02728}02728 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02729}02729                 txs-\/>nretries = (*wstat)[\mbox{\hyperlink{if__runvar_8h_ad4e962b4f3542b5b30a43d4d91c8b226}{RUN\_RETRY}}];}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02730}02730                 txs-\/>nsuccess = (*wstat)[\mbox{\hyperlink{if__runvar_8h_af80a179b63ee79156a5418f8b69c4277}{RUN\_SUCCESS}}];}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02731}02731                 txs-\/>nframes = (*wstat)[\mbox{\hyperlink{if__runvar_8h_a527a390cb8590660e751dbf55a146aba}{RUN\_TXCNT}}];}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02732}02732                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_RATE,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02733}02733                     \textcolor{stringliteral}{"{}retrycnt=\%d txcnt=\%d success=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02734}02734                     txs-\/>nretries, txs-\/>nframes, txs-\/>nsuccess);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02735}02735 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02736}02736                 memset(wstat, 0, \textcolor{keyword}{sizeof}(*wstat));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02737}02737         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02738}02738 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02739}02739         ieee80211\_ratectl\_tx\_update(vap, txs);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02740}02740         ieee80211\_ratectl\_rate(ni, NULL, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02741}02741         \textcolor{comment}{/* XXX TODO: methodize with MCS rates */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02742}02742         \textcolor{keywordflow}{for} (ridx = 0; ridx < \mbox{\hyperlink{if__run_8c_a6dd9f14db793abbf67fd4417b35108f9}{RT2860\_RIDX\_MAX}}; ridx++)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02743}02743                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_ab543147498aaf00bd04fe0a18a6c6a74}{rt2860\_rates}}[ridx].rate == ni-\/>ni\_txrate)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02744}02744                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02745}02745         rn-\/>\mbox{\hyperlink{structrun__node_ab65d660e2548718b81efbd87cee61d53}{amrr\_ridx}} = ridx;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02746}02746 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02747}02747 \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}}:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02748}02748         \mbox{\hyperlink{if__runvar_8h_a45d3b538b97178f8fe93284ed57e2cd5}{RUN\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02749}02749 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02750}02750         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_RATE, \textcolor{stringliteral}{"{}rate=\%d, ridx=\%d\(\backslash\)n"{}}, ni-\/>ni\_txrate, rn-\/>\mbox{\hyperlink{structrun__node_ab65d660e2548718b81efbd87cee61d53}{amrr\_ridx}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02751}02751 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02752}02752 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02753}02753 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02754}\mbox{\hyperlink{if__run_8c_a202eee94b9de1b14fcd353200c847be3}{02754}} \mbox{\hyperlink{if__run_8c_a202eee94b9de1b14fcd353200c847be3}{run\_newassoc\_cb}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02755}02755 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02756}02756         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__cmdq}{run\_cmdq}} *cmdq = arg;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02757}02757         \textcolor{keyword}{struct }ieee80211\_node *ni = cmdq-\/>\mbox{\hyperlink{structrun__cmdq_a2dac1ae8f77e3aa8f1512b4e41692d07}{arg1}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02758}02758         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *sc = ni-\/>ni\_vap-\/>iv\_ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02759}02759         uint8\_t wcid = \mbox{\hyperlink{structrun__softc_a9500a13eb58aab1b19d1149c55235640}{cmdq}}-\/>\mbox{\hyperlink{structrun__cmdq_a90c6e1996b61d1296776255eb7e3c159}{wcid}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02760}02760 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02761}02761         \mbox{\hyperlink{if__runvar_8h_a46923988c8f3d1896339650dd4bf5f53}{RUN\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02762}02762 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02763}02763         \mbox{\hyperlink{if__run_8c_a366ce11d14b4e5e3700232866441c12c}{run\_write\_region\_1}}(sc, \mbox{\hyperlink{if__runreg_8h_a2e311d38c5f274619dec121a176298f0}{RT2860\_WCID\_ENTRY}}(wcid),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02764}02764             ni-\/>ni\_macaddr, IEEE80211\_ADDR\_LEN);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02765}02765 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02766}02766         memset(\&(sc-\/>\mbox{\hyperlink{structrun__softc_a5059ab1b3fc770012dffe1ff99c64dbb}{wcid\_stats}}[wcid]), 0, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structrun__softc_a5059ab1b3fc770012dffe1ff99c64dbb}{wcid\_stats}}[wcid]));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02767}02767 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02768}02768 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02769}02769 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02770}\mbox{\hyperlink{if__run_8c_af308b9211fac9d7835fb14b86394c9b2}{02770}} \mbox{\hyperlink{if__run_8c_af308b9211fac9d7835fb14b86394c9b2}{run\_newassoc}}(\textcolor{keyword}{struct} ieee80211\_node *ni, \textcolor{keywordtype}{int} isnew)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02771}02771 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02772}02772         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__node}{run\_node}} *rn = \mbox{\hyperlink{if__runvar_8h_a60a610e15c59350c228a2d8f390118e3}{RUN\_NODE}}(\mbox{\hyperlink{structrun__node_a47e98d22d90417737401b60b33b779f5}{ni}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02773}02773         \textcolor{keyword}{struct }ieee80211vap *vap = ni-\/>ni\_vap;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02774}02774         \textcolor{keyword}{struct }ieee80211com *ic = vap-\/>iv\_ic;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02775}02775         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02776}02776         uint8\_t rate;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02777}02777         uint8\_t ridx;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02778}02778         uint8\_t wcid;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02779}02779 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02780}02780         wcid = (vap-\/>iv\_opmode == IEEE80211\_M\_STA) ?}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02781}02781             1 : \mbox{\hyperlink{if__runvar_8h_ae4c2a1ac815b010f11451d0e57db2081}{RUN\_AID2WCID}}(ni-\/>ni\_associd);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02782}02782 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02783}02783         \textcolor{keywordflow}{if} (wcid > \mbox{\hyperlink{if__runvar_8h_a62d030b0e29e0863a6917def731081db}{RT2870\_WCID\_MAX}}) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02784}02784                 device\_printf(sc-\/>\mbox{\hyperlink{structrun__softc_a11422e8a9e276cfaea3662dc74f6fc84}{sc\_dev}}, \textcolor{stringliteral}{"{}wcid=\%d out of range\(\backslash\)n"{}}, wcid);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02785}02785                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02786}02786         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02787}02787 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02788}02788         \textcolor{comment}{/* only interested in true associations */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02789}02789         \textcolor{keywordflow}{if} (isnew \&\& ni-\/>ni\_associd != 0) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02790}02790                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02791}02791 \textcolor{comment}{                 * This function could is called though timeout function.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02792}02792 \textcolor{comment}{                 * Need to defer.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02793}02793 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02794}02794                 uint32\_t cnt = \mbox{\hyperlink{if__run_8c_ab51c04f6574bfdc56c82a56b5800c32b}{RUN\_CMDQ\_GET}}(\&sc-\/>\mbox{\hyperlink{structrun__softc_aa15ecf9db15b3ffda49a044842caf644}{cmdq\_store}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02795}02795                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_STATE, \textcolor{stringliteral}{"{}cmdq\_store=\%d\(\backslash\)n"{}}, cnt);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02796}02796                 sc-\/>\mbox{\hyperlink{structrun__softc_a9500a13eb58aab1b19d1149c55235640}{cmdq}}[cnt].\mbox{\hyperlink{structrun__cmdq_a8bd79bf0dffc9ec5341a2d955f19f31e}{func}} = \mbox{\hyperlink{if__run_8c_a202eee94b9de1b14fcd353200c847be3}{run\_newassoc\_cb}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02797}02797                 sc-\/>\mbox{\hyperlink{structrun__softc_a9500a13eb58aab1b19d1149c55235640}{cmdq}}[cnt].\mbox{\hyperlink{structrun__cmdq_a44148050f8e128fac3651617eecad099}{arg0}} = NULL;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02798}02798                 sc-\/>\mbox{\hyperlink{structrun__softc_a9500a13eb58aab1b19d1149c55235640}{cmdq}}[cnt].\mbox{\hyperlink{structrun__cmdq_a2dac1ae8f77e3aa8f1512b4e41692d07}{arg1}} = ni;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02799}02799                 sc-\/>\mbox{\hyperlink{structrun__softc_a9500a13eb58aab1b19d1149c55235640}{cmdq}}[cnt].\mbox{\hyperlink{structrun__cmdq_a90c6e1996b61d1296776255eb7e3c159}{wcid}} = wcid;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02800}02800                 ieee80211\_runtask(ic, \&sc-\/>\mbox{\hyperlink{structrun__softc_ae805f800f38298655ad01aa36980dc38}{cmdq\_task}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02801}02801         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02802}02802 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02803}02803         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_STATE,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02804}02804             \textcolor{stringliteral}{"{}new assoc isnew=\%d associd=\%x addr=\%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02805}02805             isnew, ni-\/>ni\_associd, ether\_sprintf(ni-\/>ni\_macaddr));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02806}02806 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02807}02807         rate = vap-\/>iv\_txparms[ieee80211\_chan2mode(ic-\/>ic\_curchan)].mgmtrate;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02808}02808         \textcolor{comment}{/* XXX TODO: methodize with MCS rates */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02809}02809         \textcolor{keywordflow}{for} (ridx = 0; ridx < \mbox{\hyperlink{if__run_8c_a6dd9f14db793abbf67fd4417b35108f9}{RT2860\_RIDX\_MAX}}; ridx++)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02810}02810                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_ab543147498aaf00bd04fe0a18a6c6a74}{rt2860\_rates}}[ridx].rate == rate)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02811}02811                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02812}02812         rn-\/>\mbox{\hyperlink{structrun__node_af036c8bafe3f8911ec6911fc0002b04b}{mgt\_ridx}} = ridx;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02813}02813         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_STATE | RUN\_DEBUG\_RATE,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02814}02814             \textcolor{stringliteral}{"{}rate=\%d, mgmt\_ridx=\%d\(\backslash\)n"{}}, rate, rn-\/>\mbox{\hyperlink{structrun__node_af036c8bafe3f8911ec6911fc0002b04b}{mgt\_ridx}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02815}02815 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02816}02816         \mbox{\hyperlink{if__runvar_8h_afb83ba5b9cfa86e30eb1e74fe2267cea}{RUN\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02817}02817         \textcolor{keywordflow}{if}(sc-\/>\mbox{\hyperlink{structrun__softc_a62dd21cab90620634cc0d338870dc49f}{ratectl\_run}} != \mbox{\hyperlink{if__runvar_8h_a2c96ec83349e59ee2ff6b2a95b3b20f9}{RUN\_RATECTL\_OFF}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02818}02818                 \mbox{\hyperlink{usbdi_8h_a5ba556ca3595eb8006822a123ac9d54f}{usb\_callout\_reset}}(\&sc-\/>\mbox{\hyperlink{structrun__softc_a4df8b5a8e9e18c43fc38313f096a5076}{ratectl\_ch}}, hz, \mbox{\hyperlink{if__run_8c_adb1c4b53cf605d51ea807c6cbd2bb652}{run\_ratectl\_to}}, sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02819}02819         \mbox{\hyperlink{if__runvar_8h_a45d3b538b97178f8fe93284ed57e2cd5}{RUN\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02820}02820 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02821}02821 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02822}02822 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02823}02823 \textcolor{comment}{ * Return the Rx chain with the highest RSSI for a given frame.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02824}02824 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02825}02825 \textcolor{keyword}{static} \_\_inline uint8\_t}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02826}\mbox{\hyperlink{if__run_8c_a98bd1d0480d9c4818ac1fa457e080d95}{02826}} \mbox{\hyperlink{if__run_8c_a98bd1d0480d9c4818ac1fa457e080d95}{run\_maxrssi\_chain}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, \textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structrt2860__rxwi}{rt2860\_rxwi}} *rxwi)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02827}02827 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02828}02828         uint8\_t rxchain = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02829}02829 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02830}02830         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_abeb252728ca242db18b1574c2687b788}{nrxchains}} > 1) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02831}02831                 \textcolor{keywordflow}{if} (rxwi-\/>\mbox{\hyperlink{structrt2860__rxwi_a166bbbb646b14485c5b1452e8d44b64a}{rssi}}[1] > rxwi-\/>\mbox{\hyperlink{structrt2860__rxwi_a166bbbb646b14485c5b1452e8d44b64a}{rssi}}[rxchain])}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02832}02832                         rxchain = 1;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02833}02833                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_abeb252728ca242db18b1574c2687b788}{nrxchains}} > 2)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02834}02834                         \textcolor{keywordflow}{if} (rxwi-\/>\mbox{\hyperlink{structrt2860__rxwi_a166bbbb646b14485c5b1452e8d44b64a}{rssi}}[2] > rxwi-\/>\mbox{\hyperlink{structrt2860__rxwi_a166bbbb646b14485c5b1452e8d44b64a}{rssi}}[rxchain])}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02835}02835                                 rxchain = 2;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02836}02836         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02837}02837         \textcolor{keywordflow}{return} (rxchain);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02838}02838 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02839}02839 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02840}02840 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02841}\mbox{\hyperlink{if__run_8c_a1cd17eb60f1863517cc6b147aa5295cd}{02841}} \mbox{\hyperlink{if__run_8c_a1cd17eb60f1863517cc6b147aa5295cd}{run\_recv\_mgmt}}(\textcolor{keyword}{struct} ieee80211\_node *ni, \textcolor{keyword}{struct} mbuf *m, \textcolor{keywordtype}{int} subtype,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02842}02842     \textcolor{keyword}{const} \textcolor{keyword}{struct} ieee80211\_rx\_stats *rxs, \textcolor{keywordtype}{int} rssi, \textcolor{keywordtype}{int} nf)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02843}02843 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02844}02844         \textcolor{keyword}{struct }ieee80211vap *vap = ni-\/>ni\_vap;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02845}02845         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *sc = vap-\/>iv\_ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02846}02846         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__vap}{run\_vap}} *rvp = \mbox{\hyperlink{if__runvar_8h_a04216c15e7dce0789f22dc3831e15869}{RUN\_VAP}}(\mbox{\hyperlink{structrun__vap_a486ec51658db5e3e238fc907e1e4f0bf}{vap}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02847}02847         uint64\_t ni\_tstamp, rx\_tstamp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02848}02848 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02849}02849         rvp-\/>\mbox{\hyperlink{structrun__vap_a1d90e3160b0832169f981472eb6a0d52}{recv\_mgmt}}(ni, m, subtype, rxs, rssi, nf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02850}02850 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02851}02851         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structrun__vap_a486ec51658db5e3e238fc907e1e4f0bf}{vap}}-\/>iv\_state == IEEE80211\_S\_RUN \&\&}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02852}02852             (subtype == IEEE80211\_FC0\_SUBTYPE\_BEACON ||}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02853}02853             subtype == IEEE80211\_FC0\_SUBTYPE\_PROBE\_RESP)) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02854}02854                 ni\_tstamp = le64toh(ni-\/>ni\_tstamp.tsf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02855}02855                 \mbox{\hyperlink{if__runvar_8h_afb83ba5b9cfa86e30eb1e74fe2267cea}{RUN\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02856}02856                 \mbox{\hyperlink{if__run_8c_aa39011516ed36cb19887392317b22550}{run\_get\_tsf}}(sc, \&rx\_tstamp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02857}02857                 \mbox{\hyperlink{if__runvar_8h_a45d3b538b97178f8fe93284ed57e2cd5}{RUN\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02858}02858                 rx\_tstamp = le64toh(rx\_tstamp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02859}02859 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02860}02860                 \textcolor{keywordflow}{if} (ni\_tstamp >= rx\_tstamp) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02861}02861                         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_RECV | RUN\_DEBUG\_BEACON,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02862}02862                             \textcolor{stringliteral}{"{}ibss merge, tsf \%ju tstamp \%ju\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02863}02863                             (uintmax\_t)rx\_tstamp, (uintmax\_t)ni\_tstamp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02864}02864                         (void) ieee80211\_ibss\_merge(ni);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02865}02865                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02866}02866         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02867}02867 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02868}02868 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02869}02869 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02870}\mbox{\hyperlink{if__run_8c_ab31fa41390612cdec3ae76e877c2bf31}{02870}} \mbox{\hyperlink{if__run_8c_ab31fa41390612cdec3ae76e877c2bf31}{run\_rx\_frame}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, \textcolor{keyword}{struct} mbuf *m, uint32\_t dmalen)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02871}02871 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02872}02872         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structrun__softc_a475dfeb97bf5936fa250323fa6a1e6ae}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02873}02873         \textcolor{keyword}{struct }ieee80211\_frame *wh;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02874}02874         \textcolor{keyword}{struct }ieee80211\_node *ni;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02875}02875         \textcolor{keyword}{struct }epoch\_tracker et;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02876}02876         \textcolor{keyword}{struct }\mbox{\hyperlink{structrt2870__rxd}{rt2870\_rxd}} *rxd;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02877}02877         \textcolor{keyword}{struct }\mbox{\hyperlink{structrt2860__rxwi}{rt2860\_rxwi}} *rxwi;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02878}02878         uint32\_t flags;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02879}02879         uint16\_t \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}}, rxwisize;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02880}02880         uint8\_t ant, \mbox{\hyperlink{structrt2860__rxwi_a166bbbb646b14485c5b1452e8d44b64a}{rssi}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02881}02881         int8\_t nf;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02882}02882 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02883}02883         rxwisize = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structrt2860__rxwi}{rt2860\_rxwi}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02884}02884         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x5592)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02885}02885                 rxwisize += \textcolor{keyword}{sizeof}(uint64\_t);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02886}02886         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3593)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02887}02887                 rxwisize += \textcolor{keyword}{sizeof}(uint32\_t);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02888}02888 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02889}02889         \textcolor{keywordflow}{if} (\_\_predict\_false(dmalen <}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02890}02890             rxwisize + \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} ieee80211\_frame\_ack))) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02891}02891                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_RECV,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02892}02892                     \textcolor{stringliteral}{"{}payload is too short: dma length \%u < \%zu\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02893}02893                     dmalen, rxwisize + \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} ieee80211\_frame\_ack));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02894}02894                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02895}02895         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02896}02896 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02897}02897         rxwi = mtod(m, \textcolor{keyword}{struct} \mbox{\hyperlink{structrt2860__rxwi}{rt2860\_rxwi}} *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02898}02898         \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = le16toh(rxwi-\/>\mbox{\hyperlink{structrt2860__rxwi_a7d820afa0d022c25b47276f13c90d00f}{len}}) \& 0xfff;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02899}02899 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02900}02900         \textcolor{keywordflow}{if} (\_\_predict\_false(\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} > dmalen -\/ rxwisize)) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02901}02901                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_RECV,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02902}02902                     \textcolor{stringliteral}{"{}bad RXWI length \%u > \%u\(\backslash\)n"{}}, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}}, dmalen);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02903}02903                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02904}02904         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02905}02905 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02906}02906         \textcolor{comment}{/* Rx descriptor is located at the end */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02907}02907         rxd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structrt2870__rxd}{rt2870\_rxd}} *)(mtod(m, caddr\_t) + dmalen);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02908}02908         \mbox{\hyperlink{structrt2870__rxd_a2b28aaf4faf4e10dcd08c90036723d34}{flags}} = le32toh(rxd-\/>\mbox{\hyperlink{structrt2870__rxd_a2b28aaf4faf4e10dcd08c90036723d34}{flags}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02909}02909 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02910}02910         \textcolor{keywordflow}{if} (\_\_predict\_false(\mbox{\hyperlink{structrt2870__rxd_a2b28aaf4faf4e10dcd08c90036723d34}{flags}} \& (\mbox{\hyperlink{if__runreg_8h_ad696910d9f1741a001390a005e0954f5}{RT2860\_RX\_CRCERR}} | \mbox{\hyperlink{if__runreg_8h_a53c8cf32682a9f960a6beca9a2cb420d}{RT2860\_RX\_ICVERR}}))) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02911}02911                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_RECV, \textcolor{stringliteral}{"{}\%s error.\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02912}02912                     (\mbox{\hyperlink{structrt2870__rxd_a2b28aaf4faf4e10dcd08c90036723d34}{flags}} \& \mbox{\hyperlink{if__runreg_8h_ad696910d9f1741a001390a005e0954f5}{RT2860\_RX\_CRCERR}})?\textcolor{stringliteral}{"{}CRC"{}}:\textcolor{stringliteral}{"{}ICV"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02913}02913                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02914}02914         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02915}02915 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02916}02916         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structrt2870__rxd_a2b28aaf4faf4e10dcd08c90036723d34}{flags}} \& \mbox{\hyperlink{if__runreg_8h_ae33c7772de5ee064e96f2f17c5fc9398}{RT2860\_RX\_L2PAD}}) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02917}02917                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_RECV,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02918}02918                     \textcolor{stringliteral}{"{}received RT2860\_RX\_L2PAD frame\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02919}02919                 \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} += 2;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02920}02920         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02921}02921 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02922}02922         m-\/>m\_data += rxwisize;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02923}02923         m-\/>m\_pkthdr.len = m-\/>m\_len = \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02924}02924 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02925}02925         wh = mtod(m, \textcolor{keyword}{struct} ieee80211\_frame *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02926}02926 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02927}02927         \textcolor{keywordflow}{if} ((wh-\/>i\_fc[1] \& IEEE80211\_FC1\_PROTECTED) != 0 \&\&}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02928}02928             (\mbox{\hyperlink{structrt2870__rxd_a2b28aaf4faf4e10dcd08c90036723d34}{flags}} \& \mbox{\hyperlink{if__runreg_8h_a0f034ae41d866f25f41e678282622f90}{RT2860\_RX\_DEC}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02929}02929                 wh-\/>i\_fc[1] \&= \string~IEEE80211\_FC1\_PROTECTED;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02930}02930                 m-\/>m\_flags |= M\_WEP;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02931}02931         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02932}02932 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02933}02933         \textcolor{keywordflow}{if} (\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} >= \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} ieee80211\_frame\_min)) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02934}02934                 ni = ieee80211\_find\_rxnode(ic,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02935}02935                     mtod(m, \textcolor{keyword}{struct} ieee80211\_frame\_min *));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02936}02936         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02937}02937                 ni = NULL;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02938}02938 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02939}02939         \textcolor{keywordflow}{if}(ni \&\& ni-\/>ni\_flags \& IEEE80211\_NODE\_HT) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02940}02940                 m-\/>m\_flags |= M\_AMPDU;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02941}02941         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02942}02942 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02943}02943         \textcolor{keywordflow}{if} (\_\_predict\_false(\mbox{\hyperlink{structrt2870__rxd_a2b28aaf4faf4e10dcd08c90036723d34}{flags}} \& \mbox{\hyperlink{if__runreg_8h_aecbe789934a9064f8384239814560b88}{RT2860\_RX\_MICERR}})) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02944}02944                 \textcolor{comment}{/* report MIC failures to net80211 for TKIP */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02945}02945                 \textcolor{keywordflow}{if} (ni != NULL)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02946}02946                         ieee80211\_notify\_michael\_failure(ni-\/>ni\_vap, wh,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02947}02947                             rxwi-\/>\mbox{\hyperlink{structrt2860__rxwi_ac713fe92ab14b42980b439ad4197bf5b}{keyidx}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02948}02948                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_RECV,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02949}02949                     \textcolor{stringliteral}{"{}MIC error. Someone is lying.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02950}02950                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02951}02951         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02952}02952 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02953}02953         ant = \mbox{\hyperlink{if__run_8c_a98bd1d0480d9c4818ac1fa457e080d95}{run\_maxrssi\_chain}}(sc, rxwi);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02954}02954         rssi = rxwi-\/>\mbox{\hyperlink{structrt2860__rxwi_a166bbbb646b14485c5b1452e8d44b64a}{rssi}}[ant];}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02955}02955         nf = \mbox{\hyperlink{if__run_8c_a77af8f1d76fccdc9ff424438a540f2be}{run\_rssi2dbm}}(sc, rssi, ant);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02956}02956 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02957}02957         \textcolor{keywordflow}{if} (\_\_predict\_false(ieee80211\_radiotap\_active(ic))) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02958}02958                 \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__rx__radiotap__header}{run\_rx\_radiotap\_header}} *tap = \&sc-\/>sc\_rxtap;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02959}02959                 uint16\_t phy;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02960}02960 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02961}02961                 tap-\/>\mbox{\hyperlink{structrun__rx__radiotap__header_a1d5498bf075ea0d3aaa2ab7f638ba8cf}{wr\_flags}} = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02962}02962                 \textcolor{keywordflow}{if} (flags \& \mbox{\hyperlink{if__runreg_8h_ae33c7772de5ee064e96f2f17c5fc9398}{RT2860\_RX\_L2PAD}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02963}02963                         tap-\/>\mbox{\hyperlink{structrun__rx__radiotap__header_a1d5498bf075ea0d3aaa2ab7f638ba8cf}{wr\_flags}} |= IEEE80211\_RADIOTAP\_F\_DATAPAD;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02964}02964                 tap-\/>\mbox{\hyperlink{structrun__rx__radiotap__header_a1046fe4f158a2ab4bdb30a373b3b4fc1}{wr\_antsignal}} = rssi;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02965}02965                 tap-\/>\mbox{\hyperlink{structrun__rx__radiotap__header_a7482b4f667b97e0bbb481b11898c3ff1}{wr\_antenna}} = ant;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02966}02966                 tap-\/>\mbox{\hyperlink{structrun__rx__radiotap__header_ad1dd1d29e39eb7f6741694213839f246}{wr\_dbm\_antsignal}} = \mbox{\hyperlink{if__run_8c_a77af8f1d76fccdc9ff424438a540f2be}{run\_rssi2dbm}}(sc, rssi, ant);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02967}02967                 tap-\/>\mbox{\hyperlink{structrun__rx__radiotap__header_a9fa980056bb83c8bfab6fb4735fe63cc}{wr\_rate}} = 2;        \textcolor{comment}{/* in case it can't be found below */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02968}02968                 \mbox{\hyperlink{if__runvar_8h_afb83ba5b9cfa86e30eb1e74fe2267cea}{RUN\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02969}02969                 \mbox{\hyperlink{if__run_8c_aa39011516ed36cb19887392317b22550}{run\_get\_tsf}}(sc, \&tap-\/>\mbox{\hyperlink{structrun__rx__radiotap__header_aaeedae1f7317b261e3c594e97dffa707}{wr\_tsf}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02970}02970                 \mbox{\hyperlink{if__runvar_8h_a45d3b538b97178f8fe93284ed57e2cd5}{RUN\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02971}02971                 phy = le16toh(rxwi-\/>\mbox{\hyperlink{structrt2860__rxwi_a0d60e284479efecb859d231fb4491ef8}{phy}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02972}02972                 \textcolor{keywordflow}{switch} (phy \& \mbox{\hyperlink{if__runreg_8h_a9bd94a907b6a3603ead68414d71a1073}{RT2860\_PHY\_MODE}}) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02973}02973                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__runreg_8h_a1185b8b170f6af327a20bbe4be2b0b46}{RT2860\_PHY\_CCK}}:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02974}02974                         \textcolor{keywordflow}{switch} ((phy \& \mbox{\hyperlink{if__runreg_8h_a3589b8a639583e09e74aa9f7efdc2fb1}{RT2860\_PHY\_MCS}}) \& \string~\mbox{\hyperlink{if__runreg_8h_ae8de48c3595620def80a4cff5156455d}{RT2860\_PHY\_SHPRE}}) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02975}02975                         \textcolor{keywordflow}{case} 0: tap-\/>\mbox{\hyperlink{structrun__rx__radiotap__header_a9fa980056bb83c8bfab6fb4735fe63cc}{wr\_rate}} =   2; \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02976}02976                         \textcolor{keywordflow}{case} 1: tap-\/>\mbox{\hyperlink{structrun__rx__radiotap__header_a9fa980056bb83c8bfab6fb4735fe63cc}{wr\_rate}} =   4; \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02977}02977                         \textcolor{keywordflow}{case} 2: tap-\/>\mbox{\hyperlink{structrun__rx__radiotap__header_a9fa980056bb83c8bfab6fb4735fe63cc}{wr\_rate}} =  11; \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02978}02978                         \textcolor{keywordflow}{case} 3: tap-\/>\mbox{\hyperlink{structrun__rx__radiotap__header_a9fa980056bb83c8bfab6fb4735fe63cc}{wr\_rate}} =  22; \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02979}02979                         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02980}02980                         \textcolor{keywordflow}{if} (phy \& \mbox{\hyperlink{if__runreg_8h_ae8de48c3595620def80a4cff5156455d}{RT2860\_PHY\_SHPRE}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02981}02981                                 tap-\/>\mbox{\hyperlink{structrun__rx__radiotap__header_a1d5498bf075ea0d3aaa2ab7f638ba8cf}{wr\_flags}} |= IEEE80211\_RADIOTAP\_F\_SHORTPRE;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02982}02982                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02983}02983                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__runreg_8h_a79d9f4ffc5d0aa9734711be2e5a0df53}{RT2860\_PHY\_OFDM}}:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02984}02984                         \textcolor{keywordflow}{switch} (phy \& \mbox{\hyperlink{if__runreg_8h_a3589b8a639583e09e74aa9f7efdc2fb1}{RT2860\_PHY\_MCS}}) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02985}02985                         \textcolor{keywordflow}{case} 0: tap-\/>\mbox{\hyperlink{structrun__rx__radiotap__header_a9fa980056bb83c8bfab6fb4735fe63cc}{wr\_rate}} =  12; \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02986}02986                         \textcolor{keywordflow}{case} 1: tap-\/>\mbox{\hyperlink{structrun__rx__radiotap__header_a9fa980056bb83c8bfab6fb4735fe63cc}{wr\_rate}} =  18; \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02987}02987                         \textcolor{keywordflow}{case} 2: tap-\/>\mbox{\hyperlink{structrun__rx__radiotap__header_a9fa980056bb83c8bfab6fb4735fe63cc}{wr\_rate}} =  24; \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02988}02988                         \textcolor{keywordflow}{case} 3: tap-\/>\mbox{\hyperlink{structrun__rx__radiotap__header_a9fa980056bb83c8bfab6fb4735fe63cc}{wr\_rate}} =  36; \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02989}02989                         \textcolor{keywordflow}{case} 4: tap-\/>\mbox{\hyperlink{structrun__rx__radiotap__header_a9fa980056bb83c8bfab6fb4735fe63cc}{wr\_rate}} =  48; \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02990}02990                         \textcolor{keywordflow}{case} 5: tap-\/>\mbox{\hyperlink{structrun__rx__radiotap__header_a9fa980056bb83c8bfab6fb4735fe63cc}{wr\_rate}} =  72; \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02991}02991                         \textcolor{keywordflow}{case} 6: tap-\/>\mbox{\hyperlink{structrun__rx__radiotap__header_a9fa980056bb83c8bfab6fb4735fe63cc}{wr\_rate}} =  96; \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02992}02992                         \textcolor{keywordflow}{case} 7: tap-\/>\mbox{\hyperlink{structrun__rx__radiotap__header_a9fa980056bb83c8bfab6fb4735fe63cc}{wr\_rate}} = 108; \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02993}02993                         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02994}02994                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02995}02995                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02996}02996         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02997}02997 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02998}02998         NET\_EPOCH\_ENTER(et);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l02999}02999         \textcolor{keywordflow}{if} (ni != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03000}03000                 (void)ieee80211\_input(ni, m, rssi, nf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03001}03001                 ieee80211\_free\_node(ni);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03002}03002         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03003}03003                 (void)ieee80211\_input\_all(ic, m, rssi, nf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03004}03004         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03005}03005         NET\_EPOCH\_EXIT(et);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03006}03006 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03007}03007         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03008}03008 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03009}03009 \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}}:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03010}03010         m\_freem(m);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03011}03011         counter\_u64\_add(ic-\/>ic\_ierrors, 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03012}03012 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03013}03013 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03014}03014 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03015}\mbox{\hyperlink{if__run_8c_ad568d282e3e3bc062da9cb45be9ccb3c}{03015}} \mbox{\hyperlink{if__run_8c_a0c59ee8391f88a1fabda6fb232859f53}{run\_bulk\_rx\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03016}03016 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03017}03017         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *sc = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03018}03018         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structrun__softc_a475dfeb97bf5936fa250323fa6a1e6ae}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03019}03019         \textcolor{keyword}{struct }mbuf *m = NULL;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03020}03020         \textcolor{keyword}{struct }mbuf *m0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03021}03021         uint32\_t dmalen, mbuf\_len;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03022}03022         uint16\_t rxwisize;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03023}03023         \textcolor{keywordtype}{int} xferlen;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03024}03024 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03025}03025         rxwisize = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structrt2860__rxwi}{rt2860\_rxwi}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03026}03026         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x5592)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03027}03027                 rxwisize += \textcolor{keyword}{sizeof}(uint64\_t);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03028}03028         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3593)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03029}03029                 rxwisize += \textcolor{keyword}{sizeof}(uint32\_t);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03030}03030 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03031}03031         \mbox{\hyperlink{usb__transfer_8c_ac0c68320222f26c2a3eba47b46c47899}{usbd\_xfer\_status}}(xfer, \&xferlen, NULL, NULL, NULL);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03032}03032 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03033}03033         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03034}03034         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a8f0386217ba77be3e47721fae9aa9b3d}{USB\_ST\_TRANSFERRED}}:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03035}03035 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03036}03036                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_RECV,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03037}03037                     \textcolor{stringliteral}{"{}rx done, actlen=\%d\(\backslash\)n"{}}, xferlen);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03038}03038 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03039}03039                 \textcolor{keywordflow}{if} (xferlen < (\textcolor{keywordtype}{int})(\textcolor{keyword}{sizeof}(uint32\_t) + rxwisize +}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03040}03040                     \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrt2870__rxd}{rt2870\_rxd}}))) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03041}03041                         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_RECV\_DESC | RUN\_DEBUG\_USB,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03042}03042                             \textcolor{stringliteral}{"{}xfer too short \%d\(\backslash\)n"{}}, xferlen);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03043}03043                         \textcolor{keywordflow}{goto} tr\_setup;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03044}03044                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03045}03045 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03046}03046                 m = sc-\/>\mbox{\hyperlink{structrun__softc_ae637efc0ef336d071a092b993762fa77}{rx\_m}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03047}03047                 sc-\/>\mbox{\hyperlink{structrun__softc_ae637efc0ef336d071a092b993762fa77}{rx\_m}} = NULL;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03048}03048 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03049}03049                 \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03050}03050         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a3aa7120c3ecab31972b8fe219530f552}{USB\_ST\_SETUP}}:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03051}03051 tr\_setup:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03052}03052                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_ae637efc0ef336d071a092b993762fa77}{rx\_m}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03053}03053                         sc-\/>\mbox{\hyperlink{structrun__softc_ae637efc0ef336d071a092b993762fa77}{rx\_m}} = m\_getjcl(M\_NOWAIT, MT\_DATA, M\_PKTHDR,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03054}03054                             \mbox{\hyperlink{if__runvar_8h_a6e0c0113648892ddd41a644efa8f2cff}{RUN\_MAX\_RXSZ}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03055}03055                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03056}03056                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_ae637efc0ef336d071a092b993762fa77}{rx\_m}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03057}03057                         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_RECV |}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03058}03058                             RUN\_DEBUG\_RECV\_DESC | RUN\_DEBUG\_USB,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03059}03059                             \textcolor{stringliteral}{"{}could not allocate mbuf -\/ idle with stall\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03060}03060                         counter\_u64\_add(ic-\/>ic\_ierrors, 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03061}03061                         \mbox{\hyperlink{usb__transfer_8c_abadf9cb2f8e81a5133af0c8030039de3}{usbd\_xfer\_set\_stall}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03062}03062                         \mbox{\hyperlink{usb__transfer_8c_a10f82b008c3a5311e5210e44beaca014}{usbd\_xfer\_set\_frames}}(xfer, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03063}03063                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03064}03064                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03065}03065 \textcolor{comment}{                         * Directly loading a mbuf cluster into DMA to}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03066}03066 \textcolor{comment}{                         * save some data copying. This works because}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03067}03067 \textcolor{comment}{                         * there is only one cluster.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03068}03068 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03069}03069                         \mbox{\hyperlink{usb__transfer_8c_a30d239cbfe3c02ec7da6e6dfe5055762}{usbd\_xfer\_set\_frame\_data}}(xfer, 0, }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03070}03070                             mtod(sc-\/>\mbox{\hyperlink{structrun__softc_ae637efc0ef336d071a092b993762fa77}{rx\_m}}, caddr\_t), \mbox{\hyperlink{if__runvar_8h_a6e0c0113648892ddd41a644efa8f2cff}{RUN\_MAX\_RXSZ}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03071}03071                         \mbox{\hyperlink{usb__transfer_8c_a10f82b008c3a5311e5210e44beaca014}{usbd\_xfer\_set\_frames}}(xfer, 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03072}03072                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03073}03073                 \mbox{\hyperlink{usb__transfer_8c_a10c440b0b97cac293b4df9d558f15bac}{usbd\_transfer\_submit}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03074}03074                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03075}03075 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03076}03076         \textcolor{keywordflow}{default}:        \textcolor{comment}{/* Error */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03077}03077                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}}) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03078}03078                         \textcolor{comment}{/* try to clear stall first */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03079}03079                         \mbox{\hyperlink{usb__transfer_8c_abadf9cb2f8e81a5133af0c8030039de3}{usbd\_xfer\_set\_stall}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03080}03080                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} == \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945aeb31baaa7bf416e200f2a0d4ece60820}{USB\_ERR\_TIMEOUT}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03081}03081                                 device\_printf(sc-\/>\mbox{\hyperlink{structrun__softc_a11422e8a9e276cfaea3662dc74f6fc84}{sc\_dev}}, \textcolor{stringliteral}{"{}device timeout\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03082}03082                         counter\_u64\_add(ic-\/>ic\_ierrors, 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03083}03083                         \textcolor{keywordflow}{goto} tr\_setup;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03084}03084                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03085}03085                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_ae637efc0ef336d071a092b993762fa77}{rx\_m}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03086}03086                         m\_freem(sc-\/>\mbox{\hyperlink{structrun__softc_ae637efc0ef336d071a092b993762fa77}{rx\_m}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03087}03087                         sc-\/>\mbox{\hyperlink{structrun__softc_ae637efc0ef336d071a092b993762fa77}{rx\_m}} = NULL;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03088}03088                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03089}03089                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03090}03090         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03091}03091 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03092}03092         \textcolor{keywordflow}{if} (m == NULL)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03093}03093                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03094}03094 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03095}03095         \textcolor{comment}{/* inputting all the frames must be last */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03096}03096 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03097}03097         \mbox{\hyperlink{if__runvar_8h_a45d3b538b97178f8fe93284ed57e2cd5}{RUN\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03098}03098 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03099}03099         m-\/>m\_pkthdr.len = m-\/>m\_len = xferlen;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03100}03100 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03101}03101         \textcolor{comment}{/* HW can aggregate multiple 802.11 frames in a single USB xfer */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03102}03102         \textcolor{keywordflow}{for}(;;) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03103}03103                 dmalen = le32toh(*mtod(m, uint32\_t *)) \& 0xffff;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03104}03104 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03105}03105                 \textcolor{keywordflow}{if} ((dmalen >= (uint32\_t)-\/8) || (dmalen == 0) ||}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03106}03106                     ((dmalen \& 3) != 0)) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03107}03107                         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_RECV\_DESC | RUN\_DEBUG\_USB,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03108}03108                             \textcolor{stringliteral}{"{}bad DMA length \%u\(\backslash\)n"{}}, dmalen);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03109}03109                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03110}03110                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03111}03111                 \textcolor{keywordflow}{if} ((dmalen + 8) > (uint32\_t)xferlen) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03112}03112                         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_RECV\_DESC | RUN\_DEBUG\_USB,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03113}03113                             \textcolor{stringliteral}{"{}bad DMA length \%u > \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03114}03114                         dmalen + 8, xferlen);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03115}03115                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03116}03116                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03117}03117 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03118}03118                 \textcolor{comment}{/* If it is the last one or a single frame, we won't copy. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03119}03119                 \textcolor{keywordflow}{if} ((xferlen -\/= dmalen + 8) <= 8) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03120}03120                         \textcolor{comment}{/* trim 32-\/bit DMA-\/len header */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03121}03121                         m-\/>m\_data += 4;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03122}03122                         m-\/>m\_pkthdr.len = m-\/>m\_len -\/= 4;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03123}03123                         \mbox{\hyperlink{if__run_8c_ab31fa41390612cdec3ae76e877c2bf31}{run\_rx\_frame}}(sc, m, dmalen);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03124}03124                         m = NULL;       \textcolor{comment}{/* don't free source buffer */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03125}03125                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03126}03126                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03127}03127 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03128}03128                 mbuf\_len = dmalen + \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structrt2870__rxd}{rt2870\_rxd}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03129}03129                 \textcolor{keywordflow}{if} (\_\_predict\_false(mbuf\_len > MCLBYTES)) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03130}03130                         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_RECV\_DESC | RUN\_DEBUG\_USB,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03131}03131                             \textcolor{stringliteral}{"{}payload is too big: mbuf\_len \%u\(\backslash\)n"{}}, mbuf\_len);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03132}03132                         counter\_u64\_add(ic-\/>ic\_ierrors, 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03133}03133                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03134}03134                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03135}03135 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03136}03136                 \textcolor{comment}{/* copy aggregated frames to another mbuf */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03137}03137                 m0 = m\_getcl(M\_NOWAIT, MT\_DATA, M\_PKTHDR);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03138}03138                 \textcolor{keywordflow}{if} (\_\_predict\_false(m0 == NULL)) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03139}03139                         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_RECV\_DESC,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03140}03140                             \textcolor{stringliteral}{"{}could not allocate mbuf\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03141}03141                         counter\_u64\_add(ic-\/>ic\_ierrors, 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03142}03142                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03143}03143                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03144}03144                 m\_copydata(m, 4 \textcolor{comment}{/* skip 32-\/bit DMA-\/len header */},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03145}03145                     mbuf\_len, mtod(m0, caddr\_t));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03146}03146                 m0-\/>m\_pkthdr.len = m0-\/>m\_len = mbuf\_len;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03147}03147                 \mbox{\hyperlink{if__run_8c_ab31fa41390612cdec3ae76e877c2bf31}{run\_rx\_frame}}(sc, m0, dmalen);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03148}03148 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03149}03149                 \textcolor{comment}{/* update data ptr */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03150}03150                 m-\/>m\_data += mbuf\_len + 4;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03151}03151                 m-\/>m\_pkthdr.len = m-\/>m\_len -\/= mbuf\_len + 4;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03152}03152         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03153}03153 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03154}03154         \textcolor{comment}{/* make sure we free the source buffer, if any */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03155}03155         m\_freem(m);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03156}03156 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03157}03157 \textcolor{preprocessor}{\#ifdef  IEEE80211\_SUPPORT\_SUPERG}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03158}03158         ieee80211\_ff\_age\_all(ic, 100);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03159}03159 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03160}03160         \mbox{\hyperlink{if__runvar_8h_afb83ba5b9cfa86e30eb1e74fe2267cea}{RUN\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03161}03161 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03162}03162 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03163}03163 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03164}\mbox{\hyperlink{if__run_8c_ad959590591a9bf96e930e7341ba1915d}{03164}} \mbox{\hyperlink{if__run_8c_ad959590591a9bf96e930e7341ba1915d}{run\_tx\_free}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__endpoint__queue}{run\_endpoint\_queue}} *pq,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03165}03165     \textcolor{keyword}{struct} \mbox{\hyperlink{structrun__tx__data}{run\_tx\_data}} *data, \textcolor{keywordtype}{int} txerr)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03166}03166 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03167}03167 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03168}03168         ieee80211\_tx\_complete(data-\/>ni, data-\/>m, txerr);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03169}03169 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03170}03170         data-\/>m = NULL;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03171}03171         data-\/>ni = NULL;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03172}03172 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03173}03173         STAILQ\_INSERT\_TAIL(\&pq-\/>\mbox{\hyperlink{structrun__endpoint__queue_a1db0efb561505e806b51e94d5ec9d9e4}{tx\_fh}}, data, \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03174}03174         pq-\/>\mbox{\hyperlink{structrun__endpoint__queue_ad10831fe0433aa4f7a641b45bc670098}{tx\_nfree}}++;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03175}03175 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03176}03176 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03177}03177 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03178}\mbox{\hyperlink{if__run_8c_a518d4f99558cc289f394735408072a3f}{03178}} \mbox{\hyperlink{if__run_8c_a518d4f99558cc289f394735408072a3f}{run\_bulk\_tx\_callbackN}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}, u\_int index)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03179}03179 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03180}03180         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *sc = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03181}03181         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structrun__softc_a475dfeb97bf5936fa250323fa6a1e6ae}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03182}03182         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__tx__data}{run\_tx\_data}} *data;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03183}03183         \textcolor{keyword}{struct }ieee80211vap *vap = NULL;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03184}03184         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *pc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03185}03185         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__endpoint__queue}{run\_endpoint\_queue}} *pq = \&sc-\/>\mbox{\hyperlink{structrun__softc_ac32a4e4f9bda8c035f10a84ae91b68eb}{sc\_epq}}[index];}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03186}03186         \textcolor{keyword}{struct }mbuf *m;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03187}03187         \mbox{\hyperlink{usb__freebsd_8h_a66bb6b1869e5e89aff3b693720b39cfb}{usb\_frlength\_t}} \mbox{\hyperlink{if__axge_8c_ae5dc6ffcd9b7605c7787791e40cc6bb0}{size}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03188}03188         \textcolor{keywordtype}{int} actlen;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03189}03189         \textcolor{keywordtype}{int} sumlen;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03190}03190 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03191}03191         \mbox{\hyperlink{usb__transfer_8c_ac0c68320222f26c2a3eba47b46c47899}{usbd\_xfer\_status}}(xfer, \&actlen, \&sumlen, NULL, NULL);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03192}03192 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03193}03193         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03194}03194         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a8f0386217ba77be3e47721fae9aa9b3d}{USB\_ST\_TRANSFERRED}}:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03195}03195                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_XMIT | RUN\_DEBUG\_USB,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03196}03196                     \textcolor{stringliteral}{"{}transfer complete: \%d bytes @ index \%d\(\backslash\)n"{}}, actlen, index);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03197}03197 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03198}03198                 data = \mbox{\hyperlink{usb__transfer_8c_a1d9c627eab802e6281cea4de0369afde}{usbd\_xfer\_get\_priv}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03199}03199                 \mbox{\hyperlink{if__run_8c_ad959590591a9bf96e930e7341ba1915d}{run\_tx\_free}}(pq, data, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03200}03200                 \mbox{\hyperlink{usb__transfer_8c_a9e8b046b9d903ce4deb7b4ebba3c0e95}{usbd\_xfer\_set\_priv}}(xfer, NULL);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03201}03201 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03202}03202                 \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03203}03203         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a3aa7120c3ecab31972b8fe219530f552}{USB\_ST\_SETUP}}:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03204}03204 tr\_setup:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03205}03205                 data = STAILQ\_FIRST(\&pq-\/>\mbox{\hyperlink{structrun__endpoint__queue_a653ce1228c9cf40b5c3540a174da8043}{tx\_qh}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03206}03206                 \textcolor{keywordflow}{if} (data == NULL)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03207}03207                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03208}03208 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03209}03209                 STAILQ\_REMOVE\_HEAD(\&pq-\/>\mbox{\hyperlink{structrun__endpoint__queue_a653ce1228c9cf40b5c3540a174da8043}{tx\_qh}}, \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03210}03210 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03211}03211                 m = data-\/>m;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03212}03212                 \mbox{\hyperlink{if__axge_8c_ae5dc6ffcd9b7605c7787791e40cc6bb0}{size}} = (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x5592) ?}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03213}03213                     \textcolor{keyword}{sizeof}(data-\/>desc) + \textcolor{keyword}{sizeof}(uint32\_t) : \textcolor{keyword}{sizeof}(data-\/>desc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03214}03214                 \textcolor{keywordflow}{if} ((m-\/>m\_pkthdr.len +}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03215}03215                     \mbox{\hyperlink{if__axge_8c_ae5dc6ffcd9b7605c7787791e40cc6bb0}{size}} + 3 + 8) > \mbox{\hyperlink{if__runvar_8h_a7a4a30dffdd33bb6127fb3683641b847}{RUN\_MAX\_TXSZ}}) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03216}03216                         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_XMIT\_DESC | RUN\_DEBUG\_USB,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03217}03217                             \textcolor{stringliteral}{"{}data overflow, \%u bytes\(\backslash\)n"{}}, m-\/>m\_pkthdr.len);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03218}03218                         \mbox{\hyperlink{if__run_8c_ad959590591a9bf96e930e7341ba1915d}{run\_tx\_free}}(pq, data, 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03219}03219                         \textcolor{keywordflow}{goto} tr\_setup;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03220}03220                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03221}03221 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03222}03222                 pc = \mbox{\hyperlink{usb__transfer_8c_a6e66695b916f0770a259bed959c21555}{usbd\_xfer\_get\_frame}}(xfer, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03223}03223                 \mbox{\hyperlink{usb__busdma_8c_accb7cd85c3477e50c1ba1b1489226d09}{usbd\_copy\_in}}(pc, 0, \&data-\/>desc, \mbox{\hyperlink{if__axge_8c_ae5dc6ffcd9b7605c7787791e40cc6bb0}{size}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03224}03224                 \mbox{\hyperlink{usbdi_8h_a9696aa8bcb25b1adcf45e8387a13897a}{usbd\_m\_copy\_in}}(pc, \mbox{\hyperlink{if__axge_8c_ae5dc6ffcd9b7605c7787791e40cc6bb0}{size}}, m, 0, m-\/>m\_pkthdr.len);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03225}03225                 \mbox{\hyperlink{if__axge_8c_ae5dc6ffcd9b7605c7787791e40cc6bb0}{size}} += m-\/>m\_pkthdr.len;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03226}03226                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03227}03227 \textcolor{comment}{                 * Align end on a 4-\/byte boundary, pad 8 bytes (CRC +}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03228}03228 \textcolor{comment}{                 * 4-\/byte padding), and be sure to zero those trailing}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03229}03229 \textcolor{comment}{                 * bytes:}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03230}03230 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03231}03231                 \mbox{\hyperlink{usb__busdma_8c_a462a55c3d98d29504f946ac3882f2961}{usbd\_frame\_zero}}(pc, \mbox{\hyperlink{if__axge_8c_ae5dc6ffcd9b7605c7787791e40cc6bb0}{size}}, ((-\/\mbox{\hyperlink{if__axge_8c_ae5dc6ffcd9b7605c7787791e40cc6bb0}{size}}) \& 3) + 8);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03232}03232                 \mbox{\hyperlink{if__axge_8c_ae5dc6ffcd9b7605c7787791e40cc6bb0}{size}} += ((-\/\mbox{\hyperlink{if__axge_8c_ae5dc6ffcd9b7605c7787791e40cc6bb0}{size}}) \& 3) + 8;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03233}03233 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03234}03234                 vap = data-\/>ni-\/>ni\_vap;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03235}03235                 \textcolor{keywordflow}{if} (ieee80211\_radiotap\_active\_vap(vap)) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03236}03236                         \textcolor{keyword}{const} \textcolor{keyword}{struct }ieee80211\_frame *wh;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03237}03237                         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__tx__radiotap__header}{run\_tx\_radiotap\_header}} *tap = \&sc-\/>sc\_txtap;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03238}03238                         \textcolor{keyword}{struct }\mbox{\hyperlink{structrt2860__txwi}{rt2860\_txwi}} *txwi = }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03239}03239                             (\textcolor{keyword}{struct }\mbox{\hyperlink{structrt2860__txwi}{rt2860\_txwi}} *)(\&data-\/>desc + \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrt2870__txd}{rt2870\_txd}}));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03240}03240                         \textcolor{keywordtype}{int} has\_l2pad;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03241}03241 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03242}03242                         wh = mtod(m, \textcolor{keyword}{struct} ieee80211\_frame *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03243}03243                         has\_l2pad = \mbox{\hyperlink{if__run_8c_a5a328256811aa2cbbd1158b54e74fd82}{IEEE80211\_HAS\_ADDR4}}(wh) !=}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03244}03244                             IEEE80211\_QOS\_HAS\_SEQ(wh);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03245}03245 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03246}03246                         tap-\/>\mbox{\hyperlink{structrun__tx__radiotap__header_abcc6ca6c7ebc05ed7c3b008819479733}{wt\_flags}} = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03247}03247                         tap-\/>\mbox{\hyperlink{structrun__tx__radiotap__header_a6ee550274cd2558719b978ec8af0536a}{wt\_rate}} = \mbox{\hyperlink{if__run_8c_ab543147498aaf00bd04fe0a18a6c6a74}{rt2860\_rates}}[data-\/>ridx].\mbox{\hyperlink{structrt2860__rate_a57d0e6f274f6fff45d5424c4ba852d21}{rate}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03248}03248                         tap-\/>\mbox{\hyperlink{structrun__tx__radiotap__header_a6725a9c8925bdcdd2d4f6fbc674a6388}{wt\_hwqueue}} = index;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03249}03249                         \textcolor{keywordflow}{if} (le16toh(txwi-\/>\mbox{\hyperlink{structrt2860__txwi_ab1140c2bc0aede788659636107a94ec8}{phy}}) \& \mbox{\hyperlink{if__runreg_8h_ae8de48c3595620def80a4cff5156455d}{RT2860\_PHY\_SHPRE}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03250}03250                                 tap-\/>\mbox{\hyperlink{structrun__tx__radiotap__header_abcc6ca6c7ebc05ed7c3b008819479733}{wt\_flags}} |= IEEE80211\_RADIOTAP\_F\_SHORTPRE;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03251}03251                         \textcolor{keywordflow}{if} (has\_l2pad)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03252}03252                                 tap-\/>\mbox{\hyperlink{structrun__tx__radiotap__header_abcc6ca6c7ebc05ed7c3b008819479733}{wt\_flags}} |= IEEE80211\_RADIOTAP\_F\_DATAPAD;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03253}03253 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03254}03254                         ieee80211\_radiotap\_tx(vap, m);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03255}03255                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03256}03256 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03257}03257                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_XMIT | RUN\_DEBUG\_USB,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03258}03258                     \textcolor{stringliteral}{"{}sending frame len=\%u/\%u @ index \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03259}03259                     m-\/>m\_pkthdr.len, \mbox{\hyperlink{if__axge_8c_ae5dc6ffcd9b7605c7787791e40cc6bb0}{size}}, index);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03260}03260 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03261}03261                 \mbox{\hyperlink{usb__transfer_8c_a31786497f0f4222203b1e993d52af753}{usbd\_xfer\_set\_frame\_len}}(xfer, 0, \mbox{\hyperlink{if__axge_8c_ae5dc6ffcd9b7605c7787791e40cc6bb0}{size}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03262}03262                 \mbox{\hyperlink{usb__transfer_8c_a9e8b046b9d903ce4deb7b4ebba3c0e95}{usbd\_xfer\_set\_priv}}(xfer, data);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03263}03263                 \mbox{\hyperlink{usb__transfer_8c_a10c440b0b97cac293b4df9d558f15bac}{usbd\_transfer\_submit}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03264}03264                 \mbox{\hyperlink{if__run_8c_a3796fad2a883e74f7f5f4a1cb3b7ef6d}{run\_start}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03265}03265 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03266}03266                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03267}03267 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03268}03268         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03269}03269                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_XMIT | RUN\_DEBUG\_USB,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03270}03270                     \textcolor{stringliteral}{"{}USB transfer error, \%s\(\backslash\)n"{}}, \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03271}03271 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03272}03272                 data = \mbox{\hyperlink{usb__transfer_8c_a1d9c627eab802e6281cea4de0369afde}{usbd\_xfer\_get\_priv}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03273}03273 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03274}03274                 \textcolor{keywordflow}{if} (data != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03275}03275                         \textcolor{keywordflow}{if}(data-\/>ni != NULL)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03276}03276                                 vap = data-\/>ni-\/>ni\_vap;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03277}03277                         \mbox{\hyperlink{if__run_8c_ad959590591a9bf96e930e7341ba1915d}{run\_tx\_free}}(pq, data, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03278}03278                         \mbox{\hyperlink{usb__transfer_8c_a9e8b046b9d903ce4deb7b4ebba3c0e95}{usbd\_xfer\_set\_priv}}(xfer, NULL);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03279}03279                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03280}03280 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03281}03281                 \textcolor{keywordflow}{if} (vap == NULL)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03282}03282                         vap = TAILQ\_FIRST(\&ic-\/>ic\_vaps);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03283}03283 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03284}03284                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}}) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03285}03285                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} == \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945aeb31baaa7bf416e200f2a0d4ece60820}{USB\_ERR\_TIMEOUT}}) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03286}03286                                 device\_printf(sc-\/>\mbox{\hyperlink{structrun__softc_a11422e8a9e276cfaea3662dc74f6fc84}{sc\_dev}}, \textcolor{stringliteral}{"{}device timeout\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03287}03287                                 uint32\_t i = \mbox{\hyperlink{if__run_8c_ab51c04f6574bfdc56c82a56b5800c32b}{RUN\_CMDQ\_GET}}(\&sc-\/>\mbox{\hyperlink{structrun__softc_aa15ecf9db15b3ffda49a044842caf644}{cmdq\_store}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03288}03288                                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_XMIT | RUN\_DEBUG\_USB,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03289}03289                                     \textcolor{stringliteral}{"{}cmdq\_store=\%d\(\backslash\)n"{}}, i);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03290}03290                                 sc-\/>\mbox{\hyperlink{structrun__softc_a9500a13eb58aab1b19d1149c55235640}{cmdq}}[i].\mbox{\hyperlink{structrun__cmdq_a8bd79bf0dffc9ec5341a2d955f19f31e}{func}} = \mbox{\hyperlink{if__run_8c_a4ab9667b9d26855695ced3803230299c}{run\_usb\_timeout\_cb}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03291}03291                                 sc-\/>\mbox{\hyperlink{structrun__softc_a9500a13eb58aab1b19d1149c55235640}{cmdq}}[i].\mbox{\hyperlink{structrun__cmdq_a44148050f8e128fac3651617eecad099}{arg0}} = vap;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03292}03292                                 ieee80211\_runtask(ic, \&sc-\/>\mbox{\hyperlink{structrun__softc_ae805f800f38298655ad01aa36980dc38}{cmdq\_task}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03293}03293                         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03294}03294 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03295}03295                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03296}03296 \textcolor{comment}{                         * Try to clear stall first, also if other}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03297}03297 \textcolor{comment}{                         * errors occur, hence clearing stall}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03298}03298 \textcolor{comment}{                         * introduces a 50 ms delay:}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03299}03299 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03300}03300                         \mbox{\hyperlink{usb__transfer_8c_abadf9cb2f8e81a5133af0c8030039de3}{usbd\_xfer\_set\_stall}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03301}03301                         \textcolor{keywordflow}{goto} tr\_setup;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03302}03302                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03303}03303                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03304}03304         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03305}03305 \textcolor{preprocessor}{\#ifdef  IEEE80211\_SUPPORT\_SUPERG}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03306}03306         \textcolor{comment}{/* XXX TODO: make this deferred rather than unlock/relock */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03307}03307         \textcolor{comment}{/* XXX TODO: should only do the QoS AC this belongs to */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03308}03308         \textcolor{keywordflow}{if} (pq-\/>\mbox{\hyperlink{structrun__endpoint__queue_ad10831fe0433aa4f7a641b45bc670098}{tx\_nfree}} >= \mbox{\hyperlink{if__runvar_8h_a7aef91982728fb09e3be24be55a0cbbf}{RUN\_TX\_RING\_COUNT}}) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03309}03309                 \mbox{\hyperlink{if__runvar_8h_a45d3b538b97178f8fe93284ed57e2cd5}{RUN\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03310}03310                 ieee80211\_ff\_flush\_all(ic);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03311}03311                 \mbox{\hyperlink{if__runvar_8h_afb83ba5b9cfa86e30eb1e74fe2267cea}{RUN\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03312}03312         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03313}03313 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03314}03314 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03315}03315 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03316}03316 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03317}\mbox{\hyperlink{if__run_8c_ae1e49bb4eaa9a0914ba9999280d96b55}{03317}} \mbox{\hyperlink{if__run_8c_aafa71d7f3ada8d87c618402f598bb5da}{run\_bulk\_tx\_callback0}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03318}03318 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03319}03319         \mbox{\hyperlink{if__run_8c_a518d4f99558cc289f394735408072a3f}{run\_bulk\_tx\_callbackN}}(xfer, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03320}03320 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03321}03321 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03322}03322 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03323}\mbox{\hyperlink{if__run_8c_a4981c9dc004bdc85ed6aa7c1ca8ec088}{03323}} \mbox{\hyperlink{if__run_8c_a8ba3b6f4900b86e9f6ff66ea1e490e30}{run\_bulk\_tx\_callback1}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03324}03324 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03325}03325         \mbox{\hyperlink{if__run_8c_a518d4f99558cc289f394735408072a3f}{run\_bulk\_tx\_callbackN}}(xfer, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}, 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03326}03326 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03327}03327 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03328}03328 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03329}\mbox{\hyperlink{if__run_8c_ad62c945c94741ec34809d1b5be797d2b}{03329}} \mbox{\hyperlink{if__run_8c_a850f0dcc5cf0b79e53a6968e06aa91b2}{run\_bulk\_tx\_callback2}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03330}03330 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03331}03331         \mbox{\hyperlink{if__run_8c_a518d4f99558cc289f394735408072a3f}{run\_bulk\_tx\_callbackN}}(xfer, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}, 2);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03332}03332 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03333}03333 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03334}03334 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03335}\mbox{\hyperlink{if__run_8c_ada62ad7bdf92330ea782a5935bc6430a}{03335}} \mbox{\hyperlink{if__run_8c_a8288bd9419c280c37b38c345c364fb42}{run\_bulk\_tx\_callback3}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03336}03336 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03337}03337         \mbox{\hyperlink{if__run_8c_a518d4f99558cc289f394735408072a3f}{run\_bulk\_tx\_callbackN}}(xfer, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}, 3);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03338}03338 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03339}03339 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03340}03340 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03341}\mbox{\hyperlink{if__run_8c_aadf68c8229ced1ccd6fc589b0e55f913}{03341}} \mbox{\hyperlink{if__run_8c_a9a5aa933295549f3c220158c39a27670}{run\_bulk\_tx\_callback4}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03342}03342 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03343}03343         \mbox{\hyperlink{if__run_8c_a518d4f99558cc289f394735408072a3f}{run\_bulk\_tx\_callbackN}}(xfer, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}, 4);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03344}03344 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03345}03345 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03346}03346 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03347}\mbox{\hyperlink{if__run_8c_afd33d6d95a2253b873614b424ee1c036}{03347}} \mbox{\hyperlink{if__run_8c_a0fe0129a05063060ab96b67d850aec30}{run\_bulk\_tx\_callback5}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03348}03348 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03349}03349         \mbox{\hyperlink{if__run_8c_a518d4f99558cc289f394735408072a3f}{run\_bulk\_tx\_callbackN}}(xfer, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}, 5);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03350}03350 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03351}03351 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03352}03352 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03353}\mbox{\hyperlink{if__run_8c_ade3e6fd8ad25e51c5ba7ccfd8710659e}{03353}} \mbox{\hyperlink{if__run_8c_ade3e6fd8ad25e51c5ba7ccfd8710659e}{run\_set\_tx\_desc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structrun__tx__data}{run\_tx\_data}} *data)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03354}03354 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03355}03355         \textcolor{keyword}{struct }mbuf *m = data-\/>m;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03356}03356         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structrun__softc_a475dfeb97bf5936fa250323fa6a1e6ae}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03357}03357         \textcolor{keyword}{struct }ieee80211vap *vap = data-\/>ni-\/>ni\_vap;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03358}03358         \textcolor{keyword}{struct }ieee80211\_frame *wh;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03359}03359         \textcolor{keyword}{struct }\mbox{\hyperlink{structrt2870__txd}{rt2870\_txd}} *txd;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03360}03360         \textcolor{keyword}{struct }\mbox{\hyperlink{structrt2860__txwi}{rt2860\_txwi}} *txwi;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03361}03361         uint16\_t xferlen, txwisize;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03362}03362         uint16\_t mcs;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03363}03363         uint8\_t ridx = data-\/>ridx;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03364}03364         uint8\_t \mbox{\hyperlink{if__runreg_8h_a29720fa149448a5be70ff846b72c6dde}{pad}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03365}03365 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03366}03366         \textcolor{comment}{/* get MCS code from rate index */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03367}03367         mcs = \mbox{\hyperlink{if__run_8c_ab543147498aaf00bd04fe0a18a6c6a74}{rt2860\_rates}}[ridx].\mbox{\hyperlink{structrt2860__rate_a76fdb7acbca2d34fb076e317377dc06c}{mcs}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03368}03368 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03369}03369         txwisize = (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x5592) ?}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03370}03370             \textcolor{keyword}{sizeof}(*txwi) + \textcolor{keyword}{sizeof}(uint32\_t) : \textcolor{keyword}{sizeof}(*txwi);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03371}03371         xferlen = txwisize + m-\/>m\_pkthdr.len;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03372}03372 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03373}03373         \textcolor{comment}{/* roundup to 32-\/bit alignment */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03374}03374         xferlen = (xferlen + 3) \& \string~3;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03375}03375 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03376}03376         txd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structrt2870__txd}{rt2870\_txd}} *)\&data-\/>desc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03377}03377         txd-\/>\mbox{\hyperlink{structrt2870__txd_aadc12f3725414669cad544aa962fc402}{len}} = htole16(xferlen);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03378}03378 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03379}03379         wh = mtod(m, \textcolor{keyword}{struct} ieee80211\_frame *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03380}03380 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03381}03381         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03382}03382 \textcolor{comment}{         * Ether both are true or both are false, the header}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03383}03383 \textcolor{comment}{         * are nicely aligned to 32-\/bit. So, no L2 padding.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03384}03384 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03385}03385         \textcolor{keywordflow}{if}(\mbox{\hyperlink{if__run_8c_a5a328256811aa2cbbd1158b54e74fd82}{IEEE80211\_HAS\_ADDR4}}(wh) == IEEE80211\_QOS\_HAS\_SEQ(wh))}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03386}03386                 \mbox{\hyperlink{if__runreg_8h_a29720fa149448a5be70ff846b72c6dde}{pad}} = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03387}03387         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03388}03388                 \mbox{\hyperlink{if__runreg_8h_a29720fa149448a5be70ff846b72c6dde}{pad}} = 2;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03389}03389 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03390}03390         \textcolor{comment}{/* setup TX Wireless Information */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03391}03391         txwi = (\textcolor{keyword}{struct }\mbox{\hyperlink{structrt2860__txwi}{rt2860\_txwi}} *)(txd + 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03392}03392         txwi-\/>\mbox{\hyperlink{structrt2860__txwi_a8600fc81df7fa8dff3d460f4d3ce4c23}{len}} = htole16(m-\/>m\_pkthdr.len -\/ \mbox{\hyperlink{if__runreg_8h_a29720fa149448a5be70ff846b72c6dde}{pad}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03393}03393         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_ab543147498aaf00bd04fe0a18a6c6a74}{rt2860\_rates}}[ridx].\mbox{\hyperlink{structrt2860__txwi_ab1140c2bc0aede788659636107a94ec8}{phy}} == IEEE80211\_T\_DS) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03394}03394                 mcs |= \mbox{\hyperlink{if__runreg_8h_a1185b8b170f6af327a20bbe4be2b0b46}{RT2860\_PHY\_CCK}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03395}03395                 \textcolor{keywordflow}{if} (ridx != \mbox{\hyperlink{if__run_8c_a422a4d05e17982d11e390dd6455f07c0}{RT2860\_RIDX\_CCK1}} \&\&}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03396}03396                     (ic-\/>ic\_flags \& IEEE80211\_F\_SHPREAMBLE))}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03397}03397                         mcs |= \mbox{\hyperlink{if__runreg_8h_ae8de48c3595620def80a4cff5156455d}{RT2860\_PHY\_SHPRE}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03398}03398         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_ab543147498aaf00bd04fe0a18a6c6a74}{rt2860\_rates}}[ridx].\mbox{\hyperlink{structrt2860__txwi_ab1140c2bc0aede788659636107a94ec8}{phy}} == IEEE80211\_T\_OFDM) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03399}03399                 mcs |= \mbox{\hyperlink{if__runreg_8h_a79d9f4ffc5d0aa9734711be2e5a0df53}{RT2860\_PHY\_OFDM}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03400}03400         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_ab543147498aaf00bd04fe0a18a6c6a74}{rt2860\_rates}}[ridx].\mbox{\hyperlink{structrt2860__txwi_ab1140c2bc0aede788659636107a94ec8}{phy}} == IEEE80211\_T\_HT) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03401}03401                 \textcolor{comment}{/* XXX TODO: [adrian] set short preamble for MCS? */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03402}03402                 mcs |= \mbox{\hyperlink{if__runreg_8h_a291f752da3f46029e3e35b76222a2606}{RT2860\_PHY\_HT\_MIX}}; \textcolor{comment}{/* Mixed, not greenfield */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03403}03403         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03404}03404         txwi-\/>\mbox{\hyperlink{structrt2860__txwi_ab1140c2bc0aede788659636107a94ec8}{phy}} = htole16(mcs);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03405}03405 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03406}03406         \textcolor{comment}{/* check if RTS/CTS or CTS-\/to-\/self protection is required */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03407}03407         \textcolor{keywordflow}{if} (!IEEE80211\_IS\_MULTICAST(wh-\/>i\_addr1) \&\&}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03408}03408             ((m-\/>m\_pkthdr.len + IEEE80211\_CRC\_LEN > vap-\/>iv\_rtsthreshold) ||}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03409}03409              ((ic-\/>ic\_flags \& IEEE80211\_F\_USEPROT) \&\&}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03410}03410               \mbox{\hyperlink{if__run_8c_ab543147498aaf00bd04fe0a18a6c6a74}{rt2860\_rates}}[ridx].\mbox{\hyperlink{structrt2860__rate_a4f6fae18ebab17d28a2dd1337da25415}{phy}} == IEEE80211\_T\_OFDM) ||}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03411}03411              ((ic-\/>ic\_htprotmode == IEEE80211\_PROT\_RTSCTS) \&\&}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03412}03412               \mbox{\hyperlink{if__run_8c_ab543147498aaf00bd04fe0a18a6c6a74}{rt2860\_rates}}[ridx].\mbox{\hyperlink{structrt2860__rate_a4f6fae18ebab17d28a2dd1337da25415}{phy}} == IEEE80211\_T\_HT)))}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03413}03413                 txwi-\/>\mbox{\hyperlink{structrt2860__txwi_afabdd4cc8b6c14bc5b1823ec5145b910}{txop}} |= \mbox{\hyperlink{if__runreg_8h_a5b89fb14a74b74d8e797f748970ea6e7}{RT2860\_TX\_TXOP\_HT}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03414}03414         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03415}03415                 txwi-\/>\mbox{\hyperlink{structrt2860__txwi_afabdd4cc8b6c14bc5b1823ec5145b910}{txop}} |= \mbox{\hyperlink{if__runreg_8h_a859ea69f3af5b8bdaa1eff312d9c9ea5}{RT2860\_TX\_TXOP\_BACKOFF}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03416}03416 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03417}03417         \textcolor{keywordflow}{if} (vap-\/>iv\_opmode != IEEE80211\_M\_STA \&\& !IEEE80211\_QOS\_HAS\_SEQ(wh))}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03418}03418                 txwi-\/>\mbox{\hyperlink{structrt2860__txwi_ae10df0e5eb585d998073199569ccc499}{xflags}} |= \mbox{\hyperlink{if__runreg_8h_adf3a5b463f105f25f48745bd6719e2db}{RT2860\_TX\_NSEQ}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03419}03419 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03420}03420 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03421}03421 \textcolor{comment}{/* This function must be called locked */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03422}03422 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03423}\mbox{\hyperlink{if__run_8c_ac7493d1363b4737f63c1181104f46bf8}{03423}} \mbox{\hyperlink{if__run_8c_ac7493d1363b4737f63c1181104f46bf8}{run\_tx}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, \textcolor{keyword}{struct} mbuf *m, \textcolor{keyword}{struct} ieee80211\_node *ni)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03424}03424 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03425}03425         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structrun__softc_a475dfeb97bf5936fa250323fa6a1e6ae}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03426}03426         \textcolor{keyword}{struct }ieee80211vap *vap = ni-\/>ni\_vap;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03427}03427         \textcolor{keyword}{struct }ieee80211\_frame *wh;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03428}03428         \textcolor{keyword}{const} \textcolor{keyword}{struct }ieee80211\_txparam *tp = ni-\/>ni\_txparms;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03429}03429         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__node}{run\_node}} *rn = \mbox{\hyperlink{if__runvar_8h_a60a610e15c59350c228a2d8f390118e3}{RUN\_NODE}}(\mbox{\hyperlink{structrun__node_a47e98d22d90417737401b60b33b779f5}{ni}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03430}03430         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__tx__data}{run\_tx\_data}} *data;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03431}03431         \textcolor{keyword}{struct }\mbox{\hyperlink{structrt2870__txd}{rt2870\_txd}} *txd;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03432}03432         \textcolor{keyword}{struct }\mbox{\hyperlink{structrt2860__txwi}{rt2860\_txwi}} *txwi;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03433}03433         uint16\_t qos;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03434}03434         uint16\_t dur;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03435}03435         uint16\_t qid;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03436}03436         uint8\_t type;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03437}03437         uint8\_t tid;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03438}03438         uint8\_t ridx;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03439}03439         uint8\_t ctl\_ridx;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03440}03440         uint8\_t qflags;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03441}03441         uint8\_t \mbox{\hyperlink{structrt2860__txwi_ae10df0e5eb585d998073199569ccc499}{xflags}} = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03442}03442         \textcolor{keywordtype}{int} hasqos;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03443}03443 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03444}03444         \mbox{\hyperlink{if__runvar_8h_a46923988c8f3d1896339650dd4bf5f53}{RUN\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03445}03445 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03446}03446         wh = mtod(m, \textcolor{keyword}{struct} ieee80211\_frame *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03447}03447 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03448}03448         type = wh-\/>i\_fc[0] \& IEEE80211\_FC0\_TYPE\_MASK;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03449}03449 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03450}03450         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03451}03451 \textcolor{comment}{         * There are 7 bulk endpoints: 1 for RX}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03452}03452 \textcolor{comment}{         * and 6 for TX (4 EDCAs + HCCA + Prio).}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03453}03453 \textcolor{comment}{         * Update 03-\/14-\/2009:  some devices like the Planex GW-\/US300MiniS}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03454}03454 \textcolor{comment}{         * seem to have only 4 TX bulk endpoints (Fukaumi Naoki).}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03455}03455 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03456}03456         \textcolor{keywordflow}{if} ((hasqos = IEEE80211\_QOS\_HAS\_SEQ(wh))) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03457}03457                 uint8\_t *frm;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03458}03458 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03459}03459                 frm = ieee80211\_getqos(wh);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03460}03460                 qos = le16toh(*(\textcolor{keyword}{const} uint16\_t *)frm);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03461}03461                 tid = qos \& IEEE80211\_QOS\_TID;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03462}03462                 qid = TID\_TO\_WME\_AC(tid);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03463}03463         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03464}03464                 qos = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03465}03465                 tid = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03466}03466                 qid = WME\_AC\_BE;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03467}03467         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03468}03468         qflags = (qid < 4) ? \mbox{\hyperlink{if__runreg_8h_a92ec3825fe6eb1726ad79004a3bc41c6}{RT2860\_TX\_QSEL\_EDCA}} : \mbox{\hyperlink{if__runreg_8h_acc829499e31ac7455f63a85611bf0f3f}{RT2860\_TX\_QSEL\_HCCA}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03469}03469 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03470}03470         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_XMIT, \textcolor{stringliteral}{"{}qos \%d\(\backslash\)tqid \%d\(\backslash\)ttid \%d\(\backslash\)tqflags \%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03471}03471             qos, qid, tid, qflags);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03472}03472 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03473}03473         \textcolor{comment}{/* pickup a rate index */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03474}03474         \textcolor{keywordflow}{if} (IEEE80211\_IS\_MULTICAST(wh-\/>i\_addr1) ||}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03475}03475             type != IEEE80211\_FC0\_TYPE\_DATA || m-\/>m\_flags \& M\_EAPOL) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03476}03476                 \textcolor{comment}{/* XXX TODO: methodize for 11n; use MCS0 for 11NA/11NG */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03477}03477                 ridx = (ic-\/>ic\_curmode == IEEE80211\_MODE\_11A || ic-\/>ic\_curmode == IEEE80211\_MODE\_11NA) ?}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03478}03478                     \mbox{\hyperlink{if__run_8c_a7cd8380edf7054526c4a83dfc0ba4fe7}{RT2860\_RIDX\_OFDM6}} : \mbox{\hyperlink{if__run_8c_a422a4d05e17982d11e390dd6455f07c0}{RT2860\_RIDX\_CCK1}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03479}03479                 ctl\_ridx = \mbox{\hyperlink{if__run_8c_ab543147498aaf00bd04fe0a18a6c6a74}{rt2860\_rates}}[ridx].\mbox{\hyperlink{structrt2860__rate_a323407f34d0b850071cdabe47e4d62f7}{ctl\_ridx}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03480}03480         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03481}03481                 \textcolor{keywordflow}{if} (tp-\/>ucastrate != IEEE80211\_FIXED\_RATE\_NONE)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03482}03482                         ridx = rn-\/>\mbox{\hyperlink{structrun__node_ad481d1dbd5da4d03d044c883628c6453}{fix\_ridx}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03483}03483                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03484}03484                         ridx = rn-\/>\mbox{\hyperlink{structrun__node_ab65d660e2548718b81efbd87cee61d53}{amrr\_ridx}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03485}03485                 ctl\_ridx = \mbox{\hyperlink{if__run_8c_ab543147498aaf00bd04fe0a18a6c6a74}{rt2860\_rates}}[ridx].\mbox{\hyperlink{structrt2860__rate_a323407f34d0b850071cdabe47e4d62f7}{ctl\_ridx}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03486}03486         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03487}03487 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03488}03488         \textcolor{keywordflow}{if} (!IEEE80211\_IS\_MULTICAST(wh-\/>i\_addr1) \&\&}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03489}03489             (!hasqos || (qos \& IEEE80211\_QOS\_ACKPOLICY) !=}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03490}03490              IEEE80211\_QOS\_ACKPOLICY\_NOACK)) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03491}03491                 \mbox{\hyperlink{structrt2860__txwi_ae10df0e5eb585d998073199569ccc499}{xflags}} |= \mbox{\hyperlink{if__runreg_8h_a79e5da59c60ee158cfa9be8ed07656b1}{RT2860\_TX\_ACK}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03492}03492                 \textcolor{keywordflow}{if} (ic-\/>ic\_flags \& IEEE80211\_F\_SHPREAMBLE)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03493}03493                         dur = \mbox{\hyperlink{if__run_8c_ab543147498aaf00bd04fe0a18a6c6a74}{rt2860\_rates}}[ctl\_ridx].\mbox{\hyperlink{structrt2860__rate_af91df3ed1940eedfa1c110f5bfab3ee6}{sp\_ack\_dur}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03494}03494                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03495}03495                         dur = \mbox{\hyperlink{if__run_8c_ab543147498aaf00bd04fe0a18a6c6a74}{rt2860\_rates}}[ctl\_ridx].\mbox{\hyperlink{structrt2860__rate_a2ec1ccf8f9aaa27a82f294b9558eb1d5}{lp\_ack\_dur}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03496}03496                 \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(wh-\/>i\_dur, dur);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03497}03497         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03498}03498 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03499}03499         \textcolor{comment}{/* reserve slots for mgmt packets, just in case */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03500}03500         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_ac32a4e4f9bda8c035f10a84ae91b68eb}{sc\_epq}}[qid].\mbox{\hyperlink{structrun__endpoint__queue_ad10831fe0433aa4f7a641b45bc670098}{tx\_nfree}} < 3) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03501}03501                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_XMIT, \textcolor{stringliteral}{"{}tx ring \%d is full\(\backslash\)n"{}}, qid);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03502}03502                 \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03503}03503         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03504}03504 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03505}03505         data = STAILQ\_FIRST(\&sc-\/>\mbox{\hyperlink{structrun__softc_ac32a4e4f9bda8c035f10a84ae91b68eb}{sc\_epq}}[qid].\mbox{\hyperlink{structrun__endpoint__queue_a1db0efb561505e806b51e94d5ec9d9e4}{tx\_fh}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03506}03506         STAILQ\_REMOVE\_HEAD(\&sc-\/>\mbox{\hyperlink{structrun__softc_ac32a4e4f9bda8c035f10a84ae91b68eb}{sc\_epq}}[qid].\mbox{\hyperlink{structrun__endpoint__queue_a1db0efb561505e806b51e94d5ec9d9e4}{tx\_fh}}, \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03507}03507         sc-\/>\mbox{\hyperlink{structrun__softc_ac32a4e4f9bda8c035f10a84ae91b68eb}{sc\_epq}}[qid].\mbox{\hyperlink{structrun__endpoint__queue_ad10831fe0433aa4f7a641b45bc670098}{tx\_nfree}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03508}03508 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03509}03509         txd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structrt2870__txd}{rt2870\_txd}} *)\&data-\/>desc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03510}03510         txd-\/>\mbox{\hyperlink{structrt2870__txd_a3d90a2a6c6220003ffc4ba0780e42fcb}{flags}} = qflags;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03511}03511         txwi = (\textcolor{keyword}{struct} \mbox{\hyperlink{structrt2860__txwi}{rt2860\_txwi}} *)(txd + 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03512}03512         txwi-\/>\mbox{\hyperlink{structrt2860__txwi_ae10df0e5eb585d998073199569ccc499}{xflags}} = xflags;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03513}03513         \textcolor{keywordflow}{if} (IEEE80211\_IS\_MULTICAST(wh-\/>i\_addr1))}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03514}03514                 txwi-\/>\mbox{\hyperlink{structrt2860__txwi_a97116de0c7190fde55fd46cad1c2a2a0}{wcid}} = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03515}03515         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03516}03516                 txwi-\/>\mbox{\hyperlink{structrt2860__txwi_a97116de0c7190fde55fd46cad1c2a2a0}{wcid}} = (vap-\/>iv\_opmode == IEEE80211\_M\_STA) ?}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03517}03517                     1 : \mbox{\hyperlink{if__runvar_8h_ae4c2a1ac815b010f11451d0e57db2081}{RUN\_AID2WCID}}(ni-\/>ni\_associd);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03518}03518 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03519}03519         \textcolor{comment}{/* clear leftover garbage bits */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03520}03520         txwi-\/>\mbox{\hyperlink{structrt2860__txwi_ad5c74efeb2ba118b395a75aa25423276}{flags}} = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03521}03521         txwi-\/>\mbox{\hyperlink{structrt2860__txwi_afabdd4cc8b6c14bc5b1823ec5145b910}{txop}} = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03522}03522 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03523}03523         data-\/>m = m;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03524}03524         data-\/>ni = ni;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03525}03525         data-\/>ridx = ridx;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03526}03526 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03527}03527         \mbox{\hyperlink{if__run_8c_ade3e6fd8ad25e51c5ba7ccfd8710659e}{run\_set\_tx\_desc}}(sc, data);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03528}03528 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03529}03529         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03530}03530 \textcolor{comment}{         * The chip keeps track of 2 kind of Tx stats,}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03531}03531 \textcolor{comment}{         *  * TX\_STAT\_FIFO, for per WCID stats, and}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03532}03532 \textcolor{comment}{         *  * TX\_STA\_CNT0 for all-\/TX-\/in-\/one stats.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03533}03533 \textcolor{comment}{         *}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03534}03534 \textcolor{comment}{         * To use FIFO stats, we need to store MCS into the driver-\/private}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03535}03535 \textcolor{comment}{         * PacketID field. So that, we can tell whose stats when we read them.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03536}03536 \textcolor{comment}{         * We add 1 to the MCS because setting the PacketID field to 0 means}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03537}03537 \textcolor{comment}{         * that we don't want feedback in TX\_STAT\_FIFO.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03538}03538 \textcolor{comment}{         * And, that's what we want for STA mode, since TX\_STA\_CNT0 does the job.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03539}03539 \textcolor{comment}{         *}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03540}03540 \textcolor{comment}{         * FIFO stats doesn't count Tx with WCID 0xff, so we do this in run\_tx().}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03541}03541 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03542}03542         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_ac8eca37dc53b73408f99d028e07fea66}{rvp\_cnt}} > 1 || vap-\/>iv\_opmode == IEEE80211\_M\_HOSTAP ||}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03543}03543             vap-\/>iv\_opmode == IEEE80211\_M\_MBSS) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03544}03544                 uint16\_t pid = (\mbox{\hyperlink{if__run_8c_ab543147498aaf00bd04fe0a18a6c6a74}{rt2860\_rates}}[ridx].\mbox{\hyperlink{structrt2860__rate_a76fdb7acbca2d34fb076e317377dc06c}{mcs}} + 1) \& 0xf;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03545}03545                 txwi-\/>\mbox{\hyperlink{structrt2860__txwi_a8600fc81df7fa8dff3d460f4d3ce4c23}{len}} |= htole16(pid << \mbox{\hyperlink{if__runreg_8h_a145f3969760d951b3f5a13c4787b6066}{RT2860\_TX\_PID\_SHIFT}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03546}03546 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03547}03547                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03548}03548 \textcolor{comment}{                 * Unlike PCI based devices, we don't get any interrupt from}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03549}03549 \textcolor{comment}{                 * USB devices, so we simulate FIFO-\/is-\/full interrupt here.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03550}03550 \textcolor{comment}{                 * Ralink recommends to drain FIFO stats every 100 ms, but 16 slots}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03551}03551 \textcolor{comment}{                 * quickly get fulled. To prevent overflow, increment a counter on}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03552}03552 \textcolor{comment}{                 * every FIFO stat request, so we know how many slots are left.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03553}03553 \textcolor{comment}{                 * We do this only in HOSTAP or multiple vap mode since FIFO stats}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03554}03554 \textcolor{comment}{                 * are used only in those modes.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03555}03555 \textcolor{comment}{                 * We just drain stats. AMRR gets updated every 1 sec by}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03556}03556 \textcolor{comment}{                 * run\_ratectl\_cb() via callout.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03557}03557 \textcolor{comment}{                 * Call it early. Otherwise overflow.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03558}03558 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03559}03559                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_ad758026e953bd272c786099076e725e4}{fifo\_cnt}}++ == 10) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03560}03560                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03561}03561 \textcolor{comment}{                         * With multiple vaps or if\_bridge, if\_start() is called}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03562}03562 \textcolor{comment}{                         * with a non-\/sleepable lock, tcpinp. So, need to defer.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03563}03563 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03564}03564                         uint32\_t i = \mbox{\hyperlink{if__run_8c_ab51c04f6574bfdc56c82a56b5800c32b}{RUN\_CMDQ\_GET}}(\&sc-\/>\mbox{\hyperlink{structrun__softc_aa15ecf9db15b3ffda49a044842caf644}{cmdq\_store}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03565}03565                         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_XMIT, \textcolor{stringliteral}{"{}cmdq\_store=\%d\(\backslash\)n"{}}, i);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03566}03566                         sc-\/>\mbox{\hyperlink{structrun__softc_a9500a13eb58aab1b19d1149c55235640}{cmdq}}[i].\mbox{\hyperlink{structrun__cmdq_a8bd79bf0dffc9ec5341a2d955f19f31e}{func}} = \mbox{\hyperlink{if__run_8c_acf69017c5ef131e134a4f7d189c87972}{run\_drain\_fifo}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03567}03567                         sc-\/>\mbox{\hyperlink{structrun__softc_a9500a13eb58aab1b19d1149c55235640}{cmdq}}[i].\mbox{\hyperlink{structrun__cmdq_a44148050f8e128fac3651617eecad099}{arg0}} = sc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03568}03568                         ieee80211\_runtask(ic, \&sc-\/>\mbox{\hyperlink{structrun__softc_ae805f800f38298655ad01aa36980dc38}{cmdq\_task}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03569}03569                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03570}03570         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03571}03571 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03572}03572         STAILQ\_INSERT\_TAIL(\&sc-\/>\mbox{\hyperlink{structrun__softc_ac32a4e4f9bda8c035f10a84ae91b68eb}{sc\_epq}}[qid].\mbox{\hyperlink{structrun__endpoint__queue_a653ce1228c9cf40b5c3540a174da8043}{tx\_qh}}, data, \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03573}03573 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03574}03574         \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structrun__softc_a8522ea9d5483b98283b7629e41c31eac}{sc\_xfer}}[qid]);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03575}03575 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03576}03576         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_XMIT,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03577}03577             \textcolor{stringliteral}{"{}sending data frame len=\%d rate=\%d qid=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03578}03578             m-\/>m\_pkthdr.len + (\textcolor{keywordtype}{int})(\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrt2870__txd}{rt2870\_txd}}) +}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03579}03579             \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrt2860__txwi}{rt2860\_txwi}})), \mbox{\hyperlink{if__run_8c_ab543147498aaf00bd04fe0a18a6c6a74}{rt2860\_rates}}[ridx].\mbox{\hyperlink{structrt2860__rate_a57d0e6f274f6fff45d5424c4ba852d21}{rate}}, qid);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03580}03580 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03581}03581         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03582}03582 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03583}03583 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03584}03584 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03585}\mbox{\hyperlink{if__run_8c_a8882cb6e98f3c5c3c334ab4792039fd8}{03585}} \mbox{\hyperlink{if__run_8c_a8882cb6e98f3c5c3c334ab4792039fd8}{run\_tx\_mgt}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, \textcolor{keyword}{struct} mbuf *m, \textcolor{keyword}{struct} ieee80211\_node *ni)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03586}03586 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03587}03587         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structrun__softc_a475dfeb97bf5936fa250323fa6a1e6ae}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03588}03588         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__node}{run\_node}} *rn = \mbox{\hyperlink{if__runvar_8h_a60a610e15c59350c228a2d8f390118e3}{RUN\_NODE}}(\mbox{\hyperlink{structrun__node_a47e98d22d90417737401b60b33b779f5}{ni}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03589}03589         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__tx__data}{run\_tx\_data}} *data;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03590}03590         \textcolor{keyword}{struct }ieee80211\_frame *wh;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03591}03591         \textcolor{keyword}{struct }\mbox{\hyperlink{structrt2870__txd}{rt2870\_txd}} *txd;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03592}03592         \textcolor{keyword}{struct }\mbox{\hyperlink{structrt2860__txwi}{rt2860\_txwi}} *txwi;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03593}03593         uint16\_t dur;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03594}03594         uint8\_t ridx = rn-\/>\mbox{\hyperlink{structrun__node_af036c8bafe3f8911ec6911fc0002b04b}{mgt\_ridx}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03595}03595         uint8\_t \mbox{\hyperlink{structrt2860__txwi_ae10df0e5eb585d998073199569ccc499}{xflags}} = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03596}03596         uint8\_t wflags = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03597}03597 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03598}03598         \mbox{\hyperlink{if__runvar_8h_a46923988c8f3d1896339650dd4bf5f53}{RUN\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03599}03599 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03600}03600         wh = mtod(m, \textcolor{keyword}{struct} ieee80211\_frame *);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03601}03601 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03602}03602         \textcolor{comment}{/* tell hardware to add timestamp for probe responses */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03603}03603         \textcolor{keywordflow}{if} ((wh-\/>i\_fc[0] \&}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03604}03604             (IEEE80211\_FC0\_TYPE\_MASK | IEEE80211\_FC0\_SUBTYPE\_MASK)) ==}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03605}03605             (IEEE80211\_FC0\_TYPE\_MGT | IEEE80211\_FC0\_SUBTYPE\_PROBE\_RESP))}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03606}03606                 wflags |= \mbox{\hyperlink{if__runreg_8h_a91281711e31e89c3b4f22a16ae1a6d1c}{RT2860\_TX\_TS}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03607}03607         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (!IEEE80211\_IS\_MULTICAST(wh-\/>i\_addr1)) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03608}03608                 \mbox{\hyperlink{structrt2860__txwi_ae10df0e5eb585d998073199569ccc499}{xflags}} |= \mbox{\hyperlink{if__runreg_8h_a79e5da59c60ee158cfa9be8ed07656b1}{RT2860\_TX\_ACK}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03609}03609 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03610}03610                 dur = ieee80211\_ack\_duration(ic-\/>ic\_rt, \mbox{\hyperlink{if__run_8c_ab543147498aaf00bd04fe0a18a6c6a74}{rt2860\_rates}}[ridx].\mbox{\hyperlink{structrt2860__rate_a57d0e6f274f6fff45d5424c4ba852d21}{rate}}, }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03611}03611                     ic-\/>ic\_flags \& IEEE80211\_F\_SHPREAMBLE);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03612}03612                 \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(wh-\/>i\_dur, dur);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03613}03613         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03614}03614 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03615}03615         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_ac32a4e4f9bda8c035f10a84ae91b68eb}{sc\_epq}}[0].\mbox{\hyperlink{structrun__endpoint__queue_ad10831fe0433aa4f7a641b45bc670098}{tx\_nfree}} == 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03616}03616                 \textcolor{comment}{/* let caller free mbuf */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03617}03617                 \textcolor{keywordflow}{return} (EIO);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03618}03618         data = STAILQ\_FIRST(\&sc-\/>\mbox{\hyperlink{structrun__softc_ac32a4e4f9bda8c035f10a84ae91b68eb}{sc\_epq}}[0].\mbox{\hyperlink{structrun__endpoint__queue_a1db0efb561505e806b51e94d5ec9d9e4}{tx\_fh}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03619}03619         STAILQ\_REMOVE\_HEAD(\&sc-\/>\mbox{\hyperlink{structrun__softc_ac32a4e4f9bda8c035f10a84ae91b68eb}{sc\_epq}}[0].\mbox{\hyperlink{structrun__endpoint__queue_a1db0efb561505e806b51e94d5ec9d9e4}{tx\_fh}}, \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03620}03620         sc-\/>\mbox{\hyperlink{structrun__softc_ac32a4e4f9bda8c035f10a84ae91b68eb}{sc\_epq}}[0].\mbox{\hyperlink{structrun__endpoint__queue_ad10831fe0433aa4f7a641b45bc670098}{tx\_nfree}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03621}03621 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03622}03622         txd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structrt2870__txd}{rt2870\_txd}} *)\&data-\/>desc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03623}03623         txd-\/>\mbox{\hyperlink{structrt2870__txd_a3d90a2a6c6220003ffc4ba0780e42fcb}{flags}} = \mbox{\hyperlink{if__runreg_8h_a92ec3825fe6eb1726ad79004a3bc41c6}{RT2860\_TX\_QSEL\_EDCA}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03624}03624         txwi = (\textcolor{keyword}{struct} \mbox{\hyperlink{structrt2860__txwi}{rt2860\_txwi}} *)(txd + 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03625}03625         txwi-\/>\mbox{\hyperlink{structrt2860__txwi_a97116de0c7190fde55fd46cad1c2a2a0}{wcid}} = 0xff;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03626}03626         txwi-\/>\mbox{\hyperlink{structrt2860__txwi_ad5c74efeb2ba118b395a75aa25423276}{flags}} = wflags;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03627}03627         txwi-\/>\mbox{\hyperlink{structrt2860__txwi_ae10df0e5eb585d998073199569ccc499}{xflags}} = xflags;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03628}03628         txwi-\/>\mbox{\hyperlink{structrt2860__txwi_afabdd4cc8b6c14bc5b1823ec5145b910}{txop}} = 0;     \textcolor{comment}{/* clear leftover garbage bits */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03629}03629 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03630}03630         data-\/>m = m;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03631}03631         data-\/>ni = ni;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03632}03632         data-\/>ridx = ridx;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03633}03633 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03634}03634         \mbox{\hyperlink{if__run_8c_ade3e6fd8ad25e51c5ba7ccfd8710659e}{run\_set\_tx\_desc}}(sc, data);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03635}03635 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03636}03636         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_XMIT, \textcolor{stringliteral}{"{}sending mgt frame len=\%d rate=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03637}03637             m-\/>m\_pkthdr.len + (\textcolor{keywordtype}{int})(\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrt2870__txd}{rt2870\_txd}}) +}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03638}03638             \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrt2860__txwi}{rt2860\_txwi}})), \mbox{\hyperlink{if__run_8c_ab543147498aaf00bd04fe0a18a6c6a74}{rt2860\_rates}}[ridx].\mbox{\hyperlink{structrt2860__rate_a57d0e6f274f6fff45d5424c4ba852d21}{rate}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03639}03639 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03640}03640         STAILQ\_INSERT\_TAIL(\&sc-\/>\mbox{\hyperlink{structrun__softc_ac32a4e4f9bda8c035f10a84ae91b68eb}{sc\_epq}}[0].\mbox{\hyperlink{structrun__endpoint__queue_a653ce1228c9cf40b5c3540a174da8043}{tx\_qh}}, data, \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03641}03641 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03642}03642         \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structrun__softc_a8522ea9d5483b98283b7629e41c31eac}{sc\_xfer}}[0]);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03643}03643 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03644}03644         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03645}03645 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03646}03646 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03647}03647 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03648}\mbox{\hyperlink{if__run_8c_ab60dfbf6c5be456a48a956b10b9947e9}{03648}} \mbox{\hyperlink{if__run_8c_ab60dfbf6c5be456a48a956b10b9947e9}{run\_sendprot}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03649}03649     \textcolor{keyword}{const} \textcolor{keyword}{struct} mbuf *m, \textcolor{keyword}{struct} ieee80211\_node *ni, \textcolor{keywordtype}{int} prot, \textcolor{keywordtype}{int} rate)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03650}03650 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03651}03651         \textcolor{keyword}{struct }ieee80211com *ic = ni-\/>ni\_ic;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03652}03652         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__tx__data}{run\_tx\_data}} *data;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03653}03653         \textcolor{keyword}{struct }\mbox{\hyperlink{structrt2870__txd}{rt2870\_txd}} *txd;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03654}03654         \textcolor{keyword}{struct }\mbox{\hyperlink{structrt2860__txwi}{rt2860\_txwi}} *txwi;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03655}03655         \textcolor{keyword}{struct }mbuf *mprot;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03656}03656         \textcolor{keywordtype}{int} ridx;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03657}03657         \textcolor{keywordtype}{int} protrate;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03658}03658         uint8\_t wflags = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03659}03659         uint8\_t xflags = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03660}03660 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03661}03661         \mbox{\hyperlink{if__runvar_8h_a46923988c8f3d1896339650dd4bf5f53}{RUN\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03662}03662 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03663}03663         \textcolor{comment}{/* check that there are free slots before allocating the mbuf */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03664}03664         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_ac32a4e4f9bda8c035f10a84ae91b68eb}{sc\_epq}}[0].\mbox{\hyperlink{structrun__endpoint__queue_ad10831fe0433aa4f7a641b45bc670098}{tx\_nfree}} == 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03665}03665                 \textcolor{comment}{/* let caller free mbuf */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03666}03666                 \textcolor{keywordflow}{return} (ENOBUFS);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03667}03667 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03668}03668         mprot = ieee80211\_alloc\_prot(ni, m, rate, prot);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03669}03669         \textcolor{keywordflow}{if} (mprot == NULL) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03670}03670                 if\_inc\_counter(ni-\/>ni\_vap-\/>iv\_ifp, IFCOUNTER\_OERRORS, 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03671}03671                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_XMIT, \textcolor{stringliteral}{"{}could not allocate mbuf\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03672}03672                 \textcolor{keywordflow}{return} (ENOBUFS);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03673}03673         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03674}03674 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03675}03675         protrate = ieee80211\_ctl\_rate(ic-\/>ic\_rt, rate);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03676}03676         wflags = \mbox{\hyperlink{if__runreg_8h_a8c38bd75931c12a991165acaba6e1447}{RT2860\_TX\_FRAG}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03677}03677         xflags = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03678}03678         \textcolor{keywordflow}{if} (prot == IEEE80211\_PROT\_RTSCTS)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03679}03679                 xflags |= \mbox{\hyperlink{if__runreg_8h_a79e5da59c60ee158cfa9be8ed07656b1}{RT2860\_TX\_ACK}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03680}03680 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03681}03681         data = STAILQ\_FIRST(\&sc-\/>\mbox{\hyperlink{structrun__softc_ac32a4e4f9bda8c035f10a84ae91b68eb}{sc\_epq}}[0].\mbox{\hyperlink{structrun__endpoint__queue_a1db0efb561505e806b51e94d5ec9d9e4}{tx\_fh}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03682}03682         STAILQ\_REMOVE\_HEAD(\&sc-\/>\mbox{\hyperlink{structrun__softc_ac32a4e4f9bda8c035f10a84ae91b68eb}{sc\_epq}}[0].\mbox{\hyperlink{structrun__endpoint__queue_a1db0efb561505e806b51e94d5ec9d9e4}{tx\_fh}}, \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03683}03683         sc-\/>\mbox{\hyperlink{structrun__softc_ac32a4e4f9bda8c035f10a84ae91b68eb}{sc\_epq}}[0].\mbox{\hyperlink{structrun__endpoint__queue_ad10831fe0433aa4f7a641b45bc670098}{tx\_nfree}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03684}03684 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03685}03685         txd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structrt2870__txd}{rt2870\_txd}} *)\&data-\/>desc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03686}03686         txd-\/>\mbox{\hyperlink{structrt2870__txd_a3d90a2a6c6220003ffc4ba0780e42fcb}{flags}} = \mbox{\hyperlink{if__runreg_8h_a92ec3825fe6eb1726ad79004a3bc41c6}{RT2860\_TX\_QSEL\_EDCA}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03687}03687         txwi = (\textcolor{keyword}{struct} \mbox{\hyperlink{structrt2860__txwi}{rt2860\_txwi}} *)(txd + 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03688}03688         txwi-\/>\mbox{\hyperlink{structrt2860__txwi_a97116de0c7190fde55fd46cad1c2a2a0}{wcid}} = 0xff;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03689}03689         txwi-\/>\mbox{\hyperlink{structrt2860__txwi_ad5c74efeb2ba118b395a75aa25423276}{flags}} = wflags;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03690}03690         txwi-\/>\mbox{\hyperlink{structrt2860__txwi_ae10df0e5eb585d998073199569ccc499}{xflags}} = xflags;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03691}03691         txwi-\/>\mbox{\hyperlink{structrt2860__txwi_afabdd4cc8b6c14bc5b1823ec5145b910}{txop}} = 0;     \textcolor{comment}{/* clear leftover garbage bits */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03692}03692 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03693}03693         data-\/>m = mprot;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03694}03694         data-\/>ni = ieee80211\_ref\_node(ni);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03695}03695 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03696}03696         \textcolor{comment}{/* XXX TODO: methodize with MCS rates */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03697}03697         \textcolor{keywordflow}{for} (ridx = 0; ridx < \mbox{\hyperlink{if__run_8c_a6dd9f14db793abbf67fd4417b35108f9}{RT2860\_RIDX\_MAX}}; ridx++)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03698}03698                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_ab543147498aaf00bd04fe0a18a6c6a74}{rt2860\_rates}}[ridx].rate == protrate)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03699}03699                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03700}03700         data-\/>ridx = ridx;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03701}03701 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03702}03702         \mbox{\hyperlink{if__run_8c_ade3e6fd8ad25e51c5ba7ccfd8710659e}{run\_set\_tx\_desc}}(sc, data);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03703}03703 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03704}03704         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_XMIT, \textcolor{stringliteral}{"{}sending prot len=\%u rate=\%u\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03705}03705             m-\/>m\_pkthdr.len, rate);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03706}03706 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03707}03707         STAILQ\_INSERT\_TAIL(\&sc-\/>\mbox{\hyperlink{structrun__softc_ac32a4e4f9bda8c035f10a84ae91b68eb}{sc\_epq}}[0].\mbox{\hyperlink{structrun__endpoint__queue_a653ce1228c9cf40b5c3540a174da8043}{tx\_qh}}, data, \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03708}03708 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03709}03709         \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structrun__softc_a8522ea9d5483b98283b7629e41c31eac}{sc\_xfer}}[0]);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03710}03710 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03711}03711         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03712}03712 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03713}03713 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03714}03714 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03715}\mbox{\hyperlink{if__run_8c_a5de455b0ca5ef596124d541fc46c9f0e}{03715}} \mbox{\hyperlink{if__run_8c_a5de455b0ca5ef596124d541fc46c9f0e}{run\_tx\_param}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, \textcolor{keyword}{struct} mbuf *m, \textcolor{keyword}{struct} ieee80211\_node *ni,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03716}03716     \textcolor{keyword}{const} \textcolor{keyword}{struct} ieee80211\_bpf\_params *params)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03717}03717 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03718}03718         \textcolor{keyword}{struct }ieee80211com *ic = ni-\/>ni\_ic;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03719}03719         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__tx__data}{run\_tx\_data}} *data;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03720}03720         \textcolor{keyword}{struct }\mbox{\hyperlink{structrt2870__txd}{rt2870\_txd}} *txd;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03721}03721         \textcolor{keyword}{struct }\mbox{\hyperlink{structrt2860__txwi}{rt2860\_txwi}} *txwi;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03722}03722         uint8\_t ridx;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03723}03723         uint8\_t rate;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03724}03724         uint8\_t opflags = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03725}03725         uint8\_t \mbox{\hyperlink{structrt2860__txwi_ae10df0e5eb585d998073199569ccc499}{xflags}} = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03726}03726         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03727}03727 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03728}03728         \mbox{\hyperlink{if__runvar_8h_a46923988c8f3d1896339650dd4bf5f53}{RUN\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03729}03729 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03730}03730         KASSERT(params != NULL, (\textcolor{stringliteral}{"{}no raw xmit params"{}}));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03731}03731 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03732}03732         rate = params-\/>ibp\_rate0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03733}03733         \textcolor{keywordflow}{if} (!ieee80211\_isratevalid(ic-\/>ic\_rt, rate)) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03734}03734                 \textcolor{comment}{/* let caller free mbuf */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03735}03735                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03736}03736         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03737}03737 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03738}03738         \textcolor{keywordflow}{if} ((params-\/>ibp\_flags \& IEEE80211\_BPF\_NOACK) == 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03739}03739                 \mbox{\hyperlink{structrt2860__txwi_ae10df0e5eb585d998073199569ccc499}{xflags}} |= \mbox{\hyperlink{if__runreg_8h_a79e5da59c60ee158cfa9be8ed07656b1}{RT2860\_TX\_ACK}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03740}03740         \textcolor{keywordflow}{if} (params-\/>ibp\_flags \& (IEEE80211\_BPF\_RTS|IEEE80211\_BPF\_CTS)) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03741}03741                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__run_8c_ab60dfbf6c5be456a48a956b10b9947e9}{run\_sendprot}}(sc, m, ni,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03742}03742                     params-\/>ibp\_flags \& IEEE80211\_BPF\_RTS ?}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03743}03743                         IEEE80211\_PROT\_RTSCTS : IEEE80211\_PROT\_CTSONLY,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03744}03744                     rate);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03745}03745                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03746}03746                         \textcolor{comment}{/* let caller free mbuf */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03747}03747                         \textcolor{keywordflow}{return} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03748}03748                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03749}03749                 opflags |= \textcolor{comment}{/*XXX RT2573\_TX\_LONG\_RETRY |*/} \mbox{\hyperlink{if__runreg_8h_affa4ac65188c2ce75a2c8b8db42b22f9}{RT2860\_TX\_TXOP\_SIFS}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03750}03750         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03751}03751 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03752}03752         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_ac32a4e4f9bda8c035f10a84ae91b68eb}{sc\_epq}}[0].\mbox{\hyperlink{structrun__endpoint__queue_ad10831fe0433aa4f7a641b45bc670098}{tx\_nfree}} == 0) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03753}03753                 \textcolor{comment}{/* let caller free mbuf */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03754}03754                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_XMIT,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03755}03755                     \textcolor{stringliteral}{"{}sending raw frame, but tx ring is full\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03756}03756                 \textcolor{keywordflow}{return} (EIO);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03757}03757         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03758}03758         data = STAILQ\_FIRST(\&sc-\/>\mbox{\hyperlink{structrun__softc_ac32a4e4f9bda8c035f10a84ae91b68eb}{sc\_epq}}[0].\mbox{\hyperlink{structrun__endpoint__queue_a1db0efb561505e806b51e94d5ec9d9e4}{tx\_fh}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03759}03759         STAILQ\_REMOVE\_HEAD(\&sc-\/>\mbox{\hyperlink{structrun__softc_ac32a4e4f9bda8c035f10a84ae91b68eb}{sc\_epq}}[0].\mbox{\hyperlink{structrun__endpoint__queue_a1db0efb561505e806b51e94d5ec9d9e4}{tx\_fh}}, \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03760}03760         sc-\/>\mbox{\hyperlink{structrun__softc_ac32a4e4f9bda8c035f10a84ae91b68eb}{sc\_epq}}[0].\mbox{\hyperlink{structrun__endpoint__queue_ad10831fe0433aa4f7a641b45bc670098}{tx\_nfree}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03761}03761 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03762}03762         txd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structrt2870__txd}{rt2870\_txd}} *)\&data-\/>desc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03763}03763         txd-\/>\mbox{\hyperlink{structrt2870__txd_a3d90a2a6c6220003ffc4ba0780e42fcb}{flags}} = \mbox{\hyperlink{if__runreg_8h_a92ec3825fe6eb1726ad79004a3bc41c6}{RT2860\_TX\_QSEL\_EDCA}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03764}03764         txwi = (\textcolor{keyword}{struct} \mbox{\hyperlink{structrt2860__txwi}{rt2860\_txwi}} *)(txd + 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03765}03765         txwi-\/>\mbox{\hyperlink{structrt2860__txwi_a97116de0c7190fde55fd46cad1c2a2a0}{wcid}} = 0xff;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03766}03766         txwi-\/>\mbox{\hyperlink{structrt2860__txwi_ae10df0e5eb585d998073199569ccc499}{xflags}} = xflags;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03767}03767         txwi-\/>\mbox{\hyperlink{structrt2860__txwi_afabdd4cc8b6c14bc5b1823ec5145b910}{txop}} = opflags;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03768}03768         txwi-\/>\mbox{\hyperlink{structrt2860__txwi_ad5c74efeb2ba118b395a75aa25423276}{flags}} = 0;   \textcolor{comment}{/* clear leftover garbage bits */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03769}03769 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03770}03770         data-\/>m = m;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03771}03771         data-\/>ni = ni;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03772}03772         \textcolor{comment}{/* XXX TODO: methodize with MCS rates */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03773}03773         \textcolor{keywordflow}{for} (ridx = 0; ridx < \mbox{\hyperlink{if__run_8c_a6dd9f14db793abbf67fd4417b35108f9}{RT2860\_RIDX\_MAX}}; ridx++)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03774}03774                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_ab543147498aaf00bd04fe0a18a6c6a74}{rt2860\_rates}}[ridx].rate == rate)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03775}03775                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03776}03776         data-\/>ridx = ridx;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03777}03777 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03778}03778         \mbox{\hyperlink{if__run_8c_ade3e6fd8ad25e51c5ba7ccfd8710659e}{run\_set\_tx\_desc}}(sc, data);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03779}03779 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03780}03780         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_XMIT, \textcolor{stringliteral}{"{}sending raw frame len=\%u rate=\%u\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03781}03781             m-\/>m\_pkthdr.len, rate);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03782}03782 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03783}03783         STAILQ\_INSERT\_TAIL(\&sc-\/>\mbox{\hyperlink{structrun__softc_ac32a4e4f9bda8c035f10a84ae91b68eb}{sc\_epq}}[0].\mbox{\hyperlink{structrun__endpoint__queue_a653ce1228c9cf40b5c3540a174da8043}{tx\_qh}}, data, \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03784}03784 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03785}03785         \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structrun__softc_a8522ea9d5483b98283b7629e41c31eac}{sc\_xfer}}[0]);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03786}03786 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03787}03787         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03788}03788 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03789}03789 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03790}03790 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03791}\mbox{\hyperlink{if__run_8c_a14b65c9fea714353ef4afcb368fd439a}{03791}} \mbox{\hyperlink{if__run_8c_a14b65c9fea714353ef4afcb368fd439a}{run\_raw\_xmit}}(\textcolor{keyword}{struct} ieee80211\_node *ni, \textcolor{keyword}{struct} mbuf *m,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03792}03792     \textcolor{keyword}{const} \textcolor{keyword}{struct} ieee80211\_bpf\_params *params)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03793}03793 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03794}03794         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *sc = ni-\/>ni\_ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03795}03795         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03796}03796 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03797}03797         \mbox{\hyperlink{if__runvar_8h_afb83ba5b9cfa86e30eb1e74fe2267cea}{RUN\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03798}03798 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03799}03799         \textcolor{comment}{/* prevent management frames from being sent if we're not ready */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03800}03800         \textcolor{keywordflow}{if} (!(sc-\/>\mbox{\hyperlink{structrun__softc_ae1260c15661b04d2cc04867c70e3df41}{sc\_flags}} \& \mbox{\hyperlink{if__runvar_8h_a4d0bc8a7e4cf8003139e1ee4d3d6930e}{RUN\_RUNNING}})) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03801}03801                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = ENETDOWN;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03802}03802                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03803}03803         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03804}03804 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03805}03805         \textcolor{keywordflow}{if} (params == NULL) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03806}03806                 \textcolor{comment}{/* tx mgt packet */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03807}03807                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__run_8c_a8882cb6e98f3c5c3c334ab4792039fd8}{run\_tx\_mgt}}(sc, m, ni)) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03808}03808                         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_XMIT, \textcolor{stringliteral}{"{}mgt tx failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03809}03809                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03810}03810                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03811}03811         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03812}03812                 \textcolor{comment}{/* tx raw packet with param */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03813}03813                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__run_8c_a5de455b0ca5ef596124d541fc46c9f0e}{run\_tx\_param}}(sc, m, ni, params)) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03814}03814                         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_XMIT, \textcolor{stringliteral}{"{}tx with param failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03815}03815                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03816}03816                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03817}03817         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03818}03818 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03819}03819 done:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03820}03820         \mbox{\hyperlink{if__runvar_8h_a45d3b538b97178f8fe93284ed57e2cd5}{RUN\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03821}03821 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03822}03822         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != 0) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03823}03823                 \textcolor{keywordflow}{if}(m != NULL)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03824}03824                         m\_freem(m);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03825}03825         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03826}03826 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03827}03827         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03828}03828 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03829}03829 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03830}03830 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03831}\mbox{\hyperlink{if__run_8c_a8f7a93a2fb57b9f408f7a5766257e79c}{03831}} \mbox{\hyperlink{if__run_8c_a8f7a93a2fb57b9f408f7a5766257e79c}{run\_transmit}}(\textcolor{keyword}{struct} ieee80211com *ic, \textcolor{keyword}{struct} mbuf *m)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03832}03832 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03833}03833         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03834}03834         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03835}03835 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03836}03836         \mbox{\hyperlink{if__runvar_8h_afb83ba5b9cfa86e30eb1e74fe2267cea}{RUN\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03837}03837         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structrun__softc_ae1260c15661b04d2cc04867c70e3df41}{sc\_flags}} \& \mbox{\hyperlink{if__runvar_8h_a4d0bc8a7e4cf8003139e1ee4d3d6930e}{RUN\_RUNNING}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03838}03838                 \mbox{\hyperlink{if__runvar_8h_a45d3b538b97178f8fe93284ed57e2cd5}{RUN\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03839}03839                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03840}03840         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03841}03841         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = mbufq\_enqueue(\&sc-\/>\mbox{\hyperlink{structrun__softc_a338a1523731bc34512da29b789fc18dc}{sc\_snd}}, m);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03842}03842         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03843}03843                 \mbox{\hyperlink{if__runvar_8h_a45d3b538b97178f8fe93284ed57e2cd5}{RUN\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03844}03844                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03845}03845         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03846}03846         \mbox{\hyperlink{if__run_8c_a3796fad2a883e74f7f5f4a1cb3b7ef6d}{run\_start}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03847}03847         \mbox{\hyperlink{if__runvar_8h_a45d3b538b97178f8fe93284ed57e2cd5}{RUN\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03848}03848 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03849}03849         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03850}03850 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03851}03851 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03852}03852 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03853}\mbox{\hyperlink{if__run_8c_a3796fad2a883e74f7f5f4a1cb3b7ef6d}{03853}} \mbox{\hyperlink{if__run_8c_a3796fad2a883e74f7f5f4a1cb3b7ef6d}{run\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03854}03854 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03855}03855         \textcolor{keyword}{struct }ieee80211\_node *ni;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03856}03856         \textcolor{keyword}{struct }mbuf *m;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03857}03857 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03858}03858         \mbox{\hyperlink{if__runvar_8h_a46923988c8f3d1896339650dd4bf5f53}{RUN\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03859}03859 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03860}03860         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structrun__softc_ae1260c15661b04d2cc04867c70e3df41}{sc\_flags}} \& \mbox{\hyperlink{if__runvar_8h_a4d0bc8a7e4cf8003139e1ee4d3d6930e}{RUN\_RUNNING}}) == 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03861}03861                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03862}03862 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03863}03863         \textcolor{keywordflow}{while} ((m = mbufq\_dequeue(\&sc-\/>\mbox{\hyperlink{structrun__softc_a338a1523731bc34512da29b789fc18dc}{sc\_snd}})) != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03864}03864                 ni = (\textcolor{keyword}{struct }ieee80211\_node *)m-\/>m\_pkthdr.rcvif;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03865}03865                 if (\mbox{\hyperlink{if__run_8c_ac7493d1363b4737f63c1181104f46bf8}{run\_tx}}(sc, m, ni) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03866}03866                         mbufq\_prepend(\&sc-\/>\mbox{\hyperlink{structrun__softc_a338a1523731bc34512da29b789fc18dc}{sc\_snd}}, m);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03867}03867                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03868}03868                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03869}03869         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03870}03870 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03871}03871 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03872}03872 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03873}\mbox{\hyperlink{if__run_8c_acabc0677be5e1d636515af3261d400ed}{03873}} \mbox{\hyperlink{if__run_8c_acabc0677be5e1d636515af3261d400ed}{run\_parent}}(\textcolor{keyword}{struct} ieee80211com *ic)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03874}03874 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03875}03875         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03876}03876         \textcolor{keywordtype}{int} startall = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03877}03877 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03878}03878         \mbox{\hyperlink{if__runvar_8h_afb83ba5b9cfa86e30eb1e74fe2267cea}{RUN\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03879}03879         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a6a25bd6228c91c902fefbc1f49a01f97}{sc\_detached}}) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03880}03880                 \mbox{\hyperlink{if__runvar_8h_a45d3b538b97178f8fe93284ed57e2cd5}{RUN\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03881}03881                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03882}03882         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03883}03883 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03884}03884         \textcolor{keywordflow}{if} (ic-\/>ic\_nrunning > 0) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03885}03885                 \textcolor{keywordflow}{if} (!(sc-\/>\mbox{\hyperlink{structrun__softc_ae1260c15661b04d2cc04867c70e3df41}{sc\_flags}} \& \mbox{\hyperlink{if__runvar_8h_a4d0bc8a7e4cf8003139e1ee4d3d6930e}{RUN\_RUNNING}})) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03886}03886                         startall = 1;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03887}03887                         \mbox{\hyperlink{if__run_8c_a11a486139db80fe5b329e49a70faaed0}{run\_init\_locked}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03888}03888                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03889}03889                         \mbox{\hyperlink{if__run_8c_aff14172871a208dbc4da28b9479709c9}{run\_update\_promisc\_locked}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03890}03890         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structrun__softc_ae1260c15661b04d2cc04867c70e3df41}{sc\_flags}} \& \mbox{\hyperlink{if__runvar_8h_a4d0bc8a7e4cf8003139e1ee4d3d6930e}{RUN\_RUNNING}}) \&\& sc-\/>\mbox{\hyperlink{structrun__softc_ac8eca37dc53b73408f99d028e07fea66}{rvp\_cnt}} <= 1)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03891}03891                 \mbox{\hyperlink{if__run_8c_a70abcd6419cad126379ea12f8aac4bce}{run\_stop}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03892}03892         \mbox{\hyperlink{if__runvar_8h_a45d3b538b97178f8fe93284ed57e2cd5}{RUN\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03893}03893         \textcolor{keywordflow}{if} (startall)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03894}03894                 ieee80211\_start\_all(ic);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03895}03895 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03896}03896 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03897}03897 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03898}\mbox{\hyperlink{if__run_8c_a2689dd01ea1f8d7c4a19861a285732a4}{03898}} \mbox{\hyperlink{if__run_8c_a2689dd01ea1f8d7c4a19861a285732a4}{run\_iq\_calib}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, u\_int \mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03899}03899 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03900}03900         uint16\_t \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03901}03901 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03902}03902         \textcolor{comment}{/* Tx0 IQ gain. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03903}03903         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 158, 0x2c);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03904}03904         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03905}03905                 \mbox{\hyperlink{if__run_8c_a9c64940d705ae76b070ec09042a17a32}{run\_efuse\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a7844a897234f72bfe13c7cd0edb9f198}{RT5390\_EEPROM\_IQ\_GAIN\_CAL\_TX0\_2GHZ}}, \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03906}03906         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 64) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03907}03907                 \mbox{\hyperlink{if__run_8c_a9c64940d705ae76b070ec09042a17a32}{run\_efuse\_read}}(sc,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03908}03908                     \mbox{\hyperlink{if__runreg_8h_a89fe594eedb4340857e4243661865705}{RT5390\_EEPROM\_IQ\_GAIN\_CAL\_TX0\_CH36\_TO\_CH64\_5GHZ}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03909}03909                     \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03910}03910         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 138) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03911}03911                 \mbox{\hyperlink{if__run_8c_a9c64940d705ae76b070ec09042a17a32}{run\_efuse\_read}}(sc,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03912}03912                     \mbox{\hyperlink{if__runreg_8h_a1f7f8d7281006610afe3e5e06e04d66c}{RT5390\_EEPROM\_IQ\_GAIN\_CAL\_TX0\_CH100\_TO\_CH138\_5GHZ}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03913}03913                     \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03914}03914         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 165) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03915}03915                 \mbox{\hyperlink{if__run_8c_a9c64940d705ae76b070ec09042a17a32}{run\_efuse\_read}}(sc,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03916}03916             \mbox{\hyperlink{if__runreg_8h_a60bf96292cfd4ebfce2975673bccd99c}{RT5390\_EEPROM\_IQ\_GAIN\_CAL\_TX0\_CH140\_TO\_CH165\_5GHZ}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03917}03917                     \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03918}03918         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03919}03919                 \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03920}03920         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 159, \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03921}03921 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03922}03922         \textcolor{comment}{/* Tx0 IQ phase. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03923}03923         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 158, 0x2d);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03924}03924         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03925}03925                 \mbox{\hyperlink{if__run_8c_a9c64940d705ae76b070ec09042a17a32}{run\_efuse\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a4e9441f352dd8aa9adc0ea8113647734}{RT5390\_EEPROM\_IQ\_PHASE\_CAL\_TX0\_2GHZ}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03926}03926                     \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03927}03927         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 64) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03928}03928                 \mbox{\hyperlink{if__run_8c_a9c64940d705ae76b070ec09042a17a32}{run\_efuse\_read}}(sc,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03929}03929                     \mbox{\hyperlink{if__runreg_8h_af691bb8cc26424336d1b124039479261}{RT5390\_EEPROM\_IQ\_PHASE\_CAL\_TX0\_CH36\_TO\_CH64\_5GHZ}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03930}03930                     \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03931}03931         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 138) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03932}03932                 \mbox{\hyperlink{if__run_8c_a9c64940d705ae76b070ec09042a17a32}{run\_efuse\_read}}(sc,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03933}03933                     \mbox{\hyperlink{if__runreg_8h_a0b324c7a9e4528987893d1c537f8941b}{RT5390\_EEPROM\_IQ\_PHASE\_CAL\_TX0\_CH100\_TO\_CH138\_5GHZ}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03934}03934                     \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03935}03935         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 165) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03936}03936                 \mbox{\hyperlink{if__run_8c_a9c64940d705ae76b070ec09042a17a32}{run\_efuse\_read}}(sc,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03937}03937                     \mbox{\hyperlink{if__runreg_8h_adf53918fc5072cb33b21e5b0305589f6}{RT5390\_EEPROM\_IQ\_PHASE\_CAL\_TX0\_CH140\_TO\_CH165\_5GHZ}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03938}03938                     \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03939}03939         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03940}03940                 \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03941}03941         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 159, \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03942}03942 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03943}03943         \textcolor{comment}{/* Tx1 IQ gain. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03944}03944         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 158, 0x4a);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03945}03945         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03946}03946                 \mbox{\hyperlink{if__run_8c_a9c64940d705ae76b070ec09042a17a32}{run\_efuse\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a037585200a0f7dc328c7ac143a8e2871}{RT5390\_EEPROM\_IQ\_GAIN\_CAL\_TX1\_2GHZ}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03947}03947                     \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03948}03948         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 64) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03949}03949                 \mbox{\hyperlink{if__run_8c_a9c64940d705ae76b070ec09042a17a32}{run\_efuse\_read}}(sc,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03950}03950                     \mbox{\hyperlink{if__runreg_8h_a83cd13837557fe65ac91422638761b55}{RT5390\_EEPROM\_IQ\_GAIN\_CAL\_TX1\_CH36\_TO\_CH64\_5GHZ}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03951}03951                     \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03952}03952         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 138) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03953}03953                 \mbox{\hyperlink{if__run_8c_a9c64940d705ae76b070ec09042a17a32}{run\_efuse\_read}}(sc,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03954}03954                     \mbox{\hyperlink{if__runreg_8h_a04c52d551aaf1154657f55eeefab1f36}{RT5390\_EEPROM\_IQ\_GAIN\_CAL\_TX1\_CH100\_TO\_CH138\_5GHZ}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03955}03955                     \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03956}03956         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 165) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03957}03957                 \mbox{\hyperlink{if__run_8c_a9c64940d705ae76b070ec09042a17a32}{run\_efuse\_read}}(sc,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03958}03958                     \mbox{\hyperlink{if__runreg_8h_ab95bb39d2de394fc6f3951850bfd0a0f}{RT5390\_EEPROM\_IQ\_GAIN\_CAL\_TX1\_CH140\_TO\_CH165\_5GHZ}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03959}03959                     \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03960}03960         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03961}03961                 \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03962}03962         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 159, \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03963}03963 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03964}03964         \textcolor{comment}{/* Tx1 IQ phase. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03965}03965         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 158, 0x4b);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03966}03966         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03967}03967                 \mbox{\hyperlink{if__run_8c_a9c64940d705ae76b070ec09042a17a32}{run\_efuse\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a869abf8640f94ad20d601a276a0380d9}{RT5390\_EEPROM\_IQ\_PHASE\_CAL\_TX1\_2GHZ}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03968}03968                     \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03969}03969         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 64) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03970}03970                 \mbox{\hyperlink{if__run_8c_a9c64940d705ae76b070ec09042a17a32}{run\_efuse\_read}}(sc,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03971}03971                     \mbox{\hyperlink{if__runreg_8h_a458881fb7c397e6e5fd7f558a024e244}{RT5390\_EEPROM\_IQ\_PHASE\_CAL\_TX1\_CH36\_TO\_CH64\_5GHZ}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03972}03972                     \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03973}03973         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 138) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03974}03974                 \mbox{\hyperlink{if__run_8c_a9c64940d705ae76b070ec09042a17a32}{run\_efuse\_read}}(sc,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03975}03975                     \mbox{\hyperlink{if__runreg_8h_ab2f8d08bbf457e4907b84a2cd5c5ccda}{RT5390\_EEPROM\_IQ\_PHASE\_CAL\_TX1\_CH100\_TO\_CH138\_5GHZ}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03976}03976                     \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03977}03977         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 165) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03978}03978                 \mbox{\hyperlink{if__run_8c_a9c64940d705ae76b070ec09042a17a32}{run\_efuse\_read}}(sc,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03979}03979                     \mbox{\hyperlink{if__runreg_8h_adfa9604f5644997f716c26bb937c227b}{RT5390\_EEPROM\_IQ\_PHASE\_CAL\_TX1\_CH140\_TO\_CH165\_5GHZ}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03980}03980                     \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03981}03981         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03982}03982                 \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03983}03983         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 159, \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03984}03984 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03985}03985         \textcolor{comment}{/* RF IQ compensation control. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03986}03986         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 158, 0x04);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03987}03987         \mbox{\hyperlink{if__run_8c_a9c64940d705ae76b070ec09042a17a32}{run\_efuse\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_ada63bd71421b21c49ce5ad80a439d3e2}{RT5390\_EEPROM\_RF\_IQ\_COMPENSATION\_CTL}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03988}03988             \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03989}03989         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 159, \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03990}03990 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03991}03991         \textcolor{comment}{/* RF IQ imbalance compensation control. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03992}03992         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 158, 0x03);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03993}03993         \mbox{\hyperlink{if__run_8c_a9c64940d705ae76b070ec09042a17a32}{run\_efuse\_read}}(sc,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03994}03994             \mbox{\hyperlink{if__runreg_8h_a090ee1a0d90c031e481b6830ebefc2f8}{RT5390\_EEPROM\_RF\_IQ\_IMBALANCE\_COMPENSATION\_CTL}}, \&\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03995}03995         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 159, \mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03996}03996 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03997}03997 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03998}03998 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l03999}\mbox{\hyperlink{if__run_8c_afc43e0d31008e8039dd33dd43ca6c6ab}{03999}} \mbox{\hyperlink{if__run_8c_afc43e0d31008e8039dd33dd43ca6c6ab}{run\_set\_agc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, uint8\_t agc)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04000}04000 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04001}04001         uint8\_t \mbox{\hyperlink{structrun__softc_adc6b518a9c057be70517be3287dfaa14}{bbp}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04002}04002 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04003}04003         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3572) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04004}04004                 \mbox{\hyperlink{if__run_8c_abc20e1ae73e45e6ffade8618697f6b8a}{run\_bbp\_read}}(sc, 27, \&\mbox{\hyperlink{structrun__softc_adc6b518a9c057be70517be3287dfaa14}{bbp}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04005}04005                 \mbox{\hyperlink{structrun__softc_adc6b518a9c057be70517be3287dfaa14}{bbp}} \&= \string~(0x3 << 5);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04006}04006                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 27, \mbox{\hyperlink{structrun__softc_adc6b518a9c057be70517be3287dfaa14}{bbp}} | 0 << 5);    \textcolor{comment}{/* select Rx0 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04007}04007                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 66, agc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04008}04008                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 27, \mbox{\hyperlink{structrun__softc_adc6b518a9c057be70517be3287dfaa14}{bbp}} | 1 << 5);    \textcolor{comment}{/* select Rx1 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04009}04009                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 66, agc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04010}04010         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04011}04011                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 66, agc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04012}04012 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04013}04013 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04014}04014 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04015}\mbox{\hyperlink{if__run_8c_acfca3112a6a8420399bce9ac5f2cfa24}{04015}} \mbox{\hyperlink{if__run_8c_acfca3112a6a8420399bce9ac5f2cfa24}{run\_select\_chan\_group}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, \textcolor{keywordtype}{int} group)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04016}04016 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04017}04017         uint32\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04018}04018         uint8\_t agc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04019}04019 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04020}04020         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 62, 0x37 -\/ sc-\/>\mbox{\hyperlink{structrun__softc_ab87cb627c86925dc5c5331c6de3b1536}{lna}}[group]);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04021}04021         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 63, 0x37 -\/ sc-\/>\mbox{\hyperlink{structrun__softc_ab87cb627c86925dc5c5331c6de3b1536}{lna}}[group]);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04022}04022         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 64, 0x37 -\/ sc-\/>\mbox{\hyperlink{structrun__softc_ab87cb627c86925dc5c5331c6de3b1536}{lna}}[group]);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04023}04023         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} < 0x3572)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04024}04024                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 86, 0x00);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04025}04025 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04026}04026         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3593) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04027}04027                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 77, 0x98);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04028}04028                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 83, (group == 0) ? 0x8a : 0x9a);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04029}04029         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04030}04030 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04031}04031         \textcolor{keywordflow}{if} (group == 0) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04032}04032                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a8d5b36cf0df34a66df73a332d405da0a}{ext\_2ghz\_lna}}) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04033}04033                         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} >= 0x5390)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04034}04034                                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 75, 0x52);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04035}04035                         \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04036}04036                                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 82, 0x62);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04037}04037                                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 75, 0x46);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04038}04038                         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04039}04039                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04040}04040                         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x5592) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04041}04041                                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 79, 0x1c);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04042}04042                                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 80, 0x0e);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04043}04043                                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 81, 0x3a);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04044}04044                                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 82, 0x62);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04045}04045 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04046}04046                                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 195, 0x80);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04047}04047                                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 196, 0xe0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04048}04048                                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 195, 0x81);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04049}04049                                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 196, 0x1f);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04050}04050                                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 195, 0x82);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04051}04051                                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 196, 0x38);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04052}04052                                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 195, 0x83);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04053}04053                                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 196, 0x32);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04054}04054                                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 195, 0x85);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04055}04055                                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 196, 0x28);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04056}04056                                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 195, 0x86);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04057}04057                                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 196, 0x19);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04058}04058                         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} >= 0x5390)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04059}04059                                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 75, 0x50);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04060}04060                         \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04061}04061                                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 82,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04062}04062                                     (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3593) ? 0x62 : 0x84);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04063}04063                                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 75, 0x50);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04064}04064                         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04065}04065                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04066}04066         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04067}04067                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x5592) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04068}04068                         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 79, 0x18);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04069}04069                         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 80, 0x08);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04070}04070                         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 81, 0x38);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04071}04071                         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 82, 0x92);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04072}04072 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04073}04073                         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 195, 0x80);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04074}04074                         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 196, 0xf0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04075}04075                         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 195, 0x81);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04076}04076                         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 196, 0x1e);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04077}04077                         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 195, 0x82);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04078}04078                         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 196, 0x28);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04079}04079                         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 195, 0x83);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04080}04080                         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 196, 0x20);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04081}04081                         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 195, 0x85);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04082}04082                         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 196, 0x7f);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04083}04083                         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 195, 0x86);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04084}04084                         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 196, 0x7f);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04085}04085                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3572)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04086}04086                         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 82, 0x94);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04087}04087                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04088}04088                         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 82,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04089}04089                             (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3593) ? 0x82 : 0xf2);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04090}04090                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a11efa2d8422855290bba1a8c92a722cc}{ext\_5ghz\_lna}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04091}04091                         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 75, 0x46);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04092}04092                 \textcolor{keywordflow}{else} }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04093}04093                         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 75, 0x50);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04094}04094         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04095}04095 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04096}04096         \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_af31e64d40985c17adc74cf8f117c19b4}{RT2860\_TX\_BAND\_CFG}}, \&tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04097}04097         tmp \&= \string~(\mbox{\hyperlink{if__runreg_8h_ab1ae7e4752938f0257950714d330d041}{RT2860\_5G\_BAND\_SEL\_N}} | \mbox{\hyperlink{if__runreg_8h_a4fcb55626ca42e426912cfee74989b66}{RT2860\_5G\_BAND\_SEL\_P}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04098}04098         tmp |= (group == 0) ? \mbox{\hyperlink{if__runreg_8h_ab1ae7e4752938f0257950714d330d041}{RT2860\_5G\_BAND\_SEL\_N}} : \mbox{\hyperlink{if__runreg_8h_a4fcb55626ca42e426912cfee74989b66}{RT2860\_5G\_BAND\_SEL\_P}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04099}04099         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_af31e64d40985c17adc74cf8f117c19b4}{RT2860\_TX\_BAND\_CFG}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04100}04100 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04101}04101         \textcolor{comment}{/* enable appropriate Power Amplifiers and Low Noise Amplifiers */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04102}04102         tmp = \mbox{\hyperlink{if__runreg_8h_ad68a9627e4f0294764aa6ba48acf9434}{RT2860\_RFTR\_EN}} | \mbox{\hyperlink{if__runreg_8h_a055d7273c3fca136508bf59524a588e3}{RT2860\_TRSW\_EN}} | \mbox{\hyperlink{if__runreg_8h_a523c4b546de5f3194c8e435aae05a431}{RT2860\_LNA\_PE0\_EN}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04103}04103         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3593)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04104}04104                 tmp |= 1 << 29 | 1 << 28;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04105}04105         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_abeb252728ca242db18b1574c2687b788}{nrxchains}} > 1)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04106}04106                 tmp |= \mbox{\hyperlink{if__runreg_8h_a463a3aea1080950d95bffbf575da3b8d}{RT2860\_LNA\_PE1\_EN}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04107}04107         \textcolor{keywordflow}{if} (group == 0) \{       \textcolor{comment}{/* 2GHz */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04108}04108                 tmp |= \mbox{\hyperlink{if__runreg_8h_a610faafc6bfbeca28dd9d2a1fd394e34}{RT2860\_PA\_PE\_G0\_EN}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04109}04109                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a67c3c37459a1133495cd627be4037ca6}{ntxchains}} > 1)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04110}04110                         tmp |= \mbox{\hyperlink{if__runreg_8h_a56fb6bc19aae9baa98ba46a01774d77c}{RT2860\_PA\_PE\_G1\_EN}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04111}04111                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3593) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04112}04112                         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a67c3c37459a1133495cd627be4037ca6}{ntxchains}} > 2)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04113}04113                                 tmp |= 1 << 25;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04114}04114                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04115}04115         \} \textcolor{keywordflow}{else} \{                \textcolor{comment}{/* 5GHz */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04116}04116                 tmp |= \mbox{\hyperlink{if__runreg_8h_aa8a7b0c03f22749f3e2c7c3803ec2ba3}{RT2860\_PA\_PE\_A0\_EN}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04117}04117                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a67c3c37459a1133495cd627be4037ca6}{ntxchains}} > 1)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04118}04118                         tmp |= \mbox{\hyperlink{if__runreg_8h_a587df5bd5fee3fde968c4005c02088e4}{RT2860\_PA\_PE\_A1\_EN}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04119}04119         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04120}04120         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3572) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04121}04121                 \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 8, 0x00);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04122}04122                 \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a2aab2c0d224413daa5c6cf5c1c319d3c}{RT2860\_TX\_PIN\_CFG}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04123}04123                 \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 8, 0x80);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04124}04124         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04125}04125                 \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a2aab2c0d224413daa5c6cf5c1c319d3c}{RT2860\_TX\_PIN\_CFG}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04126}04126 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04127}04127         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x5592) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04128}04128                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 195, 0x8d);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04129}04129                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 196, 0x1a);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04130}04130         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04131}04131 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04132}04132         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3593) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04133}04133                 \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_aff882afcec2608a9e1bf9dd6bdb0dbe4}{RT2860\_GPIO\_CTRL}}, \&tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04134}04134                 tmp \&= \string~0x01010000;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04135}04135                 \textcolor{keywordflow}{if} (group == 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04136}04136                         tmp |= 0x00010000;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04137}04137                 tmp = (tmp \& \string~0x00009090) | 0x00000090;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04138}04138                 \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_aff882afcec2608a9e1bf9dd6bdb0dbe4}{RT2860\_GPIO\_CTRL}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04139}04139         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04140}04140 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04141}04141         \textcolor{comment}{/* set initial AGC value */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04142}04142         \textcolor{keywordflow}{if} (group == 0) \{       \textcolor{comment}{/* 2GHz band */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04143}04143                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} >= 0x3070)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04144}04144                         agc = 0x1c + sc-\/>\mbox{\hyperlink{structrun__softc_ab87cb627c86925dc5c5331c6de3b1536}{lna}}[0] * 2;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04145}04145                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04146}04146                         agc = 0x2e + sc-\/>\mbox{\hyperlink{structrun__softc_ab87cb627c86925dc5c5331c6de3b1536}{lna}}[0];}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04147}04147         \} \textcolor{keywordflow}{else} \{                \textcolor{comment}{/* 5GHz band */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04148}04148                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x5592)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04149}04149                         agc = 0x24 + sc-\/>\mbox{\hyperlink{structrun__softc_ab87cb627c86925dc5c5331c6de3b1536}{lna}}[group] * 2;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04150}04150                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3572 || sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3593)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04151}04151                         agc = 0x22 + (sc-\/>\mbox{\hyperlink{structrun__softc_ab87cb627c86925dc5c5331c6de3b1536}{lna}}[group] * 5) / 3;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04152}04152                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04153}04153                         agc = 0x32 + (sc-\/>\mbox{\hyperlink{structrun__softc_ab87cb627c86925dc5c5331c6de3b1536}{lna}}[group] * 5) / 3;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04154}04154         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04155}04155         \mbox{\hyperlink{if__run_8c_afc43e0d31008e8039dd33dd43ca6c6ab}{run\_set\_agc}}(sc, agc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04156}04156 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04157}04157 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04158}04158 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04159}\mbox{\hyperlink{if__run_8c_a110cbd1d9701a3de2015969e851f9867}{04159}} \mbox{\hyperlink{if__run_8c_a110cbd1d9701a3de2015969e851f9867}{run\_rt2870\_set\_chan}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, u\_int \mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04160}04160 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04161}04161         \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structrfprog}{rfprog}} *\mbox{\hyperlink{structrfprog}{rfprog}} = \mbox{\hyperlink{if__run_8c_a629ef14775e7a7e5fdf4b976ce7e9e2e}{rt2860\_rf2850}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04162}04162         uint32\_t \mbox{\hyperlink{if__ural_8c_a3f3de83e4d1261e394f4547c8ec0198f}{r2}}, \mbox{\hyperlink{structrfprog_a277f4d6c802c1a04a7f620ad88975b60}{r3}}, \mbox{\hyperlink{if__ural_8c_abb350ded3920a0199969707b46c10f8a}{r4}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04163}04163         int8\_t txpow1, txpow2;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04164}04164         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04165}04165 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04166}04166         \textcolor{comment}{/* find the settings for this channel (we know it exists) */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04167}04167         \textcolor{keywordflow}{for} (i = 0; \mbox{\hyperlink{structrfprog}{rfprog}}[i].\mbox{\hyperlink{structrfprog_a91693b9f9d0a9caa67fbf864247d332a}{chan}} != \mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}}; i++);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04168}04168 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04169}04169         \mbox{\hyperlink{if__ural_8c_a3f3de83e4d1261e394f4547c8ec0198f}{r2}} = \mbox{\hyperlink{structrfprog}{rfprog}}[i].\mbox{\hyperlink{structrfprog_a33ebe04489e7fbc32e8582ed43d06a66}{r2}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04170}04170         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a67c3c37459a1133495cd627be4037ca6}{ntxchains}} == 1)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04171}04171                 \mbox{\hyperlink{if__ural_8c_a3f3de83e4d1261e394f4547c8ec0198f}{r2}} |= 1 << 14;                \textcolor{comment}{/* 1T: disable Tx chain 2 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04172}04172         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_abeb252728ca242db18b1574c2687b788}{nrxchains}} == 1)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04173}04173                 \mbox{\hyperlink{if__ural_8c_a3f3de83e4d1261e394f4547c8ec0198f}{r2}} |= 1 << 17 | 1 << 6;       \textcolor{comment}{/* 1R: disable Rx chains 2 \& 3 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04174}04174         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_abeb252728ca242db18b1574c2687b788}{nrxchains}} == 2)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04175}04175                 \mbox{\hyperlink{if__ural_8c_a3f3de83e4d1261e394f4547c8ec0198f}{r2}} |= 1 << 6;         \textcolor{comment}{/* 2R: disable Rx chain 3 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04176}04176 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04177}04177         \textcolor{comment}{/* use Tx power values from EEPROM */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04178}04178         txpow1 = sc-\/>\mbox{\hyperlink{structrun__softc_a54e52fa21c554e60b35ec045ac001a25}{txpow1}}[i];}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04179}04179         txpow2 = sc-\/>\mbox{\hyperlink{structrun__softc_aeeaa3e34d3d92d422fcd7285425c2fe0}{txpow2}}[i];}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04180}04180 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04181}04181         \textcolor{comment}{/* Initialize RF R3 and R4. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04182}04182         \mbox{\hyperlink{structrfprog_a277f4d6c802c1a04a7f620ad88975b60}{r3}} = \mbox{\hyperlink{structrfprog}{rfprog}}[i].\mbox{\hyperlink{structrfprog_a277f4d6c802c1a04a7f620ad88975b60}{r3}} \& 0xffffc1ff;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04183}04183         \mbox{\hyperlink{if__ural_8c_abb350ded3920a0199969707b46c10f8a}{r4}} = (\mbox{\hyperlink{structrfprog}{rfprog}}[i].\mbox{\hyperlink{structrfprog_a9b195486d18a49ce1bb820b350277abe}{r4}} \& \string~(0x001f87c0)) | (sc-\/>\mbox{\hyperlink{structrun__softc_a0dacefc883d5e8c77983176277bbf773}{freq}} << 15);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04184}04184         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} > 14) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04185}04185                 \textcolor{keywordflow}{if} (txpow1 >= 0) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04186}04186                         txpow1 = (txpow1 > 0xf) ? (0xf) : (txpow1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04187}04187                         \mbox{\hyperlink{structrfprog_a277f4d6c802c1a04a7f620ad88975b60}{r3}} |= (txpow1 << 10) | (1 << 9);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04188}04188                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04189}04189                         txpow1 += 7;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04190}04190 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04191}04191                         \textcolor{comment}{/* txpow1 is not possible larger than 15. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04192}04192                         \mbox{\hyperlink{structrfprog_a277f4d6c802c1a04a7f620ad88975b60}{r3}} |= (txpow1 << 10);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04193}04193                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04194}04194                 \textcolor{keywordflow}{if} (txpow2 >= 0) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04195}04195                         txpow2 = (txpow2 > 0xf) ? (0xf) : (txpow2);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04196}04196                         \mbox{\hyperlink{if__ural_8c_abb350ded3920a0199969707b46c10f8a}{r4}} |= (txpow2 << 7) | (1 << 6);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04197}04197                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04198}04198                         txpow2 += 7;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04199}04199                         \mbox{\hyperlink{if__ural_8c_abb350ded3920a0199969707b46c10f8a}{r4}} |= (txpow2 << 7);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04200}04200                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04201}04201         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04202}04202                 \textcolor{comment}{/* Set Tx0 power. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04203}04203                 \mbox{\hyperlink{structrfprog_a277f4d6c802c1a04a7f620ad88975b60}{r3}} |= (txpow1 << 9);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04204}04204 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04205}04205                 \textcolor{comment}{/* Set frequency offset and Tx1 power. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04206}04206                 \mbox{\hyperlink{if__ural_8c_abb350ded3920a0199969707b46c10f8a}{r4}} |= (txpow2 << 6);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04207}04207         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04208}04208 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04209}04209         \mbox{\hyperlink{if__run_8c_aa4820cee28f4577e3b1b557d3e730d37}{run\_rt2870\_rf\_write}}(sc, \mbox{\hyperlink{structrfprog}{rfprog}}[i].\mbox{\hyperlink{if__ural_8c_a241f774bd9124717ac8d6cfa094a6d1b}{r1}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04210}04210         \mbox{\hyperlink{if__run_8c_aa4820cee28f4577e3b1b557d3e730d37}{run\_rt2870\_rf\_write}}(sc, \mbox{\hyperlink{if__ural_8c_a3f3de83e4d1261e394f4547c8ec0198f}{r2}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04211}04211         \mbox{\hyperlink{if__run_8c_aa4820cee28f4577e3b1b557d3e730d37}{run\_rt2870\_rf\_write}}(sc, \mbox{\hyperlink{structrfprog_a277f4d6c802c1a04a7f620ad88975b60}{r3}} \& \string~(1 << 2));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04212}04212         \mbox{\hyperlink{if__run_8c_aa4820cee28f4577e3b1b557d3e730d37}{run\_rt2870\_rf\_write}}(sc, \mbox{\hyperlink{if__ural_8c_abb350ded3920a0199969707b46c10f8a}{r4}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04213}04213 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04214}04214         \mbox{\hyperlink{if__run_8c_a92b12f7b350001cb12d558c3fb85e0c5}{run\_delay}}(sc, 10);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04215}04215 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04216}04216         \mbox{\hyperlink{if__run_8c_aa4820cee28f4577e3b1b557d3e730d37}{run\_rt2870\_rf\_write}}(sc, \mbox{\hyperlink{structrfprog}{rfprog}}[i].\mbox{\hyperlink{if__ural_8c_a241f774bd9124717ac8d6cfa094a6d1b}{r1}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04217}04217         \mbox{\hyperlink{if__run_8c_aa4820cee28f4577e3b1b557d3e730d37}{run\_rt2870\_rf\_write}}(sc, \mbox{\hyperlink{if__ural_8c_a3f3de83e4d1261e394f4547c8ec0198f}{r2}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04218}04218         \mbox{\hyperlink{if__run_8c_aa4820cee28f4577e3b1b557d3e730d37}{run\_rt2870\_rf\_write}}(sc, \mbox{\hyperlink{structrfprog_a277f4d6c802c1a04a7f620ad88975b60}{r3}} | (1 << 2));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04219}04219         \mbox{\hyperlink{if__run_8c_aa4820cee28f4577e3b1b557d3e730d37}{run\_rt2870\_rf\_write}}(sc, \mbox{\hyperlink{if__ural_8c_abb350ded3920a0199969707b46c10f8a}{r4}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04220}04220 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04221}04221         \mbox{\hyperlink{if__run_8c_a92b12f7b350001cb12d558c3fb85e0c5}{run\_delay}}(sc, 10);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04222}04222 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04223}04223         \mbox{\hyperlink{if__run_8c_aa4820cee28f4577e3b1b557d3e730d37}{run\_rt2870\_rf\_write}}(sc, \mbox{\hyperlink{structrfprog}{rfprog}}[i].\mbox{\hyperlink{if__ural_8c_a241f774bd9124717ac8d6cfa094a6d1b}{r1}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04224}04224         \mbox{\hyperlink{if__run_8c_aa4820cee28f4577e3b1b557d3e730d37}{run\_rt2870\_rf\_write}}(sc, \mbox{\hyperlink{if__ural_8c_a3f3de83e4d1261e394f4547c8ec0198f}{r2}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04225}04225         \mbox{\hyperlink{if__run_8c_aa4820cee28f4577e3b1b557d3e730d37}{run\_rt2870\_rf\_write}}(sc, \mbox{\hyperlink{structrfprog_a277f4d6c802c1a04a7f620ad88975b60}{r3}} \& \string~(1 << 2));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04226}04226         \mbox{\hyperlink{if__run_8c_aa4820cee28f4577e3b1b557d3e730d37}{run\_rt2870\_rf\_write}}(sc, \mbox{\hyperlink{if__ural_8c_abb350ded3920a0199969707b46c10f8a}{r4}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04227}04227 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04228}04228 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04229}04229 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04230}\mbox{\hyperlink{if__run_8c_a73d0f4681b58c5d82b674044ea2d8b4d}{04230}} \mbox{\hyperlink{if__run_8c_a73d0f4681b58c5d82b674044ea2d8b4d}{run\_rt3070\_set\_chan}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, u\_int \mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04231}04231 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04232}04232         int8\_t txpow1, txpow2;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04233}04233         uint8\_t rf;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04234}04234         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04235}04235 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04236}04236         \textcolor{comment}{/* find the settings for this channel (we know it exists) */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04237}04237         \textcolor{keywordflow}{for} (i = 0; \mbox{\hyperlink{if__run_8c_a629ef14775e7a7e5fdf4b976ce7e9e2e}{rt2860\_rf2850}}[i].\mbox{\hyperlink{structrfprog_a91693b9f9d0a9caa67fbf864247d332a}{chan}} != \mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}}; i++);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04238}04238 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04239}04239         \textcolor{comment}{/* use Tx power values from EEPROM */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04240}04240         txpow1 = sc-\/>\mbox{\hyperlink{structrun__softc_a54e52fa21c554e60b35ec045ac001a25}{txpow1}}[i];}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04241}04241         txpow2 = sc-\/>\mbox{\hyperlink{structrun__softc_aeeaa3e34d3d92d422fcd7285425c2fe0}{txpow2}}[i];}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04242}04242 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04243}04243         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 2, \mbox{\hyperlink{if__run_8c_ae7effc96316b76e45b7bbc41a2f3b482}{rt3070\_freqs}}[i].\mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04244}04244 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04245}04245         \textcolor{comment}{/* RT3370/RT3390: RF R3 [7:4] is not reserved bits. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04246}04246         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 3, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04247}04247         rf = (rf \& \string~0x0f) | \mbox{\hyperlink{if__run_8c_ae7effc96316b76e45b7bbc41a2f3b482}{rt3070\_freqs}}[i].\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04248}04248         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 3, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04249}04249 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04250}04250         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 6, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04251}04251         rf = (rf \& \string~0x03) | \mbox{\hyperlink{if__run_8c_ae7effc96316b76e45b7bbc41a2f3b482}{rt3070\_freqs}}[i].\mbox{\hyperlink{if__run_8c_a4c5c6ceb8ed33456261fa907136e0c3a}{r}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04252}04252         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 6, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04253}04253 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04254}04254         \textcolor{comment}{/* set Tx0 power */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04255}04255         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 12, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04256}04256         rf = (rf \& \string~0x1f) | txpow1;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04257}04257         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 12, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04258}04258 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04259}04259         \textcolor{comment}{/* set Tx1 power */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04260}04260         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 13, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04261}04261         rf = (rf \& \string~0x1f) | txpow2;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04262}04262         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 13, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04263}04263 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04264}04264         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 1, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04265}04265         rf \&= \string~0xfc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04266}04266         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a67c3c37459a1133495cd627be4037ca6}{ntxchains}} == 1)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04267}04267                 rf |= 1 << 7 | 1 << 5;  \textcolor{comment}{/* 1T: disable Tx chains 2 \& 3 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04268}04268         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a67c3c37459a1133495cd627be4037ca6}{ntxchains}} == 2)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04269}04269                 rf |= 1 << 7;           \textcolor{comment}{/* 2T: disable Tx chain 3 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04270}04270         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_abeb252728ca242db18b1574c2687b788}{nrxchains}} == 1)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04271}04271                 rf |= 1 << 6 | 1 << 4;  \textcolor{comment}{/* 1R: disable Rx chains 2 \& 3 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04272}04272         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_abeb252728ca242db18b1574c2687b788}{nrxchains}} == 2)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04273}04273                 rf |= 1 << 6;           \textcolor{comment}{/* 2R: disable Rx chain 3 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04274}04274         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 1, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04275}04275 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04276}04276         \textcolor{comment}{/* set RF offset */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04277}04277         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 23, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04278}04278         rf = (rf \& \string~0x7f) | sc-\/>\mbox{\hyperlink{structrun__softc_a0dacefc883d5e8c77983176277bbf773}{freq}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04279}04279         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 23, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04280}04280 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04281}04281         \textcolor{comment}{/* program RF filter */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04282}04282         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 24, \&rf);      \textcolor{comment}{/* Tx */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04283}04283         rf = (rf \& \string~0x3f) | sc-\/>\mbox{\hyperlink{structrun__softc_a351c39369a9bdb78e97dd42d8b4dbed7}{rf24\_20mhz}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04284}04284         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 24, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04285}04285         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 31, \&rf);      \textcolor{comment}{/* Rx */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04286}04286         rf = (rf \& \string~0x3f) | sc-\/>\mbox{\hyperlink{structrun__softc_a351c39369a9bdb78e97dd42d8b4dbed7}{rf24\_20mhz}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04287}04287         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 31, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04288}04288 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04289}04289         \textcolor{comment}{/* enable RF tuning */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04290}04290         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 7, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04291}04291         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 7, rf | 0x01);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04292}04292 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04293}04293 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04294}04294 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04295}\mbox{\hyperlink{if__run_8c_a10d963c4d5bfa529db0aab57a0b329b4}{04295}} \mbox{\hyperlink{if__run_8c_a10d963c4d5bfa529db0aab57a0b329b4}{run\_rt3572\_set\_chan}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, u\_int \mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04296}04296 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04297}04297         int8\_t txpow1, txpow2;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04298}04298         uint32\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04299}04299         uint8\_t rf;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04300}04300         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04301}04301 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04302}04302         \textcolor{comment}{/* find the settings for this channel (we know it exists) */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04303}04303         \textcolor{keywordflow}{for} (i = 0; \mbox{\hyperlink{if__run_8c_a629ef14775e7a7e5fdf4b976ce7e9e2e}{rt2860\_rf2850}}[i].\mbox{\hyperlink{structrfprog_a91693b9f9d0a9caa67fbf864247d332a}{chan}} != \mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}}; i++);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04304}04304 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04305}04305         \textcolor{comment}{/* use Tx power values from EEPROM */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04306}04306         txpow1 = sc-\/>\mbox{\hyperlink{structrun__softc_a54e52fa21c554e60b35ec045ac001a25}{txpow1}}[i];}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04307}04307         txpow2 = sc-\/>\mbox{\hyperlink{structrun__softc_aeeaa3e34d3d92d422fcd7285425c2fe0}{txpow2}}[i];}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04308}04308 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04309}04309         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04310}04310                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 25, sc-\/>\mbox{\hyperlink{structrun__softc_a20e2f04c0b620ebf5ab4eb98016d1ebd}{bbp25}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04311}04311                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 26, sc-\/>\mbox{\hyperlink{structrun__softc_a67cb2726d91c573c71974c46a44ea5cd}{bbp26}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04312}04312         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04313}04313                 \textcolor{comment}{/* enable IQ phase correction */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04314}04314                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 25, 0x09);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04315}04315                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 26, 0xff);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04316}04316         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04317}04317 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04318}04318         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 2, \mbox{\hyperlink{if__run_8c_ae7effc96316b76e45b7bbc41a2f3b482}{rt3070\_freqs}}[i].\mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04319}04319         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 3, \mbox{\hyperlink{if__run_8c_ae7effc96316b76e45b7bbc41a2f3b482}{rt3070\_freqs}}[i].\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04320}04320         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 6, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04321}04321         rf  = (rf \& \string~0x0f) | \mbox{\hyperlink{if__run_8c_ae7effc96316b76e45b7bbc41a2f3b482}{rt3070\_freqs}}[i].\mbox{\hyperlink{if__run_8c_a4c5c6ceb8ed33456261fa907136e0c3a}{r}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04322}04322         rf |= (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14) ? 0x08 : 0x04;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04323}04323         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 6, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04324}04324 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04325}04325         \textcolor{comment}{/* set PLL mode */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04326}04326         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 5, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04327}04327         rf \&= \string~(0x08 | 0x04);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04328}04328         rf |= (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14) ? 0x04 : 0x08;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04329}04329         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 5, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04330}04330 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04331}04331         \textcolor{comment}{/* set Tx power for chain 0 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04332}04332         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04333}04333                 rf = 0x60 | txpow1;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04334}04334         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04335}04335                 rf = 0xe0 | (txpow1 \& 0xc) << 1 | (txpow1 \& 0x3);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04336}04336         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 12, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04337}04337 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04338}04338         \textcolor{comment}{/* set Tx power for chain 1 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04339}04339         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04340}04340                 rf = 0x60 | txpow2;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04341}04341         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04342}04342                 rf = 0xe0 | (txpow2 \& 0xc) << 1 | (txpow2 \& 0x3);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04343}04343         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 13, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04344}04344 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04345}04345         \textcolor{comment}{/* set Tx/Rx streams */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04346}04346         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 1, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04347}04347         rf \&= \string~0xfc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04348}04348         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a67c3c37459a1133495cd627be4037ca6}{ntxchains}} == 1)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04349}04349                 rf |= 1 << 7 | 1 << 5;  \textcolor{comment}{/* 1T: disable Tx chains 2 \& 3 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04350}04350         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a67c3c37459a1133495cd627be4037ca6}{ntxchains}} == 2)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04351}04351                 rf |= 1 << 7;           \textcolor{comment}{/* 2T: disable Tx chain 3 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04352}04352         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_abeb252728ca242db18b1574c2687b788}{nrxchains}} == 1)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04353}04353                 rf |= 1 << 6 | 1 << 4;  \textcolor{comment}{/* 1R: disable Rx chains 2 \& 3 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04354}04354         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_abeb252728ca242db18b1574c2687b788}{nrxchains}} == 2)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04355}04355                 rf |= 1 << 6;           \textcolor{comment}{/* 2R: disable Rx chain 3 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04356}04356         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 1, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04357}04357 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04358}04358         \textcolor{comment}{/* set RF offset */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04359}04359         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 23, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04360}04360         rf = (rf \& \string~0x7f) | sc-\/>\mbox{\hyperlink{structrun__softc_a0dacefc883d5e8c77983176277bbf773}{freq}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04361}04361         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 23, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04362}04362 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04363}04363         \textcolor{comment}{/* program RF filter */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04364}04364         rf = sc-\/>\mbox{\hyperlink{structrun__softc_a351c39369a9bdb78e97dd42d8b4dbed7}{rf24\_20mhz}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04365}04365         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 24, rf);     \textcolor{comment}{/* Tx */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04366}04366         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 31, rf);     \textcolor{comment}{/* Rx */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04367}04367 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04368}04368         \textcolor{comment}{/* enable RF tuning */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04369}04369         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 7, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04370}04370         rf = (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14) ? 0xd8 : ((rf \& \string~0xc8) | 0x14);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04371}04371         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 7, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04372}04372 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04373}04373         \textcolor{comment}{/* TSSI */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04374}04374         rf = (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14) ? 0xc3 : 0xc0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04375}04375         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 9, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04376}04376 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04377}04377         \textcolor{comment}{/* set loop filter 1 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04378}04378         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 10, 0xf1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04379}04379         \textcolor{comment}{/* set loop filter 2 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04380}04380         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 11, (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14) ? 0xb9 : 0x00);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04381}04381 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04382}04382         \textcolor{comment}{/* set tx\_mx2\_ic */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04383}04383         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 15, (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14) ? 0x53 : 0x43);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04384}04384         \textcolor{comment}{/* set tx\_mx1\_ic */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04385}04385         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04386}04386                 rf = 0x48 | sc-\/>\mbox{\hyperlink{structrun__softc_ae4a114cd9059a92fdd68d0a613416cab}{txmixgain\_2ghz}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04387}04387         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04388}04388                 rf = 0x78 | sc-\/>\mbox{\hyperlink{structrun__softc_a46408054487e1e244b44af83932b6dda}{txmixgain\_5ghz}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04389}04389         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 16, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04390}04390 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04391}04391         \textcolor{comment}{/* set tx\_lo1 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04392}04392         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 17, 0x23);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04393}04393         \textcolor{comment}{/* set tx\_lo2 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04394}04394         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04395}04395                 rf = 0x93;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04396}04396         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 64)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04397}04397                 rf = 0xb7;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04398}04398         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 128)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04399}04399                 rf = 0x74;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04400}04400         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04401}04401                 rf = 0x72;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04402}04402         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 19, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04403}04403 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04404}04404         \textcolor{comment}{/* set rx\_lo1 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04405}04405         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04406}04406                 rf = 0xb3;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04407}04407         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 64)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04408}04408                 rf = 0xf6;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04409}04409         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 128)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04410}04410                 rf = 0xf4;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04411}04411         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04412}04412                 rf = 0xf3;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04413}04413         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 20, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04414}04414 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04415}04415         \textcolor{comment}{/* set pfd\_delay */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04416}04416         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04417}04417                 rf = 0x15;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04418}04418         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 64)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04419}04419                 rf = 0x3d;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04420}04420         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04421}04421                 rf = 0x01;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04422}04422         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 25, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04423}04423 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04424}04424         \textcolor{comment}{/* set rx\_lo2 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04425}04425         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 26, (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14) ? 0x85 : 0x87);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04426}04426         \textcolor{comment}{/* set ldo\_rf\_vc */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04427}04427         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 27, (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14) ? 0x00 : 0x01);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04428}04428         \textcolor{comment}{/* set drv\_cc */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04429}04429         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 29, (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14) ? 0x9b : 0x9f);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04430}04430 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04431}04431         \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_aff882afcec2608a9e1bf9dd6bdb0dbe4}{RT2860\_GPIO\_CTRL}}, \&tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04432}04432         tmp \&= \string~0x8080;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04433}04433         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04434}04434                 tmp |= 0x80;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04435}04435         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_aff882afcec2608a9e1bf9dd6bdb0dbe4}{RT2860\_GPIO\_CTRL}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04436}04436 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04437}04437         \textcolor{comment}{/* enable RF tuning */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04438}04438         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 7, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04439}04439         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 7, rf | 0x01);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04440}04440 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04441}04441         \mbox{\hyperlink{if__run_8c_a92b12f7b350001cb12d558c3fb85e0c5}{run\_delay}}(sc, 2);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04442}04442 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04443}04443 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04444}04444 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04445}\mbox{\hyperlink{if__run_8c_aac9f7b8769745236b69d70e0e55f3d6b}{04445}} \mbox{\hyperlink{if__run_8c_aac9f7b8769745236b69d70e0e55f3d6b}{run\_rt3593\_set\_chan}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, u\_int \mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04446}04446 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04447}04447         int8\_t txpow1, txpow2, txpow3;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04448}04448         uint8\_t h20mhz, rf;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04449}04449         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04450}04450 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04451}04451         \textcolor{comment}{/* find the settings for this channel (we know it exists) */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04452}04452         \textcolor{keywordflow}{for} (i = 0; \mbox{\hyperlink{if__run_8c_a629ef14775e7a7e5fdf4b976ce7e9e2e}{rt2860\_rf2850}}[i].\mbox{\hyperlink{structrfprog_a91693b9f9d0a9caa67fbf864247d332a}{chan}} != \mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}}; i++);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04453}04453 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04454}04454         \textcolor{comment}{/* use Tx power values from EEPROM */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04455}04455         txpow1 = sc-\/>\mbox{\hyperlink{structrun__softc_a54e52fa21c554e60b35ec045ac001a25}{txpow1}}[i];}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04456}04456         txpow2 = sc-\/>\mbox{\hyperlink{structrun__softc_aeeaa3e34d3d92d422fcd7285425c2fe0}{txpow2}}[i];}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04457}04457         txpow3 = (sc-\/>\mbox{\hyperlink{structrun__softc_a67c3c37459a1133495cd627be4037ca6}{ntxchains}} == 3) ? sc-\/>\mbox{\hyperlink{structrun__softc_afe16ec82adf5ccec4c203fea4cf8ece5}{txpow3}}[i] : 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04458}04458 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04459}04459         if (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04460}04460                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 25, sc-\/>\mbox{\hyperlink{structrun__softc_a20e2f04c0b620ebf5ab4eb98016d1ebd}{bbp25}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04461}04461                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 26, sc-\/>\mbox{\hyperlink{structrun__softc_a67cb2726d91c573c71974c46a44ea5cd}{bbp26}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04462}04462         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04463}04463                 \textcolor{comment}{/* Enable IQ phase correction. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04464}04464                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 25, 0x09);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04465}04465                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 26, 0xff);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04466}04466         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04467}04467 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04468}04468         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 8, \mbox{\hyperlink{if__run_8c_ae7effc96316b76e45b7bbc41a2f3b482}{rt3070\_freqs}}[i].\mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04469}04469         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 9, \mbox{\hyperlink{if__run_8c_ae7effc96316b76e45b7bbc41a2f3b482}{rt3070\_freqs}}[i].\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}} \& 0x0f);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04470}04470         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 11, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04471}04471         rf = (rf \& \string~0x03) | (\mbox{\hyperlink{if__run_8c_ae7effc96316b76e45b7bbc41a2f3b482}{rt3070\_freqs}}[i].\mbox{\hyperlink{if__run_8c_a4c5c6ceb8ed33456261fa907136e0c3a}{r}} \& 0x03);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04472}04472         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 11, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04473}04473 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04474}04474         \textcolor{comment}{/* Set pll\_idoh. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04475}04475         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 11, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04476}04476         rf \&= \string~0x4c;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04477}04477         rf |= (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14) ? 0x44 : 0x48;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04478}04478         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 11, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04479}04479 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04480}04480         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04481}04481                 rf = txpow1 \& 0x1f;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04482}04482         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04483}04483                 rf = 0x40 | ((txpow1 \& 0x18) << 1) | (txpow1 \& 0x07);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04484}04484         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 53, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04485}04485 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04486}04486         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04487}04487                 rf = txpow2 \& 0x1f;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04488}04488         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04489}04489                 rf = 0x40 | ((txpow2 \& 0x18) << 1) | (txpow2 \& 0x07);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04490}04490         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 55, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04491}04491 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04492}04492         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04493}04493                 rf = txpow3 \& 0x1f;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04494}04494         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04495}04495                 rf = 0x40 | ((txpow3 \& 0x18) << 1) | (txpow3 \& 0x07);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04496}04496         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 54, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04497}04497 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04498}04498         rf = \mbox{\hyperlink{if__runreg_8h_a129eab5b4bea4f2daf64ed5790350aea}{RT3070\_RF\_BLOCK}} | \mbox{\hyperlink{if__runreg_8h_a28b2abcb731fbc1662c00fca9e223316}{RT3070\_PLL\_PD}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04499}04499         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a67c3c37459a1133495cd627be4037ca6}{ntxchains}} == 3)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04500}04500                 rf |= \mbox{\hyperlink{if__runreg_8h_a3392c440f463833f8bfb1f3f21787690}{RT3070\_TX0\_PD}} | \mbox{\hyperlink{if__runreg_8h_ab36d9500182ab2f58a29703aa60e2980}{RT3070\_TX1\_PD}} | \mbox{\hyperlink{if__runreg_8h_ae8522da361af945fc5d4e02bfdf56012}{RT3070\_TX2\_PD}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04501}04501         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04502}04502                 rf |= \mbox{\hyperlink{if__runreg_8h_a3392c440f463833f8bfb1f3f21787690}{RT3070\_TX0\_PD}} | \mbox{\hyperlink{if__runreg_8h_ab36d9500182ab2f58a29703aa60e2980}{RT3070\_TX1\_PD}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04503}04503         rf |= \mbox{\hyperlink{if__runreg_8h_a43344c6d2aed204b5f68138dc4f3e5b3}{RT3070\_RX0\_PD}} | \mbox{\hyperlink{if__runreg_8h_ad9119bb15eacaa673da3994ed5089254}{RT3070\_RX1\_PD}} | \mbox{\hyperlink{if__runreg_8h_a3e48ad44928c1b3dae48d009e91e5a4f}{RT3070\_RX2\_PD}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04504}04504         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 1, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04505}04505 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04506}04506         \mbox{\hyperlink{if__run_8c_a2ca1d8df0375e88d4b7bdd067485284a}{run\_adjust\_freq\_offset}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04507}04507 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04508}04508         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 31, (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14) ? 0xa0 : 0x80);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04509}04509 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04510}04510         h20mhz = (sc-\/>\mbox{\hyperlink{structrun__softc_a351c39369a9bdb78e97dd42d8b4dbed7}{rf24\_20mhz}} \& 0x20) >> 5; }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04511}04511         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 30, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04512}04512         rf = (rf \& \string~0x06) | (h20mhz << 1) | (h20mhz << 2);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04513}04513         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 30, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04514}04514 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04515}04515         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 36, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04516}04516         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04517}04517                 rf |= 0x80;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04518}04518         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04519}04519                 rf \&= \string~0x80;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04520}04520         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 36, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04521}04521 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04522}04522         \textcolor{comment}{/* Set vcolo\_bs. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04523}04523         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 34, (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14) ? 0x3c : 0x20);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04524}04524         \textcolor{comment}{/* Set pfd\_delay. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04525}04525         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 12, (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14) ? 0x1a : 0x12);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04526}04526 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04527}04527         \textcolor{comment}{/* Set vco bias current control. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04528}04528         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 6, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04529}04529         rf \&= \string~0xc0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04530}04530         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04531}04531                 rf |= 0x40;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04532}04532         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 128)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04533}04533                 rf |= 0x80;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04534}04534         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04535}04535                 rf |= 0x40;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04536}04536         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 6, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04537}04537                 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04538}04538         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 30, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04539}04539         rf = (rf \& \string~0x18) | 0x10;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04540}04540         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 30, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04541}04541 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04542}04542         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 10, (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14) ? 0xd3 : 0xd8);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04543}04543         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 13, (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14) ? 0x12 : 0x23);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04544}04544 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04545}04545         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 51, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04546}04546         rf = (rf \& \string~0x03) | 0x01;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04547}04547         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 51, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04548}04548         \textcolor{comment}{/* Set tx\_mx1\_cc. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04549}04549         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 51, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04550}04550         rf \&= \string~0x1c;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04551}04551         rf |= (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14) ? 0x14 : 0x10;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04552}04552         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 51, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04553}04553         \textcolor{comment}{/* Set tx\_mx1\_ic. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04554}04554         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 51, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04555}04555         rf \&= \string~0xe0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04556}04556         rf |= (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14) ? 0x60 : 0x40;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04557}04557         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 51, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04558}04558         \textcolor{comment}{/* Set tx\_lo1\_ic. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04559}04559         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 49, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04560}04560         rf \&= \string~0x1c;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04561}04561         rf |= (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14) ? 0x0c : 0x08;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04562}04562         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 49, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04563}04563         \textcolor{comment}{/* Set tx\_lo1\_en. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04564}04564         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 50, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04565}04565         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 50, rf \& \string~0x20);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04566}04566         \textcolor{comment}{/* Set drv\_cc. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04567}04567         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 57, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04568}04568         rf \&= \string~0xfc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04569}04569         rf |= (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14) ?  0x6c : 0x3c;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04570}04570         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 57, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04571}04571         \textcolor{comment}{/* Set rx\_mix1\_ic, rxa\_lnactr, lna\_vc, lna\_inbias\_en and lna\_en. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04572}04572         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 44, (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14) ? 0x93 : 0x9b);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04573}04573         \textcolor{comment}{/* Set drv\_gnd\_a, tx\_vga\_cc\_a and tx\_mx2\_gain. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04574}04574         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 52, (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14) ? 0x45 : 0x05);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04575}04575         \textcolor{comment}{/* Enable VCO calibration. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04576}04576         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 3, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04577}04577         rf \&= \string~RT5390\_VCOCAL;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04578}04578         rf |= (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14) ? \mbox{\hyperlink{if__runreg_8h_a364afaa296cd8c72b738148e860cf030}{RT5390\_VCOCAL}} : 0xbe;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04579}04579         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 3, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04580}04580 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04581}04581         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04582}04582                 rf = 0x23;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04583}04583         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 64)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04584}04584                 rf = 0x36;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04585}04585         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 128)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04586}04586                 rf = 0x32;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04587}04587         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04588}04588                 rf = 0x30;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04589}04589         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 39, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04590}04590         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04591}04591                 rf = 0xbb;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04592}04592         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 64)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04593}04593                 rf = 0xeb;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04594}04594         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 128)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04595}04595                 rf = 0xb3;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04596}04596         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04597}04597                 rf = 0x9b;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04598}04598         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 45, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04599}04599 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04600}04600         \textcolor{comment}{/* Set FEQ/AEQ control. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04601}04601         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 105, 0x34);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04602}04602 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04603}04603 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04604}04604 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04605}\mbox{\hyperlink{if__run_8c_a20f50fe7da9e189e0670738f5695544d}{04605}} \mbox{\hyperlink{if__run_8c_a20f50fe7da9e189e0670738f5695544d}{run\_rt5390\_set\_chan}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, u\_int \mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04606}04606 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04607}04607         int8\_t txpow1, txpow2;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04608}04608         uint8\_t rf;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04609}04609         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04610}04610 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04611}04611         \textcolor{comment}{/* find the settings for this channel (we know it exists) */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04612}04612         \textcolor{keywordflow}{for} (i = 0; \mbox{\hyperlink{if__run_8c_a629ef14775e7a7e5fdf4b976ce7e9e2e}{rt2860\_rf2850}}[i].\mbox{\hyperlink{structrfprog_a91693b9f9d0a9caa67fbf864247d332a}{chan}} != \mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}}; i++);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04613}04613 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04614}04614         \textcolor{comment}{/* use Tx power values from EEPROM */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04615}04615         txpow1 = sc-\/>\mbox{\hyperlink{structrun__softc_a54e52fa21c554e60b35ec045ac001a25}{txpow1}}[i];}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04616}04616         txpow2 = sc-\/>\mbox{\hyperlink{structrun__softc_aeeaa3e34d3d92d422fcd7285425c2fe0}{txpow2}}[i];}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04617}04617 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04618}04618         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 8, \mbox{\hyperlink{if__run_8c_ae7effc96316b76e45b7bbc41a2f3b482}{rt3070\_freqs}}[i].\mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04619}04619         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 9, \mbox{\hyperlink{if__run_8c_ae7effc96316b76e45b7bbc41a2f3b482}{rt3070\_freqs}}[i].\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}} \& 0x0f);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04620}04620         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 11, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04621}04621         rf = (rf \& \string~0x03) | (\mbox{\hyperlink{if__run_8c_ae7effc96316b76e45b7bbc41a2f3b482}{rt3070\_freqs}}[i].\mbox{\hyperlink{if__run_8c_a4c5c6ceb8ed33456261fa907136e0c3a}{r}} \& 0x03);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04622}04622         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 11, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04623}04623 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04624}04624         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 49, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04625}04625         rf = (rf \& \string~0x3f) | (txpow1 \& 0x3f);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04626}04626         \textcolor{comment}{/* The valid range of the RF R49 is 0x00 to 0x27. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04627}04627         \textcolor{keywordflow}{if} ((rf \& 0x3f) > 0x27)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04628}04628                 rf = (rf \& \string~0x3f) | 0x27;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04629}04629         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 49, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04630}04630 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04631}04631         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x5392) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04632}04632                 \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 50, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04633}04633                 rf = (rf \& \string~0x3f) | (txpow2 \& 0x3f);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04634}04634                 \textcolor{comment}{/* The valid range of the RF R50 is 0x00 to 0x27. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04635}04635                 \textcolor{keywordflow}{if} ((rf \& 0x3f) > 0x27)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04636}04636                         rf = (rf \& \string~0x3f) | 0x27;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04637}04637                 \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 50, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04638}04638         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04639}04639 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04640}04640         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 1, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04641}04641         rf |= \mbox{\hyperlink{if__runreg_8h_a129eab5b4bea4f2daf64ed5790350aea}{RT3070\_RF\_BLOCK}} | \mbox{\hyperlink{if__runreg_8h_a28b2abcb731fbc1662c00fca9e223316}{RT3070\_PLL\_PD}} | \mbox{\hyperlink{if__runreg_8h_a43344c6d2aed204b5f68138dc4f3e5b3}{RT3070\_RX0\_PD}} | \mbox{\hyperlink{if__runreg_8h_a3392c440f463833f8bfb1f3f21787690}{RT3070\_TX0\_PD}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04642}04642         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x5392)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04643}04643                 rf |= \mbox{\hyperlink{if__runreg_8h_ad9119bb15eacaa673da3994ed5089254}{RT3070\_RX1\_PD}} | \mbox{\hyperlink{if__runreg_8h_ab36d9500182ab2f58a29703aa60e2980}{RT3070\_TX1\_PD}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04644}04644         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 1, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04645}04645 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04646}04646         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} != 0x5392) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04647}04647                 \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 2, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04648}04648                 rf |= 0x80;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04649}04649                 \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 2, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04650}04650                 \mbox{\hyperlink{if__run_8c_a92b12f7b350001cb12d558c3fb85e0c5}{run\_delay}}(sc, 10);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04651}04651                 rf \&= 0x7f;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04652}04652                 \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 2, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04653}04653         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04654}04654 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04655}04655         \mbox{\hyperlink{if__run_8c_a2ca1d8df0375e88d4b7bdd067485284a}{run\_adjust\_freq\_offset}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04656}04656 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04657}04657         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x5392) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04658}04658                 \textcolor{comment}{/* Fix for RT5392C. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04659}04659                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_af4f2d5358072bd02994b64bcbe7d6f4d}{mac\_rev}} >= 0x0223) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04660}04660                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 4)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04661}04661                                 rf = 0x0f;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04662}04662                         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} >= 5 \&\& \mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 7)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04663}04663                                 rf = 0x0e;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04664}04664                         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04665}04665                                 rf = 0x0d;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04666}04666                         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 23, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04667}04667 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04668}04668                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 4)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04669}04669                                 rf = 0x0c;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04670}04670                         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} == 5)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04671}04671                                 rf = 0x0b;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04672}04672                         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} >= 6 \&\& \mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 7)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04673}04673                                 rf = 0x0a;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04674}04674                         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} >= 8 \&\& \mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 10)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04675}04675                                 rf = 0x09;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04676}04676                         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04677}04677                                 rf = 0x08;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04678}04678                         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 59, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04679}04679                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04680}04680                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 11)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04681}04681                                 rf = 0x0f;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04682}04682                         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04683}04683                                 rf = 0x0b;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04684}04684                         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 59, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04685}04685                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04686}04686         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04687}04687                 \textcolor{comment}{/* Fix for RT5390F. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04688}04688                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_af4f2d5358072bd02994b64bcbe7d6f4d}{mac\_rev}} >= 0x0502) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04689}04689                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 11)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04690}04690                                 rf = 0x43;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04691}04691                         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04692}04692                                 rf = 0x23;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04693}04693                         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 55, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04694}04694 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04695}04695                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 11)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04696}04696                                 rf = 0x0f;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04697}04697                         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} == 12)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04698}04698                                 rf = 0x0d;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04699}04699                         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04700}04700                                 rf = 0x0b;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04701}04701                         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 59, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04702}04702                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04703}04703                         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 55, 0x44);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04704}04704                         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 59, 0x8f);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04705}04705                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04706}04706         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04707}04707 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04708}04708         \textcolor{comment}{/* Enable VCO calibration. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04709}04709         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 3, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04710}04710         rf |= \mbox{\hyperlink{if__runreg_8h_a364afaa296cd8c72b738148e860cf030}{RT5390\_VCOCAL}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04711}04711         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 3, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04712}04712 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04713}04713 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04714}04714 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04715}\mbox{\hyperlink{if__run_8c_a2153e3c2b8ca1c7a060065650e9ec32e}{04715}} \mbox{\hyperlink{if__run_8c_a2153e3c2b8ca1c7a060065650e9ec32e}{run\_rt5592\_set\_chan}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, u\_int \mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04716}04716 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04717}04717         \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structrt5592__freqs}{rt5592\_freqs}} *freqs;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04718}04718         uint32\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04719}04719         uint8\_t \mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, rf, txpow\_bound;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04720}04720         int8\_t txpow1, txpow2;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04721}04721         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04722}04722 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04723}04723         \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a675afebe13a74d4881f0de0da444d112}{RT5592\_DEBUG\_INDEX}}, \&tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04724}04724         freqs = (tmp \& \mbox{\hyperlink{if__runreg_8h_ab467265d63805cac9cc427ce72c54019}{RT5592\_SEL\_XTAL}}) ?}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04725}04725             \mbox{\hyperlink{if__run_8c_a6c83077c6dbbe4f2ed61ffb365d1ee8b}{rt5592\_freqs\_40mhz}} : \mbox{\hyperlink{if__run_8c_ac2c1690169c76805324d2bfb70408dbc}{rt5592\_freqs\_20mhz}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04726}04726 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04727}04727         \textcolor{comment}{/* find the settings for this channel (we know it exists) */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04728}04728         \textcolor{keywordflow}{for} (i = 0; \mbox{\hyperlink{if__run_8c_a629ef14775e7a7e5fdf4b976ce7e9e2e}{rt2860\_rf2850}}[i].\mbox{\hyperlink{structrfprog_a91693b9f9d0a9caa67fbf864247d332a}{chan}} != \mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}}; i++, freqs++);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04729}04729 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04730}04730         \textcolor{comment}{/* use Tx power values from EEPROM */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04731}04731         txpow1 = sc-\/>\mbox{\hyperlink{structrun__softc_a54e52fa21c554e60b35ec045ac001a25}{txpow1}}[i];}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04732}04732         txpow2 = sc-\/>\mbox{\hyperlink{structrun__softc_aeeaa3e34d3d92d422fcd7285425c2fe0}{txpow2}}[i];}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04733}04733 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04734}04734         \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_aa13e99dab9e49ac8283f2cb0be04428a}{RT3070\_LDO\_CFG0}}, \&tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04735}04735         tmp \&= \string~0x1c000000;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04736}04736         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} > 14)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04737}04737                 tmp |= 0x14000000;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04738}04738         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_aa13e99dab9e49ac8283f2cb0be04428a}{RT3070\_LDO\_CFG0}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04739}04739 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04740}04740         \textcolor{comment}{/* N setting. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04741}04741         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 8, freqs-\/>\mbox{\hyperlink{structrt5592__freqs_a273f23abe2ea105c0b53e11330d472eb}{n}} \& 0xff);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04742}04742         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 9, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04743}04743         rf \&= \string~(1 << 4);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04744}04744         rf |= ((freqs-\/>\mbox{\hyperlink{structrt5592__freqs_a273f23abe2ea105c0b53e11330d472eb}{n}} \& 0x0100) >> 8) << 4;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04745}04745         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 9, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04746}04746 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04747}04747         \textcolor{comment}{/* K setting. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04748}04748         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 9, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04749}04749         rf \&= \string~0x0f;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04750}04750         rf |= (freqs-\/>\mbox{\hyperlink{structrt5592__freqs_a7c889b550d6c13cbf11e48d1a1407205}{k}} \& 0x0f);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04751}04751         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 9, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04752}04752 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04753}04753         \textcolor{comment}{/* Mode setting. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04754}04754         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 11, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04755}04755         rf \&= \string~0x0c;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04756}04756         rf |= ((freqs-\/>\mbox{\hyperlink{structrt5592__freqs_a3480bfb78c9029805cf7f00c6dd6ff4a}{m}} -\/ 0x8) \& 0x3) << 2;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04757}04757         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 11, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04758}04758         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 9, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04759}04759         rf \&= \string~(1 << 7);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04760}04760         rf |= (((freqs-\/>\mbox{\hyperlink{structrt5592__freqs_a3480bfb78c9029805cf7f00c6dd6ff4a}{m}} -\/ 0x8) \& 0x4) >> 2) << 7;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04761}04761         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 9, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04762}04762 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04763}04763         \textcolor{comment}{/* R setting. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04764}04764         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 11, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04765}04765         rf \&= \string~0x03;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04766}04766         rf |= (freqs-\/>\mbox{\hyperlink{structrt5592__freqs_ab3f393f3ce55b2acbb5a0ea1f02ae4eb}{r}} -\/ 0x1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04767}04767         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 11, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04768}04768 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04769}04769         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04770}04770                 \textcolor{comment}{/* Initialize RF registers for 2GHZ. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04771}04771                 \textcolor{keywordflow}{for} (i = 0; i < nitems(\mbox{\hyperlink{if__run_8c_a87eef2fb4459e7793e7347c36d99ab65}{rt5592\_2ghz\_def\_rf}}); i++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04772}04772                         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, \mbox{\hyperlink{if__run_8c_a87eef2fb4459e7793e7347c36d99ab65}{rt5592\_2ghz\_def\_rf}}[i].\mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04773}04773                             \mbox{\hyperlink{if__run_8c_a87eef2fb4459e7793e7347c36d99ab65}{rt5592\_2ghz\_def\_rf}}[i].\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04774}04774                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04775}04775 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04776}04776                 rf = (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 10) ? 0x07 : 0x06;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04777}04777                 \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 23, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04778}04778                 \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 59, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04779}04779 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04780}04780                 \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 55, 0x43);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04781}04781 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04782}04782                 \textcolor{comment}{/* }}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04783}04783 \textcolor{comment}{                 * RF R49/R50 Tx power ALC code.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04784}04784 \textcolor{comment}{                 * G-\/band bit<7:6>=1:0, bit<5:0> range from 0x0 \string~ 0x27.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04785}04785 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04786}04786                 \mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} = 2;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04787}04787                 txpow\_bound = 0x27;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04788}04788         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04789}04789                 \textcolor{comment}{/* Initialize RF registers for 5GHZ. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04790}04790                 \textcolor{keywordflow}{for} (i = 0; i < nitems(\mbox{\hyperlink{if__run_8c_a89e475b21fb6422459b48a2985d96e2f}{rt5592\_5ghz\_def\_rf}}); i++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04791}04791                         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, \mbox{\hyperlink{if__run_8c_a89e475b21fb6422459b48a2985d96e2f}{rt5592\_5ghz\_def\_rf}}[i].\mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04792}04792                             \mbox{\hyperlink{if__run_8c_a89e475b21fb6422459b48a2985d96e2f}{rt5592\_5ghz\_def\_rf}}[i].\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04793}04793                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04794}04794                 \textcolor{keywordflow}{for} (i = 0; i < nitems(\mbox{\hyperlink{if__run_8c_a1379ee8f4def3b95616896346f9d51f0}{rt5592\_chan\_5ghz}}); i++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04795}04795                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} >= \mbox{\hyperlink{if__run_8c_a1379ee8f4def3b95616896346f9d51f0}{rt5592\_chan\_5ghz}}[i].\mbox{\hyperlink{if__run_8c_ada52957e7cb74b184a843692b2be05d3}{firstchan}} \&\&}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04796}04796                             \mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= \mbox{\hyperlink{if__run_8c_a1379ee8f4def3b95616896346f9d51f0}{rt5592\_chan\_5ghz}}[i].\mbox{\hyperlink{if__run_8c_a4d7900db2bf6fd45f7e7d347bd8e9c96}{lastchan}}) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04797}04797                                 \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, \mbox{\hyperlink{if__run_8c_a1379ee8f4def3b95616896346f9d51f0}{rt5592\_chan\_5ghz}}[i].\mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04798}04798                                     \mbox{\hyperlink{if__run_8c_a1379ee8f4def3b95616896346f9d51f0}{rt5592\_chan\_5ghz}}[i].\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04799}04799                         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04800}04800                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04801}04801 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04802}04802                 \textcolor{comment}{/* }}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04803}04803 \textcolor{comment}{                 * RF R49/R50 Tx power ALC code.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04804}04804 \textcolor{comment}{                 * A-\/band bit<7:6>=1:1, bit<5:0> range from 0x0 \string~ 0x2b.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04805}04805 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04806}04806                 \mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} = 3;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04807}04807                 txpow\_bound = 0x2b;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04808}04808         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04809}04809 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04810}04810         \textcolor{comment}{/* RF R49 ch0 Tx power ALC code. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04811}04811         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 49, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04812}04812         rf \&= \string~0xc0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04813}04813         rf |= (\mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} << 6);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04814}04814         rf = (rf \& \string~0x3f) | (txpow1 \& 0x3f);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04815}04815         \textcolor{keywordflow}{if} ((rf \& 0x3f) > txpow\_bound)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04816}04816                 rf = (rf \& \string~0x3f) | txpow\_bound;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04817}04817         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 49, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04818}04818 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04819}04819         \textcolor{comment}{/* RF R50 ch1 Tx power ALC code. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04820}04820         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 50, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04821}04821         rf \&= \string~(1 << 7 | 1 << 6);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04822}04822         rf |= (\mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} << 6);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04823}04823         rf = (rf \& \string~0x3f) | (txpow2 \& 0x3f);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04824}04824         \textcolor{keywordflow}{if} ((rf \& 0x3f) > txpow\_bound)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04825}04825                 rf = (rf \& \string~0x3f) | txpow\_bound;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04826}04826         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 50, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04827}04827 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04828}04828         \textcolor{comment}{/* Enable RF\_BLOCK, PLL\_PD, RX0\_PD, and TX0\_PD. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04829}04829         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 1, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04830}04830         rf |= (\mbox{\hyperlink{if__runreg_8h_a129eab5b4bea4f2daf64ed5790350aea}{RT3070\_RF\_BLOCK}} | \mbox{\hyperlink{if__runreg_8h_a28b2abcb731fbc1662c00fca9e223316}{RT3070\_PLL\_PD}} | \mbox{\hyperlink{if__runreg_8h_a43344c6d2aed204b5f68138dc4f3e5b3}{RT3070\_RX0\_PD}} | \mbox{\hyperlink{if__runreg_8h_a3392c440f463833f8bfb1f3f21787690}{RT3070\_TX0\_PD}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04831}04831         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a67c3c37459a1133495cd627be4037ca6}{ntxchains}} > 1)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04832}04832                 rf |= \mbox{\hyperlink{if__runreg_8h_ab36d9500182ab2f58a29703aa60e2980}{RT3070\_TX1\_PD}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04833}04833         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_abeb252728ca242db18b1574c2687b788}{nrxchains}} > 1)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04834}04834                 rf |= \mbox{\hyperlink{if__runreg_8h_ad9119bb15eacaa673da3994ed5089254}{RT3070\_RX1\_PD}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04835}04835         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 1, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04836}04836 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04837}04837         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 6, 0xe4);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04838}04838 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04839}04839         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 30, 0x10);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04840}04840         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 31, 0x80);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04841}04841         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 32, 0x80);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04842}04842 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04843}04843         \mbox{\hyperlink{if__run_8c_a2ca1d8df0375e88d4b7bdd067485284a}{run\_adjust\_freq\_offset}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04844}04844 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04845}04845         \textcolor{comment}{/* Enable VCO calibration. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04846}04846         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 3, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04847}04847         rf |= \mbox{\hyperlink{if__runreg_8h_a364afaa296cd8c72b738148e860cf030}{RT5390\_VCOCAL}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04848}04848         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 3, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04849}04849 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04850}04850 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04851}04851 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04852}\mbox{\hyperlink{if__run_8c_a2d792cd77b7547b682d6a2ae161458fe}{04852}} \mbox{\hyperlink{if__run_8c_a2d792cd77b7547b682d6a2ae161458fe}{run\_set\_rx\_antenna}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, \textcolor{keywordtype}{int} aux)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04853}04853 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04854}04854         uint32\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04855}04855         uint8\_t bbp152;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04856}04856 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04857}04857         \textcolor{keywordflow}{if} (aux) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04858}04858                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1a20cab629806dd03e9caebd2bdab962}{rf\_rev}} == \mbox{\hyperlink{if__runreg_8h_add9aa109750e8500846a3de98132af35}{RT5390\_RF\_5370}}) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04859}04859                         \mbox{\hyperlink{if__run_8c_abc20e1ae73e45e6ffade8618697f6b8a}{run\_bbp\_read}}(sc, 152, \&bbp152);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04860}04860                         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 152, bbp152 \& \string~0x80);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04861}04861                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04862}04862                         \mbox{\hyperlink{if__run_8c_af551890d568e683ea5614e905506fb1e}{run\_mcu\_cmd}}(sc, \mbox{\hyperlink{if__runreg_8h_ac783afbc59f515b905087a30d5e6ef80}{RT2860\_MCU\_CMD\_ANTSEL}}, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04863}04863                         \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_aff882afcec2608a9e1bf9dd6bdb0dbe4}{RT2860\_GPIO\_CTRL}}, \&tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04864}04864                         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_aff882afcec2608a9e1bf9dd6bdb0dbe4}{RT2860\_GPIO\_CTRL}}, (tmp \& \string~0x0808) | 0x08);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04865}04865                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04866}04866         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04867}04867                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1a20cab629806dd03e9caebd2bdab962}{rf\_rev}} == \mbox{\hyperlink{if__runreg_8h_add9aa109750e8500846a3de98132af35}{RT5390\_RF\_5370}}) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04868}04868                         \mbox{\hyperlink{if__run_8c_abc20e1ae73e45e6ffade8618697f6b8a}{run\_bbp\_read}}(sc, 152, \&bbp152);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04869}04869                         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 152, bbp152 | 0x80);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04870}04870                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04871}04871                         \mbox{\hyperlink{if__run_8c_af551890d568e683ea5614e905506fb1e}{run\_mcu\_cmd}}(sc, \mbox{\hyperlink{if__runreg_8h_ac783afbc59f515b905087a30d5e6ef80}{RT2860\_MCU\_CMD\_ANTSEL}}, 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04872}04872                         \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_aff882afcec2608a9e1bf9dd6bdb0dbe4}{RT2860\_GPIO\_CTRL}}, \&tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04873}04873                         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_aff882afcec2608a9e1bf9dd6bdb0dbe4}{RT2860\_GPIO\_CTRL}}, tmp \& \string~0x0808);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04874}04874                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04875}04875         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04876}04876 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04877}04877 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04878}04878 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04879}\mbox{\hyperlink{if__run_8c_a717abe8d9850e16225bcf651852059ec}{04879}} \mbox{\hyperlink{if__run_8c_a717abe8d9850e16225bcf651852059ec}{run\_set\_chan}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, \textcolor{keyword}{struct} ieee80211\_channel *c)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04880}04880 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04881}04881         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structrun__softc_a475dfeb97bf5936fa250323fa6a1e6ae}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04882}04882         u\_int \mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}}, group;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04883}04883 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04884}04884         \mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} = ieee80211\_chan2ieee(ic, c);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04885}04885         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} == 0 || \mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} == IEEE80211\_CHAN\_ANY)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04886}04886                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04887}04887 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04888}04888         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x5592)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04889}04889                 \mbox{\hyperlink{if__run_8c_a2153e3c2b8ca1c7a060065650e9ec32e}{run\_rt5592\_set\_chan}}(sc, \mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04890}04890         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} >= 0x5390)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04891}04891                 \mbox{\hyperlink{if__run_8c_a20f50fe7da9e189e0670738f5695544d}{run\_rt5390\_set\_chan}}(sc, \mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04892}04892         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3593)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04893}04893                 \mbox{\hyperlink{if__run_8c_aac9f7b8769745236b69d70e0e55f3d6b}{run\_rt3593\_set\_chan}}(sc, \mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04894}04894         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3572)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04895}04895                 \mbox{\hyperlink{if__run_8c_a10d963c4d5bfa529db0aab57a0b329b4}{run\_rt3572\_set\_chan}}(sc, \mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04896}04896         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} >= 0x3070)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04897}04897                 \mbox{\hyperlink{if__run_8c_a73d0f4681b58c5d82b674044ea2d8b4d}{run\_rt3070\_set\_chan}}(sc, \mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04898}04898         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04899}04899                 \mbox{\hyperlink{if__run_8c_a110cbd1d9701a3de2015969e851f9867}{run\_rt2870\_set\_chan}}(sc, \mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04900}04900 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04901}04901         \textcolor{comment}{/* determine channel group */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04902}04902         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 14)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04903}04903                 group = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04904}04904         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 64)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04905}04905                 group = 1;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04906}04906         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 128)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04907}04907                 group = 2;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04908}04908         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04909}04909                 group = 3;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04910}04910 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04911}04911         \textcolor{comment}{/* XXX necessary only when group has changed! */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04912}04912         \mbox{\hyperlink{if__run_8c_acfca3112a6a8420399bce9ac5f2cfa24}{run\_select\_chan\_group}}(sc, group);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04913}04913 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04914}04914         \mbox{\hyperlink{if__run_8c_a92b12f7b350001cb12d558c3fb85e0c5}{run\_delay}}(sc, 10);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04915}04915 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04916}04916         \textcolor{comment}{/* Perform IQ calibration. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04917}04917         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} >= 0x5392)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04918}04918                 \mbox{\hyperlink{if__run_8c_a2689dd01ea1f8d7c4a19861a285732a4}{run\_iq\_calib}}(sc, \mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04919}04919 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04920}04920         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04921}04921 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04922}04922 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04923}04923 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04924}\mbox{\hyperlink{if__run_8c_a69f5d157ebc62993cb2ae9f44c8f01bf}{04924}} \mbox{\hyperlink{if__run_8c_a69f5d157ebc62993cb2ae9f44c8f01bf}{run\_set\_channel}}(\textcolor{keyword}{struct} ieee80211com *ic)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04925}04925 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04926}04926         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04927}04927 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04928}04928         \mbox{\hyperlink{if__runvar_8h_afb83ba5b9cfa86e30eb1e74fe2267cea}{RUN\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04929}04929         \mbox{\hyperlink{if__run_8c_a717abe8d9850e16225bcf651852059ec}{run\_set\_chan}}(sc, ic-\/>ic\_curchan);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04930}04930         \mbox{\hyperlink{if__runvar_8h_a45d3b538b97178f8fe93284ed57e2cd5}{RUN\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04931}04931 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04932}04932         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04933}04933 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04934}04934 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04935}04935 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04936}\mbox{\hyperlink{if__run_8c_afb7c8db84ef9e15393a681b15e2f25d4}{04936}} \mbox{\hyperlink{if__run_8c_afb7c8db84ef9e15393a681b15e2f25d4}{run\_getradiocaps}}(\textcolor{keyword}{struct} ieee80211com *ic,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04937}04937     \textcolor{keywordtype}{int} maxchans, \textcolor{keywordtype}{int} *nchans, \textcolor{keyword}{struct} ieee80211\_channel chans[])}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04938}04938 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04939}04939         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04940}04940         uint8\_t bands[IEEE80211\_MODE\_BYTES];}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04941}04941 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04942}04942         memset(bands, 0, \textcolor{keyword}{sizeof}(bands));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04943}04943         setbit(bands, IEEE80211\_MODE\_11B);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04944}04944         setbit(bands, IEEE80211\_MODE\_11G);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04945}04945         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1a20cab629806dd03e9caebd2bdab962}{rf\_rev}} != \mbox{\hyperlink{if__runreg_8h_aff045a547d03206f2d6235560bc5f0e5}{RT3070\_RF\_2020}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04946}04946                 setbit(bands, IEEE80211\_MODE\_11NG);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04947}04947 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04948}04948         \textcolor{comment}{/* Note: for now, only support HT20 channels */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04949}04949         ieee80211\_add\_channels\_default\_2ghz(chans, maxchans, nchans, bands, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04950}04950 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04951}04951         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1a20cab629806dd03e9caebd2bdab962}{rf\_rev}} == \mbox{\hyperlink{if__runreg_8h_a750bb27d3442343b236f2b33752f6958}{RT2860\_RF\_2750}} || sc-\/>\mbox{\hyperlink{structrun__softc_a1a20cab629806dd03e9caebd2bdab962}{rf\_rev}} == \mbox{\hyperlink{if__runreg_8h_aeafca53d5188b4446e24974818a73865}{RT2860\_RF\_2850}} ||}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04952}04952             sc-\/>\mbox{\hyperlink{structrun__softc_a1a20cab629806dd03e9caebd2bdab962}{rf\_rev}} == \mbox{\hyperlink{if__runreg_8h_a89435118bb436be0bb0839a16fab636c}{RT3070\_RF\_3052}} || sc-\/>\mbox{\hyperlink{structrun__softc_a1a20cab629806dd03e9caebd2bdab962}{rf\_rev}} == \mbox{\hyperlink{if__runreg_8h_afc4d0b9aa7848176cce382ee9c95136b}{RT3593\_RF\_3053}} ||}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04953}04953             sc-\/>\mbox{\hyperlink{structrun__softc_a1a20cab629806dd03e9caebd2bdab962}{rf\_rev}} == \mbox{\hyperlink{if__runreg_8h_ada3c3d76bed60493ac0849aacf68c459}{RT5592\_RF\_5592}}) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04954}04954                 setbit(bands, IEEE80211\_MODE\_11A);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04955}04955                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1a20cab629806dd03e9caebd2bdab962}{rf\_rev}} != \mbox{\hyperlink{if__runreg_8h_aff045a547d03206f2d6235560bc5f0e5}{RT3070\_RF\_2020}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04956}04956                         setbit(bands, IEEE80211\_MODE\_11NA);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04957}04957                 \textcolor{comment}{/* Note: for now, only support HT20 channels */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04958}04958                 ieee80211\_add\_channel\_list\_5ghz(chans, maxchans, nchans,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04959}04959                     \mbox{\hyperlink{if__runreg_8h_acdce61094896f92d33c7fd0419507e01}{run\_chan\_5ghz}}, nitems(\mbox{\hyperlink{if__runreg_8h_acdce61094896f92d33c7fd0419507e01}{run\_chan\_5ghz}}), bands, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04960}04960         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04961}04961 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04962}04962 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04963}04963 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04964}\mbox{\hyperlink{if__run_8c_a0e08633473c486c9bb7c1f9e04c07d4e}{04964}} \mbox{\hyperlink{if__run_8c_a0e08633473c486c9bb7c1f9e04c07d4e}{run\_scan\_start}}(\textcolor{keyword}{struct} ieee80211com *ic)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04965}04965 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04966}04966         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04967}04967 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04968}04968         \mbox{\hyperlink{if__runvar_8h_afb83ba5b9cfa86e30eb1e74fe2267cea}{RUN\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04969}04969 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04970}04970         \textcolor{comment}{/* abort TSF synchronization */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04971}04971         \mbox{\hyperlink{if__run_8c_a4b9834f174786bcc92da7d8e788d0c4c}{run\_disable\_tsf}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04972}04972         \mbox{\hyperlink{if__run_8c_a4516b912a2489e9939a535b1b99a1bdf}{run\_set\_bssid}}(sc, ieee80211broadcastaddr);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04973}04973 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04974}04974         \mbox{\hyperlink{if__runvar_8h_a45d3b538b97178f8fe93284ed57e2cd5}{RUN\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04975}04975 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04976}04976         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04977}04977 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04978}04978 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04979}04979 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04980}\mbox{\hyperlink{if__run_8c_a4b6060a46c3e742249986bb8bc5bbe58}{04980}} \mbox{\hyperlink{if__run_8c_a4b6060a46c3e742249986bb8bc5bbe58}{run\_scan\_end}}(\textcolor{keyword}{struct} ieee80211com *ic)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04981}04981 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04982}04982         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04983}04983 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04984}04984         \mbox{\hyperlink{if__runvar_8h_afb83ba5b9cfa86e30eb1e74fe2267cea}{RUN\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04985}04985 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04986}04986         \mbox{\hyperlink{if__run_8c_a919f3dd64163f08124102ccb41930014}{run\_enable\_tsf\_sync}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04987}04987         \mbox{\hyperlink{if__run_8c_a4516b912a2489e9939a535b1b99a1bdf}{run\_set\_bssid}}(sc, sc-\/>\mbox{\hyperlink{structrun__softc_ae60c005a84561cfc167b3ca4161b3e33}{sc\_bssid}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04988}04988 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04989}04989         \mbox{\hyperlink{if__runvar_8h_a45d3b538b97178f8fe93284ed57e2cd5}{RUN\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04990}04990 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04991}04991         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04992}04992 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04993}04993 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04994}04994 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04995}04995 \textcolor{comment}{ * Could be called from ieee80211\_node\_timeout()}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04996}04996 \textcolor{comment}{ * (non-\/sleepable thread)}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04997}04997 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04998}04998 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l04999}\mbox{\hyperlink{if__run_8c_a4b03d589a18e3ff1f9538cdaf953f669}{04999}} \mbox{\hyperlink{if__run_8c_a4b03d589a18e3ff1f9538cdaf953f669}{run\_update\_beacon}}(\textcolor{keyword}{struct} ieee80211vap *vap, \textcolor{keywordtype}{int} item)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05000}05000 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05001}05001         \textcolor{keyword}{struct }ieee80211com *ic = vap-\/>iv\_ic;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05002}05002         \textcolor{keyword}{struct }ieee80211\_beacon\_offsets *bo = \&vap-\/>iv\_bcn\_off;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05003}05003         \textcolor{keyword}{struct }ieee80211\_node *ni = vap-\/>iv\_bss;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05004}05004         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05005}05005         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__vap}{run\_vap}} *rvp = \mbox{\hyperlink{if__runvar_8h_a04216c15e7dce0789f22dc3831e15869}{RUN\_VAP}}(\mbox{\hyperlink{structrun__vap_a486ec51658db5e3e238fc907e1e4f0bf}{vap}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05006}05006         \textcolor{keywordtype}{int} mcast = 0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05007}05007         uint32\_t i;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05008}05008 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05009}05009         \textcolor{keywordflow}{switch} (item) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05010}05010         \textcolor{keywordflow}{case} IEEE80211\_BEACON\_ERP:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05011}05011                 \mbox{\hyperlink{if__run_8c_a5f9ad8fd4a1febc68b268bbeeba9fac2}{run\_updateslot}}(ic);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05012}05012                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05013}05013         \textcolor{keywordflow}{case} IEEE80211\_BEACON\_HTINFO:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05014}05014                 \mbox{\hyperlink{if__run_8c_af6e347625bddc484ddc8a5a00c0edfb4}{run\_updateprot}}(ic);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05015}05015                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05016}05016         \textcolor{keywordflow}{case} IEEE80211\_BEACON\_TIM:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05017}05017                 mcast = 1;      \textcolor{comment}{/*TODO*/}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05018}05018                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05019}05019         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05020}05020                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05021}05021         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05022}05022 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05023}05023         setbit(bo-\/>bo\_flags, item);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05024}05024         \textcolor{keywordflow}{if} (rvp-\/>\mbox{\hyperlink{structrun__vap_ae4fdb0538e4abb3d28b3ecd67b8a8f09}{beacon\_mbuf}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05025}05025                 rvp-\/>\mbox{\hyperlink{structrun__vap_ae4fdb0538e4abb3d28b3ecd67b8a8f09}{beacon\_mbuf}} = ieee80211\_beacon\_alloc(ni);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05026}05026                 \textcolor{keywordflow}{if} (rvp-\/>\mbox{\hyperlink{structrun__vap_ae4fdb0538e4abb3d28b3ecd67b8a8f09}{beacon\_mbuf}} == NULL)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05027}05027                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05028}05028         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05029}05029         ieee80211\_beacon\_update(ni, rvp-\/>\mbox{\hyperlink{structrun__vap_ae4fdb0538e4abb3d28b3ecd67b8a8f09}{beacon\_mbuf}}, mcast);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05030}05030 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05031}05031         i = \mbox{\hyperlink{if__run_8c_ab51c04f6574bfdc56c82a56b5800c32b}{RUN\_CMDQ\_GET}}(\&sc-\/>\mbox{\hyperlink{structrun__softc_aa15ecf9db15b3ffda49a044842caf644}{cmdq\_store}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05032}05032         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_BEACON, \textcolor{stringliteral}{"{}cmdq\_store=\%d\(\backslash\)n"{}}, i);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05033}05033         sc-\/>\mbox{\hyperlink{structrun__softc_a9500a13eb58aab1b19d1149c55235640}{cmdq}}[i].\mbox{\hyperlink{structrun__cmdq_a8bd79bf0dffc9ec5341a2d955f19f31e}{func}} = \mbox{\hyperlink{if__run_8c_a5f68509146f99c809c969ba8d5ef40a8}{run\_update\_beacon\_cb}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05034}05034         sc-\/>\mbox{\hyperlink{structrun__softc_a9500a13eb58aab1b19d1149c55235640}{cmdq}}[i].\mbox{\hyperlink{structrun__cmdq_a44148050f8e128fac3651617eecad099}{arg0}} = \mbox{\hyperlink{structrun__vap_a486ec51658db5e3e238fc907e1e4f0bf}{vap}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05035}05035         ieee80211\_runtask(ic, \&sc-\/>\mbox{\hyperlink{structrun__softc_ae805f800f38298655ad01aa36980dc38}{cmdq\_task}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05036}05036 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05037}05037         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05038}05038 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05039}05039 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05040}05040 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05041}\mbox{\hyperlink{if__run_8c_a5f68509146f99c809c969ba8d5ef40a8}{05041}} \mbox{\hyperlink{if__run_8c_a5f68509146f99c809c969ba8d5ef40a8}{run\_update\_beacon\_cb}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05042}05042 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05043}05043         \textcolor{keyword}{struct }ieee80211vap *vap = arg;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05044}05044         \textcolor{keyword}{struct }ieee80211\_node *ni = vap-\/>iv\_bss;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05045}05045         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__vap}{run\_vap}} *rvp = \mbox{\hyperlink{if__runvar_8h_a04216c15e7dce0789f22dc3831e15869}{RUN\_VAP}}(\mbox{\hyperlink{structrun__vap_a486ec51658db5e3e238fc907e1e4f0bf}{vap}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05046}05046         \textcolor{keyword}{struct }ieee80211com *ic = vap-\/>iv\_ic;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05047}05047         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05048}05048         \textcolor{keyword}{struct }\mbox{\hyperlink{structrt2860__txwi}{rt2860\_txwi}} txwi;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05049}05049         \textcolor{keyword}{struct }mbuf *m;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05050}05050         uint16\_t txwisize;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05051}05051         uint8\_t ridx;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05052}05052 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05053}05053         \textcolor{keywordflow}{if} (ni-\/>ni\_chan == IEEE80211\_CHAN\_ANYC)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05054}05054                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05055}05055         \textcolor{keywordflow}{if} (ic-\/>ic\_bsschan == IEEE80211\_CHAN\_ANYC)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05056}05056                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05057}05057 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05058}05058         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05059}05059 \textcolor{comment}{         * No need to call ieee80211\_beacon\_update(), run\_update\_beacon()}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05060}05060 \textcolor{comment}{         * is taking care of appropriate calls.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05061}05061 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05062}05062         \textcolor{keywordflow}{if} (rvp-\/>\mbox{\hyperlink{structrun__vap_ae4fdb0538e4abb3d28b3ecd67b8a8f09}{beacon\_mbuf}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05063}05063                 rvp-\/>\mbox{\hyperlink{structrun__vap_ae4fdb0538e4abb3d28b3ecd67b8a8f09}{beacon\_mbuf}} = ieee80211\_beacon\_alloc(ni);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05064}05064                 \textcolor{keywordflow}{if} (rvp-\/>\mbox{\hyperlink{structrun__vap_ae4fdb0538e4abb3d28b3ecd67b8a8f09}{beacon\_mbuf}} == NULL)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05065}05065                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05066}05066         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05067}05067         m = rvp-\/>\mbox{\hyperlink{structrun__vap_ae4fdb0538e4abb3d28b3ecd67b8a8f09}{beacon\_mbuf}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05068}05068 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05069}05069         memset(\&txwi, 0, \textcolor{keyword}{sizeof}(txwi));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05070}05070         txwi.\mbox{\hyperlink{structrt2860__txwi_a97116de0c7190fde55fd46cad1c2a2a0}{wcid}} = 0xff;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05071}05071         txwi.\mbox{\hyperlink{structrt2860__txwi_a8600fc81df7fa8dff3d460f4d3ce4c23}{len}} = htole16(m-\/>m\_pkthdr.len);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05072}05072 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05073}05073         \textcolor{comment}{/* send beacons at the lowest available rate */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05074}05074         ridx = (ic-\/>ic\_curmode == IEEE80211\_MODE\_11A) ?}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05075}05075             \mbox{\hyperlink{if__run_8c_a7cd8380edf7054526c4a83dfc0ba4fe7}{RT2860\_RIDX\_OFDM6}} : \mbox{\hyperlink{if__run_8c_a422a4d05e17982d11e390dd6455f07c0}{RT2860\_RIDX\_CCK1}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05076}05076         txwi.\mbox{\hyperlink{structrt2860__txwi_ab1140c2bc0aede788659636107a94ec8}{phy}} = htole16(\mbox{\hyperlink{if__run_8c_ab543147498aaf00bd04fe0a18a6c6a74}{rt2860\_rates}}[ridx].mcs);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05077}05077         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_ab543147498aaf00bd04fe0a18a6c6a74}{rt2860\_rates}}[ridx].phy == IEEE80211\_T\_OFDM)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05078}05078                 txwi.\mbox{\hyperlink{structrt2860__txwi_ab1140c2bc0aede788659636107a94ec8}{phy}} |= htole16(\mbox{\hyperlink{if__runreg_8h_a79d9f4ffc5d0aa9734711be2e5a0df53}{RT2860\_PHY\_OFDM}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05079}05079         txwi.\mbox{\hyperlink{structrt2860__txwi_afabdd4cc8b6c14bc5b1823ec5145b910}{txop}} = \mbox{\hyperlink{if__runreg_8h_a5b89fb14a74b74d8e797f748970ea6e7}{RT2860\_TX\_TXOP\_HT}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05080}05080         txwi.\mbox{\hyperlink{structrt2860__txwi_ad5c74efeb2ba118b395a75aa25423276}{flags}} = \mbox{\hyperlink{if__runreg_8h_a91281711e31e89c3b4f22a16ae1a6d1c}{RT2860\_TX\_TS}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05081}05081         txwi.\mbox{\hyperlink{structrt2860__txwi_ae10df0e5eb585d998073199569ccc499}{xflags}} = \mbox{\hyperlink{if__runreg_8h_adf3a5b463f105f25f48745bd6719e2db}{RT2860\_TX\_NSEQ}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05082}05082 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05083}05083         txwisize = (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x5592) ?}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05084}05084             \textcolor{keyword}{sizeof}(txwi) + \textcolor{keyword}{sizeof}(uint32\_t) : \textcolor{keyword}{sizeof}(txwi);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05085}05085         \mbox{\hyperlink{if__run_8c_a366ce11d14b4e5e3700232866441c12c}{run\_write\_region\_1}}(sc, \mbox{\hyperlink{if__runreg_8h_affdbbb6a91de61c6cb45a1e829599d18}{RT2860\_BCN\_BASE}}(rvp-\/>\mbox{\hyperlink{structrun__vap_a8ffa8613b55b52ad41c7d293cb35ec63}{rvp\_id}}), (uint8\_t *)\&txwi,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05086}05086             txwisize);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05087}05087         \mbox{\hyperlink{if__run_8c_a366ce11d14b4e5e3700232866441c12c}{run\_write\_region\_1}}(sc, \mbox{\hyperlink{if__runreg_8h_affdbbb6a91de61c6cb45a1e829599d18}{RT2860\_BCN\_BASE}}(rvp-\/>\mbox{\hyperlink{structrun__vap_a8ffa8613b55b52ad41c7d293cb35ec63}{rvp\_id}}) + txwisize,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05088}05088             mtod(m, uint8\_t *), (m-\/>m\_pkthdr.len + 1) \& \string~1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05089}05089 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05090}05090 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05091}05091 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05092}\mbox{\hyperlink{if__run_8c_af6e347625bddc484ddc8a5a00c0edfb4}{05092}} \mbox{\hyperlink{if__run_8c_af6e347625bddc484ddc8a5a00c0edfb4}{run\_updateprot}}(\textcolor{keyword}{struct} ieee80211com *ic)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05093}05093 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05094}05094         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05095}05095         uint32\_t i;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05096}05096 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05097}05097         i = \mbox{\hyperlink{if__run_8c_ab51c04f6574bfdc56c82a56b5800c32b}{RUN\_CMDQ\_GET}}(\&sc-\/>\mbox{\hyperlink{structrun__softc_aa15ecf9db15b3ffda49a044842caf644}{cmdq\_store}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05098}05098         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_BEACON, \textcolor{stringliteral}{"{}cmdq\_store=\%d\(\backslash\)n"{}}, i);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05099}05099         sc-\/>\mbox{\hyperlink{structrun__softc_a9500a13eb58aab1b19d1149c55235640}{cmdq}}[i].\mbox{\hyperlink{structrun__cmdq_a8bd79bf0dffc9ec5341a2d955f19f31e}{func}} = \mbox{\hyperlink{if__run_8c_a91c6c1e62ce1500100420f9eb39970e3}{run\_updateprot\_cb}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05100}05100         sc-\/>\mbox{\hyperlink{structrun__softc_a9500a13eb58aab1b19d1149c55235640}{cmdq}}[i].\mbox{\hyperlink{structrun__cmdq_a44148050f8e128fac3651617eecad099}{arg0}} = ic;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05101}05101         ieee80211\_runtask(ic, \&sc-\/>\mbox{\hyperlink{structrun__softc_ae805f800f38298655ad01aa36980dc38}{cmdq\_task}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05102}05102 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05103}05103 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05104}05104 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05105}\mbox{\hyperlink{if__run_8c_a91c6c1e62ce1500100420f9eb39970e3}{05105}} \mbox{\hyperlink{if__run_8c_a91c6c1e62ce1500100420f9eb39970e3}{run\_updateprot\_cb}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05106}05106 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05107}05107         \textcolor{keyword}{struct }ieee80211com *ic = arg;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05108}05108         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05109}05109         uint32\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05110}05110 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05111}05111         tmp = \mbox{\hyperlink{if__runreg_8h_aaeafc3d179fd267dd147c1d2cc0024b6}{RT2860\_RTSTH\_EN}} | \mbox{\hyperlink{if__runreg_8h_ac7c0c931d3db0ae5792187276095b8ce}{RT2860\_PROT\_NAV\_SHORT}} | \mbox{\hyperlink{if__runreg_8h_a79af6a3f9cd59aa036d16772f6e42c91}{RT2860\_TXOP\_ALLOW\_ALL}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05112}05112         \textcolor{comment}{/* setup protection frame rate (MCS code) */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05113}05113         tmp |= (ic-\/>ic\_curmode == IEEE80211\_MODE\_11A) ?}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05114}05114             \mbox{\hyperlink{if__run_8c_ab543147498aaf00bd04fe0a18a6c6a74}{rt2860\_rates}}[\mbox{\hyperlink{if__run_8c_a7cd8380edf7054526c4a83dfc0ba4fe7}{RT2860\_RIDX\_OFDM6}}].mcs | \mbox{\hyperlink{if__runreg_8h_a79d9f4ffc5d0aa9734711be2e5a0df53}{RT2860\_PHY\_OFDM}} :}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05115}05115             \mbox{\hyperlink{if__run_8c_ab543147498aaf00bd04fe0a18a6c6a74}{rt2860\_rates}}[\mbox{\hyperlink{if__run_8c_af9c77c0ca9c12f7d1c530bae6bb1edcf}{RT2860\_RIDX\_CCK11}}].mcs;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05116}05116 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05117}05117         \textcolor{comment}{/* CCK frames don't require protection */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05118}05118         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a76adfa7716340b2f852a01d810da811b}{RT2860\_CCK\_PROT\_CFG}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05119}05119         \textcolor{keywordflow}{if} (ic-\/>ic\_flags \& IEEE80211\_F\_USEPROT) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05120}05120                 \textcolor{keywordflow}{if} (ic-\/>ic\_protmode == IEEE80211\_PROT\_RTSCTS)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05121}05121                         tmp |= \mbox{\hyperlink{if__runreg_8h_a158c7bc5a4e1d7dfbe08850477e69b1f}{RT2860\_PROT\_CTRL\_RTS\_CTS}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05122}05122                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (ic-\/>ic\_protmode == IEEE80211\_PROT\_CTSONLY)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05123}05123                         tmp |= \mbox{\hyperlink{if__runreg_8h_afcdf343e760430c920f37f66491c01f6}{RT2860\_PROT\_CTRL\_CTS}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05124}05124         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05125}05125         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a3de5ae79dde58c52cd9ec00196f2ca4f}{RT2860\_OFDM\_PROT\_CFG}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05126}05126 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05127}05127 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05128}05128 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05129}\mbox{\hyperlink{if__run_8c_a4ab9667b9d26855695ced3803230299c}{05129}} \mbox{\hyperlink{if__run_8c_a4ab9667b9d26855695ced3803230299c}{run\_usb\_timeout\_cb}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05130}05130 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05131}05131         \textcolor{keyword}{struct }ieee80211vap *vap = arg;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05132}05132         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *sc = vap-\/>iv\_ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05133}05133 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05134}05134         \mbox{\hyperlink{if__runvar_8h_a46923988c8f3d1896339650dd4bf5f53}{RUN\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05135}05135 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05136}05136         \textcolor{keywordflow}{if}(vap-\/>iv\_state == IEEE80211\_S\_RUN \&\&}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05137}05137             vap-\/>iv\_opmode != IEEE80211\_M\_STA)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05138}05138                 \mbox{\hyperlink{if__run_8c_a1a5622645062abcde09a94e9808f48ef}{run\_reset\_livelock}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05139}05139         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (vap-\/>iv\_state == IEEE80211\_S\_SCAN) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05140}05140                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_USB | RUN\_DEBUG\_STATE,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05141}05141                     \textcolor{stringliteral}{"{}timeout caused by scan\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05142}05142                 \textcolor{comment}{/* cancel bgscan */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05143}05143                 ieee80211\_cancel\_scan(vap);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05144}05144         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05145}05145                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_USB | RUN\_DEBUG\_STATE,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05146}05146                     \textcolor{stringliteral}{"{}timeout by unknown cause\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05147}05147 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05148}05148 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05149}05149 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05150}\mbox{\hyperlink{if__run_8c_a1a5622645062abcde09a94e9808f48ef}{05150}} \mbox{\hyperlink{if__run_8c_a1a5622645062abcde09a94e9808f48ef}{run\_reset\_livelock}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05151}05151 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05152}05152         uint32\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05153}05153 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05154}05154         \mbox{\hyperlink{if__runvar_8h_a46923988c8f3d1896339650dd4bf5f53}{RUN\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05155}05155 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05156}05156         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05157}05157 \textcolor{comment}{         * In IBSS or HostAP modes (when the hardware sends beacons), the MAC}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05158}05158 \textcolor{comment}{         * can run into a livelock and start sending CTS-\/to-\/self frames like}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05159}05159 \textcolor{comment}{         * crazy if protection is enabled.  Reset MAC/BBP for a while}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05160}05160 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05161}05161         \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a786c94eaaa2d2848dfb639af0557c702}{RT2860\_DEBUG}}, \&tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05162}05162         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_RESET, \textcolor{stringliteral}{"{}debug reg \%08x\(\backslash\)n"{}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05163}05163         \textcolor{keywordflow}{if} ((tmp \& (1 << 29)) \&\& (tmp \& (1 << 7 | 1 << 5))) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05164}05164                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_RESET,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05165}05165                     \textcolor{stringliteral}{"{}CTS-\/to-\/self livelock detected\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05166}05166                 \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a5e4990071cffacab52a14f31dec5721d}{RT2860\_MAC\_SYS\_CTRL}}, \mbox{\hyperlink{if__runreg_8h_abab677b0ab94b680bf89336ce073c560}{RT2860\_MAC\_SRST}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05167}05167                 \mbox{\hyperlink{if__run_8c_a92b12f7b350001cb12d558c3fb85e0c5}{run\_delay}}(sc, 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05168}05168                 \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a5e4990071cffacab52a14f31dec5721d}{RT2860\_MAC\_SYS\_CTRL}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05169}05169                     \mbox{\hyperlink{if__runreg_8h_a50b11ecd5acb21d5e4a6ffcdea64eff6}{RT2860\_MAC\_RX\_EN}} | \mbox{\hyperlink{if__runreg_8h_af0f3ca1039aae4714af7601599c96d6e}{RT2860\_MAC\_TX\_EN}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05170}05170         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05171}05171 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05172}05172 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05173}05173 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05174}\mbox{\hyperlink{if__run_8c_aff14172871a208dbc4da28b9479709c9}{05174}} \mbox{\hyperlink{if__run_8c_aff14172871a208dbc4da28b9479709c9}{run\_update\_promisc\_locked}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05175}05175 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05176}05176         uint32\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05177}05177 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05178}05178         \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a5b50b06040e8eba94dd0f70f15dca2dc}{RT2860\_RX\_FILTR\_CFG}}, \&tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05179}05179 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05180}05180         tmp |= \mbox{\hyperlink{if__runreg_8h_a2f1d34e33ed0cf37ec49bd698b05dfb7}{RT2860\_DROP\_UC\_NOME}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05181}05181         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a475dfeb97bf5936fa250323fa6a1e6ae}{sc\_ic}}.ic\_promisc > 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05182}05182                 tmp \&= \string~RT2860\_DROP\_UC\_NOME;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05183}05183 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05184}05184         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a5b50b06040e8eba94dd0f70f15dca2dc}{RT2860\_RX\_FILTR\_CFG}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05185}05185 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05186}05186         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_RECV, \textcolor{stringliteral}{"{}\%s promiscuous mode\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05187}05187             (sc-\/>\mbox{\hyperlink{structrun__softc_a475dfeb97bf5936fa250323fa6a1e6ae}{sc\_ic}}.ic\_promisc > 0) ?  \textcolor{stringliteral}{"{}entering"{}} : \textcolor{stringliteral}{"{}leaving"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05188}05188 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05189}05189 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05190}05190 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05191}\mbox{\hyperlink{if__run_8c_ab852b8342790898b05f6789785740695}{05191}} \mbox{\hyperlink{if__run_8c_ab852b8342790898b05f6789785740695}{run\_update\_promisc}}(\textcolor{keyword}{struct} ieee80211com *ic)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05192}05192 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05193}05193         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05194}05194 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05195}05195         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structrun__softc_ae1260c15661b04d2cc04867c70e3df41}{sc\_flags}} \& \mbox{\hyperlink{if__runvar_8h_a4d0bc8a7e4cf8003139e1ee4d3d6930e}{RUN\_RUNNING}}) == 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05196}05196                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05197}05197 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05198}05198         \mbox{\hyperlink{if__runvar_8h_afb83ba5b9cfa86e30eb1e74fe2267cea}{RUN\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05199}05199         \mbox{\hyperlink{if__run_8c_aff14172871a208dbc4da28b9479709c9}{run\_update\_promisc\_locked}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05200}05200         \mbox{\hyperlink{if__runvar_8h_a45d3b538b97178f8fe93284ed57e2cd5}{RUN\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05201}05201 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05202}05202 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05203}05203 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05204}\mbox{\hyperlink{if__run_8c_a919f3dd64163f08124102ccb41930014}{05204}} \mbox{\hyperlink{if__run_8c_a919f3dd64163f08124102ccb41930014}{run\_enable\_tsf\_sync}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05205}05205 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05206}05206         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structrun__softc_a475dfeb97bf5936fa250323fa6a1e6ae}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05207}05207         \textcolor{keyword}{struct }ieee80211vap *vap = TAILQ\_FIRST(\&ic-\/>ic\_vaps);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05208}05208         uint32\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05209}05209 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05210}05210         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_BEACON, \textcolor{stringliteral}{"{}rvp\_id=\%d ic\_opmode=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05211}05211             \mbox{\hyperlink{if__runvar_8h_a04216c15e7dce0789f22dc3831e15869}{RUN\_VAP}}(vap)-\/>rvp\_id, ic-\/>ic\_opmode);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05212}05212 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05213}05213         \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a6b8427e9787d074d1e3f6e7d84147235}{RT2860\_BCN\_TIME\_CFG}}, \&tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05214}05214         tmp \&= \string~0x1fffff;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05215}05215         tmp |= vap-\/>iv\_bss-\/>ni\_intval * 16;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05216}05216         tmp |= \mbox{\hyperlink{if__runreg_8h_aa462eb15179c147b6c51c481feae68fd}{RT2860\_TSF\_TIMER\_EN}} | \mbox{\hyperlink{if__runreg_8h_a227018a292bce5ac7dc62a8c2b94c920}{RT2860\_TBTT\_TIMER\_EN}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05217}05217 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05218}05218         \textcolor{keywordflow}{if} (ic-\/>ic\_opmode == IEEE80211\_M\_STA) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05219}05219                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05220}05220 \textcolor{comment}{                 * Local TSF is always updated with remote TSF on beacon}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05221}05221 \textcolor{comment}{                 * reception.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05222}05222 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05223}05223                 tmp |= 1 << \mbox{\hyperlink{if__runreg_8h_aab47afbad4d6e47d253ee9f87be3fd16}{RT2860\_TSF\_SYNC\_MODE\_SHIFT}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05224}05224         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (ic-\/>ic\_opmode == IEEE80211\_M\_IBSS) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05225}05225                 tmp |= \mbox{\hyperlink{if__runreg_8h_a05cd8075c5d2ca3e8308846f47a281f7}{RT2860\_BCN\_TX\_EN}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05226}05226                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05227}05227 \textcolor{comment}{                 * Local TSF is updated with remote TSF on beacon reception}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05228}05228 \textcolor{comment}{                 * only if the remote TSF is greater than local TSF.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05229}05229 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05230}05230                 tmp |= 2 << \mbox{\hyperlink{if__runreg_8h_aab47afbad4d6e47d253ee9f87be3fd16}{RT2860\_TSF\_SYNC\_MODE\_SHIFT}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05231}05231         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (ic-\/>ic\_opmode == IEEE80211\_M\_HOSTAP ||}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05232}05232                     ic-\/>ic\_opmode == IEEE80211\_M\_MBSS) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05233}05233                 tmp |= \mbox{\hyperlink{if__runreg_8h_a05cd8075c5d2ca3e8308846f47a281f7}{RT2860\_BCN\_TX\_EN}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05234}05234                 \textcolor{comment}{/* SYNC with nobody */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05235}05235                 tmp |= 3 << \mbox{\hyperlink{if__runreg_8h_aab47afbad4d6e47d253ee9f87be3fd16}{RT2860\_TSF\_SYNC\_MODE\_SHIFT}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05236}05236         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05237}05237                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_BEACON,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05238}05238                     \textcolor{stringliteral}{"{}Enabling TSF failed. undefined opmode\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05239}05239                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05240}05240         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05241}05241 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05242}05242         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a6b8427e9787d074d1e3f6e7d84147235}{RT2860\_BCN\_TIME\_CFG}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05243}05243 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05244}05244 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05245}05245 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05246}\mbox{\hyperlink{if__run_8c_a1176c339f5e95c5b7303ae4a22deac19}{05246}} \mbox{\hyperlink{if__run_8c_a1176c339f5e95c5b7303ae4a22deac19}{run\_enable\_tsf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05247}05247 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05248}05248         uint32\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05249}05249 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05250}05250         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a6b8427e9787d074d1e3f6e7d84147235}{RT2860\_BCN\_TIME\_CFG}}, \&tmp) == 0) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05251}05251                 tmp \&= \string~(\mbox{\hyperlink{if__runreg_8h_a05cd8075c5d2ca3e8308846f47a281f7}{RT2860\_BCN\_TX\_EN}} | \mbox{\hyperlink{if__runreg_8h_a227018a292bce5ac7dc62a8c2b94c920}{RT2860\_TBTT\_TIMER\_EN}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05252}05252                 tmp |= \mbox{\hyperlink{if__runreg_8h_aa462eb15179c147b6c51c481feae68fd}{RT2860\_TSF\_TIMER\_EN}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05253}05253                 \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a6b8427e9787d074d1e3f6e7d84147235}{RT2860\_BCN\_TIME\_CFG}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05254}05254         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05255}05255 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05256}05256 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05257}05257 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05258}\mbox{\hyperlink{if__run_8c_a4b9834f174786bcc92da7d8e788d0c4c}{05258}} \mbox{\hyperlink{if__run_8c_a4b9834f174786bcc92da7d8e788d0c4c}{run\_disable\_tsf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05259}05259 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05260}05260         uint32\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05261}05261 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05262}05262         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a6b8427e9787d074d1e3f6e7d84147235}{RT2860\_BCN\_TIME\_CFG}}, \&tmp) == 0) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05263}05263                 tmp \&= \string~(\mbox{\hyperlink{if__runreg_8h_a05cd8075c5d2ca3e8308846f47a281f7}{RT2860\_BCN\_TX\_EN}} | \mbox{\hyperlink{if__runreg_8h_aa462eb15179c147b6c51c481feae68fd}{RT2860\_TSF\_TIMER\_EN}} |}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05264}05264                     \mbox{\hyperlink{if__runreg_8h_a227018a292bce5ac7dc62a8c2b94c920}{RT2860\_TBTT\_TIMER\_EN}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05265}05265                 \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a6b8427e9787d074d1e3f6e7d84147235}{RT2860\_BCN\_TIME\_CFG}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05266}05266         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05267}05267 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05268}05268 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05269}05269 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05270}\mbox{\hyperlink{if__run_8c_aa39011516ed36cb19887392317b22550}{05270}} \mbox{\hyperlink{if__run_8c_aa39011516ed36cb19887392317b22550}{run\_get\_tsf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, uint64\_t *buf)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05271}05271 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05272}05272         \mbox{\hyperlink{if__run_8c_a4e4209826999dd13a18401725612b197}{run\_read\_region\_1}}(sc, \mbox{\hyperlink{if__runreg_8h_abf9ac9a1684ce073bd0cd042ada25c67}{RT2860\_TSF\_TIMER\_DW0}}, (uint8\_t *)buf,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05273}05273             \textcolor{keyword}{sizeof}(*buf));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05274}05274 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05275}05275 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05276}05276 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05277}\mbox{\hyperlink{if__run_8c_adafc9cad1627a76fba3a974d1907b745}{05277}} \mbox{\hyperlink{if__run_8c_adafc9cad1627a76fba3a974d1907b745}{run\_enable\_mrr}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05278}05278 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05279}05279 \textcolor{preprocessor}{\#define CCK(mcs)        (mcs)}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05280}05280 \textcolor{preprocessor}{\#define OFDM(mcs)       (1 << 3 | (mcs))}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05281}05281         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a22b6a5a6e2b0f644af23a04ebc7f9160}{RT2860\_LG\_FBK\_CFG0}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05282}05282             \mbox{\hyperlink{if__run_8c_a608c5a199fa0347de57df9e28f513525}{OFDM}}(6) << 28 | \textcolor{comment}{/* 54-\/>48 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05283}05283             \mbox{\hyperlink{if__run_8c_a608c5a199fa0347de57df9e28f513525}{OFDM}}(5) << 24 | \textcolor{comment}{/* 48-\/>36 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05284}05284             \mbox{\hyperlink{if__run_8c_a608c5a199fa0347de57df9e28f513525}{OFDM}}(4) << 20 | \textcolor{comment}{/* 36-\/>24 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05285}05285             \mbox{\hyperlink{if__run_8c_a608c5a199fa0347de57df9e28f513525}{OFDM}}(3) << 16 | \textcolor{comment}{/* 24-\/>18 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05286}05286             \mbox{\hyperlink{if__run_8c_a608c5a199fa0347de57df9e28f513525}{OFDM}}(2) << 12 | \textcolor{comment}{/* 18-\/>12 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05287}05287             \mbox{\hyperlink{if__run_8c_a608c5a199fa0347de57df9e28f513525}{OFDM}}(1) <<  8 | \textcolor{comment}{/* 12-\/> 9 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05288}05288             \mbox{\hyperlink{if__run_8c_a608c5a199fa0347de57df9e28f513525}{OFDM}}(0) <<  4 | \textcolor{comment}{/*  9-\/> 6 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05289}05289             \mbox{\hyperlink{if__run_8c_a608c5a199fa0347de57df9e28f513525}{OFDM}}(0));               \textcolor{comment}{/*  6-\/> 6 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05290}05290 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05291}05291         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a9b047a0258ffc1d9bfdd381caec22bff}{RT2860\_LG\_FBK\_CFG1}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05292}05292             \mbox{\hyperlink{if__run_8c_a4e380acc3bcd93bfe54a3c310245df4d}{CCK}}(2) << 12 |   \textcolor{comment}{/* 11-\/>5.5 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05293}05293             \mbox{\hyperlink{if__run_8c_a4e380acc3bcd93bfe54a3c310245df4d}{CCK}}(1) <<  8 |   \textcolor{comment}{/* 5.5-\/> 2 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05294}05294             \mbox{\hyperlink{if__run_8c_a4e380acc3bcd93bfe54a3c310245df4d}{CCK}}(0) <<  4 |   \textcolor{comment}{/*   2-\/> 1 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05295}05295             \mbox{\hyperlink{if__run_8c_a4e380acc3bcd93bfe54a3c310245df4d}{CCK}}(0));         \textcolor{comment}{/*   1-\/> 1 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05296}05296 \textcolor{preprocessor}{\#undef OFDM}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05297}05297 \textcolor{preprocessor}{\#undef CCK}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05298}05298 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05299}05299 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05300}05300 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05301}\mbox{\hyperlink{if__run_8c_adb61534f0d29aac4a9880b31de3f9739}{05301}} \mbox{\hyperlink{if__run_8c_adb61534f0d29aac4a9880b31de3f9739}{run\_set\_txpreamble}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05302}05302 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05303}05303         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structrun__softc_a475dfeb97bf5936fa250323fa6a1e6ae}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05304}05304         uint32\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05305}05305 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05306}05306         \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a76d0c9ba66799b469f3dc29dbb215788}{RT2860\_AUTO\_RSP\_CFG}}, \&tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05307}05307         \textcolor{keywordflow}{if} (ic-\/>ic\_flags \& IEEE80211\_F\_SHPREAMBLE)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05308}05308                 tmp |= \mbox{\hyperlink{if__runreg_8h_aa696620b7ed52cdf3a16df59012c5179}{RT2860\_CCK\_SHORT\_EN}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05309}05309         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05310}05310                 tmp \&= \string~RT2860\_CCK\_SHORT\_EN;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05311}05311         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a76d0c9ba66799b469f3dc29dbb215788}{RT2860\_AUTO\_RSP\_CFG}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05312}05312 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05313}05313 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05314}05314 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05315}\mbox{\hyperlink{if__run_8c_a831ad16498909189c7ab5a1f7bb35035}{05315}} \mbox{\hyperlink{if__run_8c_a831ad16498909189c7ab5a1f7bb35035}{run\_set\_basicrates}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05316}05316 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05317}05317         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structrun__softc_a475dfeb97bf5936fa250323fa6a1e6ae}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05318}05318 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05319}05319         \textcolor{comment}{/* set basic rates mask */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05320}05320         \textcolor{keywordflow}{if} (ic-\/>ic\_curmode == IEEE80211\_MODE\_11B)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05321}05321                 \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a62ce4fcb6de1d6c005c9778db5bcedbd}{RT2860\_LEGACY\_BASIC\_RATE}}, 0x003);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05322}05322         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (ic-\/>ic\_curmode == IEEE80211\_MODE\_11A)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05323}05323                 \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a62ce4fcb6de1d6c005c9778db5bcedbd}{RT2860\_LEGACY\_BASIC\_RATE}}, 0x150);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05324}05324         \textcolor{keywordflow}{else}    \textcolor{comment}{/* 11g */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05325}05325                 \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a62ce4fcb6de1d6c005c9778db5bcedbd}{RT2860\_LEGACY\_BASIC\_RATE}}, 0x15f);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05326}05326 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05327}05327 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05328}05328 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05329}\mbox{\hyperlink{if__run_8c_a3132e4277bc63d116dca25932f0369a0}{05329}} \mbox{\hyperlink{if__run_8c_a3132e4277bc63d116dca25932f0369a0}{run\_set\_leds}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, uint16\_t which)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05330}05330 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05331}05331         (void)\mbox{\hyperlink{if__run_8c_af551890d568e683ea5614e905506fb1e}{run\_mcu\_cmd}}(sc, \mbox{\hyperlink{if__runreg_8h_acb1c62c670c0a3379bf6d0e8f40be0a4}{RT2860\_MCU\_CMD\_LEDS}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05332}05332             which | (sc-\/>\mbox{\hyperlink{structrun__softc_a3def4fdd1a5651dbce367ade28a2f7e6}{leds}} \& 0x7f));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05333}05333 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05334}05334 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05335}05335 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05336}\mbox{\hyperlink{if__run_8c_a4516b912a2489e9939a535b1b99a1bdf}{05336}} \mbox{\hyperlink{if__run_8c_a4516b912a2489e9939a535b1b99a1bdf}{run\_set\_bssid}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, \textcolor{keyword}{const} uint8\_t *bssid)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05337}05337 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05338}05338         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_aae578d11b439af569aec5e2c3f40aa90}{RT2860\_MAC\_BSSID\_DW0}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05339}05339             bssid[0] | bssid[1] << 8 | bssid[2] << 16 | bssid[3] << 24);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05340}05340         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a6e24d264330ce827268a6d6c4d128838}{RT2860\_MAC\_BSSID\_DW1}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05341}05341             bssid[4] | bssid[5] << 8);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05342}05342 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05343}05343 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05344}05344 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05345}\mbox{\hyperlink{if__run_8c_a44e4296a3e0c838c5fd661d8455b48c1}{05345}} \mbox{\hyperlink{if__run_8c_a44e4296a3e0c838c5fd661d8455b48c1}{run\_set\_macaddr}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, \textcolor{keyword}{const} uint8\_t *addr)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05346}05346 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05347}05347         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a42b289859741018cabe971b352bc9113}{RT2860\_MAC\_ADDR\_DW0}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05348}05348             addr[0] | addr[1] << 8 | addr[2] << 16 | addr[3] << 24);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05349}05349         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a67f2552545f4ee96c05b6f5fad34f8ce}{RT2860\_MAC\_ADDR\_DW1}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05350}05350             addr[4] | addr[5] << 8 | 0xff << 16);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05351}05351 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05352}05352 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05353}05353 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05354}\mbox{\hyperlink{if__run_8c_a5f9ad8fd4a1febc68b268bbeeba9fac2}{05354}} \mbox{\hyperlink{if__run_8c_a5f9ad8fd4a1febc68b268bbeeba9fac2}{run\_updateslot}}(\textcolor{keyword}{struct} ieee80211com *ic)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05355}05355 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05356}05356         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05357}05357         uint32\_t i;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05358}05358 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05359}05359         i = \mbox{\hyperlink{if__run_8c_ab51c04f6574bfdc56c82a56b5800c32b}{RUN\_CMDQ\_GET}}(\&sc-\/>\mbox{\hyperlink{structrun__softc_aa15ecf9db15b3ffda49a044842caf644}{cmdq\_store}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05360}05360         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_BEACON, \textcolor{stringliteral}{"{}cmdq\_store=\%d\(\backslash\)n"{}}, i);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05361}05361         sc-\/>\mbox{\hyperlink{structrun__softc_a9500a13eb58aab1b19d1149c55235640}{cmdq}}[i].\mbox{\hyperlink{structrun__cmdq_a8bd79bf0dffc9ec5341a2d955f19f31e}{func}} = \mbox{\hyperlink{if__run_8c_addf8ff63ec1f9ba36c23ed0aee6f7d06}{run\_updateslot\_cb}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05362}05362         sc-\/>\mbox{\hyperlink{structrun__softc_a9500a13eb58aab1b19d1149c55235640}{cmdq}}[i].\mbox{\hyperlink{structrun__cmdq_a44148050f8e128fac3651617eecad099}{arg0}} = ic;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05363}05363         ieee80211\_runtask(ic, \&sc-\/>\mbox{\hyperlink{structrun__softc_ae805f800f38298655ad01aa36980dc38}{cmdq\_task}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05364}05364 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05365}05365         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05366}05366 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05367}05367 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05368}05368 \textcolor{comment}{/* ARGSUSED */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05369}05369 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05370}\mbox{\hyperlink{if__run_8c_addf8ff63ec1f9ba36c23ed0aee6f7d06}{05370}} \mbox{\hyperlink{if__run_8c_addf8ff63ec1f9ba36c23ed0aee6f7d06}{run\_updateslot\_cb}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05371}05371 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05372}05372         \textcolor{keyword}{struct }ieee80211com *ic = arg;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05373}05373         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05374}05374         uint32\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05375}05375 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05376}05376         \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_acebe9cf8c74d9b699a67087a7c9308df}{RT2860\_BKOFF\_SLOT\_CFG}}, \&tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05377}05377         tmp \&= \string~0xff;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05378}05378         tmp |= IEEE80211\_GET\_SLOTTIME(ic);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05379}05379         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_acebe9cf8c74d9b699a67087a7c9308df}{RT2860\_BKOFF\_SLOT\_CFG}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05380}05380 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05381}05381 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05382}05382 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05383}\mbox{\hyperlink{if__run_8c_a7449a410ba5722fd4db17ccda585f0c3}{05383}} \mbox{\hyperlink{if__run_8c_a7449a410ba5722fd4db17ccda585f0c3}{run\_update\_mcast}}(\textcolor{keyword}{struct} ieee80211com *ic)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05384}05384 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05385}05385 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05386}05386 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05387}05387 \textcolor{keyword}{static} int8\_t}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05388}\mbox{\hyperlink{if__run_8c_a77af8f1d76fccdc9ff424438a540f2be}{05388}} \mbox{\hyperlink{if__run_8c_a77af8f1d76fccdc9ff424438a540f2be}{run\_rssi2dbm}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, uint8\_t rssi, uint8\_t rxchain)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05389}05389 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05390}05390         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structrun__softc_a475dfeb97bf5936fa250323fa6a1e6ae}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05391}05391         \textcolor{keyword}{struct }ieee80211\_channel *c = ic-\/>ic\_curchan;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05392}05392         \textcolor{keywordtype}{int} delta;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05393}05393 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05394}05394         \textcolor{keywordflow}{if} (IEEE80211\_IS\_CHAN\_5GHZ(c)) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05395}05395                 u\_int \mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} = ieee80211\_chan2ieee(ic, c);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05396}05396                 delta = sc-\/>\mbox{\hyperlink{structrun__softc_a15cd296140c95180cd3280084329df31}{rssi\_5ghz}}[rxchain];}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05397}05397 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05398}05398                 \textcolor{comment}{/* determine channel group */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05399}05399                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 64)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05400}05400                         delta -\/= sc-\/>\mbox{\hyperlink{structrun__softc_ab87cb627c86925dc5c5331c6de3b1536}{lna}}[1];}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05401}05401                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} <= 128)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05402}05402                         delta -\/= sc-\/>\mbox{\hyperlink{structrun__softc_ab87cb627c86925dc5c5331c6de3b1536}{lna}}[2];}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05403}05403                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05404}05404                         delta -\/= sc-\/>\mbox{\hyperlink{structrun__softc_ab87cb627c86925dc5c5331c6de3b1536}{lna}}[3];}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05405}05405         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05406}05406                 delta = sc-\/>\mbox{\hyperlink{structrun__softc_ab419928156f63d9250382e07863883d1}{rssi\_2ghz}}[rxchain] -\/ sc-\/>\mbox{\hyperlink{structrun__softc_ab87cb627c86925dc5c5331c6de3b1536}{lna}}[0];}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05407}05407 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05408}05408         \textcolor{keywordflow}{return} (-\/12 -\/ delta -\/ rssi);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05409}05409 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05410}05410 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05411}05411 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05412}\mbox{\hyperlink{if__run_8c_afd4e28fc9c134bfc5eaa7a0e32731f34}{05412}} \mbox{\hyperlink{if__run_8c_afd4e28fc9c134bfc5eaa7a0e32731f34}{run\_rt5390\_bbp\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05413}05413 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05414}05414         u\_int i;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05415}05415         uint8\_t bbp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05416}05416 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05417}05417         \textcolor{comment}{/* Apply maximum likelihood detection for 2 stream case. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05418}05418         \mbox{\hyperlink{if__run_8c_abc20e1ae73e45e6ffade8618697f6b8a}{run\_bbp\_read}}(sc, 105, \&bbp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05419}05419         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_abeb252728ca242db18b1574c2687b788}{nrxchains}} > 1)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05420}05420                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 105, bbp | \mbox{\hyperlink{if__runreg_8h_ac288188b59585abaeffbe390d195f4f5}{RT5390\_MLD}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05421}05421 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05422}05422         \textcolor{comment}{/* Avoid data lost and CRC error. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05423}05423         \mbox{\hyperlink{if__run_8c_abc20e1ae73e45e6ffade8618697f6b8a}{run\_bbp\_read}}(sc, 4, \&bbp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05424}05424         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 4, bbp | \mbox{\hyperlink{if__runreg_8h_a0e8a92e620f5c36fbc33f3d199b1e9f7}{RT5390\_MAC\_IF\_CTRL}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05425}05425 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05426}05426         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x5592) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05427}05427                 \textcolor{keywordflow}{for} (i = 0; i < nitems(\mbox{\hyperlink{if__run_8c_a6ff73e84a0539633598fdf4ca862f7af}{rt5592\_def\_bbp}}); i++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05428}05428                         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, \mbox{\hyperlink{if__run_8c_a6ff73e84a0539633598fdf4ca862f7af}{rt5592\_def\_bbp}}[i].\mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05429}05429                             \mbox{\hyperlink{if__run_8c_a6ff73e84a0539633598fdf4ca862f7af}{rt5592\_def\_bbp}}[i].\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05430}05430                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05431}05431                 \textcolor{keywordflow}{for} (i = 0; i < nitems(\mbox{\hyperlink{if__run_8c_a7a6a54dfc66a08981804cd13e66cc410}{rt5592\_bbp\_r196}}); i++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05432}05432                         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 195, i + 0x80);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05433}05433                         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 196, \mbox{\hyperlink{if__run_8c_a7a6a54dfc66a08981804cd13e66cc410}{rt5592\_bbp\_r196}}[i]);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05434}05434                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05435}05435         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05436}05436                 \textcolor{keywordflow}{for} (i = 0; i < nitems(\mbox{\hyperlink{if__run_8c_a1e6e71e283cb4eeb86a01e49e50434dc}{rt5390\_def\_bbp}}); i++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05437}05437                         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, \mbox{\hyperlink{if__run_8c_a1e6e71e283cb4eeb86a01e49e50434dc}{rt5390\_def\_bbp}}[i].\mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05438}05438                             \mbox{\hyperlink{if__run_8c_a1e6e71e283cb4eeb86a01e49e50434dc}{rt5390\_def\_bbp}}[i].\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05439}05439                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05440}05440         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05441}05441         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x5392) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05442}05442                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 88, 0x90);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05443}05443                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 95, 0x9a);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05444}05444                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 98, 0x12);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05445}05445                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 106, 0x12);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05446}05446                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 134, 0xd0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05447}05447                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 135, 0xf6);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05448}05448                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 148, 0x84);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05449}05449         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05450}05450 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05451}05451         \mbox{\hyperlink{if__run_8c_abc20e1ae73e45e6ffade8618697f6b8a}{run\_bbp\_read}}(sc, 152, \&bbp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05452}05452         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 152, bbp | 0x80);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05453}05453 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05454}05454         \textcolor{comment}{/* Fix BBP254 for RT5592C. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05455}05455         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x5592 \&\& sc-\/>\mbox{\hyperlink{structrun__softc_af4f2d5358072bd02994b64bcbe7d6f4d}{mac\_rev}} >= 0x0221) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05456}05456                 \mbox{\hyperlink{if__run_8c_abc20e1ae73e45e6ffade8618697f6b8a}{run\_bbp\_read}}(sc, 254, \&bbp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05457}05457                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 254, bbp | 0x80);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05458}05458         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05459}05459 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05460}05460         \textcolor{comment}{/* Disable hardware antenna diversity. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05461}05461         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x5390)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05462}05462                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 154, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05463}05463 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05464}05464         \textcolor{comment}{/* Initialize Rx CCK/OFDM frequency offset report. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05465}05465         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 142, 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05466}05466         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 143, 57);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05467}05467 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05468}05468 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05469}05469 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05470}\mbox{\hyperlink{if__run_8c_a81cf4ed4a69e89e426c64586c482683c}{05470}} \mbox{\hyperlink{if__run_8c_a81cf4ed4a69e89e426c64586c482683c}{run\_bbp\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05471}05471 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05472}05472         \textcolor{keywordtype}{int} i, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}, ntries;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05473}05473         uint8\_t bbp0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05474}05474 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05475}05475         \textcolor{comment}{/* wait for BBP to wake up */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05476}05476         \textcolor{keywordflow}{for} (ntries = 0; ntries < 20; ntries++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05477}05477                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__run_8c_abc20e1ae73e45e6ffade8618697f6b8a}{run\_bbp\_read}}(sc, 0, \&bbp0)) != 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05478}05478                         \textcolor{keywordflow}{return} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05479}05479                 \textcolor{keywordflow}{if} (bbp0 != 0 \&\& bbp0 != 0xff)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05480}05480                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05481}05481         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05482}05482         \textcolor{keywordflow}{if} (ntries == 20)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05483}05483                 \textcolor{keywordflow}{return} (ETIMEDOUT);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05484}05484 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05485}05485         \textcolor{comment}{/* initialize BBP registers to default values */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05486}05486         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} >= 0x5390)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05487}05487                 \mbox{\hyperlink{if__run_8c_afd4e28fc9c134bfc5eaa7a0e32731f34}{run\_rt5390\_bbp\_init}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05488}05488         \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05489}05489                 \textcolor{keywordflow}{for} (i = 0; i < nitems(\mbox{\hyperlink{if__run_8c_a78f3b45d56fe081d860a037eaab5c3df}{rt2860\_def\_bbp}}); i++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05490}05490                         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, \mbox{\hyperlink{if__run_8c_a78f3b45d56fe081d860a037eaab5c3df}{rt2860\_def\_bbp}}[i].\mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05491}05491                             \mbox{\hyperlink{if__run_8c_a78f3b45d56fe081d860a037eaab5c3df}{rt2860\_def\_bbp}}[i].\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05492}05492                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05493}05493         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05494}05494 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05495}05495         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3593) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05496}05496                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 79, 0x13);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05497}05497                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 80, 0x05);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05498}05498                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 81, 0x33);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05499}05499                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 86, 0x46);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05500}05500                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 137, 0x0f);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05501}05501         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05502}05502                 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05503}05503         \textcolor{comment}{/* fix BBP84 for RT2860E */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05504}05504         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x2860 \&\& sc-\/>\mbox{\hyperlink{structrun__softc_af4f2d5358072bd02994b64bcbe7d6f4d}{mac\_rev}} != 0x0101)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05505}05505                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 84, 0x19);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05506}05506 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05507}05507         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} >= 0x3070 \&\& (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} != 0x3593 \&\&}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05508}05508             sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} != 0x5592)) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05509}05509                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 79, 0x13);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05510}05510                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 80, 0x05);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05511}05511                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 81, 0x33);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05512}05512         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x2860 \&\& sc-\/>\mbox{\hyperlink{structrun__softc_af4f2d5358072bd02994b64bcbe7d6f4d}{mac\_rev}} == 0x0100) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05513}05513                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 69, 0x16);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05514}05514                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 73, 0x12);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05515}05515         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05516}05516         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05517}05517 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05518}05518 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05519}05519 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05520}\mbox{\hyperlink{if__run_8c_a74c64a3c1c957baeeb9b56fa2478364d}{05520}} \mbox{\hyperlink{if__run_8c_a74c64a3c1c957baeeb9b56fa2478364d}{run\_rt3070\_rf\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05521}05521 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05522}05522         uint32\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05523}05523         uint8\_t bbp4, mingain, rf, target;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05524}05524         u\_int i;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05525}05525 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05526}05526         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 30, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05527}05527         \textcolor{comment}{/* toggle RF R30 bit 7 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05528}05528         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 30, rf | 0x80);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05529}05529         \mbox{\hyperlink{if__run_8c_a92b12f7b350001cb12d558c3fb85e0c5}{run\_delay}}(sc, 10);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05530}05530         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 30, rf \& \string~0x80);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05531}05531 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05532}05532         \textcolor{comment}{/* initialize RF registers to default value */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05533}05533         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3572) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05534}05534                 \textcolor{keywordflow}{for} (i = 0; i < nitems(\mbox{\hyperlink{if__run_8c_aefebbb0ddb336d592947c569b381ed23}{rt3572\_def\_rf}}); i++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05535}05535                         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, \mbox{\hyperlink{if__run_8c_aefebbb0ddb336d592947c569b381ed23}{rt3572\_def\_rf}}[i].\mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05536}05536                             \mbox{\hyperlink{if__run_8c_aefebbb0ddb336d592947c569b381ed23}{rt3572\_def\_rf}}[i].\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05537}05537                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05538}05538         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05539}05539                 \textcolor{keywordflow}{for} (i = 0; i < nitems(\mbox{\hyperlink{if__run_8c_a41fc6caa59f0e0cc6823f694c3433c54}{rt3070\_def\_rf}}); i++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05540}05540                         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, \mbox{\hyperlink{if__run_8c_a41fc6caa59f0e0cc6823f694c3433c54}{rt3070\_def\_rf}}[i].\mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05541}05541                             \mbox{\hyperlink{if__run_8c_a41fc6caa59f0e0cc6823f694c3433c54}{rt3070\_def\_rf}}[i].\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05542}05542                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05543}05543         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05544}05544 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05545}05545         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3070 \&\& sc-\/>\mbox{\hyperlink{structrun__softc_af4f2d5358072bd02994b64bcbe7d6f4d}{mac\_rev}} < 0x0201) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05546}05546                 \textcolor{comment}{/* }}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05547}05547 \textcolor{comment}{                 * Change voltage from 1.2V to 1.35V for RT3070.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05548}05548 \textcolor{comment}{                 * The DAC issue (RT3070\_LDO\_CFG0) has been fixed}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05549}05549 \textcolor{comment}{                 * in RT3070(F).}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05550}05550 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05551}05551                 \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_aa13e99dab9e49ac8283f2cb0be04428a}{RT3070\_LDO\_CFG0}}, \&tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05552}05552                 tmp = (tmp \& \string~0x0f000000) | 0x0d000000;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05553}05553                 \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_aa13e99dab9e49ac8283f2cb0be04428a}{RT3070\_LDO\_CFG0}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05554}05554 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05555}05555         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3071) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05556}05556                 \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 6, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05557}05557                 \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 6, rf | 0x40);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05558}05558                 \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 31, 0x14);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05559}05559 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05560}05560                 \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_aa13e99dab9e49ac8283f2cb0be04428a}{RT3070\_LDO\_CFG0}}, \&tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05561}05561                 tmp \&= \string~0x1f000000;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05562}05562                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_af4f2d5358072bd02994b64bcbe7d6f4d}{mac\_rev}} < 0x0211)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05563}05563                         tmp |= 0x0d000000;      \textcolor{comment}{/* 1.3V */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05564}05564                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05565}05565                         tmp |= 0x01000000;      \textcolor{comment}{/* 1.2V */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05566}05566                 \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_aa13e99dab9e49ac8283f2cb0be04428a}{RT3070\_LDO\_CFG0}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05567}05567 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05568}05568                 \textcolor{comment}{/* patch LNA\_PE\_G1 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05569}05569                 \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a073c6f17a41c5686daafe7dcec989366}{RT3070\_GPIO\_SWITCH}}, \&tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05570}05570                 \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a073c6f17a41c5686daafe7dcec989366}{RT3070\_GPIO\_SWITCH}}, tmp \& \string~0x20);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05571}05571 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05572}05572         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3572) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05573}05573                 \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 6, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05574}05574                 \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 6, rf | 0x40);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05575}05575 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05576}05576                 \textcolor{comment}{/* increase voltage from 1.2V to 1.35V */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05577}05577                 \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_aa13e99dab9e49ac8283f2cb0be04428a}{RT3070\_LDO\_CFG0}}, \&tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05578}05578                 tmp = (tmp \& \string~0x1f000000) | 0x0d000000;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05579}05579                 \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_aa13e99dab9e49ac8283f2cb0be04428a}{RT3070\_LDO\_CFG0}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05580}05580 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05581}05581                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_af4f2d5358072bd02994b64bcbe7d6f4d}{mac\_rev}} < 0x0211 || !sc-\/>\mbox{\hyperlink{structrun__softc_a2bcb7021de5d7c6e267c6ea0d09c6645}{patch\_dac}}) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05582}05582                         \mbox{\hyperlink{if__run_8c_a92b12f7b350001cb12d558c3fb85e0c5}{run\_delay}}(sc, 1);      \textcolor{comment}{/* wait for 1msec */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05583}05583                         \textcolor{comment}{/* decrease voltage back to 1.2V */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05584}05584                         tmp = (tmp \& \string~0x1f000000) | 0x01000000;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05585}05585                         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_aa13e99dab9e49ac8283f2cb0be04428a}{RT3070\_LDO\_CFG0}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05586}05586                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05587}05587         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05588}05588 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05589}05589         \textcolor{comment}{/* select 20MHz bandwidth */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05590}05590         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 31, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05591}05591         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 31, rf \& \string~0x20);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05592}05592 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05593}05593         \textcolor{comment}{/* calibrate filter for 20MHz bandwidth */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05594}05594         sc-\/>\mbox{\hyperlink{structrun__softc_a351c39369a9bdb78e97dd42d8b4dbed7}{rf24\_20mhz}} = 0x1f;        \textcolor{comment}{/* default value */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05595}05595         target = (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} < 0x3071) ? 0x16 : 0x13;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05596}05596         \mbox{\hyperlink{if__run_8c_a01763cefa819c6aa83d236ce19ae5b72}{run\_rt3070\_filter\_calib}}(sc, 0x07, target, \&sc-\/>\mbox{\hyperlink{structrun__softc_a351c39369a9bdb78e97dd42d8b4dbed7}{rf24\_20mhz}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05597}05597 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05598}05598         \textcolor{comment}{/* select 40MHz bandwidth */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05599}05599         \mbox{\hyperlink{if__run_8c_abc20e1ae73e45e6ffade8618697f6b8a}{run\_bbp\_read}}(sc, 4, \&bbp4);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05600}05600         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 4, (bbp4 \& \string~0x18) | 0x10);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05601}05601         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 31, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05602}05602         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 31, rf | 0x20);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05603}05603 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05604}05604         \textcolor{comment}{/* calibrate filter for 40MHz bandwidth */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05605}05605         sc-\/>\mbox{\hyperlink{structrun__softc_a6d6bfeff43bc9b3b1d8d1ccccbac7563}{rf24\_40mhz}} = 0x2f;        \textcolor{comment}{/* default value */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05606}05606         target = (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} < 0x3071) ? 0x19 : 0x15;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05607}05607         \mbox{\hyperlink{if__run_8c_a01763cefa819c6aa83d236ce19ae5b72}{run\_rt3070\_filter\_calib}}(sc, 0x27, target, \&sc-\/>\mbox{\hyperlink{structrun__softc_a6d6bfeff43bc9b3b1d8d1ccccbac7563}{rf24\_40mhz}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05608}05608 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05609}05609         \textcolor{comment}{/* go back to 20MHz bandwidth */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05610}05610         \mbox{\hyperlink{if__run_8c_abc20e1ae73e45e6ffade8618697f6b8a}{run\_bbp\_read}}(sc, 4, \&bbp4);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05611}05611         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 4, bbp4 \& \string~0x18);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05612}05612 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05613}05613         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3572) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05614}05614                 \textcolor{comment}{/* save default BBP registers 25 and 26 values */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05615}05615                 \mbox{\hyperlink{if__run_8c_abc20e1ae73e45e6ffade8618697f6b8a}{run\_bbp\_read}}(sc, 25, \&sc-\/>\mbox{\hyperlink{structrun__softc_a20e2f04c0b620ebf5ab4eb98016d1ebd}{bbp25}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05616}05616                 \mbox{\hyperlink{if__run_8c_abc20e1ae73e45e6ffade8618697f6b8a}{run\_bbp\_read}}(sc, 26, \&sc-\/>\mbox{\hyperlink{structrun__softc_a67cb2726d91c573c71974c46a44ea5cd}{bbp26}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05617}05617         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_af4f2d5358072bd02994b64bcbe7d6f4d}{mac\_rev}} < 0x0201 || sc-\/>\mbox{\hyperlink{structrun__softc_af4f2d5358072bd02994b64bcbe7d6f4d}{mac\_rev}} < 0x0211)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05618}05618                 \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 27, 0x03);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05619}05619 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05620}05620         \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a39a8c352a87c0b11e8a8d75b4a0f696d}{RT3070\_OPT\_14}}, \&tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05621}05621         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a39a8c352a87c0b11e8a8d75b4a0f696d}{RT3070\_OPT\_14}}, tmp | 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05622}05622 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05623}05623         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3070 || sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3071) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05624}05624                 \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 17, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05625}05625                 rf \&= \string~RT3070\_TX\_LO1;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05626}05626                 \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3070 ||}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05627}05627                      (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3071 \&\& sc-\/>\mbox{\hyperlink{structrun__softc_af4f2d5358072bd02994b64bcbe7d6f4d}{mac\_rev}} >= 0x0211)) \&\&}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05628}05628                     !sc-\/>\mbox{\hyperlink{structrun__softc_a8d5b36cf0df34a66df73a332d405da0a}{ext\_2ghz\_lna}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05629}05629                         rf |= 0x20;     \textcolor{comment}{/* fix for long range Rx issue */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05630}05630                 mingain = (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3070) ? 1 : 2;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05631}05631                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_ae4a114cd9059a92fdd68d0a613416cab}{txmixgain\_2ghz}} >= mingain)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05632}05632                         rf = (rf \& \string~0x7) | sc-\/>\mbox{\hyperlink{structrun__softc_ae4a114cd9059a92fdd68d0a613416cab}{txmixgain\_2ghz}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05633}05633                 \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 17, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05634}05634         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05635}05635 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05636}05636         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3071) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05637}05637                 \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 1, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05638}05638                 rf \&= \string~(\mbox{\hyperlink{if__runreg_8h_a43344c6d2aed204b5f68138dc4f3e5b3}{RT3070\_RX0\_PD}} | \mbox{\hyperlink{if__runreg_8h_a3392c440f463833f8bfb1f3f21787690}{RT3070\_TX0\_PD}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05639}05639                 rf |= \mbox{\hyperlink{if__runreg_8h_a129eab5b4bea4f2daf64ed5790350aea}{RT3070\_RF\_BLOCK}} | \mbox{\hyperlink{if__runreg_8h_ad9119bb15eacaa673da3994ed5089254}{RT3070\_RX1\_PD}} | \mbox{\hyperlink{if__runreg_8h_ab36d9500182ab2f58a29703aa60e2980}{RT3070\_TX1\_PD}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05640}05640                 \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 1, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05641}05641 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05642}05642                 \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 15, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05643}05643                 \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 15, rf \& \string~\mbox{\hyperlink{if__runreg_8h_a6ec8628da4254a6432fb00df72f5c58c}{RT3070\_TX\_LO2}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05644}05644 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05645}05645                 \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 20, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05646}05646                 \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 20, rf \& \string~\mbox{\hyperlink{if__runreg_8h_aaa61be7c50011301b5a0ee8185cc421c}{RT3070\_RX\_LO1}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05647}05647 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05648}05648                 \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 21, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05649}05649                 \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 21, rf \& \string~\mbox{\hyperlink{if__runreg_8h_a68116a0407a21a5806cba881bfe909d8}{RT3070\_RX\_LO2}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05650}05650         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05651}05651 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05652}05652         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3070 || sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3071) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05653}05653                 \textcolor{comment}{/* fix Tx to Rx IQ glitch by raising RF voltage */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05654}05654                 \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 27, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05655}05655                 rf \&= \string~0x77;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05656}05656                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_af4f2d5358072bd02994b64bcbe7d6f4d}{mac\_rev}} < 0x0211)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05657}05657                         rf |= 0x03;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05658}05658                 \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 27, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05659}05659         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05660}05660         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05661}05661 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05662}05662 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05663}05663 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05664}\mbox{\hyperlink{if__run_8c_ae747a162160887d02459eda30014d3c5}{05664}} \mbox{\hyperlink{if__run_8c_ae747a162160887d02459eda30014d3c5}{run\_rt3593\_rf\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05665}05665 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05666}05666         uint32\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05667}05667         uint8\_t rf;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05668}05668         u\_int i;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05669}05669 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05670}05670         \textcolor{comment}{/* Disable the GPIO bits 4 and 7 for LNA PE control. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05671}05671         \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a073c6f17a41c5686daafe7dcec989366}{RT3070\_GPIO\_SWITCH}}, \&tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05672}05672         tmp \&= \string~(1 << 4 | 1 << 7);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05673}05673         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a073c6f17a41c5686daafe7dcec989366}{RT3070\_GPIO\_SWITCH}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05674}05674 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05675}05675         \textcolor{comment}{/* Initialize RF registers to default value. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05676}05676         \textcolor{keywordflow}{for} (i = 0; i < nitems(\mbox{\hyperlink{if__run_8c_a04bf8a0662f881eb58716e4c128f41fe}{rt3593\_def\_rf}}); i++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05677}05677                 \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, \mbox{\hyperlink{if__run_8c_a04bf8a0662f881eb58716e4c128f41fe}{rt3593\_def\_rf}}[i].\mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05678}05678                     \mbox{\hyperlink{if__run_8c_a04bf8a0662f881eb58716e4c128f41fe}{rt3593\_def\_rf}}[i].\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05679}05679         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05680}05680 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05681}05681         \textcolor{comment}{/* Toggle RF R2 to initiate calibration. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05682}05682         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 2, \mbox{\hyperlink{if__runreg_8h_a19e14da8ea077035f765ddc661c56740}{RT5390\_RESCAL}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05683}05683 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05684}05684         \textcolor{comment}{/* Initialize RF frequency offset. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05685}05685         \mbox{\hyperlink{if__run_8c_a2ca1d8df0375e88d4b7bdd067485284a}{run\_adjust\_freq\_offset}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05686}05686 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05687}05687         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 18, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05688}05688         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 18, rf | \mbox{\hyperlink{if__runreg_8h_ab5126d20c2423a444ef62015369ffbf1}{RT3593\_AUTOTUNE\_BYPASS}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05689}05689 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05690}05690         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05691}05691 \textcolor{comment}{         * Increase voltage from 1.2V to 1.35V, wait for 1 msec to}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05692}05692 \textcolor{comment}{         * decrease voltage back to 1.2V.}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05693}05693 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05694}05694         \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_aa13e99dab9e49ac8283f2cb0be04428a}{RT3070\_LDO\_CFG0}}, \&tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05695}05695         tmp = (tmp \& \string~0x1f000000) | 0x0d000000;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05696}05696         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_aa13e99dab9e49ac8283f2cb0be04428a}{RT3070\_LDO\_CFG0}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05697}05697         \mbox{\hyperlink{if__run_8c_a92b12f7b350001cb12d558c3fb85e0c5}{run\_delay}}(sc, 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05698}05698         tmp = (tmp \& \string~0x1f000000) | 0x01000000;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05699}05699         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_aa13e99dab9e49ac8283f2cb0be04428a}{RT3070\_LDO\_CFG0}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05700}05700 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05701}05701         sc-\/>\mbox{\hyperlink{structrun__softc_a351c39369a9bdb78e97dd42d8b4dbed7}{rf24\_20mhz}} = 0x1f;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05702}05702         sc-\/>\mbox{\hyperlink{structrun__softc_a6d6bfeff43bc9b3b1d8d1ccccbac7563}{rf24\_40mhz}} = 0x2f;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05703}05703 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05704}05704         \textcolor{comment}{/* Save default BBP registers 25 and 26 values. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05705}05705         \mbox{\hyperlink{if__run_8c_abc20e1ae73e45e6ffade8618697f6b8a}{run\_bbp\_read}}(sc, 25, \&sc-\/>\mbox{\hyperlink{structrun__softc_a20e2f04c0b620ebf5ab4eb98016d1ebd}{bbp25}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05706}05706         \mbox{\hyperlink{if__run_8c_abc20e1ae73e45e6ffade8618697f6b8a}{run\_bbp\_read}}(sc, 26, \&sc-\/>\mbox{\hyperlink{structrun__softc_a67cb2726d91c573c71974c46a44ea5cd}{bbp26}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05707}05707 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05708}05708         \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a39a8c352a87c0b11e8a8d75b4a0f696d}{RT3070\_OPT\_14}}, \&tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05709}05709         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a39a8c352a87c0b11e8a8d75b4a0f696d}{RT3070\_OPT\_14}}, tmp | 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05710}05710 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05711}05711 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05712}05712 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05713}\mbox{\hyperlink{if__run_8c_aea0cea64a7e3036fffbc43a80ae3d964}{05713}} \mbox{\hyperlink{if__run_8c_aea0cea64a7e3036fffbc43a80ae3d964}{run\_rt5390\_rf\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05714}05714 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05715}05715         uint32\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05716}05716         uint8\_t rf;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05717}05717         u\_int i;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05718}05718 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05719}05719         \textcolor{comment}{/* Toggle RF R2 to initiate calibration. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05720}05720         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x5390) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05721}05721                 \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 2, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05722}05722                 \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 2, rf | \mbox{\hyperlink{if__runreg_8h_a19e14da8ea077035f765ddc661c56740}{RT5390\_RESCAL}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05723}05723                 \mbox{\hyperlink{if__run_8c_a92b12f7b350001cb12d558c3fb85e0c5}{run\_delay}}(sc, 10);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05724}05724                 \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 2, rf \& \string~\mbox{\hyperlink{if__runreg_8h_a19e14da8ea077035f765ddc661c56740}{RT5390\_RESCAL}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05725}05725         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05726}05726                 \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 2, \mbox{\hyperlink{if__runreg_8h_a19e14da8ea077035f765ddc661c56740}{RT5390\_RESCAL}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05727}05727                 \mbox{\hyperlink{if__run_8c_a92b12f7b350001cb12d558c3fb85e0c5}{run\_delay}}(sc, 10);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05728}05728         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05729}05729 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05730}05730         \textcolor{comment}{/* Initialize RF registers to default value. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05731}05731         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x5592) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05732}05732                 \textcolor{keywordflow}{for} (i = 0; i < nitems(\mbox{\hyperlink{if__run_8c_a76858d3605eff27e3a814129e7d67454}{rt5592\_def\_rf}}); i++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05733}05733                         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, \mbox{\hyperlink{if__run_8c_a76858d3605eff27e3a814129e7d67454}{rt5592\_def\_rf}}[i].\mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05734}05734                             \mbox{\hyperlink{if__run_8c_a76858d3605eff27e3a814129e7d67454}{rt5592\_def\_rf}}[i].\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05735}05735                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05736}05736                 \textcolor{comment}{/* Initialize RF frequency offset. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05737}05737                 \mbox{\hyperlink{if__run_8c_a2ca1d8df0375e88d4b7bdd067485284a}{run\_adjust\_freq\_offset}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05738}05738         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x5392) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05739}05739                 \textcolor{keywordflow}{for} (i = 0; i < nitems(\mbox{\hyperlink{if__run_8c_a5fd9cc738d75e4e7313333245601802f}{rt5392\_def\_rf}}); i++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05740}05740                         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, \mbox{\hyperlink{if__run_8c_a5fd9cc738d75e4e7313333245601802f}{rt5392\_def\_rf}}[i].\mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05741}05741                             \mbox{\hyperlink{if__run_8c_a5fd9cc738d75e4e7313333245601802f}{rt5392\_def\_rf}}[i].\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05742}05742                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05743}05743                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_af4f2d5358072bd02994b64bcbe7d6f4d}{mac\_rev}} >= 0x0223) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05744}05744                         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 23, 0x0f);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05745}05745                         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 24, 0x3e);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05746}05746                         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 51, 0x32);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05747}05747                         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 53, 0x22);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05748}05748                         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 56, 0xc1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05749}05749                         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 59, 0x0f);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05750}05750                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05751}05751         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05752}05752                 \textcolor{keywordflow}{for} (i = 0; i < nitems(\mbox{\hyperlink{if__run_8c_a947a373951668cbaa9907d7ead5c8f4c}{rt5390\_def\_rf}}); i++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05753}05753                         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, \mbox{\hyperlink{if__run_8c_a947a373951668cbaa9907d7ead5c8f4c}{rt5390\_def\_rf}}[i].\mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05754}05754                             \mbox{\hyperlink{if__run_8c_a947a373951668cbaa9907d7ead5c8f4c}{rt5390\_def\_rf}}[i].\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05755}05755                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05756}05756                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_af4f2d5358072bd02994b64bcbe7d6f4d}{mac\_rev}} >= 0x0502) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05757}05757                         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 6, 0xe0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05758}05758                         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 25, 0x80);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05759}05759                         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 46, 0x73);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05760}05760                         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 53, 0x00);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05761}05761                         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 56, 0x42);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05762}05762                         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 61, 0xd1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05763}05763                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05764}05764         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05765}05765 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05766}05766         sc-\/>\mbox{\hyperlink{structrun__softc_a351c39369a9bdb78e97dd42d8b4dbed7}{rf24\_20mhz}} = 0x1f;        \textcolor{comment}{/* default value */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05767}05767         sc-\/>\mbox{\hyperlink{structrun__softc_a6d6bfeff43bc9b3b1d8d1ccccbac7563}{rf24\_40mhz}} = (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x5592) ? 0 : 0x2f;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05768}05768 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05769}05769         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_af4f2d5358072bd02994b64bcbe7d6f4d}{mac\_rev}} < 0x0211)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05770}05770                 \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 27, 0x3);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05771}05771 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05772}05772         \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a39a8c352a87c0b11e8a8d75b4a0f696d}{RT3070\_OPT\_14}}, \&tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05773}05773         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a39a8c352a87c0b11e8a8d75b4a0f696d}{RT3070\_OPT\_14}}, tmp | 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05774}05774 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05775}05775 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05776}05776 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05777}\mbox{\hyperlink{if__run_8c_a01763cefa819c6aa83d236ce19ae5b72}{05777}} \mbox{\hyperlink{if__run_8c_a01763cefa819c6aa83d236ce19ae5b72}{run\_rt3070\_filter\_calib}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, uint8\_t \mbox{\hyperlink{generic__usb__if_8m_a4f9143db5c2f9568347baba214e311f7}{init}}, uint8\_t target,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05778}05778     uint8\_t *\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05779}05779 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05780}05780         uint8\_t rf22, rf24;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05781}05781         uint8\_t bbp55\_pb, bbp55\_sb, delta;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05782}05782         \textcolor{keywordtype}{int} ntries;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05783}05783 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05784}05784         \textcolor{comment}{/* program filter */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05785}05785         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 24, \&rf24);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05786}05786         rf24 = (rf24 \& 0xc0) | \mbox{\hyperlink{generic__usb__if_8m_a4f9143db5c2f9568347baba214e311f7}{init}};        \textcolor{comment}{/* initial filter value */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05787}05787         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 24, rf24);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05788}05788 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05789}05789         \textcolor{comment}{/* enable baseband loopback mode */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05790}05790         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 22, \&rf22);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05791}05791         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 22, rf22 | 0x01);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05792}05792 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05793}05793         \textcolor{comment}{/* set power and frequency of passband test tone */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05794}05794         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 24, 0x00);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05795}05795         \textcolor{keywordflow}{for} (ntries = 0; ntries < 100; ntries++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05796}05796                 \textcolor{comment}{/* transmit test tone */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05797}05797                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 25, 0x90);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05798}05798                 \mbox{\hyperlink{if__run_8c_a92b12f7b350001cb12d558c3fb85e0c5}{run\_delay}}(sc, 10);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05799}05799                 \textcolor{comment}{/* read received power */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05800}05800                 \mbox{\hyperlink{if__run_8c_abc20e1ae73e45e6ffade8618697f6b8a}{run\_bbp\_read}}(sc, 55, \&bbp55\_pb);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05801}05801                 \textcolor{keywordflow}{if} (bbp55\_pb != 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05802}05802                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05803}05803         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05804}05804         \textcolor{keywordflow}{if} (ntries == 100)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05805}05805                 \textcolor{keywordflow}{return} (ETIMEDOUT);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05806}05806 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05807}05807         \textcolor{comment}{/* set power and frequency of stopband test tone */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05808}05808         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 24, 0x06);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05809}05809         \textcolor{keywordflow}{for} (ntries = 0; ntries < 100; ntries++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05810}05810                 \textcolor{comment}{/* transmit test tone */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05811}05811                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 25, 0x90);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05812}05812                 \mbox{\hyperlink{if__run_8c_a92b12f7b350001cb12d558c3fb85e0c5}{run\_delay}}(sc, 10);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05813}05813                 \textcolor{comment}{/* read received power */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05814}05814                 \mbox{\hyperlink{if__run_8c_abc20e1ae73e45e6ffade8618697f6b8a}{run\_bbp\_read}}(sc, 55, \&bbp55\_sb);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05815}05815 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05816}05816                 delta = bbp55\_pb -\/ bbp55\_sb;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05817}05817                 \textcolor{keywordflow}{if} (delta > target)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05818}05818                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05819}05819 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05820}05820                 \textcolor{comment}{/* reprogram filter */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05821}05821                 rf24++;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05822}05822                 \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 24, rf24);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05823}05823         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05824}05824         \textcolor{keywordflow}{if} (ntries < 100) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05825}05825                 \textcolor{keywordflow}{if} (rf24 != \mbox{\hyperlink{generic__usb__if_8m_a4f9143db5c2f9568347baba214e311f7}{init}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05826}05826                         rf24-\/-\/; \textcolor{comment}{/* backtrack */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05827}05827                 *\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = rf24;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05828}05828                 \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 24, rf24);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05829}05829         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05830}05830 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05831}05831         \textcolor{comment}{/* restore initial state */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05832}05832         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 24, 0x00);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05833}05833 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05834}05834         \textcolor{comment}{/* disable baseband loopback mode */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05835}05835         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 22, \&rf22);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05836}05836         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 22, rf22 \& \string~0x01);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05837}05837 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05838}05838         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05839}05839 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05840}05840 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05841}05841 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05842}\mbox{\hyperlink{if__run_8c_acc541e040039abe18399a47ca6986963}{05842}} \mbox{\hyperlink{if__run_8c_acc541e040039abe18399a47ca6986963}{run\_rt3070\_rf\_setup}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05843}05843 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05844}05844         uint8\_t bbp, rf;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05845}05845         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05846}05846 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05847}05847         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3572) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05848}05848                 \textcolor{comment}{/* enable DC filter */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05849}05849                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_af4f2d5358072bd02994b64bcbe7d6f4d}{mac\_rev}} >= 0x0201)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05850}05850                         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 103, 0xc0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05851}05851 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05852}05852                 \mbox{\hyperlink{if__run_8c_abc20e1ae73e45e6ffade8618697f6b8a}{run\_bbp\_read}}(sc, 138, \&bbp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05853}05853                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a67c3c37459a1133495cd627be4037ca6}{ntxchains}} == 1)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05854}05854                         bbp |= 0x20;    \textcolor{comment}{/* turn off DAC1 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05855}05855                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_abeb252728ca242db18b1574c2687b788}{nrxchains}} == 1)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05856}05856                         bbp \&= \string~0x02;   \textcolor{comment}{/* turn off ADC1 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05857}05857                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 138, bbp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05858}05858 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05859}05859                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_af4f2d5358072bd02994b64bcbe7d6f4d}{mac\_rev}} >= 0x0211) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05860}05860                         \textcolor{comment}{/* improve power consumption */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05861}05861                         \mbox{\hyperlink{if__run_8c_abc20e1ae73e45e6ffade8618697f6b8a}{run\_bbp\_read}}(sc, 31, \&bbp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05862}05862                         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 31, bbp \& \string~0x03);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05863}05863                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05864}05864 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05865}05865                 \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 16, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05866}05866                 rf = (rf \& \string~0x07) | sc-\/>\mbox{\hyperlink{structrun__softc_ae4a114cd9059a92fdd68d0a613416cab}{txmixgain\_2ghz}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05867}05867                 \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 16, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05868}05868 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05869}05869         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3071) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05870}05870                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_af4f2d5358072bd02994b64bcbe7d6f4d}{mac\_rev}} >= 0x0211) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05871}05871                         \textcolor{comment}{/* enable DC filter */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05872}05872                         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 103, 0xc0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05873}05873 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05874}05874                         \textcolor{comment}{/* improve power consumption */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05875}05875                         \mbox{\hyperlink{if__run_8c_abc20e1ae73e45e6ffade8618697f6b8a}{run\_bbp\_read}}(sc, 31, \&bbp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05876}05876                         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 31, bbp \& \string~0x03);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05877}05877                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05878}05878 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05879}05879                 \mbox{\hyperlink{if__run_8c_abc20e1ae73e45e6ffade8618697f6b8a}{run\_bbp\_read}}(sc, 138, \&bbp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05880}05880                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a67c3c37459a1133495cd627be4037ca6}{ntxchains}} == 1)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05881}05881                         bbp |= 0x20;    \textcolor{comment}{/* turn off DAC1 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05882}05882                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_abeb252728ca242db18b1574c2687b788}{nrxchains}} == 1)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05883}05883                         bbp \&= \string~0x02;   \textcolor{comment}{/* turn off ADC1 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05884}05884                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 138, bbp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05885}05885 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05886}05886                 \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_aab639126f7020157f49926859faaa4fa}{RT2860\_TX\_SW\_CFG1}}, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05887}05887                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_af4f2d5358072bd02994b64bcbe7d6f4d}{mac\_rev}} < 0x0211) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05888}05888                         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a84f0d48fe0082f7cd229c0f4d067e604}{RT2860\_TX\_SW\_CFG2}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05889}05889                             sc-\/>\mbox{\hyperlink{structrun__softc_a2bcb7021de5d7c6e267c6ea0d09c6645}{patch\_dac}} ? 0x2c : 0x0f);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05890}05890                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05891}05891                         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a84f0d48fe0082f7cd229c0f4d067e604}{RT2860\_TX\_SW\_CFG2}}, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05892}05892 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05893}05893         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3070) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05894}05894                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_af4f2d5358072bd02994b64bcbe7d6f4d}{mac\_rev}} >= 0x0201) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05895}05895                         \textcolor{comment}{/* enable DC filter */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05896}05896                         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 103, 0xc0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05897}05897 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05898}05898                         \textcolor{comment}{/* improve power consumption */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05899}05899                         \mbox{\hyperlink{if__run_8c_abc20e1ae73e45e6ffade8618697f6b8a}{run\_bbp\_read}}(sc, 31, \&bbp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05900}05900                         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 31, bbp \& \string~0x03);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05901}05901                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05902}05902 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05903}05903                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_af4f2d5358072bd02994b64bcbe7d6f4d}{mac\_rev}} < 0x0201) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05904}05904                         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_aab639126f7020157f49926859faaa4fa}{RT2860\_TX\_SW\_CFG1}}, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05905}05905                         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a84f0d48fe0082f7cd229c0f4d067e604}{RT2860\_TX\_SW\_CFG2}}, 0x2c);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05906}05906                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05907}05907                         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a84f0d48fe0082f7cd229c0f4d067e604}{RT2860\_TX\_SW\_CFG2}}, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05908}05908         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05909}05909 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05910}05910         \textcolor{comment}{/* initialize RF registers from ROM for >=RT3071*/}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05911}05911         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} >= 0x3071) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05912}05912                 \textcolor{keywordflow}{for} (i = 0; i < 10; i++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05913}05913                         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a586279abda96375150288ec7f04c62b2}{rf}}[i].\mbox{\hyperlink{structrun__softc_abf4f75e9f00e989fd8e8e71739317e9e}{reg}} == 0 || sc-\/>\mbox{\hyperlink{structrun__softc_a586279abda96375150288ec7f04c62b2}{rf}}[i].\mbox{\hyperlink{structrun__softc_abf4f75e9f00e989fd8e8e71739317e9e}{reg}} == 0xff)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05914}05914                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05915}05915                         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, sc-\/>\mbox{\hyperlink{structrun__softc_a586279abda96375150288ec7f04c62b2}{rf}}[i].\mbox{\hyperlink{structrun__softc_abf4f75e9f00e989fd8e8e71739317e9e}{reg}}, sc-\/>\mbox{\hyperlink{structrun__softc_a586279abda96375150288ec7f04c62b2}{rf}}[i].\mbox{\hyperlink{structrun__softc_a5a55cfcb35ed87643fa25ec86d6836ea}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05916}05916                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05917}05917         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05918}05918 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05919}05919 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05920}05920 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05921}\mbox{\hyperlink{if__run_8c_a504ca58c2546d85be1dc24ccc7f885dd}{05921}} \mbox{\hyperlink{if__run_8c_a504ca58c2546d85be1dc24ccc7f885dd}{run\_rt3593\_rf\_setup}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05922}05922 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05923}05923         uint8\_t bbp, rf;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05924}05924 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05925}05925         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_af4f2d5358072bd02994b64bcbe7d6f4d}{mac\_rev}} >= 0x0211) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05926}05926                 \textcolor{comment}{/* Enable DC filter. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05927}05927                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 103, 0xc0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05928}05928         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05929}05929         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_aab639126f7020157f49926859faaa4fa}{RT2860\_TX\_SW\_CFG1}}, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05930}05930         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_af4f2d5358072bd02994b64bcbe7d6f4d}{mac\_rev}} < 0x0211) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05931}05931                 \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a84f0d48fe0082f7cd229c0f4d067e604}{RT2860\_TX\_SW\_CFG2}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05932}05932                     sc-\/>\mbox{\hyperlink{structrun__softc_a2bcb7021de5d7c6e267c6ea0d09c6645}{patch\_dac}} ? 0x2c : 0x0f);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05933}05933         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05934}05934                 \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a84f0d48fe0082f7cd229c0f4d067e604}{RT2860\_TX\_SW\_CFG2}}, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05935}05935 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05936}05936         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 50, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05937}05937         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 50, rf \& \string~\mbox{\hyperlink{if__runreg_8h_a1828e789f16ab1c1b9d61b832c4933b1}{RT3593\_TX\_LO2}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05938}05938 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05939}05939         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 51, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05940}05940         rf = (rf \& \string~(\mbox{\hyperlink{if__runreg_8h_a0f1db4f795bc38802ba44784adc55e5e}{RT3593\_TX\_LO1}} | 0x0c)) |}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05941}05941             ((sc-\/>\mbox{\hyperlink{structrun__softc_ae4a114cd9059a92fdd68d0a613416cab}{txmixgain\_2ghz}} \& 0x07) << 2);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05942}05942         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 51, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05943}05943 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05944}05944         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 38, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05945}05945         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 38, rf \& \string~\mbox{\hyperlink{if__runreg_8h_a7df9270768f8e92e45805bc8eea9131f}{RT5390\_RX\_LO1}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05946}05946 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05947}05947         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 39, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05948}05948         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 39, rf \& \string~\mbox{\hyperlink{if__runreg_8h_a188eaaeacce61c003f9efef028ee7c94}{RT5390\_RX\_LO2}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05949}05949 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05950}05950         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 1, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05951}05951         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 1, rf \& \string~(\mbox{\hyperlink{if__runreg_8h_a129eab5b4bea4f2daf64ed5790350aea}{RT3070\_RF\_BLOCK}} | \mbox{\hyperlink{if__runreg_8h_a28b2abcb731fbc1662c00fca9e223316}{RT3070\_PLL\_PD}}));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05952}05952 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05953}05953         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 30, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05954}05954         rf = (rf \& \string~0x18) | 0x10;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05955}05955         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 30, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05956}05956 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05957}05957         \textcolor{comment}{/* Apply maximum likelihood detection for 2 stream case. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05958}05958         \mbox{\hyperlink{if__run_8c_abc20e1ae73e45e6ffade8618697f6b8a}{run\_bbp\_read}}(sc, 105, \&bbp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05959}05959         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_abeb252728ca242db18b1574c2687b788}{nrxchains}} > 1)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05960}05960                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 105, bbp | \mbox{\hyperlink{if__runreg_8h_ac288188b59585abaeffbe390d195f4f5}{RT5390\_MLD}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05961}05961 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05962}05962         \textcolor{comment}{/* Avoid data lost and CRC error. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05963}05963         \mbox{\hyperlink{if__run_8c_abc20e1ae73e45e6ffade8618697f6b8a}{run\_bbp\_read}}(sc, 4, \&bbp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05964}05964         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 4, bbp | \mbox{\hyperlink{if__runreg_8h_a0e8a92e620f5c36fbc33f3d199b1e9f7}{RT5390\_MAC\_IF\_CTRL}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05965}05965 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05966}05966         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 92, 0x02);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05967}05967         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 82, 0x82);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05968}05968         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 106, 0x05);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05969}05969         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 104, 0x92);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05970}05970         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 88, 0x90);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05971}05971         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 148, 0xc8);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05972}05972         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 47, 0x48);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05973}05973         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 120, 0x50);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05974}05974 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05975}05975         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 163, 0x9d);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05976}05976 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05977}05977         \textcolor{comment}{/* SNR mapping. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05978}05978         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 142, 0x06);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05979}05979         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 143, 0xa0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05980}05980         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 142, 0x07);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05981}05981         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 143, 0xa1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05982}05982         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 142, 0x08);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05983}05983         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 143, 0xa2);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05984}05984 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05985}05985         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 31, 0x08);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05986}05986         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 68, 0x0b);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05987}05987         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 105, 0x04);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05988}05988 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05989}05989 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05990}05990 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05991}\mbox{\hyperlink{if__run_8c_a42f22247abb6785fb01fb554cda7d1a0}{05991}} \mbox{\hyperlink{if__run_8c_a42f22247abb6785fb01fb554cda7d1a0}{run\_rt5390\_rf\_setup}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05992}05992 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05993}05993         uint8\_t bbp, rf;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05994}05994 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05995}05995         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_af4f2d5358072bd02994b64bcbe7d6f4d}{mac\_rev}} >= 0x0211) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05996}05996                 \textcolor{comment}{/* Enable DC filter. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05997}05997                 \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 103, 0xc0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05998}05998 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l05999}05999                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} != 0x5592) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06000}06000                         \textcolor{comment}{/* Improve power consumption. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06001}06001                         \mbox{\hyperlink{if__run_8c_abc20e1ae73e45e6ffade8618697f6b8a}{run\_bbp\_read}}(sc, 31, \&bbp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06002}06002                         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 31, bbp \& \string~0x03);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06003}06003                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06004}06004         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06005}06005 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06006}06006         \mbox{\hyperlink{if__run_8c_abc20e1ae73e45e6ffade8618697f6b8a}{run\_bbp\_read}}(sc, 138, \&bbp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06007}06007         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a67c3c37459a1133495cd627be4037ca6}{ntxchains}} == 1)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06008}06008                 bbp |= 0x20;    \textcolor{comment}{/* turn off DAC1 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06009}06009         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_abeb252728ca242db18b1574c2687b788}{nrxchains}} == 1)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06010}06010                 bbp \&= \string~0x02;   \textcolor{comment}{/* turn off ADC1 */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06011}06011         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 138, bbp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06012}06012 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06013}06013         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 38, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06014}06014         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 38, rf \& \string~\mbox{\hyperlink{if__runreg_8h_a7df9270768f8e92e45805bc8eea9131f}{RT5390\_RX\_LO1}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06015}06015 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06016}06016         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 39, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06017}06017         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 39, rf \& \string~\mbox{\hyperlink{if__runreg_8h_a188eaaeacce61c003f9efef028ee7c94}{RT5390\_RX\_LO2}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06018}06018 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06019}06019         \textcolor{comment}{/* Avoid data lost and CRC error. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06020}06020         \mbox{\hyperlink{if__run_8c_abc20e1ae73e45e6ffade8618697f6b8a}{run\_bbp\_read}}(sc, 4, \&bbp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06021}06021         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 4, bbp | \mbox{\hyperlink{if__runreg_8h_a0e8a92e620f5c36fbc33f3d199b1e9f7}{RT5390\_MAC\_IF\_CTRL}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06022}06022 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06023}06023         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 30, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06024}06024         rf = (rf \& \string~0x18) | 0x10;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06025}06025         \mbox{\hyperlink{if__run_8c_a6a45402394e0aac77aa2c054971f48a9}{run\_rt3070\_rf\_write}}(sc, 30, rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06026}06026 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06027}06027         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} != 0x5592) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06028}06028                 \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_aab639126f7020157f49926859faaa4fa}{RT2860\_TX\_SW\_CFG1}}, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06029}06029                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_af4f2d5358072bd02994b64bcbe7d6f4d}{mac\_rev}} < 0x0211) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06030}06030                         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a84f0d48fe0082f7cd229c0f4d067e604}{RT2860\_TX\_SW\_CFG2}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06031}06031                             sc-\/>\mbox{\hyperlink{structrun__softc_a2bcb7021de5d7c6e267c6ea0d09c6645}{patch\_dac}} ? 0x2c : 0x0f);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06032}06032                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06033}06033                         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a84f0d48fe0082f7cd229c0f4d067e604}{RT2860\_TX\_SW\_CFG2}}, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06034}06034         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06035}06035 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06036}06036 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06037}06037 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06038}\mbox{\hyperlink{if__run_8c_a7458d1d2f4d37157fd6f5610c7cfe01e}{06038}} \mbox{\hyperlink{if__run_8c_a7458d1d2f4d37157fd6f5610c7cfe01e}{run\_txrx\_enable}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06039}06039 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06040}06040         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structrun__softc_a475dfeb97bf5936fa250323fa6a1e6ae}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06041}06041         uint32\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06042}06042         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}, ntries;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06043}06043 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06044}06044         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a5e4990071cffacab52a14f31dec5721d}{RT2860\_MAC\_SYS\_CTRL}}, \mbox{\hyperlink{if__runreg_8h_af0f3ca1039aae4714af7601599c96d6e}{RT2860\_MAC\_TX\_EN}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06045}06045         \textcolor{keywordflow}{for} (ntries = 0; ntries < 200; ntries++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06046}06046                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a7f414eaab074d58fdeb10bd687196ea3}{RT2860\_WPDMA\_GLO\_CFG}}, \&tmp)) != 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06047}06047                         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06048}06048                 \textcolor{keywordflow}{if} ((tmp \& (\mbox{\hyperlink{if__runreg_8h_a661ef52f0e5b894bde9d4e56ae6f74c9}{RT2860\_TX\_DMA\_BUSY}} | \mbox{\hyperlink{if__runreg_8h_ab2ba0d00ee7ed819e0a6589e58dabb85}{RT2860\_RX\_DMA\_BUSY}})) == 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06049}06049                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06050}06050                 \mbox{\hyperlink{if__run_8c_a92b12f7b350001cb12d558c3fb85e0c5}{run\_delay}}(sc, 50);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06051}06051         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06052}06052         \textcolor{keywordflow}{if} (ntries == 200)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06053}06053                 \textcolor{keywordflow}{return} (ETIMEDOUT);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06054}06054 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06055}06055         \mbox{\hyperlink{if__run_8c_a92b12f7b350001cb12d558c3fb85e0c5}{run\_delay}}(sc, 50);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06056}06056 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06057}06057         tmp |= \mbox{\hyperlink{if__runreg_8h_a7f8a24e220bcca5911b8329c9f5fc831}{RT2860\_RX\_DMA\_EN}} | \mbox{\hyperlink{if__runreg_8h_a56b338dd96903dbd6b46be8ea25cadd7}{RT2860\_TX\_DMA\_EN}} | \mbox{\hyperlink{if__runreg_8h_acd91d5b3b30547cc5ee14f8213cef519}{RT2860\_TX\_WB\_DDONE}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06058}06058         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a7f414eaab074d58fdeb10bd687196ea3}{RT2860\_WPDMA\_GLO\_CFG}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06059}06059 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06060}06060         \textcolor{comment}{/* enable Rx bulk aggregation (set timeout and limit) */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06061}06061         tmp = \mbox{\hyperlink{if__runreg_8h_ae53f082a231534b3d885eb06e62de76e}{RT2860\_USB\_TX\_EN}} | \mbox{\hyperlink{if__runreg_8h_acf90a7207d165b5ef008047e17d6e393}{RT2860\_USB\_RX\_EN}} | \mbox{\hyperlink{if__runreg_8h_abd60ab1abfe686a8765ccea3ec333c24}{RT2860\_USB\_RX\_AGG\_EN}} |}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06062}06062             \mbox{\hyperlink{if__runreg_8h_a9c09a9a2f0ff31952281eeddc69ac862}{RT2860\_USB\_RX\_AGG\_TO}}(128) | \mbox{\hyperlink{if__runreg_8h_a38833e4b4cb4b84fa9f0efb84c56c56a}{RT2860\_USB\_RX\_AGG\_LMT}}(2);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06063}06063         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a569ba8b4d4eb8a3dabd31783a7b1ca13}{RT2860\_USB\_DMA\_CFG}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06064}06064 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06065}06065         \textcolor{comment}{/* set Rx filter */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06066}06066         tmp = \mbox{\hyperlink{if__runreg_8h_a9e761c559074d432a81d18aae20996b2}{RT2860\_DROP\_CRC\_ERR}} | \mbox{\hyperlink{if__runreg_8h_addab585f36b7ff89131444784739edf3}{RT2860\_DROP\_PHY\_ERR}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06067}06067         \textcolor{keywordflow}{if} (ic-\/>ic\_opmode != IEEE80211\_M\_MONITOR) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06068}06068                 tmp |= \mbox{\hyperlink{if__runreg_8h_a2f1d34e33ed0cf37ec49bd698b05dfb7}{RT2860\_DROP\_UC\_NOME}} | \mbox{\hyperlink{if__runreg_8h_a04e962d7ee7c34a7df00edeb22e2f496}{RT2860\_DROP\_DUPL}} |}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06069}06069                     \mbox{\hyperlink{if__runreg_8h_a4b2e752e0385e988429d86a42f6edc84}{RT2860\_DROP\_CTS}} | \mbox{\hyperlink{if__runreg_8h_a93dd95ebbd7317aa388f4da27502e5ca}{RT2860\_DROP\_BA}} | \mbox{\hyperlink{if__runreg_8h_a4c6974a86830dea6017f0474e9f2b0ea}{RT2860\_DROP\_ACK}} |}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06070}06070                     \mbox{\hyperlink{if__runreg_8h_a1253e6238f2f5faad0d4d36275a51cd8}{RT2860\_DROP\_VER\_ERR}} | \mbox{\hyperlink{if__runreg_8h_a5a90233c6087238283d327fd92bf046c}{RT2860\_DROP\_CTRL\_RSV}} |}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06071}06071                     \mbox{\hyperlink{if__runreg_8h_a88ec4afaf8939587a0f9c4ed1111ae0d}{RT2860\_DROP\_CFACK}} | \mbox{\hyperlink{if__runreg_8h_a0fe22601735a8f187c4cf3a1f938c2b1}{RT2860\_DROP\_CFEND}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06072}06072                 \textcolor{keywordflow}{if} (ic-\/>ic\_opmode == IEEE80211\_M\_STA)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06073}06073                         tmp |= \mbox{\hyperlink{if__runreg_8h_a27f234f3a37bf1d64401ad1e23a87ad8}{RT2860\_DROP\_RTS}} | \mbox{\hyperlink{if__runreg_8h_abeca09ee23961cc9cf05831798bfe92b}{RT2860\_DROP\_PSPOLL}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06074}06074         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06075}06075         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a5b50b06040e8eba94dd0f70f15dca2dc}{RT2860\_RX\_FILTR\_CFG}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06076}06076 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06077}06077         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a5e4990071cffacab52a14f31dec5721d}{RT2860\_MAC\_SYS\_CTRL}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06078}06078             \mbox{\hyperlink{if__runreg_8h_a50b11ecd5acb21d5e4a6ffcdea64eff6}{RT2860\_MAC\_RX\_EN}} | \mbox{\hyperlink{if__runreg_8h_af0f3ca1039aae4714af7601599c96d6e}{RT2860\_MAC\_TX\_EN}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06079}06079 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06080}06080         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06081}06081 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06082}06082 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06083}06083 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06084}\mbox{\hyperlink{if__run_8c_a2ca1d8df0375e88d4b7bdd067485284a}{06084}} \mbox{\hyperlink{if__run_8c_a2ca1d8df0375e88d4b7bdd067485284a}{run\_adjust\_freq\_offset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06085}06085 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06086}06086         uint8\_t rf, tmp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06087}06087 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06088}06088         \mbox{\hyperlink{if__run_8c_a3e0f330941b24fabb50f6badf328bd55}{run\_rt3070\_rf\_read}}(sc, 17, \&rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06089}06089         tmp = rf;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06090}06090         rf = (rf \& \string~0x7f) | (sc-\/>\mbox{\hyperlink{structrun__softc_a0dacefc883d5e8c77983176277bbf773}{freq}} \& 0x7f);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06091}06091         rf = MIN(rf, 0x5f);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06092}06092 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06093}06093         \textcolor{keywordflow}{if} (tmp != rf)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06094}06094                 \mbox{\hyperlink{if__run_8c_af551890d568e683ea5614e905506fb1e}{run\_mcu\_cmd}}(sc, 0x74, (tmp << 8 ) | rf);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06095}06095 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06096}06096 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06097}06097 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06098}\mbox{\hyperlink{if__run_8c_a11a486139db80fe5b329e49a70faaed0}{06098}} \mbox{\hyperlink{if__run_8c_a11a486139db80fe5b329e49a70faaed0}{run\_init\_locked}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06099}06099 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06100}06100         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structrun__softc_a475dfeb97bf5936fa250323fa6a1e6ae}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06101}06101         \textcolor{keyword}{struct }ieee80211vap *vap = TAILQ\_FIRST(\&ic-\/>ic\_vaps);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06102}06102         uint32\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06103}06103         uint8\_t bbp1, bbp3;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06104}06104         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06105}06105         \textcolor{keywordtype}{int} ridx;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06106}06106         \textcolor{keywordtype}{int} ntries;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06107}06107 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06108}06108         \textcolor{keywordflow}{if} (ic-\/>ic\_nrunning > 1)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06109}06109                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06110}06110 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06111}06111         \mbox{\hyperlink{if__run_8c_a70abcd6419cad126379ea12f8aac4bce}{run\_stop}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06112}06112 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06113}06113         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_a6296048b322ee04d4142b6d24107fd8a}{run\_load\_microcode}}(sc) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06114}06114                 device\_printf(sc-\/>\mbox{\hyperlink{structrun__softc_a11422e8a9e276cfaea3662dc74f6fc84}{sc\_dev}}, \textcolor{stringliteral}{"{}could not load 8051 microcode\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06115}06115                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06116}06116         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06117}06117 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06118}06118         \textcolor{keywordflow}{for} (ntries = 0; ntries < 100; ntries++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06119}06119                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_acefb3dfe4f68bda874362bd2b3f80c71}{RT2860\_ASIC\_VER\_ID}}, \&tmp) != 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06120}06120                         \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06121}06121                 \textcolor{keywordflow}{if} (tmp != 0 \&\& tmp != 0xffffffff)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06122}06122                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06123}06123                 \mbox{\hyperlink{if__run_8c_a92b12f7b350001cb12d558c3fb85e0c5}{run\_delay}}(sc, 10);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06124}06124         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06125}06125         \textcolor{keywordflow}{if} (ntries == 100)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06126}06126                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06127}06127 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06128}06128         \textcolor{keywordflow}{for} (i = 0; i != \mbox{\hyperlink{if__runvar_8h_a07469f73b7222ee6c525c62df2629de3}{RUN\_EP\_QUEUES}}; i++)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06129}06129                 \mbox{\hyperlink{if__run_8c_a1a000f85f61f73152030a297f4b687ee}{run\_setup\_tx\_list}}(sc, \&sc-\/>\mbox{\hyperlink{structrun__softc_ac32a4e4f9bda8c035f10a84ae91b68eb}{sc\_epq}}[i]);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06130}06130 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06131}06131         \mbox{\hyperlink{if__run_8c_a44e4296a3e0c838c5fd661d8455b48c1}{run\_set\_macaddr}}(sc, vap ? vap-\/>iv\_myaddr : ic-\/>ic\_macaddr);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06132}06132 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06133}06133         \textcolor{keywordflow}{for} (ntries = 0; ntries < 100; ntries++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06134}06134                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a7f414eaab074d58fdeb10bd687196ea3}{RT2860\_WPDMA\_GLO\_CFG}}, \&tmp) != 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06135}06135                         \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06136}06136                 \textcolor{keywordflow}{if} ((tmp \& (\mbox{\hyperlink{if__runreg_8h_a661ef52f0e5b894bde9d4e56ae6f74c9}{RT2860\_TX\_DMA\_BUSY}} | \mbox{\hyperlink{if__runreg_8h_ab2ba0d00ee7ed819e0a6589e58dabb85}{RT2860\_RX\_DMA\_BUSY}})) == 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06137}06137                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06138}06138                 \mbox{\hyperlink{if__run_8c_a92b12f7b350001cb12d558c3fb85e0c5}{run\_delay}}(sc, 10);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06139}06139         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06140}06140         \textcolor{keywordflow}{if} (ntries == 100) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06141}06141                 device\_printf(sc-\/>\mbox{\hyperlink{structrun__softc_a11422e8a9e276cfaea3662dc74f6fc84}{sc\_dev}}, \textcolor{stringliteral}{"{}timeout waiting for DMA engine\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06142}06142                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06143}06143         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06144}06144         tmp \&= 0xff0;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06145}06145         tmp |= \mbox{\hyperlink{if__runreg_8h_acd91d5b3b30547cc5ee14f8213cef519}{RT2860\_TX\_WB\_DDONE}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06146}06146         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a7f414eaab074d58fdeb10bd687196ea3}{RT2860\_WPDMA\_GLO\_CFG}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06147}06147 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06148}06148         \textcolor{comment}{/* turn off PME\_OEN to solve high-\/current issue */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06149}06149         \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a9529937deef6ff6ce566296877ac3288}{RT2860\_SYS\_CTRL}}, \&tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06150}06150         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a9529937deef6ff6ce566296877ac3288}{RT2860\_SYS\_CTRL}}, tmp \& \string~\mbox{\hyperlink{if__runreg_8h_afa7fbd46413316298d64b665e8e159a4}{RT2860\_PME\_OEN}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06151}06151 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06152}06152         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a5e4990071cffacab52a14f31dec5721d}{RT2860\_MAC\_SYS\_CTRL}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06153}06153             \mbox{\hyperlink{if__runreg_8h_ad2b5e9643b6f5c28f2e9e7fe3210a21c}{RT2860\_BBP\_HRST}} | \mbox{\hyperlink{if__runreg_8h_abab677b0ab94b680bf89336ce073c560}{RT2860\_MAC\_SRST}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06154}06154         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a569ba8b4d4eb8a3dabd31783a7b1ca13}{RT2860\_USB\_DMA\_CFG}}, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06155}06155 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06156}06156         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_a23c664f4215314d704c3170d94c81c3f}{run\_reset}}(sc) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06157}06157                 device\_printf(sc-\/>\mbox{\hyperlink{structrun__softc_a11422e8a9e276cfaea3662dc74f6fc84}{sc\_dev}}, \textcolor{stringliteral}{"{}could not reset chipset\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06158}06158                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06159}06159         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06160}06160 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06161}06161         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a5e4990071cffacab52a14f31dec5721d}{RT2860\_MAC\_SYS\_CTRL}}, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06162}06162 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06163}06163         \textcolor{comment}{/* init Tx power for all Tx rates (from EEPROM) */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06164}06164         \textcolor{keywordflow}{for} (ridx = 0; ridx < 5; ridx++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06165}06165                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a5ee46e92f41eb323c2db673f3d4e78d2}{txpow20mhz}}[ridx] == 0xffffffff)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06166}06166                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06167}06167                 \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a59328d200506f7c13cd23758b0dd74c1}{RT2860\_TX\_PWR\_CFG}}(ridx), sc-\/>\mbox{\hyperlink{structrun__softc_a5ee46e92f41eb323c2db673f3d4e78d2}{txpow20mhz}}[ridx]);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06168}06168         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06169}06169 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06170}06170         \textcolor{keywordflow}{for} (i = 0; i < nitems(\mbox{\hyperlink{if__run_8c_ab548eccb2e3ec4e7e7aa04ad629e7194}{rt2870\_def\_mac}}); i++)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06171}06171                 \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__run_8c_ab548eccb2e3ec4e7e7aa04ad629e7194}{rt2870\_def\_mac}}[i].\mbox{\hyperlink{if__run_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, \mbox{\hyperlink{if__run_8c_ab548eccb2e3ec4e7e7aa04ad629e7194}{rt2870\_def\_mac}}[i].\mbox{\hyperlink{if__run_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06172}06172         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a706e406ecba2e398aae3281235af3e7f}{RT2860\_WMM\_AIFSN\_CFG}}, 0x00002273);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06173}06173         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a997ca35f76d69850fc48db8e16d3c0a1}{RT2860\_WMM\_CWMIN\_CFG}}, 0x00002344);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06174}06174         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_ab14cdf2b86ec707bdeb97bf6d1be2eb0}{RT2860\_WMM\_CWMAX\_CFG}}, 0x000034aa);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06175}06175 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06176}06176         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} >= 0x5390) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06177}06177                 \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a46069e448f86c9155b59b55f07b16f50}{RT2860\_TX\_SW\_CFG0}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06178}06178                     4 << \mbox{\hyperlink{if__runreg_8h_aea14e8c10a5b121f55cd7928f337144e}{RT2860\_DLY\_PAPE\_EN\_SHIFT}} | 4);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06179}06179                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} >= 0x5392) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06180}06180                         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_ad87ff62eebe7bf2af2198b31e38c2db5}{RT2860\_MAX\_LEN\_CFG}}, 0x00002fff);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06181}06181                         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x5592) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06182}06182                                 \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a273451110436aaf6cf1cd553cd86ef6c}{RT2860\_HT\_FBK\_CFG1}}, 0xedcba980);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06183}06183                                 \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_ace7d71da95196e793919e194a176b9f2}{RT2860\_TXOP\_HLDR\_ET}}, 0x00000082);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06184}06184                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06185}06185                                 \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a273451110436aaf6cf1cd553cd86ef6c}{RT2860\_HT\_FBK\_CFG1}}, 0xedcb4980);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06186}06186                                 \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a22b6a5a6e2b0f644af23a04ebc7f9160}{RT2860\_LG\_FBK\_CFG0}}, 0xedcba322);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06187}06187                         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06188}06188                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06189}06189         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3593) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06190}06190                 \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a46069e448f86c9155b59b55f07b16f50}{RT2860\_TX\_SW\_CFG0}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06191}06191                     4 << \mbox{\hyperlink{if__runreg_8h_aea14e8c10a5b121f55cd7928f337144e}{RT2860\_DLY\_PAPE\_EN\_SHIFT}} | 2);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06192}06192         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} >= 0x3070) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06193}06193                 \textcolor{comment}{/* set delay of PA\_PE assertion to 1us (unit of 0.25us) */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06194}06194                 \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a46069e448f86c9155b59b55f07b16f50}{RT2860\_TX\_SW\_CFG0}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06195}06195                     4 << \mbox{\hyperlink{if__runreg_8h_aea14e8c10a5b121f55cd7928f337144e}{RT2860\_DLY\_PAPE\_EN\_SHIFT}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06196}06196         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06197}06197 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06198}06198         \textcolor{comment}{/* wait while MAC is busy */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06199}06199         \textcolor{keywordflow}{for} (ntries = 0; ntries < 100; ntries++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06200}06200                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a89c80f91e673b327f6eec6d75e6d78cb}{RT2860\_MAC\_STATUS\_REG}}, \&tmp) != 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06201}06201                         \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06202}06202                 \textcolor{keywordflow}{if} (!(tmp \& (\mbox{\hyperlink{if__runreg_8h_af693eecf45505aa9976de461b7f01af4}{RT2860\_RX\_STATUS\_BUSY}} | \mbox{\hyperlink{if__runreg_8h_ad41b2598be593568f658e3fe5ab8660c}{RT2860\_TX\_STATUS\_BUSY}})))}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06203}06203                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06204}06204                 \mbox{\hyperlink{if__run_8c_a92b12f7b350001cb12d558c3fb85e0c5}{run\_delay}}(sc, 10);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06205}06205         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06206}06206         \textcolor{keywordflow}{if} (ntries == 100)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06207}06207                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06208}06208 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06209}06209         \textcolor{comment}{/* clear Host to MCU mailbox */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06210}06210         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a83b701b4ce7774131f4ba65e156fa8ee}{RT2860\_H2M\_BBPAGENT}}, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06211}06211         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a1657b7fa6a2c2b41bcd6f3e41a051379}{RT2860\_H2M\_MAILBOX}}, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06212}06212         \mbox{\hyperlink{if__run_8c_a92b12f7b350001cb12d558c3fb85e0c5}{run\_delay}}(sc, 10);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06213}06213 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06214}06214         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_a81cf4ed4a69e89e426c64586c482683c}{run\_bbp\_init}}(sc) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06215}06215                 device\_printf(sc-\/>\mbox{\hyperlink{structrun__softc_a11422e8a9e276cfaea3662dc74f6fc84}{sc\_dev}}, \textcolor{stringliteral}{"{}could not initialize BBP\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06216}06216                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06217}06217         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06218}06218 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06219}06219         \textcolor{comment}{/* abort TSF synchronization */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06220}06220         \mbox{\hyperlink{if__run_8c_a4b9834f174786bcc92da7d8e788d0c4c}{run\_disable\_tsf}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06221}06221 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06222}06222         \textcolor{comment}{/* clear RX WCID search table */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06223}06223         \mbox{\hyperlink{if__run_8c_a841976387f67bac56bbf1a8e8a5efe6f}{run\_set\_region\_4}}(sc, \mbox{\hyperlink{if__runreg_8h_a2e311d38c5f274619dec121a176298f0}{RT2860\_WCID\_ENTRY}}(0), 0, 512);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06224}06224         \textcolor{comment}{/* clear WCID attribute table */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06225}06225         \mbox{\hyperlink{if__run_8c_a841976387f67bac56bbf1a8e8a5efe6f}{run\_set\_region\_4}}(sc, \mbox{\hyperlink{if__runreg_8h_ab8b75442b4116865eac7e88f691c0885}{RT2860\_WCID\_ATTR}}(0), 0, 8 * 32);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06226}06226 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06227}06227         \textcolor{comment}{/* hostapd sets a key before init. So, don't clear it. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06228}06228         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_acc6c8fb6fc13ea995d2c54bdb372a6c1}{cmdq\_key\_set}} != \mbox{\hyperlink{if__runvar_8h_abc29e6edc22c9ba09e2a3e35e48c94c3}{RUN\_CMDQ\_GO}}) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06229}06229                 \textcolor{comment}{/* clear shared key table */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06230}06230                 \mbox{\hyperlink{if__run_8c_a841976387f67bac56bbf1a8e8a5efe6f}{run\_set\_region\_4}}(sc, \mbox{\hyperlink{if__runreg_8h_aea2084a71f6d675386b6955c74ae0c4d}{RT2860\_SKEY}}(0, 0), 0, 8 * 32);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06231}06231                 \textcolor{comment}{/* clear shared key mode */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06232}06232                 \mbox{\hyperlink{if__run_8c_a841976387f67bac56bbf1a8e8a5efe6f}{run\_set\_region\_4}}(sc, \mbox{\hyperlink{if__runreg_8h_a8a6e7e3601ec1d38edf4652b20fe2538}{RT2860\_SKEY\_MODE\_0\_7}}, 0, 4);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06233}06233         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06234}06234 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06235}06235         \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_abf01bed3a2a4e89cbfe0ffa7cb18437f}{RT2860\_US\_CYC\_CNT}}, \&tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06236}06236         tmp = (tmp \& \string~0xff) | 0x1e;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06237}06237         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_abf01bed3a2a4e89cbfe0ffa7cb18437f}{RT2860\_US\_CYC\_CNT}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06238}06238 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06239}06239         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_af4f2d5358072bd02994b64bcbe7d6f4d}{mac\_rev}} != 0x0101)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06240}06240                 \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_ac4dc2ef8d804c52660c2d9363b51249f}{RT2860\_TXOP\_CTRL\_CFG}}, 0x0000583f);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06241}06241 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06242}06242         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_ab4b83a417f37e2a6e59071dbc7dd6def}{RT2860\_WMM\_TXOP0\_CFG}}, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06243}06243         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a5b102774f140c774e1250dec29b805ca}{RT2860\_WMM\_TXOP1\_CFG}}, 48 << 16 | 96);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06244}06244 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06245}06245         \textcolor{comment}{/* write vendor-\/specific BBP values (from EEPROM) */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06246}06246         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} < 0x3593) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06247}06247                 \textcolor{keywordflow}{for} (i = 0; i < 10; i++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06248}06248                         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_adc6b518a9c057be70517be3287dfaa14}{bbp}}[i].\mbox{\hyperlink{structrun__softc_abf4f75e9f00e989fd8e8e71739317e9e}{reg}} == 0 || sc-\/>\mbox{\hyperlink{structrun__softc_adc6b518a9c057be70517be3287dfaa14}{bbp}}[i].\mbox{\hyperlink{structrun__softc_abf4f75e9f00e989fd8e8e71739317e9e}{reg}} == 0xff)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06249}06249                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06250}06250                         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, sc-\/>\mbox{\hyperlink{structrun__softc_adc6b518a9c057be70517be3287dfaa14}{bbp}}[i].\mbox{\hyperlink{structrun__softc_abf4f75e9f00e989fd8e8e71739317e9e}{reg}}, sc-\/>\mbox{\hyperlink{structrun__softc_adc6b518a9c057be70517be3287dfaa14}{bbp}}[i].\mbox{\hyperlink{structrun__softc_a5a55cfcb35ed87643fa25ec86d6836ea}{val}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06251}06251                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06252}06252         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06253}06253 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06254}06254         \textcolor{comment}{/* select Main antenna for 1T1R devices */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06255}06255         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1a20cab629806dd03e9caebd2bdab962}{rf\_rev}} == \mbox{\hyperlink{if__runreg_8h_ab2fc381907c76f8f0e2df8bc49b16f65}{RT3070\_RF\_3020}} || sc-\/>\mbox{\hyperlink{structrun__softc_a1a20cab629806dd03e9caebd2bdab962}{rf\_rev}} == \mbox{\hyperlink{if__runreg_8h_add9aa109750e8500846a3de98132af35}{RT5390\_RF\_5370}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06256}06256                 \mbox{\hyperlink{if__run_8c_a2d792cd77b7547b682d6a2ae161458fe}{run\_set\_rx\_antenna}}(sc, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06257}06257 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06258}06258         \textcolor{comment}{/* send LEDs operating mode to microcontroller */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06259}06259         (void)\mbox{\hyperlink{if__run_8c_af551890d568e683ea5614e905506fb1e}{run\_mcu\_cmd}}(sc, \mbox{\hyperlink{if__runreg_8h_a9f1c51aa042e0af40b370c3a97e6289b}{RT2860\_MCU\_CMD\_LED1}}, sc-\/>\mbox{\hyperlink{structrun__softc_a5ca2e82eeafb7854d717500e31f20b6c}{led}}[0]);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06260}06260         (void)\mbox{\hyperlink{if__run_8c_af551890d568e683ea5614e905506fb1e}{run\_mcu\_cmd}}(sc, \mbox{\hyperlink{if__runreg_8h_ac85f97af8abf259cf740fe147a0fd9d6}{RT2860\_MCU\_CMD\_LED2}}, sc-\/>\mbox{\hyperlink{structrun__softc_a5ca2e82eeafb7854d717500e31f20b6c}{led}}[1]);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06261}06261         (void)\mbox{\hyperlink{if__run_8c_af551890d568e683ea5614e905506fb1e}{run\_mcu\_cmd}}(sc, \mbox{\hyperlink{if__runreg_8h_a8d67f83bed9f670229586074ec631a04}{RT2860\_MCU\_CMD\_LED3}}, sc-\/>\mbox{\hyperlink{structrun__softc_a5ca2e82eeafb7854d717500e31f20b6c}{led}}[2]);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06262}06262 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06263}06263         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} >= 0x5390)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06264}06264                 \mbox{\hyperlink{if__run_8c_aea0cea64a7e3036fffbc43a80ae3d964}{run\_rt5390\_rf\_init}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06265}06265         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3593)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06266}06266                 \mbox{\hyperlink{if__run_8c_ae747a162160887d02459eda30014d3c5}{run\_rt3593\_rf\_init}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06267}06267         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} >= 0x3070)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06268}06268                 \mbox{\hyperlink{if__run_8c_a74c64a3c1c957baeeb9b56fa2478364d}{run\_rt3070\_rf\_init}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06269}06269 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06270}06270         \textcolor{comment}{/* disable non-\/existing Rx chains */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06271}06271         \mbox{\hyperlink{if__run_8c_abc20e1ae73e45e6ffade8618697f6b8a}{run\_bbp\_read}}(sc, 3, \&bbp3);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06272}06272         bbp3 \&= \string~(1 << 3 | 1 << 4);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06273}06273         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_abeb252728ca242db18b1574c2687b788}{nrxchains}} == 2)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06274}06274                 bbp3 |= 1 << 3;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06275}06275         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_abeb252728ca242db18b1574c2687b788}{nrxchains}} == 3)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06276}06276                 bbp3 |= 1 << 4;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06277}06277         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 3, bbp3);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06278}06278 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06279}06279         \textcolor{comment}{/* disable non-\/existing Tx chains */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06280}06280         \mbox{\hyperlink{if__run_8c_abc20e1ae73e45e6ffade8618697f6b8a}{run\_bbp\_read}}(sc, 1, \&bbp1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06281}06281         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a67c3c37459a1133495cd627be4037ca6}{ntxchains}} == 1)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06282}06282                 bbp1 \&= \string~(1 << 3 | 1 << 4);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06283}06283         \mbox{\hyperlink{if__run_8c_a5ec9591ed783ce8fa10d04e9a3c623f3}{run\_bbp\_write}}(sc, 1, bbp1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06284}06284 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06285}06285         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} >= 0x5390)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06286}06286                 \mbox{\hyperlink{if__run_8c_a42f22247abb6785fb01fb554cda7d1a0}{run\_rt5390\_rf\_setup}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06287}06287         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} == 0x3593)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06288}06288                 \mbox{\hyperlink{if__run_8c_a504ca58c2546d85be1dc24ccc7f885dd}{run\_rt3593\_rf\_setup}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06289}06289         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_a1351bdc1dc923500a5af5de46958c2d9}{mac\_ver}} >= 0x3070)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06290}06290                 \mbox{\hyperlink{if__run_8c_acc541e040039abe18399a47ca6986963}{run\_rt3070\_rf\_setup}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06291}06291 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06292}06292         \textcolor{comment}{/* select default channel */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06293}06293         \mbox{\hyperlink{if__run_8c_a717abe8d9850e16225bcf651852059ec}{run\_set\_chan}}(sc, ic-\/>ic\_curchan);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06294}06294 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06295}06295         \textcolor{comment}{/* setup initial protection mode */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06296}06296         \mbox{\hyperlink{if__run_8c_a91c6c1e62ce1500100420f9eb39970e3}{run\_updateprot\_cb}}(ic);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06297}06297 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06298}06298         \textcolor{comment}{/* turn radio LED on */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06299}06299         \mbox{\hyperlink{if__run_8c_a3132e4277bc63d116dca25932f0369a0}{run\_set\_leds}}(sc, \mbox{\hyperlink{if__runreg_8h_a766804f840b0afeba28a4b5d0bcf6508}{RT2860\_LED\_RADIO}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06300}06300 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06301}06301         \textcolor{comment}{/* Set up AUTO\_RSP\_CFG register for auto response */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06302}06302         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a76d0c9ba66799b469f3dc29dbb215788}{RT2860\_AUTO\_RSP\_CFG}}, \mbox{\hyperlink{if__runreg_8h_ad80c3b1aa81ab46b326fa067d416641f}{RT2860\_AUTO\_RSP\_EN}} |}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06303}06303             \mbox{\hyperlink{if__runreg_8h_aa0655365fd7f0a35e9b5ae41926f547f}{RT2860\_BAC\_ACKPOLICY\_EN}} | \mbox{\hyperlink{if__runreg_8h_a7a693a27713d32a23d70221c25005f32}{RT2860\_CTS\_40M\_MODE\_EN}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06304}06304 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06305}06305         sc-\/>\mbox{\hyperlink{structrun__softc_ae1260c15661b04d2cc04867c70e3df41}{sc\_flags}} |= \mbox{\hyperlink{if__runvar_8h_a4d0bc8a7e4cf8003139e1ee4d3d6930e}{RUN\_RUNNING}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06306}06306         sc-\/>\mbox{\hyperlink{structrun__softc_a80ae37469cb0af8bf5f1e59107243d21}{cmdq\_run}} = \mbox{\hyperlink{if__runvar_8h_abc29e6edc22c9ba09e2a3e35e48c94c3}{RUN\_CMDQ\_GO}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06307}06307 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06308}06308         \textcolor{keywordflow}{for} (i = 0; i != \mbox{\hyperlink{if__runvar_8h_a098384b0034af0daa7c9c5c82b563567a30a078c211986bca094dbe9f1a298eb7}{RUN\_N\_XFER}}; i++)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06309}06309                 \mbox{\hyperlink{usb__transfer_8c_abadf9cb2f8e81a5133af0c8030039de3}{usbd\_xfer\_set\_stall}}(sc-\/>\mbox{\hyperlink{structrun__softc_a8522ea9d5483b98283b7629e41c31eac}{sc\_xfer}}[i]);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06310}06310 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06311}06311         \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structrun__softc_a8522ea9d5483b98283b7629e41c31eac}{sc\_xfer}}[\mbox{\hyperlink{if__runvar_8h_a098384b0034af0daa7c9c5c82b563567ad44a010f81779263fd6933fada7c7f96}{RUN\_BULK\_RX}}]);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06312}06312 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06313}06313         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_a7458d1d2f4d37157fd6f5610c7cfe01e}{run\_txrx\_enable}}(sc) != 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06314}06314                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06315}06315 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06316}06316         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06317}06317 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06318}06318 \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}}:}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06319}06319         \mbox{\hyperlink{if__run_8c_a70abcd6419cad126379ea12f8aac4bce}{run\_stop}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06320}06320 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06321}06321 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06322}06322 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06323}\mbox{\hyperlink{if__run_8c_a70abcd6419cad126379ea12f8aac4bce}{06323}} \mbox{\hyperlink{if__run_8c_a70abcd6419cad126379ea12f8aac4bce}{run\_stop}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06324}06324 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06325}06325         \textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *sc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}} *)arg;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06326}06326         uint32\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06327}06327         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06328}06328         \textcolor{keywordtype}{int} ntries;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06329}06329 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06330}06330         \mbox{\hyperlink{if__runvar_8h_a46923988c8f3d1896339650dd4bf5f53}{RUN\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06331}06331 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06332}06332         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_ae1260c15661b04d2cc04867c70e3df41}{sc\_flags}} \& \mbox{\hyperlink{if__runvar_8h_a4d0bc8a7e4cf8003139e1ee4d3d6930e}{RUN\_RUNNING}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06333}06333                 \mbox{\hyperlink{if__run_8c_a3132e4277bc63d116dca25932f0369a0}{run\_set\_leds}}(sc, 0);        \textcolor{comment}{/* turn all LEDs off */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06334}06334 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06335}06335         sc-\/>\mbox{\hyperlink{structrun__softc_ae1260c15661b04d2cc04867c70e3df41}{sc\_flags}} \&= \string~RUN\_RUNNING;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06336}06336 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06337}06337         sc-\/>\mbox{\hyperlink{structrun__softc_a62dd21cab90620634cc0d338870dc49f}{ratectl\_run}} = \mbox{\hyperlink{if__runvar_8h_a2c96ec83349e59ee2ff6b2a95b3b20f9}{RUN\_RATECTL\_OFF}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06338}06338         sc-\/>\mbox{\hyperlink{structrun__softc_a80ae37469cb0af8bf5f1e59107243d21}{cmdq\_run}} = sc-\/>\mbox{\hyperlink{structrun__softc_acc6c8fb6fc13ea995d2c54bdb372a6c1}{cmdq\_key\_set}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06339}06339 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06340}06340         \mbox{\hyperlink{if__runvar_8h_a45d3b538b97178f8fe93284ed57e2cd5}{RUN\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06341}06341 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06342}06342         \textcolor{keywordflow}{for}(i = 0; i < \mbox{\hyperlink{if__runvar_8h_a098384b0034af0daa7c9c5c82b563567a30a078c211986bca094dbe9f1a298eb7}{RUN\_N\_XFER}}; i++)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06343}06343                 \mbox{\hyperlink{usb__transfer_8c_aa525d15cc84d40dafaaecf86537e2c7f}{usbd\_transfer\_drain}}(sc-\/>\mbox{\hyperlink{structrun__softc_a8522ea9d5483b98283b7629e41c31eac}{sc\_xfer}}[i]);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06344}06344 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06345}06345         \mbox{\hyperlink{if__runvar_8h_afb83ba5b9cfa86e30eb1e74fe2267cea}{RUN\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06346}06346 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06347}06347         \mbox{\hyperlink{if__run_8c_a6a4d8727d6e26ce108e272c396086450}{run\_drain\_mbufq}}(sc);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06348}06348 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06349}06349         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrun__softc_ae637efc0ef336d071a092b993762fa77}{rx\_m}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06350}06350                 m\_free(sc-\/>\mbox{\hyperlink{structrun__softc_ae637efc0ef336d071a092b993762fa77}{rx\_m}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06351}06351                 sc-\/>\mbox{\hyperlink{structrun__softc_ae637efc0ef336d071a092b993762fa77}{rx\_m}} = NULL;}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06352}06352         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06353}06353 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06354}06354         \textcolor{comment}{/* Disable Tx/Rx DMA. */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06355}06355         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a7f414eaab074d58fdeb10bd687196ea3}{RT2860\_WPDMA\_GLO\_CFG}}, \&tmp) != 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06356}06356                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06357}06357         tmp \&= \string~(\mbox{\hyperlink{if__runreg_8h_a7f8a24e220bcca5911b8329c9f5fc831}{RT2860\_RX\_DMA\_EN}} | \mbox{\hyperlink{if__runreg_8h_a56b338dd96903dbd6b46be8ea25cadd7}{RT2860\_TX\_DMA\_EN}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06358}06358         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a7f414eaab074d58fdeb10bd687196ea3}{RT2860\_WPDMA\_GLO\_CFG}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06359}06359 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06360}06360         \textcolor{keywordflow}{for} (ntries = 0; ntries < 100; ntries++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06361}06361                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a7f414eaab074d58fdeb10bd687196ea3}{RT2860\_WPDMA\_GLO\_CFG}}, \&tmp) != 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06362}06362                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06363}06363                 \textcolor{keywordflow}{if} ((tmp \& (\mbox{\hyperlink{if__runreg_8h_a661ef52f0e5b894bde9d4e56ae6f74c9}{RT2860\_TX\_DMA\_BUSY}} | \mbox{\hyperlink{if__runreg_8h_ab2ba0d00ee7ed819e0a6589e58dabb85}{RT2860\_RX\_DMA\_BUSY}})) == 0)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06364}06364                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06365}06365                 \mbox{\hyperlink{if__run_8c_a92b12f7b350001cb12d558c3fb85e0c5}{run\_delay}}(sc, 10);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06366}06366         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06367}06367         \textcolor{keywordflow}{if} (ntries == 100) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06368}06368                 device\_printf(sc-\/>\mbox{\hyperlink{structrun__softc_a11422e8a9e276cfaea3662dc74f6fc84}{sc\_dev}}, \textcolor{stringliteral}{"{}timeout waiting for DMA engine\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06369}06369                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06370}06370         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06371}06371 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06372}06372         \textcolor{comment}{/* disable Tx/Rx */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06373}06373         \mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_a5e4990071cffacab52a14f31dec5721d}{RT2860\_MAC\_SYS\_CTRL}}, \&tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06374}06374         tmp \&= \string~(\mbox{\hyperlink{if__runreg_8h_a50b11ecd5acb21d5e4a6ffcdea64eff6}{RT2860\_MAC\_RX\_EN}} | \mbox{\hyperlink{if__runreg_8h_af0f3ca1039aae4714af7601599c96d6e}{RT2860\_MAC\_TX\_EN}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06375}06375         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a5e4990071cffacab52a14f31dec5721d}{RT2860\_MAC\_SYS\_CTRL}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06376}06376 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06377}06377         \textcolor{comment}{/* wait for pending Tx to complete */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06378}06378         \textcolor{keywordflow}{for} (ntries = 0; ntries < 100; ntries++) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06379}06379                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_a8be0fff8d713e086baadf0715ec61f0a}{run\_read}}(sc, \mbox{\hyperlink{if__runreg_8h_ad9139570f2ac4fbe33b6e2efd10dd9de}{RT2860\_TXRXQ\_PCNT}}, \&tmp) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06380}06380                         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_XMIT | RUN\_DEBUG\_RESET,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06381}06381                             \textcolor{stringliteral}{"{}Cannot read Tx queue count\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06382}06382                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06383}06383                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06384}06384                 \textcolor{keywordflow}{if} ((tmp \& \mbox{\hyperlink{if__runreg_8h_a445a44860aa0ac1aa5c8eadd0bc78eaf}{RT2860\_TX2Q\_PCNT\_MASK}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06385}06385                         \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_XMIT | RUN\_DEBUG\_RESET,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06386}06386                             \textcolor{stringliteral}{"{}All Tx cleared\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06387}06387                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06388}06388                 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06389}06389                 \mbox{\hyperlink{if__run_8c_a92b12f7b350001cb12d558c3fb85e0c5}{run\_delay}}(sc, 10);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06390}06390         \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06391}06391         \textcolor{keywordflow}{if} (ntries >= 100)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06392}06392                 \mbox{\hyperlink{if__run_8c_a441699993333b0e1c477e28e67af6c5e}{RUN\_DPRINTF}}(sc, RUN\_DEBUG\_XMIT | RUN\_DEBUG\_RESET,}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06393}06393                     \textcolor{stringliteral}{"{}There are still pending Tx\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06394}06394         \mbox{\hyperlink{if__run_8c_a92b12f7b350001cb12d558c3fb85e0c5}{run\_delay}}(sc, 10);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06395}06395         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a569ba8b4d4eb8a3dabd31783a7b1ca13}{RT2860\_USB\_DMA\_CFG}}, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06396}06396 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06397}06397         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a5e4990071cffacab52a14f31dec5721d}{RT2860\_MAC\_SYS\_CTRL}}, \mbox{\hyperlink{if__runreg_8h_ad2b5e9643b6f5c28f2e9e7fe3210a21c}{RT2860\_BBP\_HRST}} | \mbox{\hyperlink{if__runreg_8h_abab677b0ab94b680bf89336ce073c560}{RT2860\_MAC\_SRST}});}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06398}06398         \mbox{\hyperlink{if__run_8c_afdfb763984d23b1d041cbba20f704f11}{run\_write}}(sc, \mbox{\hyperlink{if__runreg_8h_a5e4990071cffacab52a14f31dec5721d}{RT2860\_MAC\_SYS\_CTRL}}, 0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06399}06399 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06400}06400         \textcolor{keywordflow}{for} (i = 0; i != \mbox{\hyperlink{if__runvar_8h_a07469f73b7222ee6c525c62df2629de3}{RUN\_EP\_QUEUES}}; i++)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06401}06401                 \mbox{\hyperlink{if__run_8c_a965be32210d84ec046de36c0bff35244}{run\_unsetup\_tx\_list}}(sc, \&sc-\/>\mbox{\hyperlink{structrun__softc_ac32a4e4f9bda8c035f10a84ae91b68eb}{sc\_epq}}[i]);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06402}06402 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06403}06403 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06404}06404 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06405}\mbox{\hyperlink{if__run_8c_a92b12f7b350001cb12d558c3fb85e0c5}{06405}} \mbox{\hyperlink{if__run_8c_a92b12f7b350001cb12d558c3fb85e0c5}{run\_delay}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrun__softc}{run\_softc}} *sc, u\_int ms)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06406}06406 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06407}06407         \mbox{\hyperlink{usb__util_8c_a7ad9fc3660f5ecf96d72e499cdfeb963}{usb\_pause\_mtx}}(mtx\_owned(\&sc-\/>\mbox{\hyperlink{structrun__softc_a5a51534f63edf520da3cbc2cc2ca484c}{sc\_mtx}}) ? }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06408}06408             \&sc-\/>\mbox{\hyperlink{structrun__softc_a5a51534f63edf520da3cbc2cc2ca484c}{sc\_mtx}} : NULL, \mbox{\hyperlink{usbdi_8h_a9715d25e0db2e92bd86423a9283893b7}{USB\_MS\_TO\_TICKS}}(ms));}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06409}06409 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06410}06410 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06411}06411 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06412}\mbox{\hyperlink{if__run_8c_a7acbcb2596379a4728a864809a71a605}{06412}} \mbox{\hyperlink{if__run_8c_a7acbcb2596379a4728a864809a71a605}{run\_update\_chw}}(\textcolor{keyword}{struct} ieee80211com *ic)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06413}06413 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06414}06414 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06415}06415         printf(\textcolor{stringliteral}{"{}\%s: TODO\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06416}06416 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06417}06417 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06418}06418 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06419}\mbox{\hyperlink{if__run_8c_a58368cfb88d4d91f6b2045ba4111f7fd}{06419}} \mbox{\hyperlink{if__run_8c_a58368cfb88d4d91f6b2045ba4111f7fd}{run\_ampdu\_enable}}(\textcolor{keyword}{struct} ieee80211\_node *ni, \textcolor{keyword}{struct} ieee80211\_tx\_ampdu *tap)}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06420}06420 \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06421}06421 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06422}06422         \textcolor{comment}{/* For now, no A-\/MPDU TX support in the driver */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06423}06423         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06424}06424 \}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06425}06425 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06426}\mbox{\hyperlink{if__run_8c_a7e5c318b107c2cf8ec68a54a6d1a94c2}{06426}} \textcolor{keyword}{static} device\_method\_t \mbox{\hyperlink{if__run_8c_a7e5c318b107c2cf8ec68a54a6d1a94c2}{run\_methods}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06427}06427         \textcolor{comment}{/* Device interface */}}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06428}06428         DEVMETHOD(device\_probe,         \mbox{\hyperlink{if__run_8c_a7c26c3293f94869f80a14924088a86a6}{run\_match}}),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06429}06429         DEVMETHOD(device\_attach,        \mbox{\hyperlink{if__run_8c_ad4656d747624142de37fbd4be73ef445}{run\_attach}}),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06430}06430         DEVMETHOD(device\_detach,        \mbox{\hyperlink{if__run_8c_a1056dc878808b1a2ebd164bf869702a6}{run\_detach}}),}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06431}06431         DEVMETHOD\_END}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06432}06432 \};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06433}06433 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06434}\mbox{\hyperlink{if__run_8c_a53009071d85bba9b22ae5ac4273ba6aa}{06434}} \textcolor{keyword}{static} driver\_t \mbox{\hyperlink{if__run_8c_a53009071d85bba9b22ae5ac4273ba6aa}{run\_driver}} = \{}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06435}06435         .name = \textcolor{stringliteral}{"{}run"{}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06436}06436         .methods = \mbox{\hyperlink{if__run_8c_a7e5c318b107c2cf8ec68a54a6d1a94c2}{run\_methods}},}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06437}06437         .size = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structrun__softc}{run\_softc}})}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06438}06438 \};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06439}06439 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06440}\mbox{\hyperlink{if__run_8c_ade6aa53ed6ca75d7329d0ceb6a1ed587}{06440}} \textcolor{keyword}{static} devclass\_t \mbox{\hyperlink{if__run_8c_ade6aa53ed6ca75d7329d0ceb6a1ed587}{run\_devclass}};}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06441}06441 }
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06442}\mbox{\hyperlink{if__run_8c_ae3a09332ea13a769fe817fb425b2fa94}{06442}} \mbox{\hyperlink{if__run_8c_ae3a09332ea13a769fe817fb425b2fa94}{DRIVER\_MODULE}}(run, uhub, \mbox{\hyperlink{if__run_8c_a53009071d85bba9b22ae5ac4273ba6aa}{run\_driver}}, \mbox{\hyperlink{if__run_8c_ade6aa53ed6ca75d7329d0ceb6a1ed587}{run\_devclass}}, \mbox{\hyperlink{if__run_8c_a6427c344957ce71350405e194b801696}{run\_driver\_loaded}}, NULL);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06443}\mbox{\hyperlink{if__run_8c_a28b13924bd530ef122697b1e37793cf9}{06443}} \mbox{\hyperlink{if__run_8c_a28b13924bd530ef122697b1e37793cf9}{MODULE\_DEPEND}}(run, wlan, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06444}\mbox{\hyperlink{if__run_8c_a53d976818cfd748abe87e6ae06bb8fdb}{06444}} \mbox{\hyperlink{if__run_8c_a28b13924bd530ef122697b1e37793cf9}{MODULE\_DEPEND}}(run, \mbox{\hyperlink{usb__if_8m_adfa3f6da9c4881e494b180c4ebb06470}{usb}}, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06445}\mbox{\hyperlink{if__run_8c_a62f34b68b8bbc755b6330dc259a85a7c}{06445}} \mbox{\hyperlink{if__run_8c_a28b13924bd530ef122697b1e37793cf9}{MODULE\_DEPEND}}(run, firmware, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06446}\mbox{\hyperlink{if__run_8c_aae48089ce67d6ec48487f86e70d4df7f}{06446}} \mbox{\hyperlink{if__run_8c_aae48089ce67d6ec48487f86e70d4df7f}{MODULE\_VERSION}}(run, 1);}
\DoxyCodeLine{\Hypertarget{if__run_8c_source_l06447}\mbox{\hyperlink{if__run_8c_a55a68c48dd1d9b3af32349ca1eb94008}{06447}} \mbox{\hyperlink{if__run_8c_a55a68c48dd1d9b3af32349ca1eb94008}{USB\_PNP\_HOST\_INFO}}(\mbox{\hyperlink{if__run_8c_a1e8b89f5453c6c00d9b38ae3523c0c5e}{run\_devs}});}

\end{DoxyCode}
