\hypertarget{if__ural_8c_source}{}\doxysection{if\+\_\+ural.\+c}
\label{if__ural_8c_source}\index{dev/usb/wlan/if\_ural.c@{dev/usb/wlan/if\_ural.c}}
\mbox{\hyperlink{if__ural_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00001}00001 \textcolor{comment}{/*      \$FreeBSD\$       */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00002}00002 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00003}00003 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2005, 2006}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00005}00005 \textcolor{comment}{ *      Damien Bergamini <damien.bergamini@free.fr>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00007}00007 \textcolor{comment}{ * Copyright (c) 2006, 2008}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00008}00008 \textcolor{comment}{ *      Hans Petter Selasky <hselasky@FreeBSD.org>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00009}00009 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00010}00010 \textcolor{comment}{ * Permission to use, copy, modify, and distribute this software for any}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00011}00011 \textcolor{comment}{ * purpose with or without fee is hereby granted, provided that the above}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00012}00012 \textcolor{comment}{ * copyright notice and this permission notice appear in all copies.}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00013}00013 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00014}00014 \textcolor{comment}{ * THE SOFTWARE IS PROVIDED "{}AS IS"{} AND THE AUTHOR DISCLAIMS ALL WARRANTIES}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00015}00015 \textcolor{comment}{ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00016}00016 \textcolor{comment}{ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00017}00017 \textcolor{comment}{ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00018}00018 \textcolor{comment}{ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00019}00019 \textcolor{comment}{ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00020}00020 \textcolor{comment}{ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00021}00021 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00022}00022 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00023}00023 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00024}\mbox{\hyperlink{if__ural_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00024}} \mbox{\hyperlink{if__ural_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00025}00025 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00026}00026 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00027}00027 \textcolor{comment}{ * Ralink Technology RT2500USB chipset driver}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00028}00028 \textcolor{comment}{ * http://www.ralinktech.com/}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00029}00029 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00030}00030 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00031}00031 \textcolor{preprocessor}{\#include "{}opt\_wlan.h"{}}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00032}00032 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00033}00033 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00034}00034 \textcolor{preprocessor}{\#include <sys/sockio.h>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00035}00035 \textcolor{preprocessor}{\#include <sys/sysctl.h>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00036}00036 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00037}00037 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00038}00038 \textcolor{preprocessor}{\#include <sys/mbuf.h>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00039}00039 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00040}00040 \textcolor{preprocessor}{\#include <sys/socket.h>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00041}00041 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00042}00042 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00043}00043 \textcolor{preprocessor}{\#include <sys/module.h>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00044}00044 \textcolor{preprocessor}{\#include <sys/bus.h>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00045}00045 \textcolor{preprocessor}{\#include <sys/endian.h>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00046}00046 \textcolor{preprocessor}{\#include <sys/kdb.h>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00047}00047 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00048}00048 \textcolor{preprocessor}{\#include <net/bpf.h>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00049}00049 \textcolor{preprocessor}{\#include <net/if.h>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00050}00050 \textcolor{preprocessor}{\#include <net/if\_var.h>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00051}00051 \textcolor{preprocessor}{\#include <net/if\_arp.h>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00052}00052 \textcolor{preprocessor}{\#include <net/ethernet.h>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00053}00053 \textcolor{preprocessor}{\#include <net/if\_dl.h>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00054}00054 \textcolor{preprocessor}{\#include <net/if\_media.h>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00055}00055 \textcolor{preprocessor}{\#include <net/if\_types.h>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00056}00056 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00057}00057 \textcolor{preprocessor}{\#ifdef INET}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00058}00058 \textcolor{preprocessor}{\#include <netinet/in.h>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00059}00059 \textcolor{preprocessor}{\#include <netinet/in\_systm.h>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00060}00060 \textcolor{preprocessor}{\#include <netinet/in\_var.h>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00061}00061 \textcolor{preprocessor}{\#include <netinet/if\_ether.h>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00062}00062 \textcolor{preprocessor}{\#include <netinet/ip.h>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00063}00063 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00064}00064 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00065}00065 \textcolor{preprocessor}{\#include <net80211/ieee80211\_var.h>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00066}00066 \textcolor{preprocessor}{\#include <net80211/ieee80211\_regdomain.h>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00067}00067 \textcolor{preprocessor}{\#include <net80211/ieee80211\_radiotap.h>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00068}00068 \textcolor{preprocessor}{\#include <net80211/ieee80211\_ratectl.h>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00069}00069 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00070}00070 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb_8h}{dev/usb/usb.h}}>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00071}00071 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usbdi_8h}{dev/usb/usbdi.h}}>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00072}00072 \textcolor{preprocessor}{\#include "{}usbdevs.h"{}}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00073}00073 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00074}\mbox{\hyperlink{if__ural_8c_a927dd6f59caf10a2991dfb564bcbb1e1}{00074}} \textcolor{preprocessor}{\#define USB\_DEBUG\_VAR ural\_debug}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00075}00075 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__debug_8h}{dev/usb/usb\_debug.h}}>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00076}00076 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00077}00077 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{if__uralreg_8h}{dev/usb/wlan/if\_uralreg.h}}>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00078}00078 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{if__uralvar_8h}{dev/usb/wlan/if\_uralvar.h}}>}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00079}00079 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00080}00080 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00081}00081 \textcolor{keyword}{static} \textcolor{keywordtype}{int} ural\_debug = 0;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00082}00082 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00083}00083 \textcolor{keyword}{static} \mbox{\hyperlink{dwc__otg_8c_a58e125bcf985ce2333baef42f97b33b3}{SYSCTL\_NODE}}(\_hw\_usb, OID\_AUTO, ural, CTLFLAG\_RW | CTLFLAG\_MPSAFE, 0,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00084}00084     \textcolor{stringliteral}{"{}USB ural"{}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00085}00085 \mbox{\hyperlink{dwc__otg_8c_a83d020f0b15dc2783f3f1a6966c75e36}{SYSCTL\_INT}}(\_hw\_usb\_ural, OID\_AUTO, \mbox{\hyperlink{cfumass_8c_ac3e1795766a80ec63b157951b4b9a7d4}{debug}}, CTLFLAG\_RWTUN, \&ural\_debug, 0,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00086}00086     \textcolor{stringliteral}{"{}Debug level"{}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00087}00087 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00088}00088 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00089}\mbox{\hyperlink{if__ural_8c_a18c785fd88386227b1adf6c145ad068b}{00089}} \textcolor{preprocessor}{\#define URAL\_RSSI(rssi)                                 \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00090}00090 \textcolor{preprocessor}{        ((rssi) > (RAL\_NOISE\_FLOOR + RAL\_RSSI\_CORR) ?   \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00091}00091 \textcolor{preprocessor}{         ((rssi) -\/ (RAL\_NOISE\_FLOOR + RAL\_RSSI\_CORR)) : 0)}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00092}00092 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00093}00093 \textcolor{comment}{/* various supported device vendors/products */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00094}\mbox{\hyperlink{if__ural_8c_a03179c68de5a4efc6b9204cf5a3b3263}{00094}} \textcolor{keyword}{static} \textcolor{keyword}{const} \mbox{\hyperlink{usbdi_8h_acf836fd8d6349b66a31f45420728da8d}{STRUCT\_USB\_HOST\_ID}} \mbox{\hyperlink{if__ural_8c_a03179c68de5a4efc6b9204cf5a3b3263}{ural\_devs}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00095}00095 \textcolor{preprocessor}{\#define URAL\_DEV(v,p)  \{ USB\_VP(USB\_VENDOR\_\#\#v, USB\_PRODUCT\_\#\#v\#\#\_\#\#p) \}}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00096}00096         \mbox{\hyperlink{if__ural_8c_ab792f119ea731e8dd226fe017304f424}{URAL\_DEV}}(ASUS, WL167G),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00097}00097         \mbox{\hyperlink{if__ural_8c_ab792f119ea731e8dd226fe017304f424}{URAL\_DEV}}(ASUS, RT2570),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00098}00098         \mbox{\hyperlink{if__ural_8c_ab792f119ea731e8dd226fe017304f424}{URAL\_DEV}}(BELKIN, F5D7050),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00099}00099         \mbox{\hyperlink{if__ural_8c_ab792f119ea731e8dd226fe017304f424}{URAL\_DEV}}(BELKIN, F5D7051),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00100}00100         \mbox{\hyperlink{if__ural_8c_ab792f119ea731e8dd226fe017304f424}{URAL\_DEV}}(CISCOLINKSYS, HU200TS),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00101}00101         \mbox{\hyperlink{if__ural_8c_ab792f119ea731e8dd226fe017304f424}{URAL\_DEV}}(CISCOLINKSYS, WUSB54G),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00102}00102         \mbox{\hyperlink{if__ural_8c_ab792f119ea731e8dd226fe017304f424}{URAL\_DEV}}(CISCOLINKSYS, WUSB54GP),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00103}00103         \mbox{\hyperlink{if__ural_8c_ab792f119ea731e8dd226fe017304f424}{URAL\_DEV}}(CONCEPTRONIC2, C54RU),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00104}00104         \mbox{\hyperlink{if__ural_8c_ab792f119ea731e8dd226fe017304f424}{URAL\_DEV}}(DLINK, DWLG122),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00105}00105         \mbox{\hyperlink{if__ural_8c_ab792f119ea731e8dd226fe017304f424}{URAL\_DEV}}(GIGABYTE, GN54G),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00106}00106         \mbox{\hyperlink{if__ural_8c_ab792f119ea731e8dd226fe017304f424}{URAL\_DEV}}(GIGABYTE, GNWBKG),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00107}00107         \mbox{\hyperlink{if__ural_8c_ab792f119ea731e8dd226fe017304f424}{URAL\_DEV}}(GUILLEMOT, HWGUSB254),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00108}00108         \mbox{\hyperlink{if__ural_8c_ab792f119ea731e8dd226fe017304f424}{URAL\_DEV}}(MELCO, KG54),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00109}00109         \mbox{\hyperlink{if__ural_8c_ab792f119ea731e8dd226fe017304f424}{URAL\_DEV}}(MELCO, KG54AI),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00110}00110         \mbox{\hyperlink{if__ural_8c_ab792f119ea731e8dd226fe017304f424}{URAL\_DEV}}(MELCO, KG54YB),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00111}00111         \mbox{\hyperlink{if__ural_8c_ab792f119ea731e8dd226fe017304f424}{URAL\_DEV}}(MELCO, NINWIFI),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00112}00112         \mbox{\hyperlink{if__ural_8c_ab792f119ea731e8dd226fe017304f424}{URAL\_DEV}}(MSI, RT2570),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00113}00113         \mbox{\hyperlink{if__ural_8c_ab792f119ea731e8dd226fe017304f424}{URAL\_DEV}}(MSI, RT2570\_2),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00114}00114         \mbox{\hyperlink{if__ural_8c_ab792f119ea731e8dd226fe017304f424}{URAL\_DEV}}(MSI, RT2570\_3),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00115}00115         \mbox{\hyperlink{if__ural_8c_ab792f119ea731e8dd226fe017304f424}{URAL\_DEV}}(NOVATECH, NV902),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00116}00116         \mbox{\hyperlink{if__ural_8c_ab792f119ea731e8dd226fe017304f424}{URAL\_DEV}}(RALINK, RT2570),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00117}00117         \mbox{\hyperlink{if__ural_8c_ab792f119ea731e8dd226fe017304f424}{URAL\_DEV}}(RALINK, RT2570\_2),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00118}00118         \mbox{\hyperlink{if__ural_8c_ab792f119ea731e8dd226fe017304f424}{URAL\_DEV}}(RALINK, RT2570\_3),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00119}00119         \mbox{\hyperlink{if__ural_8c_ab792f119ea731e8dd226fe017304f424}{URAL\_DEV}}(SIEMENS2, WL54G),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00120}00120         \mbox{\hyperlink{if__ural_8c_ab792f119ea731e8dd226fe017304f424}{URAL\_DEV}}(SMC, 2862WG),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00121}00121         \mbox{\hyperlink{if__ural_8c_ab792f119ea731e8dd226fe017304f424}{URAL\_DEV}}(SPHAIRON, UB801R),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00122}00122         \mbox{\hyperlink{if__ural_8c_ab792f119ea731e8dd226fe017304f424}{URAL\_DEV}}(SURECOM, RT2570),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00123}00123         \mbox{\hyperlink{if__ural_8c_ab792f119ea731e8dd226fe017304f424}{URAL\_DEV}}(VTECH, RT2570),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00124}00124         \mbox{\hyperlink{if__ural_8c_ab792f119ea731e8dd226fe017304f424}{URAL\_DEV}}(ZINWELL, RT2570),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00125}00125 \textcolor{preprocessor}{\#undef URAL\_DEV}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00126}00126 \};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00127}00127 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00128}\mbox{\hyperlink{if__ural_8c_a319aa3027bf704ab3d52baed264969fb}{00128}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{if__ural_8c_a319aa3027bf704ab3d52baed264969fb}{ural\_bulk\_read\_callback}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00129}\mbox{\hyperlink{if__ural_8c_af5064378a114a914cdab7b480239558e}{00129}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{if__ural_8c_af5064378a114a914cdab7b480239558e}{ural\_bulk\_write\_callback}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00130}00130 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00131}00131 \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}}   \mbox{\hyperlink{if__ural_8c_af1bb2baad43c13da5daf210f5ee678a8}{ural\_do\_request}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00132}00132                             \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__ural_8c_source_l00133}00133 \textcolor{keyword}{static} \textcolor{keyword}{struct }ieee80211vap *\mbox{\hyperlink{if__ural_8c_a6996646c4033d3334d7354085d1c2fe3}{ural\_vap\_create}}(\textcolor{keyword}{struct} ieee80211com *,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00134}00134                             \textcolor{keyword}{const} \textcolor{keywordtype}{char} [IFNAMSIZ], \textcolor{keywordtype}{int}, \textcolor{keyword}{enum} ieee80211\_opmode,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00135}00135                             \textcolor{keywordtype}{int}, \textcolor{keyword}{const} uint8\_t [IEEE80211\_ADDR\_LEN],}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00136}00136                             \textcolor{keyword}{const} uint8\_t [IEEE80211\_ADDR\_LEN]);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00137}00137 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{if__ural_8c_a52a7c8072370c77ad244872615ad52f1}{ural\_vap\_delete}}(\textcolor{keyword}{struct} ieee80211vap *);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00138}00138 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{if__ural_8c_a22a013c9a6c86ec8fe999c5e37bd31cb}{ural\_tx\_free}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__tx__data}{ural\_tx\_data}} *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00139}00139 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{if__ural_8c_a80e4a84f8908aa9f270bdfe02ec2b129}{ural\_setup\_tx\_list}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00140}00140 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{if__ural_8c_add9b06d85ee2a88068a5a97e939fbc21}{ural\_unsetup\_tx\_list}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00141}00141 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{if__ural_8c_aaff388e12144ed0c17de86a582001530}{ural\_newstate}}(\textcolor{keyword}{struct} ieee80211vap *,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00142}00142                             \textcolor{keyword}{enum} ieee80211\_state, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00143}00143 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{if__ural_8c_a2edb8636f414eca7747dce65a8c83771}{ural\_setup\_tx\_desc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00144}00144                             \textcolor{keyword}{struct} \mbox{\hyperlink{structural__tx__desc}{ural\_tx\_desc}} *, uint32\_t, \textcolor{keywordtype}{int}, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00145}00145 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{if__ural_8c_afd639c953e0e4543f2f042fa4642d07c}{ural\_tx\_bcn}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *, \textcolor{keyword}{struct} mbuf *,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00146}00146                             \textcolor{keyword}{struct} ieee80211\_node *);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00147}00147 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{if__ural_8c_a235f19abd4284d6cfcdaa8fa783b1ec6}{ural\_tx\_mgt}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *, \textcolor{keyword}{struct} mbuf *,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00148}00148                             \textcolor{keyword}{struct} ieee80211\_node *);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00149}00149 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{if__ural_8c_ab28d22a347ad528b33a10eb793d4f6e4}{ural\_tx\_data}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *, \textcolor{keyword}{struct} mbuf *,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00150}00150                             \textcolor{keyword}{struct} ieee80211\_node *);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00151}00151 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{if__ural_8c_a9a1762163c9216f40d08061e19f8a845}{ural\_transmit}}(\textcolor{keyword}{struct} ieee80211com *, \textcolor{keyword}{struct} mbuf *);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00152}00152 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{if__ural_8c_a4544578b632abc63c444d18461ad920b}{ural\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00153}00153 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{if__ural_8c_a722e2fabb6ba2363af0febe34af4746a}{ural\_parent}}(\textcolor{keyword}{struct} ieee80211com *);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00154}00154 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{if__ural_8c_a5b85199fd4642cc4eb0b23138c629bd2}{ural\_set\_testmode}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00155}00155 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{if__ural_8c_ae9b66d57826f066bb137fee7b6959655}{ural\_eeprom\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *, uint16\_t, \textcolor{keywordtype}{void} *,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00156}00156                             \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00157}00157 \textcolor{keyword}{static} uint16\_t         \mbox{\hyperlink{if__ural_8c_a7913027ad070d91c902a3ea1ee1bd909}{ural\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *, uint16\_t);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00158}00158 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{if__ural_8c_ab72567c232af58f9f106b00874fffc46}{ural\_read\_multi}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *, uint16\_t, \textcolor{keywordtype}{void} *,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00159}00159                             \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00160}00160 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *, uint16\_t, uint16\_t);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00161}\mbox{\hyperlink{if__ural_8c_aaf1724408c69ef783ac788513e0b6f5a}{00161}} \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{if__ural_8c_aaf1724408c69ef783ac788513e0b6f5a}{ural\_write\_multi}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *, uint16\_t, \textcolor{keywordtype}{void} *,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00162}00162                             \textcolor{keywordtype}{int}) \_\_unused;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00163}00163 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{if__ural_8c_a05778372c30d5f6418625218af1387df}{ural\_bbp\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *, uint8\_t, uint8\_t);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00164}00164 \textcolor{keyword}{static} uint8\_t          \mbox{\hyperlink{if__ural_8c_a35a9a237e19bb884c6f7af3aa4b278a0}{ural\_bbp\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *, uint8\_t);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00165}00165 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{ural\_rf\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *, uint8\_t, uint32\_t);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00166}00166 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{if__ural_8c_ac2902a785cdb6779f5035e298ce33eb0}{ural\_scan\_start}}(\textcolor{keyword}{struct} ieee80211com *);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00167}00167 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{if__ural_8c_a5a08243b378dd0cb0a8b31c3cb6bc5fe}{ural\_scan\_end}}(\textcolor{keyword}{struct} ieee80211com *);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00168}00168 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{if__ural_8c_ad058c8db390fd4d849be812bb4fb0599}{ural\_getradiocaps}}(\textcolor{keyword}{struct} ieee80211com *, \textcolor{keywordtype}{int}, \textcolor{keywordtype}{int} *,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00169}00169                             \textcolor{keyword}{struct} ieee80211\_channel[]);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00170}00170 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{if__ural_8c_a2c75fd84aa20e38bf4df89507f87eba2}{ural\_set\_channel}}(\textcolor{keyword}{struct} ieee80211com *);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00171}00171 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{if__ural_8c_a7dc1bc79b36d2cbe582c14cfd283e1f7}{ural\_set\_chan}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00172}00172                             \textcolor{keyword}{struct} ieee80211\_channel *);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00173}00173 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{if__ural_8c_ae70bd0a2ff79740badd9790a08c1e558}{ural\_disable\_rf\_tune}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00174}00174 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{if__ural_8c_a47c8d7efee44543bf17b69c95c529c68}{ural\_enable\_tsf\_sync}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00175}00175 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{if__ural_8c_a5698e49b973d139f01db259f1920b781}{ural\_enable\_tsf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00176}00176 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{if__ural_8c_a21a132eeb495d82ea96bced77a6b0cc5}{ural\_update\_slot}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00177}00177 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{if__ural_8c_aa3552f6bde04e774f909d4724b785f30}{ural\_set\_txpreamble}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00178}00178 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{if__ural_8c_a982c365195030065700b595042b915ba}{ural\_set\_basicrates}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00179}00179                             \textcolor{keyword}{const} \textcolor{keyword}{struct} ieee80211\_channel *);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00180}00180 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{if__ural_8c_a985010b0a238d4f0054a4ae2d467973a}{ural\_set\_bssid}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *, \textcolor{keyword}{const} uint8\_t *);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00181}00181 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{if__ural_8c_a966bdf04687fbcb3971d6fcb7669006a}{ural\_set\_macaddr}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *, \textcolor{keyword}{const} uint8\_t *);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00182}00182 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{if__ural_8c_a290315c3205ff54a326e2f76c3b917c2}{ural\_update\_promisc}}(\textcolor{keyword}{struct} ieee80211com *);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00183}00183 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{if__ural_8c_ae2dbd9716bc0ecc23fef6b323c577d45}{ural\_setpromisc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00184}00184 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char}       *\mbox{\hyperlink{if__ural_8c_ae37740021332c8fd2f76aeb0ee0cb5df}{ural\_get\_rf}}(\textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00185}00185 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{if__ural_8c_a07172e5b2830395045cc79aad812c042}{ural\_read\_eeprom}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00186}00186 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{if__ural_8c_a61a726e84904ea899e21d4e5959fa701}{ural\_bbp\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00187}00187 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{if__ural_8c_ae0a00e3f4b3f31eb0de5675c71b8c900}{ural\_set\_txantenna}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00188}00188 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{if__ural_8c_a6e78710b98bd52f1621730631578f8b2}{ural\_set\_rxantenna}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00189}00189 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{if__ural_8c_a450ec6373cbdfa57cead5c24cf04f0f5}{ural\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00190}00190 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{if__ural_8c_aba31e94a52762fbeea522e30e85a57fc}{ural\_stop}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00191}00191 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{if__ural_8c_ac6bc0aaa72c05f795836a3d8ba89088b}{ural\_raw\_xmit}}(\textcolor{keyword}{struct} ieee80211\_node *, \textcolor{keyword}{struct} mbuf *,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00192}00192                             \textcolor{keyword}{const} \textcolor{keyword}{struct} ieee80211\_bpf\_params *);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00193}00193 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{if__ural_8c_a9c268e5610f3e3d4b6c38aa9368b33b4}{ural\_ratectl\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00194}00194                             \textcolor{keyword}{struct} ieee80211\_node *);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00195}00195 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{if__ural_8c_aff321e8a5c523f6aa60152cae3d05eaf}{ural\_ratectl\_timeout}}(\textcolor{keywordtype}{void} *);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00196}00196 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{if__ural_8c_aa19436c74b075ce255c2cf95a62a37dd}{ural\_ratectl\_task}}(\textcolor{keywordtype}{void} *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00197}00197 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{if__ural_8c_aed23bee71d5b051318db64dbd2754f98}{ural\_pause}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *sc, \textcolor{keywordtype}{int} timeout);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00198}00198 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00199}00199 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00200}00200 \textcolor{comment}{ * Default values for MAC registers; values taken from the reference driver.}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00201}00201 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00202}00202 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00203}00203         uint16\_t        \mbox{\hyperlink{if__ural_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00204}00204         uint16\_t        \mbox{\hyperlink{if__ural_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00205}\mbox{\hyperlink{if__ural_8c_a60a25ffc298e1910997dc61fcf81d49b}{00205}} \} \mbox{\hyperlink{if__ural_8c_a60a25ffc298e1910997dc61fcf81d49b}{ural\_def\_mac}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00206}00206         \{ \mbox{\hyperlink{if__uralreg_8h_a75f68b8df78a9703431a0ae37b4bd6ae}{RAL\_TXRX\_CSR5}},  0x8c8d \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00207}00207         \{ \mbox{\hyperlink{if__uralreg_8h_a1f6d11c6ed755e7956bdeb8c8ac40287}{RAL\_TXRX\_CSR6}},  0x8b8a \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00208}00208         \{ \mbox{\hyperlink{if__uralreg_8h_a6a433ad0272bba376ee7156ac3429eab}{RAL\_TXRX\_CSR7}},  0x8687 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00209}00209         \{ \mbox{\hyperlink{if__uralreg_8h_a87882e98d27bab662b2d7b4a3de8b41c}{RAL\_TXRX\_CSR8}},  0x0085 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00210}00210         \{ \mbox{\hyperlink{if__uralreg_8h_a21336b988bc8c822e9aa8a5a74a67a8e}{RAL\_MAC\_CSR13}},  0x1111 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00211}00211         \{ \mbox{\hyperlink{if__uralreg_8h_aac23fb80a27f3bbf935e2fb2b8dc78ed}{RAL\_MAC\_CSR14}},  0x1e11 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00212}00212         \{ \mbox{\hyperlink{if__uralreg_8h_ad03e7478ec614da924dae817a1ffb906}{RAL\_TXRX\_CSR21}}, 0xe78f \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00213}00213         \{ \mbox{\hyperlink{if__uralreg_8h_a2befb18d18ad076020d589c12e97db75}{RAL\_MAC\_CSR9}},   0xff1d \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00214}00214         \{ \mbox{\hyperlink{if__uralreg_8h_a9f76daf4b802f98ef5c70a83e453e2a6}{RAL\_MAC\_CSR11}},  0x0002 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00215}00215         \{ \mbox{\hyperlink{if__uralreg_8h_a9ebadc09f453ca59aaf79dc63c880abc}{RAL\_MAC\_CSR22}},  0x0053 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00216}00216         \{ \mbox{\hyperlink{if__uralreg_8h_afc4d8f2e9730e2edd81a27e7cbed4342}{RAL\_MAC\_CSR15}},  0x0000 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00217}00217         \{ \mbox{\hyperlink{if__uralreg_8h_a09a64ee9d4e4944acb4caf24337aba6e}{RAL\_MAC\_CSR8}},   \mbox{\hyperlink{if__uralreg_8h_ad302fa05ff113f4850fceb017941ea5a}{RAL\_FRAME\_SIZE}} \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00218}00218         \{ \mbox{\hyperlink{if__uralreg_8h_af154a71f9fafae9e2b2ce9e630ee82b5}{RAL\_TXRX\_CSR19}}, 0x0000 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00219}00219         \{ \mbox{\hyperlink{if__uralreg_8h_a822d387ff1cd0085d1636aa3c700a775}{RAL\_TXRX\_CSR18}}, 0x005a \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00220}00220         \{ \mbox{\hyperlink{if__uralreg_8h_a76f31eadaa1d34c02cfc26750ea334cc}{RAL\_PHY\_CSR2}},   0x0000 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00221}00221         \{ \mbox{\hyperlink{if__uralreg_8h_a0cc5ae406f90f81cda357593cb17a7aa}{RAL\_TXRX\_CSR0}},  0x1ec0 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00222}00222         \{ \mbox{\hyperlink{if__uralreg_8h_a85d56aa828925bdada39479cb054d038}{RAL\_PHY\_CSR4}},   0x000f \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00223}00223 \};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00224}00224 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00225}00225 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00226}00226 \textcolor{comment}{ * Default values for BBP registers; values taken from the reference driver.}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00227}00227 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00228}00228 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00229}\mbox{\hyperlink{if__ural_8c_a9428adc9af4653a2050e2536b55dec8d}{00229}}         uint8\_t \mbox{\hyperlink{if__ural_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00230}\mbox{\hyperlink{if__ural_8c_ae1f13e96d928504e11ec4da744f67f9b}{00230}}         uint8\_t \mbox{\hyperlink{if__ural_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00231}00231 \} \mbox{\hyperlink{if__ural_8c_a56008e935dc020c7542b618286e68d97}{ural\_def\_bbp}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00232}00232         \{  3, 0x02 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00233}00233         \{  4, 0x19 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00234}00234         \{ 14, 0x1c \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00235}00235         \{ 15, 0x30 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00236}00236         \{ 16, 0xac \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00237}00237         \{ 17, 0x48 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00238}00238         \{ 18, 0x18 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00239}00239         \{ 19, 0xff \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00240}00240         \{ 20, 0x1e \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00241}00241         \{ 21, 0x08 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00242}00242         \{ 22, 0x08 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00243}00243         \{ 23, 0x08 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00244}00244         \{ 24, 0x80 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00245}00245         \{ 25, 0x50 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00246}00246         \{ 26, 0x08 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00247}00247         \{ 27, 0x23 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00248}00248         \{ 30, 0x10 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00249}00249         \{ 31, 0x2b \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00250}00250         \{ 32, 0xb9 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00251}00251         \{ 34, 0x12 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00252}00252         \{ 35, 0x50 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00253}00253         \{ 39, 0xc4 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00254}00254         \{ 40, 0x02 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00255}00255         \{ 41, 0x60 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00256}00256         \{ 53, 0x10 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00257}00257         \{ 54, 0x18 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00258}00258         \{ 56, 0x08 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00259}00259         \{ 57, 0x10 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00260}00260         \{ 58, 0x08 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00261}00261         \{ 61, 0x60 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00262}00262         \{ 62, 0x10 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00263}00263         \{ 75, 0xff \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00264}\mbox{\hyperlink{if__ural_8c_a56008e935dc020c7542b618286e68d97}{00264}} \};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00265}00265 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00266}00266 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00267}00267 \textcolor{comment}{ * Default values for RF register R2 indexed by channel numbers.}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00268}00268 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00269}\mbox{\hyperlink{if__ural_8c_a6f699f00041cdcb0ae4c44766ebd3d96}{00269}} \textcolor{keyword}{static} \textcolor{keyword}{const} uint32\_t \mbox{\hyperlink{if__ural_8c_a6f699f00041cdcb0ae4c44766ebd3d96}{ural\_rf2522\_r2}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00270}00270         0x307f6, 0x307fb, 0x30800, 0x30805, 0x3080a, 0x3080f, 0x30814,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00271}00271         0x30819, 0x3081e, 0x30823, 0x30828, 0x3082d, 0x30832, 0x3083e}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00272}00272 \};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00273}00273 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00274}\mbox{\hyperlink{if__ural_8c_a682dab87bb637684cba5fc0f86007a90}{00274}} \textcolor{keyword}{static} \textcolor{keyword}{const} uint32\_t \mbox{\hyperlink{if__ural_8c_a682dab87bb637684cba5fc0f86007a90}{ural\_rf2523\_r2}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00275}00275         0x00327, 0x00328, 0x00329, 0x0032a, 0x0032b, 0x0032c, 0x0032d,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00276}00276         0x0032e, 0x0032f, 0x00340, 0x00341, 0x00342, 0x00343, 0x00346}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00277}00277 \};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00278}00278 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00279}\mbox{\hyperlink{if__ural_8c_a94d54af16ea6ff943f2e4a5bd1f6d41d}{00279}} \textcolor{keyword}{static} \textcolor{keyword}{const} uint32\_t \mbox{\hyperlink{if__ural_8c_a94d54af16ea6ff943f2e4a5bd1f6d41d}{ural\_rf2524\_r2}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00280}00280         0x00327, 0x00328, 0x00329, 0x0032a, 0x0032b, 0x0032c, 0x0032d,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00281}00281         0x0032e, 0x0032f, 0x00340, 0x00341, 0x00342, 0x00343, 0x00346}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00282}00282 \};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00283}00283 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00284}\mbox{\hyperlink{if__ural_8c_a28c1706ab1b215a564f42d4763209a51}{00284}} \textcolor{keyword}{static} \textcolor{keyword}{const} uint32\_t \mbox{\hyperlink{if__ural_8c_a28c1706ab1b215a564f42d4763209a51}{ural\_rf2525\_r2}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00285}00285         0x20327, 0x20328, 0x20329, 0x2032a, 0x2032b, 0x2032c, 0x2032d,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00286}00286         0x2032e, 0x2032f, 0x20340, 0x20341, 0x20342, 0x20343, 0x20346}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00287}00287 \};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00288}00288 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00289}\mbox{\hyperlink{if__ural_8c_a2a333ea27e08d40e6a01aa44ff502516}{00289}} \textcolor{keyword}{static} \textcolor{keyword}{const} uint32\_t \mbox{\hyperlink{if__ural_8c_a2a333ea27e08d40e6a01aa44ff502516}{ural\_rf2525\_hi\_r2}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00290}00290         0x2032f, 0x20340, 0x20341, 0x20342, 0x20343, 0x20344, 0x20345,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00291}00291         0x20346, 0x20347, 0x20348, 0x20349, 0x2034a, 0x2034b, 0x2034e}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00292}00292 \};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00293}00293 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00294}\mbox{\hyperlink{if__ural_8c_ab425eb9d7c1cfebfff39dfbb46beee57}{00294}} \textcolor{keyword}{static} \textcolor{keyword}{const} uint32\_t \mbox{\hyperlink{if__ural_8c_ab425eb9d7c1cfebfff39dfbb46beee57}{ural\_rf2525e\_r2}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00295}00295         0x2044d, 0x2044e, 0x2044f, 0x20460, 0x20461, 0x20462, 0x20463,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00296}00296         0x20464, 0x20465, 0x20466, 0x20467, 0x20468, 0x20469, 0x2046b}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00297}00297 \};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00298}00298 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00299}\mbox{\hyperlink{if__ural_8c_a27a250157b757339a2c66765a537dc5c}{00299}} \textcolor{keyword}{static} \textcolor{keyword}{const} uint32\_t \mbox{\hyperlink{if__ural_8c_a27a250157b757339a2c66765a537dc5c}{ural\_rf2526\_hi\_r2}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00300}00300         0x0022a, 0x0022b, 0x0022b, 0x0022c, 0x0022c, 0x0022d, 0x0022d,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00301}00301         0x0022e, 0x0022e, 0x0022f, 0x0022d, 0x00240, 0x00240, 0x00241}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00302}00302 \};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00303}00303 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00304}\mbox{\hyperlink{if__ural_8c_a9fc1961def3254dcc471c5bd2c830788}{00304}} \textcolor{keyword}{static} \textcolor{keyword}{const} uint32\_t \mbox{\hyperlink{if__ural_8c_a9fc1961def3254dcc471c5bd2c830788}{ural\_rf2526\_r2}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00305}00305         0x00226, 0x00227, 0x00227, 0x00228, 0x00228, 0x00229, 0x00229,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00306}00306         0x0022a, 0x0022a, 0x0022b, 0x0022b, 0x0022c, 0x0022c, 0x0022d}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00307}00307 \};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00308}00308 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00309}00309 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00310}00310 \textcolor{comment}{ * For dual-\/band RF, RF registers R1 and R4 also depend on channel number;}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00311}00311 \textcolor{comment}{ * values taken from the reference driver.}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00312}00312 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00313}00313 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00314}\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{00314}}         uint8\_t         \mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00315}\mbox{\hyperlink{if__ural_8c_a241f774bd9124717ac8d6cfa094a6d1b}{00315}}         uint32\_t        \mbox{\hyperlink{if__ural_8c_a241f774bd9124717ac8d6cfa094a6d1b}{r1}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00316}\mbox{\hyperlink{if__ural_8c_a3f3de83e4d1261e394f4547c8ec0198f}{00316}}         uint32\_t        \mbox{\hyperlink{if__ural_8c_a3f3de83e4d1261e394f4547c8ec0198f}{r2}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00317}\mbox{\hyperlink{if__ural_8c_abb350ded3920a0199969707b46c10f8a}{00317}}         uint32\_t        \mbox{\hyperlink{if__ural_8c_abb350ded3920a0199969707b46c10f8a}{r4}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00318}00318 \} \mbox{\hyperlink{if__ural_8c_a8f5cadb14448b3ff25f012e7ca7f7c2f}{ural\_rf5222}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00319}00319         \{   1, 0x08808, 0x0044d, 0x00282 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00320}00320         \{   2, 0x08808, 0x0044e, 0x00282 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00321}00321         \{   3, 0x08808, 0x0044f, 0x00282 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00322}00322         \{   4, 0x08808, 0x00460, 0x00282 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00323}00323         \{   5, 0x08808, 0x00461, 0x00282 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00324}00324         \{   6, 0x08808, 0x00462, 0x00282 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00325}00325         \{   7, 0x08808, 0x00463, 0x00282 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00326}00326         \{   8, 0x08808, 0x00464, 0x00282 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00327}00327         \{   9, 0x08808, 0x00465, 0x00282 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00328}00328         \{  10, 0x08808, 0x00466, 0x00282 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00329}00329         \{  11, 0x08808, 0x00467, 0x00282 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00330}00330         \{  12, 0x08808, 0x00468, 0x00282 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00331}00331         \{  13, 0x08808, 0x00469, 0x00282 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00332}00332         \{  14, 0x08808, 0x0046b, 0x00286 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00333}00333 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00334}00334         \{  36, 0x08804, 0x06225, 0x00287 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00335}00335         \{  40, 0x08804, 0x06226, 0x00287 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00336}00336         \{  44, 0x08804, 0x06227, 0x00287 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00337}00337         \{  48, 0x08804, 0x06228, 0x00287 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00338}00338         \{  52, 0x08804, 0x06229, 0x00287 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00339}00339         \{  56, 0x08804, 0x0622a, 0x00287 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00340}00340         \{  60, 0x08804, 0x0622b, 0x00287 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00341}00341         \{  64, 0x08804, 0x0622c, 0x00287 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00342}00342 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00343}00343         \{ 100, 0x08804, 0x02200, 0x00283 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00344}00344         \{ 104, 0x08804, 0x02201, 0x00283 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00345}00345         \{ 108, 0x08804, 0x02202, 0x00283 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00346}00346         \{ 112, 0x08804, 0x02203, 0x00283 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00347}00347         \{ 116, 0x08804, 0x02204, 0x00283 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00348}00348         \{ 120, 0x08804, 0x02205, 0x00283 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00349}00349         \{ 124, 0x08804, 0x02206, 0x00283 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00350}00350         \{ 128, 0x08804, 0x02207, 0x00283 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00351}00351         \{ 132, 0x08804, 0x02208, 0x00283 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00352}00352         \{ 136, 0x08804, 0x02209, 0x00283 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00353}00353         \{ 140, 0x08804, 0x0220a, 0x00283 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00354}00354 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00355}00355         \{ 149, 0x08808, 0x02429, 0x00281 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00356}00356         \{ 153, 0x08808, 0x0242b, 0x00281 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00357}00357         \{ 157, 0x08808, 0x0242d, 0x00281 \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00358}00358         \{ 161, 0x08808, 0x0242f, 0x00281 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00359}\mbox{\hyperlink{if__ural_8c_a8f5cadb14448b3ff25f012e7ca7f7c2f}{00359}} \};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00360}00360 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00361}\mbox{\hyperlink{if__ural_8c_a5e1776a78068d92dc5a730d0dcb6577c}{00361}} \textcolor{keyword}{static} \textcolor{keyword}{const} uint8\_t \mbox{\hyperlink{if__ural_8c_a5e1776a78068d92dc5a730d0dcb6577c}{ural\_chan\_5ghz}}[] =}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00362}00362         \{ 36, 40, 44, 48, 52, 56, 60, 64,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00363}00363           100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00364}00364           149, 153, 157, 161 \};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00365}00365 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00366}\mbox{\hyperlink{if__ural_8c_a77731c30f73714a68488735689a6a651}{00366}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__config}{usb\_config}} \mbox{\hyperlink{if__ural_8c_a77731c30f73714a68488735689a6a651}{ural\_config}}[\mbox{\hyperlink{if__uralvar_8h_a8420dba71b9cc240cf981b0bef892004a6fe6320fe40a9e6e4f76a038e0900281}{URAL\_N\_TRANSFER}}] = \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00367}00367         [\mbox{\hyperlink{if__uralvar_8h_a8420dba71b9cc240cf981b0bef892004a34597192b784e03fb5ae2167810e5a85}{URAL\_BULK\_WR}}] = \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00368}00368                 .\mbox{\hyperlink{structusb__config_a5bd5d569870291a54d9bed8377ed8b10}{type}} = \mbox{\hyperlink{usb_8h_a25240fc009aa67bb7a2b635d2e9401e4}{UE\_BULK}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00369}00369                 .endpoint = \mbox{\hyperlink{usb_8h_a1e8d1f402536e634471569b83f603197}{UE\_ADDR\_ANY}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00370}00370                 .direction = \mbox{\hyperlink{usb_8h_a9a98e1bc9388db2ab5213e9d6496e851}{UE\_DIR\_OUT}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00371}00371                 .bufsize = (\mbox{\hyperlink{if__uralreg_8h_ad302fa05ff113f4850fceb017941ea5a}{RAL\_FRAME\_SIZE}} + \mbox{\hyperlink{if__uralreg_8h_a54dd30ee78cb8964997db7e4c7891e09}{RAL\_TX\_DESC\_SIZE}} + 4),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00372}00372                 .\mbox{\hyperlink{structusb__config_a0e7feb3ff903ed490f21c1e5b128fc71}{flags}} = \{.\mbox{\hyperlink{structusb__xfer__flags_a1d8753add0a6492b5dc13e1fba50106c}{pipe\_bof}} = 1,.force\_short\_xfer = 1,\},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00373}00373                 .callback = \mbox{\hyperlink{if__ural_8c_af5064378a114a914cdab7b480239558e}{ural\_bulk\_write\_callback}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00374}00374                 .timeout = 5000,        \textcolor{comment}{/* ms */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00375}00375         \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00376}00376         [\mbox{\hyperlink{if__uralvar_8h_a8420dba71b9cc240cf981b0bef892004a6136ee40df1b5c9e551e23a51d23576a}{URAL\_BULK\_RD}}] = \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00377}00377                 .type = \mbox{\hyperlink{usb_8h_a25240fc009aa67bb7a2b635d2e9401e4}{UE\_BULK}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00378}00378                 .endpoint = \mbox{\hyperlink{usb_8h_a1e8d1f402536e634471569b83f603197}{UE\_ADDR\_ANY}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00379}00379                 .direction = \mbox{\hyperlink{usb_8h_a72bb077a860132c175c166f344c75893}{UE\_DIR\_IN}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00380}00380                 .bufsize = (\mbox{\hyperlink{if__uralreg_8h_ad302fa05ff113f4850fceb017941ea5a}{RAL\_FRAME\_SIZE}} + \mbox{\hyperlink{if__uralreg_8h_ac9cde383b3e7b14acf33c8ac542a74e4}{RAL\_RX\_DESC\_SIZE}}),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00381}00381                 .\mbox{\hyperlink{structusb__config_a0e7feb3ff903ed490f21c1e5b128fc71}{flags}} = \{.\mbox{\hyperlink{structusb__xfer__flags_a1d8753add0a6492b5dc13e1fba50106c}{pipe\_bof}} = 1,.short\_xfer\_ok = 1,\},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00382}00382                 .callback = \mbox{\hyperlink{if__ural_8c_a319aa3027bf704ab3d52baed264969fb}{ural\_bulk\_read\_callback}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00383}00383         \},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00384}00384 \};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00385}00385 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00386}\mbox{\hyperlink{if__ural_8c_a96cf885cca5dae62fc55c9a29888a7c2}{00386}} \textcolor{keyword}{static} device\_probe\_t \mbox{\hyperlink{if__ural_8c_a96cf885cca5dae62fc55c9a29888a7c2}{ural\_match}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00387}\mbox{\hyperlink{if__ural_8c_ac566b653d12ba8963abf21b669cd1c42}{00387}} \textcolor{keyword}{static} device\_attach\_t \mbox{\hyperlink{if__ural_8c_ac566b653d12ba8963abf21b669cd1c42}{ural\_attach}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00388}\mbox{\hyperlink{if__ural_8c_aadbc9889b426c60022dcea3cd240fdc9}{00388}} \textcolor{keyword}{static} device\_detach\_t \mbox{\hyperlink{if__ural_8c_aadbc9889b426c60022dcea3cd240fdc9}{ural\_detach}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00389}00389 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00390}\mbox{\hyperlink{if__ural_8c_ace1b728ba4bf4d14e3958be551054aa8}{00390}} \textcolor{keyword}{static} device\_method\_t \mbox{\hyperlink{if__ural_8c_ace1b728ba4bf4d14e3958be551054aa8}{ural\_methods}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00391}00391         \textcolor{comment}{/* Device interface */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00392}00392         DEVMETHOD(device\_probe,         \mbox{\hyperlink{if__ural_8c_a96cf885cca5dae62fc55c9a29888a7c2}{ural\_match}}),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00393}00393         DEVMETHOD(device\_attach,        \mbox{\hyperlink{if__ural_8c_ac566b653d12ba8963abf21b669cd1c42}{ural\_attach}}),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00394}00394         DEVMETHOD(device\_detach,        \mbox{\hyperlink{if__ural_8c_aadbc9889b426c60022dcea3cd240fdc9}{ural\_detach}}),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00395}00395         DEVMETHOD\_END}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00396}00396 \};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00397}00397 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00398}\mbox{\hyperlink{if__ural_8c_a852b8a8e360428a3df86b90f9d8e4df5}{00398}} \textcolor{keyword}{static} driver\_t \mbox{\hyperlink{if__ural_8c_a852b8a8e360428a3df86b90f9d8e4df5}{ural\_driver}} = \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00399}00399         .name = \textcolor{stringliteral}{"{}ural"{}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00400}00400         .methods = \mbox{\hyperlink{if__ural_8c_ace1b728ba4bf4d14e3958be551054aa8}{ural\_methods}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00401}00401         .size = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structural__softc}{ural\_softc}}),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00402}00402 \};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00403}00403 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00404}\mbox{\hyperlink{if__ural_8c_aa7bfb5462d7bc6e9a6c705ccf516ea31}{00404}} \textcolor{keyword}{static} devclass\_t \mbox{\hyperlink{if__ural_8c_aa7bfb5462d7bc6e9a6c705ccf516ea31}{ural\_devclass}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00405}00405 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00406}\mbox{\hyperlink{if__ural_8c_a4f9ce565e7c46b3a7bd39f9f033e0ee9}{00406}} \mbox{\hyperlink{if__ural_8c_a4f9ce565e7c46b3a7bd39f9f033e0ee9}{DRIVER\_MODULE}}(ural, uhub, \mbox{\hyperlink{if__ural_8c_a852b8a8e360428a3df86b90f9d8e4df5}{ural\_driver}}, \mbox{\hyperlink{if__ural_8c_aa7bfb5462d7bc6e9a6c705ccf516ea31}{ural\_devclass}}, NULL, 0);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00407}\mbox{\hyperlink{if__ural_8c_aa7af1cfb3bee791b019f5797c2d1a10d}{00407}} \mbox{\hyperlink{if__ural_8c_aa7af1cfb3bee791b019f5797c2d1a10d}{MODULE\_DEPEND}}(ural, \mbox{\hyperlink{usb__if_8m_adfa3f6da9c4881e494b180c4ebb06470}{usb}}, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00408}\mbox{\hyperlink{if__ural_8c_a1435aea61075c1c63f0d708b6435e088}{00408}} \mbox{\hyperlink{if__ural_8c_aa7af1cfb3bee791b019f5797c2d1a10d}{MODULE\_DEPEND}}(ural, wlan, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00409}\mbox{\hyperlink{if__ural_8c_af5ef5007a0265f7138373a127fb0b64a}{00409}} \mbox{\hyperlink{if__ural_8c_af5ef5007a0265f7138373a127fb0b64a}{MODULE\_VERSION}}(ural, 1);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00410}\mbox{\hyperlink{if__ural_8c_a0d6378b264189270e00c6f4933fbdc76}{00410}} \mbox{\hyperlink{if__ural_8c_a0d6378b264189270e00c6f4933fbdc76}{USB\_PNP\_HOST\_INFO}}(\mbox{\hyperlink{if__ural_8c_a03179c68de5a4efc6b9204cf5a3b3263}{ural\_devs}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00411}00411 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00412}00412 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00413}\mbox{\hyperlink{if__ural_8c_a7c46aa61fe2df3b7b5c1e34370fd56aa}{00413}} \mbox{\hyperlink{if__ural_8c_a96cf885cca5dae62fc55c9a29888a7c2}{ural\_match}}(device\_t self)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00414}00414 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00415}00415         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__attach__arg}{usb\_attach\_arg}} *uaa = device\_get\_ivars(self);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00416}00416 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00417}00417         \textcolor{keywordflow}{if} (uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a246691e99681281d3113d63e81b7e4f0}{usb\_mode}} != \mbox{\hyperlink{usb_8h_a9bc559812598988121896dceb483806ba1c7091216cfa9c9f4a252b0825ed32cb}{USB\_MODE\_HOST}})}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00418}00418                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00419}00419         \textcolor{keywordflow}{if} (uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a66c2afc71fce73cc432f7d58593e1f26}{info}}.\mbox{\hyperlink{structusbd__lookup__info_a9e2af2c9a58f0df11559c7679185b0e8}{bConfigIndex}} != 0)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00420}00420                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00421}00421         \textcolor{keywordflow}{if} (uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a66c2afc71fce73cc432f7d58593e1f26}{info}}.\mbox{\hyperlink{structusbd__lookup__info_a50a68740a4c82f1a9b999d4a7994b550}{bIfaceIndex}} != \mbox{\hyperlink{if__uralreg_8h_a55157b546b4256170b4d337d0b8b1887}{RAL\_IFACE\_INDEX}})}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00422}00422                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00423}00423 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00424}00424         \textcolor{keywordflow}{return} (\mbox{\hyperlink{usb__lookup_8c_aa691ad42d532498716f358cb1c994fb2}{usbd\_lookup\_id\_by\_uaa}}(\mbox{\hyperlink{if__ural_8c_a03179c68de5a4efc6b9204cf5a3b3263}{ural\_devs}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{if__ural_8c_a03179c68de5a4efc6b9204cf5a3b3263}{ural\_devs}}), uaa));}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00425}00425 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00426}00426 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00427}00427 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00428}\mbox{\hyperlink{if__ural_8c_a6abce922357c94e82257eca6b57ee998}{00428}} \mbox{\hyperlink{if__ural_8c_ac566b653d12ba8963abf21b669cd1c42}{ural\_attach}}(device\_t self)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00429}00429 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00430}00430         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__attach__arg}{usb\_attach\_arg}} *uaa = device\_get\_ivars(self);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00431}00431         \textcolor{keyword}{struct }\mbox{\hyperlink{structural__softc}{ural\_softc}} *sc = device\_get\_softc(self);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00432}00432         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structural__softc_aeb6a8284acf12d2f827af82042fedafa}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00433}00433         uint8\_t iface\_index;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00434}00434         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00435}00435 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00436}00436         \mbox{\hyperlink{usb__util_8c_a2f65a197990caa1a69a16691ce4dc66a}{device\_set\_usb\_desc}}(self);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00437}00437         sc-\/>\mbox{\hyperlink{structural__softc_a8a9b52a71b5b4a3fdfff512c8967341d}{sc\_udev}} = uaa-\/>\mbox{\hyperlink{structusb__attach__arg_ac86557d3eaf77874d436ce38648b0276}{device}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00438}00438         sc-\/>\mbox{\hyperlink{structural__softc_a9d89d62867ac69a1180cd469ba1e8492}{sc\_dev}} = self;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00439}00439 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00440}00440         mtx\_init(\&sc-\/>\mbox{\hyperlink{structural__softc_a2996ec9ed770925172b00ac947b71ce7}{sc\_mtx}}, device\_get\_nameunit(self),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00441}00441             MTX\_NETWORK\_LOCK, MTX\_DEF);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00442}00442         mbufq\_init(\&sc-\/>\mbox{\hyperlink{structural__softc_a0dff4c16e3c5b53933e914cc60880e0a}{sc\_snd}}, ifqmaxlen);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00443}00443 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00444}00444         iface\_index = \mbox{\hyperlink{if__uralreg_8h_a55157b546b4256170b4d337d0b8b1887}{RAL\_IFACE\_INDEX}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00445}00445         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{usb__transfer_8c_a7494c04fae5c5e7ef1af436308670a21}{usbd\_transfer\_setup}}(uaa-\/>\mbox{\hyperlink{structusb__attach__arg_ac86557d3eaf77874d436ce38648b0276}{device}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00446}00446             \&iface\_index, sc-\/>\mbox{\hyperlink{structural__softc_a3e5570470c9d66c12212993513f422f1}{sc\_xfer}}, \mbox{\hyperlink{if__ural_8c_a77731c30f73714a68488735689a6a651}{ural\_config}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00447}00447             \mbox{\hyperlink{if__uralvar_8h_a8420dba71b9cc240cf981b0bef892004a6fe6320fe40a9e6e4f76a038e0900281}{URAL\_N\_TRANSFER}}, sc, \&sc-\/>\mbox{\hyperlink{structural__softc_a2996ec9ed770925172b00ac947b71ce7}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00448}00448         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00449}00449                 device\_printf(self, \textcolor{stringliteral}{"{}could not allocate USB transfers, "{}}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00450}00450                     \textcolor{stringliteral}{"{}err=\%s\(\backslash\)n"{}}, \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}));}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00451}00451                 \textcolor{keywordflow}{goto} detach;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00452}00452         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00453}00453 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00454}00454         \mbox{\hyperlink{if__uralvar_8h_a93cd0229ef9274db702bf17e863b1801}{RAL\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00455}00455         \textcolor{comment}{/* retrieve RT2570 rev. no */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00456}00456         sc-\/>\mbox{\hyperlink{structural__softc_a53830a8bba0def475d61b01af99eb0a0}{asic\_rev}} = \mbox{\hyperlink{if__ural_8c_a7913027ad070d91c902a3ea1ee1bd909}{ural\_read}}(sc, \mbox{\hyperlink{if__uralreg_8h_a2d853cefbd5003fb26da2a2605c38133}{RAL\_MAC\_CSR0}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00457}00457 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00458}00458         \textcolor{comment}{/* retrieve MAC address and various other things from EEPROM */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00459}00459         \mbox{\hyperlink{if__ural_8c_a07172e5b2830395045cc79aad812c042}{ural\_read\_eeprom}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00460}00460         \mbox{\hyperlink{if__uralvar_8h_ad221f1259af784f868b4fcdc69bec791}{RAL\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00461}00461 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00462}00462         device\_printf(self, \textcolor{stringliteral}{"{}MAC/BBP RT2570 (rev 0x\%02x), RF \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00463}00463             sc-\/>\mbox{\hyperlink{structural__softc_a53830a8bba0def475d61b01af99eb0a0}{asic\_rev}}, \mbox{\hyperlink{if__ural_8c_ae37740021332c8fd2f76aeb0ee0cb5df}{ural\_get\_rf}}(sc-\/>\mbox{\hyperlink{structural__softc_a48abc1b58b7765e90047daf07ad57f3c}{rf\_rev}}));}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00464}00464 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00465}00465         ic-\/>ic\_softc = sc;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00466}00466         ic-\/>ic\_name = device\_get\_nameunit(self);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00467}00467         ic-\/>ic\_phytype = IEEE80211\_T\_OFDM; \textcolor{comment}{/* not only, but not used */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00468}00468 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00469}00469         \textcolor{comment}{/* set device capabilities */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00470}00470         ic-\/>ic\_caps =}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00471}00471               IEEE80211\_C\_STA           \textcolor{comment}{/* station mode supported */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00472}00472             | IEEE80211\_C\_IBSS          \textcolor{comment}{/* IBSS mode supported */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00473}00473             | IEEE80211\_C\_MONITOR       \textcolor{comment}{/* monitor mode supported */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00474}00474             | IEEE80211\_C\_HOSTAP        \textcolor{comment}{/* HostAp mode supported */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00475}00475             | IEEE80211\_C\_TXPMGT        \textcolor{comment}{/* tx power management */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00476}00476             | IEEE80211\_C\_SHPREAMBLE    \textcolor{comment}{/* short preamble supported */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00477}00477             | IEEE80211\_C\_SHSLOT        \textcolor{comment}{/* short slot time supported */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00478}00478             | IEEE80211\_C\_BGSCAN        \textcolor{comment}{/* bg scanning supported */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00479}00479             | IEEE80211\_C\_WPA           \textcolor{comment}{/* 802.11i */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00480}00480             ;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00481}00481 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00482}00482         \mbox{\hyperlink{if__ural_8c_ad058c8db390fd4d849be812bb4fb0599}{ural\_getradiocaps}}(ic, IEEE80211\_CHAN\_MAX, \&ic-\/>ic\_nchans,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00483}00483             ic-\/>ic\_channels);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00484}00484 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00485}00485         ieee80211\_ifattach(ic);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00486}00486         ic-\/>ic\_update\_promisc = \mbox{\hyperlink{if__ural_8c_a290315c3205ff54a326e2f76c3b917c2}{ural\_update\_promisc}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00487}00487         ic-\/>ic\_raw\_xmit = \mbox{\hyperlink{if__ural_8c_ac6bc0aaa72c05f795836a3d8ba89088b}{ural\_raw\_xmit}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00488}00488         ic-\/>ic\_scan\_start = \mbox{\hyperlink{if__ural_8c_ac2902a785cdb6779f5035e298ce33eb0}{ural\_scan\_start}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00489}00489         ic-\/>ic\_scan\_end = \mbox{\hyperlink{if__ural_8c_a5a08243b378dd0cb0a8b31c3cb6bc5fe}{ural\_scan\_end}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00490}00490         ic-\/>ic\_getradiocaps = \mbox{\hyperlink{if__ural_8c_ad058c8db390fd4d849be812bb4fb0599}{ural\_getradiocaps}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00491}00491         ic-\/>ic\_set\_channel = \mbox{\hyperlink{if__ural_8c_a2c75fd84aa20e38bf4df89507f87eba2}{ural\_set\_channel}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00492}00492         ic-\/>ic\_parent = \mbox{\hyperlink{if__ural_8c_a722e2fabb6ba2363af0febe34af4746a}{ural\_parent}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00493}00493         ic-\/>ic\_transmit = \mbox{\hyperlink{if__ural_8c_a9a1762163c9216f40d08061e19f8a845}{ural\_transmit}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00494}00494         ic-\/>ic\_vap\_create = \mbox{\hyperlink{if__ural_8c_a6996646c4033d3334d7354085d1c2fe3}{ural\_vap\_create}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00495}00495         ic-\/>ic\_vap\_delete = \mbox{\hyperlink{if__ural_8c_a52a7c8072370c77ad244872615ad52f1}{ural\_vap\_delete}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00496}00496 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00497}00497         ieee80211\_radiotap\_attach(ic,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00498}00498             \&sc-\/>\mbox{\hyperlink{structural__softc_a352beae0671033f8edd72a99c224492f}{sc\_txtap}}.\mbox{\hyperlink{structural__tx__radiotap__header_ae65057fb184beecf987ed64c9d3e0b8e}{wt\_ihdr}}, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structural__softc_a352beae0671033f8edd72a99c224492f}{sc\_txtap}}),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00499}00499                 \mbox{\hyperlink{if__uralvar_8h_a5b42c6ede0c7fe71ff4ee5eb31d085f0}{RAL\_TX\_RADIOTAP\_PRESENT}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00500}00500             \&sc-\/>\mbox{\hyperlink{structural__softc_ac20277a63b844038fc3e6f8e6d38fb55}{sc\_rxtap}}.\mbox{\hyperlink{structural__rx__radiotap__header_a475dad04edc03f340f20120502644fbe}{wr\_ihdr}}, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structural__softc_ac20277a63b844038fc3e6f8e6d38fb55}{sc\_rxtap}}),}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00501}00501                 \mbox{\hyperlink{if__uralvar_8h_a3f0b0d755558952374fd5172393d4fe1}{RAL\_RX\_RADIOTAP\_PRESENT}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00502}00502 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00503}00503         \textcolor{keywordflow}{if} (bootverbose)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00504}00504                 ieee80211\_announce(ic);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00505}00505 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00506}00506         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00507}00507 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00508}00508 detach:}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00509}00509         \mbox{\hyperlink{if__ural_8c_aadbc9889b426c60022dcea3cd240fdc9}{ural\_detach}}(self);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00510}00510         \textcolor{keywordflow}{return} (ENXIO);                 \textcolor{comment}{/* failure */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00511}00511 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00512}00512 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00513}00513 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00514}\mbox{\hyperlink{if__ural_8c_a7f67c4f7445baa3313d7217a8968b53d}{00514}} \mbox{\hyperlink{if__ural_8c_aadbc9889b426c60022dcea3cd240fdc9}{ural\_detach}}(device\_t self)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00515}00515 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00516}00516         \textcolor{keyword}{struct }\mbox{\hyperlink{structural__softc}{ural\_softc}} *sc = device\_get\_softc(self);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00517}00517         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structural__softc_aeb6a8284acf12d2f827af82042fedafa}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00518}00518 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00519}00519         \textcolor{comment}{/* prevent further ioctls */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00520}00520         \mbox{\hyperlink{if__uralvar_8h_a93cd0229ef9274db702bf17e863b1801}{RAL\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00521}00521         sc-\/>\mbox{\hyperlink{structural__softc_aeec225909c9b4560de06ee9ffea8f27f}{sc\_detached}} = 1;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00522}00522         \mbox{\hyperlink{if__uralvar_8h_ad221f1259af784f868b4fcdc69bec791}{RAL\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00523}00523 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00524}00524         \textcolor{comment}{/* stop all USB transfers */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00525}00525         \mbox{\hyperlink{usb__transfer_8c_a2f5ab55bfe7f356bb7a7505ff35c9741}{usbd\_transfer\_unsetup}}(sc-\/>\mbox{\hyperlink{structural__softc_a3e5570470c9d66c12212993513f422f1}{sc\_xfer}}, \mbox{\hyperlink{if__uralvar_8h_a8420dba71b9cc240cf981b0bef892004a6fe6320fe40a9e6e4f76a038e0900281}{URAL\_N\_TRANSFER}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00526}00526 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00527}00527         \textcolor{comment}{/* free TX list, if any */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00528}00528         \mbox{\hyperlink{if__uralvar_8h_a93cd0229ef9274db702bf17e863b1801}{RAL\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00529}00529         \mbox{\hyperlink{if__ural_8c_add9b06d85ee2a88068a5a97e939fbc21}{ural\_unsetup\_tx\_list}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00530}00530         \mbox{\hyperlink{if__uralvar_8h_ad221f1259af784f868b4fcdc69bec791}{RAL\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00531}00531 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00532}00532         \textcolor{keywordflow}{if} (ic-\/>ic\_softc == sc)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00533}00533                 ieee80211\_ifdetach(ic);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00534}00534         mbufq\_drain(\&sc-\/>\mbox{\hyperlink{structural__softc_a0dff4c16e3c5b53933e914cc60880e0a}{sc\_snd}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00535}00535         mtx\_destroy(\&sc-\/>\mbox{\hyperlink{structural__softc_a2996ec9ed770925172b00ac947b71ce7}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00536}00536 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00537}00537         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00538}00538 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00539}00539 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00540}00540 \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00541}\mbox{\hyperlink{if__ural_8c_af1bb2baad43c13da5daf210f5ee678a8}{00541}} \mbox{\hyperlink{if__ural_8c_af1bb2baad43c13da5daf210f5ee678a8}{ural\_do\_request}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00542}00542     \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__ural_8c_source_l00543}00543 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00544}00544         \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} err;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00545}00545         \textcolor{keywordtype}{int} ntries = 10;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00546}00546 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00547}00547         \textcolor{keywordflow}{while} (ntries-\/-\/) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00548}00548                 err = \mbox{\hyperlink{usb__request_8c_ae914a46bd63666caf7f4d8c182fa5e71}{usbd\_do\_request\_flags}}(sc-\/>\mbox{\hyperlink{structural__softc_a8a9b52a71b5b4a3fdfff512c8967341d}{sc\_udev}}, \&sc-\/>\mbox{\hyperlink{structural__softc_a2996ec9ed770925172b00ac947b71ce7}{sc\_mtx}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00549}00549                     \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, data, 0, NULL, 250 \textcolor{comment}{/* ms */});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00550}00550                 \textcolor{keywordflow}{if} (err == 0)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00551}00551                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00552}00552 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00553}00553                 DPRINTFN(1, \textcolor{stringliteral}{"{}Control request failed, \%s (retrying)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00554}00554                     \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(err));}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00555}00555                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_aed23bee71d5b051318db64dbd2754f98}{ural\_pause}}(sc, hz / 100))}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00556}00556                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00557}00557         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00558}00558         \textcolor{keywordflow}{return} (err);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00559}00559 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00560}00560 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00561}00561 \textcolor{keyword}{static} \textcolor{keyword}{struct }ieee80211vap *}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00562}\mbox{\hyperlink{if__ural_8c_a6996646c4033d3334d7354085d1c2fe3}{00562}} \mbox{\hyperlink{if__ural_8c_a6996646c4033d3334d7354085d1c2fe3}{ural\_vap\_create}}(\textcolor{keyword}{struct} ieee80211com *ic, \textcolor{keyword}{const} \textcolor{keywordtype}{char} name[IFNAMSIZ], \textcolor{keywordtype}{int} unit,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00563}00563     \textcolor{keyword}{enum} ieee80211\_opmode opmode, \textcolor{keywordtype}{int} flags,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00564}00564     \textcolor{keyword}{const} uint8\_t bssid[IEEE80211\_ADDR\_LEN],}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00565}00565     \textcolor{keyword}{const} uint8\_t mac[IEEE80211\_ADDR\_LEN])}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00566}00566 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00567}00567         \textcolor{keyword}{struct }\mbox{\hyperlink{structural__softc}{ural\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00568}00568         \textcolor{keyword}{struct }\mbox{\hyperlink{structural__vap}{ural\_vap}} *uvp;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00569}00569         \textcolor{keyword}{struct }ieee80211vap *vap;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00570}00570 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00571}00571         \textcolor{keywordflow}{if} (!TAILQ\_EMPTY(\&ic-\/>ic\_vaps))         \textcolor{comment}{/* only one at a time */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00572}00572                 \textcolor{keywordflow}{return} NULL;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00573}00573         uvp = malloc(\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__vap}{ural\_vap}}), M\_80211\_VAP, M\_WAITOK | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00574}00574         vap = \&uvp-\/>\mbox{\hyperlink{structural__vap_ae2de69589de6baa3e44db2c35f2b224e}{vap}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00575}00575         \textcolor{comment}{/* enable s/w bmiss handling for sta mode */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00576}00576 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00577}00577         \textcolor{keywordflow}{if} (ieee80211\_vap\_setup(ic, vap, name, unit, opmode,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00578}00578             flags | IEEE80211\_CLONE\_NOBEACONS, bssid) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00579}00579                 \textcolor{comment}{/* out of memory */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00580}00580                 free(uvp, M\_80211\_VAP);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00581}00581                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00582}00582         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00583}00583 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00584}00584         \textcolor{comment}{/* override state transition machine */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00585}00585         uvp-\/>\mbox{\hyperlink{structural__vap_af87e4a724666b7a941d253404540a949}{newstate}} = vap-\/>iv\_newstate;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00586}00586         vap-\/>iv\_newstate = \mbox{\hyperlink{if__ural_8c_aaff388e12144ed0c17de86a582001530}{ural\_newstate}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00587}00587 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00588}00588         \mbox{\hyperlink{usbdi_8h_a1f241362056f1ed3d4c4b5cfb63ce8e5}{usb\_callout\_init\_mtx}}(\&uvp-\/>\mbox{\hyperlink{structural__vap_a130c9ceed1df78b6d542a26db2697e52}{ratectl\_ch}}, \&sc-\/>\mbox{\hyperlink{structural__softc_a2996ec9ed770925172b00ac947b71ce7}{sc\_mtx}}, 0);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00589}00589         TASK\_INIT(\&uvp-\/>\mbox{\hyperlink{structural__vap_ac35a2da0d7106cc98d87c6290ef33a0e}{ratectl\_task}}, 0, \mbox{\hyperlink{if__ural_8c_aa19436c74b075ce255c2cf95a62a37dd}{ural\_ratectl\_task}}, uvp);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00590}00590         ieee80211\_ratectl\_init(vap);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00591}00591         ieee80211\_ratectl\_setinterval(vap, 1000 \textcolor{comment}{/* 1 sec */});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00592}00592 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00593}00593         \textcolor{comment}{/* complete setup */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00594}00594         ieee80211\_vap\_attach(vap, ieee80211\_media\_change,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00595}00595             ieee80211\_media\_status, mac);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00596}00596         ic-\/>ic\_opmode = opmode;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00597}00597         \textcolor{keywordflow}{return} vap;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00598}00598 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00599}00599 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00600}00600 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00601}\mbox{\hyperlink{if__ural_8c_a52a7c8072370c77ad244872615ad52f1}{00601}} \mbox{\hyperlink{if__ural_8c_a52a7c8072370c77ad244872615ad52f1}{ural\_vap\_delete}}(\textcolor{keyword}{struct} ieee80211vap *vap)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00602}00602 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00603}00603         \textcolor{keyword}{struct }\mbox{\hyperlink{structural__vap}{ural\_vap}} *uvp = \mbox{\hyperlink{if__uralvar_8h_a237ee6dd1e0e534f3a299bda13679499}{URAL\_VAP}}(\mbox{\hyperlink{structural__vap_ae2de69589de6baa3e44db2c35f2b224e}{vap}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00604}00604         \textcolor{keyword}{struct }ieee80211com *ic = vap-\/>iv\_ic;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00605}00605 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00606}00606         \mbox{\hyperlink{usbdi_8h_a828c4d79b0d9b11c8dcb77899a2bffda}{usb\_callout\_drain}}(\&uvp-\/>\mbox{\hyperlink{structural__vap_a130c9ceed1df78b6d542a26db2697e52}{ratectl\_ch}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00607}00607         ieee80211\_draintask(ic, \&uvp-\/>\mbox{\hyperlink{structural__vap_ac35a2da0d7106cc98d87c6290ef33a0e}{ratectl\_task}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00608}00608         ieee80211\_ratectl\_deinit(vap);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00609}00609         ieee80211\_vap\_detach(vap);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00610}00610         free(uvp, M\_80211\_VAP);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00611}00611 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00612}00612 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00613}00613 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00614}\mbox{\hyperlink{if__ural_8c_a22a013c9a6c86ec8fe999c5e37bd31cb}{00614}} \mbox{\hyperlink{if__ural_8c_a22a013c9a6c86ec8fe999c5e37bd31cb}{ural\_tx\_free}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__tx__data}{ural\_tx\_data}} *data, \textcolor{keywordtype}{int} txerr)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00615}00615 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00616}00616         \textcolor{keyword}{struct }\mbox{\hyperlink{structural__softc}{ural\_softc}} *sc = data-\/>sc;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00617}00617 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00618}00618         \textcolor{keywordflow}{if} (data-\/>m != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00619}00619                 ieee80211\_tx\_complete(data-\/>ni, data-\/>m, txerr);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00620}00620                 data-\/>m = NULL;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00621}00621                 data-\/>ni = NULL;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00622}00622         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00623}00623         STAILQ\_INSERT\_TAIL(\&sc-\/>\mbox{\hyperlink{structural__softc_a5ec5f1771d59cea60ed37fbbad952d1d}{tx\_free}}, data, \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00624}00624         sc-\/>\mbox{\hyperlink{structural__softc_aa8798b71126c0a52b711df7e6a4112d5}{tx\_nfree}}++;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00625}00625 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00626}00626 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00627}00627 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00628}\mbox{\hyperlink{if__ural_8c_a80e4a84f8908aa9f270bdfe02ec2b129}{00628}} \mbox{\hyperlink{if__ural_8c_a80e4a84f8908aa9f270bdfe02ec2b129}{ural\_setup\_tx\_list}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00629}00629 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00630}00630         \textcolor{keyword}{struct }\mbox{\hyperlink{structural__tx__data}{ural\_tx\_data}} *data;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00631}00631         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00632}00632 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00633}00633         \mbox{\hyperlink{structural__tx__data_ac8925316eaa365bb9fab90ebe85bed4d}{sc}}-\/>\mbox{\hyperlink{structural__softc_aa8798b71126c0a52b711df7e6a4112d5}{tx\_nfree}} = 0;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00634}00634         STAILQ\_INIT(\&\mbox{\hyperlink{structural__tx__data_ac8925316eaa365bb9fab90ebe85bed4d}{sc}}-\/>\mbox{\hyperlink{structural__softc_add16159208b328816b0a0a6ed4e04ad9}{tx\_q}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00635}00635         STAILQ\_INIT(\&\mbox{\hyperlink{structural__tx__data_ac8925316eaa365bb9fab90ebe85bed4d}{sc}}-\/>\mbox{\hyperlink{structural__softc_a5ec5f1771d59cea60ed37fbbad952d1d}{tx\_free}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00636}00636 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00637}00637         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{if__uralvar_8h_a593c35ea24c39342458f3621b26eec14}{RAL\_TX\_LIST\_COUNT}}; i++) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00638}00638                 data = \&\mbox{\hyperlink{structural__tx__data_ac8925316eaa365bb9fab90ebe85bed4d}{sc}}-\/>\mbox{\hyperlink{structural__softc_a71c62d4e2d5c0deac79bdaf74369289c}{tx\_data}}[i];}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00639}00639 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00640}00640                 data-\/>sc = \mbox{\hyperlink{structural__tx__data_ac8925316eaa365bb9fab90ebe85bed4d}{sc}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00641}00641                 STAILQ\_INSERT\_TAIL(\&\mbox{\hyperlink{structural__tx__data_ac8925316eaa365bb9fab90ebe85bed4d}{sc}}-\/>\mbox{\hyperlink{structural__softc_a5ec5f1771d59cea60ed37fbbad952d1d}{tx\_free}}, data, \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00642}00642                 \mbox{\hyperlink{structural__tx__data_ac8925316eaa365bb9fab90ebe85bed4d}{sc}}-\/>\mbox{\hyperlink{structural__softc_aa8798b71126c0a52b711df7e6a4112d5}{tx\_nfree}}++;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00643}00643         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00644}00644 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00645}00645 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00646}00646 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00647}\mbox{\hyperlink{if__ural_8c_add9b06d85ee2a88068a5a97e939fbc21}{00647}} \mbox{\hyperlink{if__ural_8c_add9b06d85ee2a88068a5a97e939fbc21}{ural\_unsetup\_tx\_list}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *\mbox{\hyperlink{structural__tx__data_ac8925316eaa365bb9fab90ebe85bed4d}{sc}})}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00648}00648 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00649}00649         \textcolor{keyword}{struct }\mbox{\hyperlink{structural__tx__data}{ural\_tx\_data}} *data;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00650}00650         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00651}00651 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00652}00652         \textcolor{comment}{/* make sure any subsequent use of the queues will fail */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00653}00653         \mbox{\hyperlink{structural__tx__data_ac8925316eaa365bb9fab90ebe85bed4d}{sc}}-\/>\mbox{\hyperlink{structural__softc_aa8798b71126c0a52b711df7e6a4112d5}{tx\_nfree}} = 0;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00654}00654         STAILQ\_INIT(\&\mbox{\hyperlink{structural__tx__data_ac8925316eaa365bb9fab90ebe85bed4d}{sc}}-\/>\mbox{\hyperlink{structural__softc_add16159208b328816b0a0a6ed4e04ad9}{tx\_q}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00655}00655         STAILQ\_INIT(\&\mbox{\hyperlink{structural__tx__data_ac8925316eaa365bb9fab90ebe85bed4d}{sc}}-\/>\mbox{\hyperlink{structural__softc_a5ec5f1771d59cea60ed37fbbad952d1d}{tx\_free}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00656}00656 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00657}00657         \textcolor{comment}{/* free up all node references and mbufs */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00658}00658         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{if__uralvar_8h_a593c35ea24c39342458f3621b26eec14}{RAL\_TX\_LIST\_COUNT}}; i++) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00659}00659                 data = \&\mbox{\hyperlink{structural__tx__data_ac8925316eaa365bb9fab90ebe85bed4d}{sc}}-\/>\mbox{\hyperlink{structural__softc_a71c62d4e2d5c0deac79bdaf74369289c}{tx\_data}}[i];}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00660}00660 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00661}00661                 \textcolor{keywordflow}{if} (data-\/>m != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00662}00662                         m\_freem(data-\/>m);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00663}00663                         data-\/>m = NULL;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00664}00664                 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00665}00665                 \textcolor{keywordflow}{if} (data-\/>ni != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00666}00666                         ieee80211\_free\_node(data-\/>ni);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00667}00667                         data-\/>ni = NULL;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00668}00668                 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00669}00669         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00670}00670 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00671}00671 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00672}00672 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00673}\mbox{\hyperlink{if__ural_8c_aaff388e12144ed0c17de86a582001530}{00673}} \mbox{\hyperlink{if__ural_8c_aaff388e12144ed0c17de86a582001530}{ural\_newstate}}(\textcolor{keyword}{struct} ieee80211vap *vap, \textcolor{keyword}{enum} ieee80211\_state nstate, \textcolor{keywordtype}{int} arg)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00674}00674 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00675}00675         \textcolor{keyword}{struct }\mbox{\hyperlink{structural__vap}{ural\_vap}} *uvp = \mbox{\hyperlink{if__uralvar_8h_a237ee6dd1e0e534f3a299bda13679499}{URAL\_VAP}}(\mbox{\hyperlink{structural__vap_ae2de69589de6baa3e44db2c35f2b224e}{vap}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00676}00676         \textcolor{keyword}{struct }ieee80211com *ic = vap-\/>iv\_ic;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00677}00677         \textcolor{keyword}{struct }\mbox{\hyperlink{structural__softc}{ural\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00678}00678         \textcolor{keyword}{const} \textcolor{keyword}{struct }ieee80211\_txparam *tp;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00679}00679         \textcolor{keyword}{struct }ieee80211\_node *ni;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00680}00680         \textcolor{keyword}{struct }mbuf *m;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00681}00681 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00682}00682         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}\%s -\/> \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00683}00683                 ieee80211\_state\_name[vap-\/>iv\_state],}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00684}00684                 ieee80211\_state\_name[nstate]);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00685}00685 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00686}00686         IEEE80211\_UNLOCK(ic);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00687}00687         \mbox{\hyperlink{if__uralvar_8h_a93cd0229ef9274db702bf17e863b1801}{RAL\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00688}00688         \mbox{\hyperlink{usbdi_8h_ad74dd2f25febf2ba5083574711e4101a}{usb\_callout\_stop}}(\&uvp-\/>\mbox{\hyperlink{structural__vap_a130c9ceed1df78b6d542a26db2697e52}{ratectl\_ch}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00689}00689 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00690}00690         \textcolor{keywordflow}{switch} (nstate) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00691}00691         \textcolor{keywordflow}{case} IEEE80211\_S\_INIT:}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00692}00692                 \textcolor{keywordflow}{if} (vap-\/>iv\_state == IEEE80211\_S\_RUN) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00693}00693                         \textcolor{comment}{/* abort TSF synchronization */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00694}00694                         \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_af154a71f9fafae9e2b2ce9e630ee82b5}{RAL\_TXRX\_CSR19}}, 0);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00695}00695 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00696}00696                         \textcolor{comment}{/* force tx led to stop blinking */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00697}00697                         \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_afab26c592cc764d2e0fd4499345c1a0f}{RAL\_MAC\_CSR20}}, 0);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00698}00698                 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00699}00699                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00700}00700 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00701}00701         \textcolor{keywordflow}{case} IEEE80211\_S\_RUN:}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00702}00702                 ni = ieee80211\_ref\_node(vap-\/>iv\_bss);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00703}00703 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00704}00704                 \textcolor{keywordflow}{if} (vap-\/>iv\_opmode != IEEE80211\_M\_MONITOR) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00705}00705                         \textcolor{keywordflow}{if} (ic-\/>ic\_bsschan == IEEE80211\_CHAN\_ANYC)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00706}00706                                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00707}00707 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00708}00708                         \mbox{\hyperlink{if__ural_8c_a21a132eeb495d82ea96bced77a6b0cc5}{ural\_update\_slot}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00709}00709                         \mbox{\hyperlink{if__ural_8c_aa3552f6bde04e774f909d4724b785f30}{ural\_set\_txpreamble}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00710}00710                         \mbox{\hyperlink{if__ural_8c_a982c365195030065700b595042b915ba}{ural\_set\_basicrates}}(sc, ic-\/>ic\_bsschan);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00711}00711                         IEEE80211\_ADDR\_COPY(sc-\/>\mbox{\hyperlink{structural__softc_a03d104f1811b1bfc5f81d98b4be2c64d}{sc\_bssid}}, ni-\/>ni\_bssid);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00712}00712                         \mbox{\hyperlink{if__ural_8c_a985010b0a238d4f0054a4ae2d467973a}{ural\_set\_bssid}}(sc, sc-\/>\mbox{\hyperlink{structural__softc_a03d104f1811b1bfc5f81d98b4be2c64d}{sc\_bssid}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00713}00713                 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00714}00714 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00715}00715                 \textcolor{keywordflow}{if} (vap-\/>iv\_opmode == IEEE80211\_M\_HOSTAP ||}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00716}00716                     vap-\/>iv\_opmode == IEEE80211\_M\_IBSS) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00717}00717                         m = ieee80211\_beacon\_alloc(ni);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00718}00718                         \textcolor{keywordflow}{if} (m == NULL) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00719}00719                                 device\_printf(sc-\/>\mbox{\hyperlink{structural__softc_a9d89d62867ac69a1180cd469ba1e8492}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00720}00720                                     \textcolor{stringliteral}{"{}could not allocate beacon\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00721}00721                                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00722}00722                         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00723}00723                         ieee80211\_ref\_node(ni);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00724}00724                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_afd639c953e0e4543f2f042fa4642d07c}{ural\_tx\_bcn}}(sc, m, ni) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00725}00725                                 device\_printf(sc-\/>\mbox{\hyperlink{structural__softc_a9d89d62867ac69a1180cd469ba1e8492}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00726}00726                                     \textcolor{stringliteral}{"{}could not send beacon\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00727}00727                                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00728}00728                         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00729}00729                 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00730}00730 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00731}00731                 \textcolor{comment}{/* make tx led blink on tx (controlled by ASIC) */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00732}00732                 \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_afab26c592cc764d2e0fd4499345c1a0f}{RAL\_MAC\_CSR20}}, 1);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00733}00733 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00734}00734                 \textcolor{keywordflow}{if} (vap-\/>iv\_opmode != IEEE80211\_M\_MONITOR)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00735}00735                         \mbox{\hyperlink{if__ural_8c_a47c8d7efee44543bf17b69c95c529c68}{ural\_enable\_tsf\_sync}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00736}00736                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00737}00737                         \mbox{\hyperlink{if__ural_8c_a5698e49b973d139f01db259f1920b781}{ural\_enable\_tsf}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00738}00738 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00739}00739                 \textcolor{comment}{/* enable automatic rate adaptation */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00740}00740                 \textcolor{comment}{/* XXX should use ic\_bsschan but not valid until after newstate call below */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00741}00741                 tp = \&vap-\/>iv\_txparms[ieee80211\_chan2mode(ic-\/>ic\_curchan)];}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00742}00742                 \textcolor{keywordflow}{if} (tp-\/>ucastrate == IEEE80211\_FIXED\_RATE\_NONE)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00743}00743                         \mbox{\hyperlink{if__ural_8c_a9c268e5610f3e3d4b6c38aa9368b33b4}{ural\_ratectl\_start}}(sc, ni);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00744}00744                 ieee80211\_free\_node(ni);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00745}00745                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00746}00746 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00747}00747         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00748}00748                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00749}00749         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00750}00750         \mbox{\hyperlink{if__uralvar_8h_ad221f1259af784f868b4fcdc69bec791}{RAL\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00751}00751         IEEE80211\_LOCK(ic);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00752}00752         \textcolor{keywordflow}{return} (uvp-\/>\mbox{\hyperlink{structural__vap_af87e4a724666b7a941d253404540a949}{newstate}}(vap, nstate, arg));}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00753}00753 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00754}00754 \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}}:}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00755}00755         \mbox{\hyperlink{if__uralvar_8h_ad221f1259af784f868b4fcdc69bec791}{RAL\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00756}00756         IEEE80211\_LOCK(ic);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00757}00757         ieee80211\_free\_node(ni);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00758}00758         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00759}00759 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00760}00760 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00761}00761 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00762}\mbox{\hyperlink{if__ural_8c_a00cd5eb4dfd4d9b71518d09fc5708ff3}{00762}} \mbox{\hyperlink{if__ural_8c_af5064378a114a914cdab7b480239558e}{ural\_bulk\_write\_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__ural_8c_source_l00763}00763 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00764}00764         \textcolor{keyword}{struct }\mbox{\hyperlink{structural__softc}{ural\_softc}} *sc = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00765}00765         \textcolor{keyword}{struct }ieee80211vap *vap;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00766}00766         \textcolor{keyword}{struct }\mbox{\hyperlink{structural__tx__data}{ural\_tx\_data}} *data;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00767}00767         \textcolor{keyword}{struct }mbuf *m;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00768}00768         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *pc;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00769}00769         \textcolor{keywordtype}{int} \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00770}00770 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00771}00771         \mbox{\hyperlink{usb__transfer_8c_ac0c68320222f26c2a3eba47b46c47899}{usbd\_xfer\_status}}(xfer, \&\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}}, NULL, NULL, NULL);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00772}00772 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00773}00773         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00774}00774         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a8f0386217ba77be3e47721fae9aa9b3d}{USB\_ST\_TRANSFERRED}}:}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00775}00775                 DPRINTFN(11, \textcolor{stringliteral}{"{}transfer complete, \%d bytes\(\backslash\)n"{}}, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00776}00776 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00777}00777                 \textcolor{comment}{/* free resources */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00778}00778                 data = \mbox{\hyperlink{usb__transfer_8c_a1d9c627eab802e6281cea4de0369afde}{usbd\_xfer\_get\_priv}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00779}00779                 \mbox{\hyperlink{if__ural_8c_a22a013c9a6c86ec8fe999c5e37bd31cb}{ural\_tx\_free}}(data, 0);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00780}00780                 \mbox{\hyperlink{usb__transfer_8c_a9e8b046b9d903ce4deb7b4ebba3c0e95}{usbd\_xfer\_set\_priv}}(xfer, NULL);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00781}00781 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00782}00782                 \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00783}00783         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a3aa7120c3ecab31972b8fe219530f552}{USB\_ST\_SETUP}}:}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00784}00784 tr\_setup:}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00785}00785                 data = STAILQ\_FIRST(\&sc-\/>\mbox{\hyperlink{structural__softc_add16159208b328816b0a0a6ed4e04ad9}{tx\_q}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00786}00786                 \textcolor{keywordflow}{if} (data) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00787}00787                         STAILQ\_REMOVE\_HEAD(\&sc-\/>\mbox{\hyperlink{structural__softc_add16159208b328816b0a0a6ed4e04ad9}{tx\_q}}, \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00788}00788                         m = data-\/>m;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00789}00789 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00790}00790                         \textcolor{keywordflow}{if} (m-\/>m\_pkthdr.len > (\textcolor{keywordtype}{int})(\mbox{\hyperlink{if__uralreg_8h_ad302fa05ff113f4850fceb017941ea5a}{RAL\_FRAME\_SIZE}} + \mbox{\hyperlink{if__uralreg_8h_a54dd30ee78cb8964997db7e4c7891e09}{RAL\_TX\_DESC\_SIZE}})) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00791}00791                                 DPRINTFN(0, \textcolor{stringliteral}{"{}data overflow, \%u bytes\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00792}00792                                     m-\/>m\_pkthdr.len);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00793}00793                                 m-\/>m\_pkthdr.len = (\mbox{\hyperlink{if__uralreg_8h_ad302fa05ff113f4850fceb017941ea5a}{RAL\_FRAME\_SIZE}} + \mbox{\hyperlink{if__uralreg_8h_a54dd30ee78cb8964997db7e4c7891e09}{RAL\_TX\_DESC\_SIZE}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00794}00794                         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00795}00795                         pc = \mbox{\hyperlink{usb__transfer_8c_a6e66695b916f0770a259bed959c21555}{usbd\_xfer\_get\_frame}}(xfer, 0);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00796}00796                         \mbox{\hyperlink{usb__busdma_8c_accb7cd85c3477e50c1ba1b1489226d09}{usbd\_copy\_in}}(pc, 0, \&data-\/>desc, \mbox{\hyperlink{if__uralreg_8h_a54dd30ee78cb8964997db7e4c7891e09}{RAL\_TX\_DESC\_SIZE}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00797}00797                         \mbox{\hyperlink{usbdi_8h_a9696aa8bcb25b1adcf45e8387a13897a}{usbd\_m\_copy\_in}}(pc, \mbox{\hyperlink{if__uralreg_8h_a54dd30ee78cb8964997db7e4c7891e09}{RAL\_TX\_DESC\_SIZE}}, m, 0,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00798}00798                             m-\/>m\_pkthdr.len);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00799}00799 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00800}00800                         vap = data-\/>ni-\/>ni\_vap;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00801}00801                         \textcolor{keywordflow}{if} (ieee80211\_radiotap\_active\_vap(vap)) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00802}00802                                 \textcolor{keyword}{struct }\mbox{\hyperlink{structural__tx__radiotap__header}{ural\_tx\_radiotap\_header}} *tap = \&sc-\/>\mbox{\hyperlink{structural__softc_a352beae0671033f8edd72a99c224492f}{sc\_txtap}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00803}00803 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00804}00804                                 tap-\/>\mbox{\hyperlink{structural__tx__radiotap__header_aa25f68e5faf3f31f7477bf2efb6f5635}{wt\_flags}} = 0;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00805}00805                                 tap-\/>\mbox{\hyperlink{structural__tx__radiotap__header_a90a4de0ae90e99b80f5dcfaca46bbccc}{wt\_rate}} = data-\/>rate;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00806}00806                                 tap-\/>\mbox{\hyperlink{structural__tx__radiotap__header_adf826cb162ac52ff2266358e4b802917}{wt\_antenna}} = sc-\/>\mbox{\hyperlink{structural__softc_af11c8cfb01da2def7b07281a9e5329ac}{tx\_ant}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00807}00807 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00808}00808                                 ieee80211\_radiotap\_tx(vap, m);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00809}00809                         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00810}00810 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00811}00811                         \textcolor{comment}{/* xfer length needs to be a multiple of two! */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00812}00812                         \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = (\mbox{\hyperlink{if__uralreg_8h_a54dd30ee78cb8964997db7e4c7891e09}{RAL\_TX\_DESC\_SIZE}} + m-\/>m\_pkthdr.len + 1) \& \string~1;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00813}00813                         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} \% 64) == 0)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00814}00814                                 \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} += 2;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00815}00815 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00816}00816                         DPRINTFN(11, \textcolor{stringliteral}{"{}sending frame len=\%u xferlen=\%u\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00817}00817                             m-\/>m\_pkthdr.len, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00818}00818 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00819}00819                         \mbox{\hyperlink{usb__transfer_8c_a31786497f0f4222203b1e993d52af753}{usbd\_xfer\_set\_frame\_len}}(xfer, 0, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00820}00820                         \mbox{\hyperlink{usb__transfer_8c_a9e8b046b9d903ce4deb7b4ebba3c0e95}{usbd\_xfer\_set\_priv}}(xfer, data);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00821}00821 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00822}00822                         \mbox{\hyperlink{usb__transfer_8c_a10c440b0b97cac293b4df9d558f15bac}{usbd\_transfer\_submit}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00823}00823                 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00824}00824                 \mbox{\hyperlink{if__ural_8c_a4544578b632abc63c444d18461ad920b}{ural\_start}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00825}00825                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00826}00826 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00827}00827         \textcolor{keywordflow}{default}:                        \textcolor{comment}{/* Error */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00828}00828                 DPRINTFN(11, \textcolor{stringliteral}{"{}transfer error, \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00829}00829                     \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}));}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00830}00830 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00831}00831                 data = \mbox{\hyperlink{usb__transfer_8c_a1d9c627eab802e6281cea4de0369afde}{usbd\_xfer\_get\_priv}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00832}00832                 \textcolor{keywordflow}{if} (data != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00833}00833                         \mbox{\hyperlink{if__ural_8c_a22a013c9a6c86ec8fe999c5e37bd31cb}{ural\_tx\_free}}(data, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00834}00834                         \mbox{\hyperlink{usb__transfer_8c_a9e8b046b9d903ce4deb7b4ebba3c0e95}{usbd\_xfer\_set\_priv}}(xfer, NULL);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00835}00835                 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00836}00836 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00837}00837                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} == \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a83258c6183686c303988db96e7f5713a}{USB\_ERR\_STALLED}}) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00838}00838                         \textcolor{comment}{/* try to clear stall first */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00839}00839                         \mbox{\hyperlink{usb__transfer_8c_abadf9cb2f8e81a5133af0c8030039de3}{usbd\_xfer\_set\_stall}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00840}00840                         \textcolor{keywordflow}{goto} tr\_setup;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00841}00841                 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00842}00842                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} == \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945aeb31baaa7bf416e200f2a0d4ece60820}{USB\_ERR\_TIMEOUT}})}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00843}00843                         device\_printf(sc-\/>\mbox{\hyperlink{structural__softc_a9d89d62867ac69a1180cd469ba1e8492}{sc\_dev}}, \textcolor{stringliteral}{"{}device timeout\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00844}00844                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00845}00845         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00846}00846 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00847}00847 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00848}00848 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00849}\mbox{\hyperlink{if__ural_8c_a160604e33b3446a2feb4cd5b0d188170}{00849}} \mbox{\hyperlink{if__ural_8c_a319aa3027bf704ab3d52baed264969fb}{ural\_bulk\_read\_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__ural_8c_source_l00850}00850 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00851}00851         \textcolor{keyword}{struct }\mbox{\hyperlink{structural__softc}{ural\_softc}} *sc = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00852}00852         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structural__softc_aeb6a8284acf12d2f827af82042fedafa}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00853}00853         \textcolor{keyword}{struct }ieee80211\_node *ni;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00854}00854         \textcolor{keyword}{struct }epoch\_tracker et;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00855}00855         \textcolor{keyword}{struct }mbuf *m = NULL;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00856}00856         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *pc;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00857}00857         uint32\_t flags;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00858}00858         int8\_t rssi = 0, nf = 0;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00859}00859         \textcolor{keywordtype}{int} \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00860}00860 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00861}00861         \mbox{\hyperlink{usb__transfer_8c_ac0c68320222f26c2a3eba47b46c47899}{usbd\_xfer\_status}}(xfer, \&\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}}, NULL, NULL, NULL);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00862}00862 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00863}00863         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00864}00864         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a8f0386217ba77be3e47721fae9aa9b3d}{USB\_ST\_TRANSFERRED}}:}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00865}00865 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00866}00866                 DPRINTFN(15, \textcolor{stringliteral}{"{}rx done, actlen=\%d\(\backslash\)n"{}}, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00867}00867 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00868}00868                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} < (\textcolor{keywordtype}{int})(\mbox{\hyperlink{if__uralreg_8h_ac9cde383b3e7b14acf33c8ac542a74e4}{RAL\_RX\_DESC\_SIZE}} + IEEE80211\_MIN\_LEN)) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00869}00869                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}\%s: xfer too short \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00870}00870                             device\_get\_nameunit(sc-\/>\mbox{\hyperlink{structural__softc_a9d89d62867ac69a1180cd469ba1e8492}{sc\_dev}}), \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00871}00871                         counter\_u64\_add(ic-\/>ic\_ierrors, 1);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00872}00872                         \textcolor{keywordflow}{goto} tr\_setup;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00873}00873                 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00874}00874 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00875}00875                 \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} -\/= \mbox{\hyperlink{if__uralreg_8h_ac9cde383b3e7b14acf33c8ac542a74e4}{RAL\_RX\_DESC\_SIZE}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00876}00876                 \textcolor{comment}{/* rx descriptor is located at the end */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00877}00877                 pc = \mbox{\hyperlink{usb__transfer_8c_a6e66695b916f0770a259bed959c21555}{usbd\_xfer\_get\_frame}}(xfer, 0);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00878}00878                 \mbox{\hyperlink{usb__busdma_8c_af52eece45b7868dbf58386f4c9e4eb9a}{usbd\_copy\_out}}(pc, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}}, \&sc-\/>\mbox{\hyperlink{structural__softc_ae6f41d256b74c83f3e2378e351138b62}{sc\_rx\_desc}}, \mbox{\hyperlink{if__uralreg_8h_ac9cde383b3e7b14acf33c8ac542a74e4}{RAL\_RX\_DESC\_SIZE}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00879}00879 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00880}00880                 rssi = \mbox{\hyperlink{if__ural_8c_a18c785fd88386227b1adf6c145ad068b}{URAL\_RSSI}}(sc-\/>\mbox{\hyperlink{structural__softc_ae6f41d256b74c83f3e2378e351138b62}{sc\_rx\_desc}}.\mbox{\hyperlink{structural__rx__desc_a18d1828086feeb076bb4f14da288e8ff}{rssi}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00881}00881                 nf = \mbox{\hyperlink{if__uralreg_8h_ac55b2afef94284011e1a9a659f71f7b8}{RAL\_NOISE\_FLOOR}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00882}00882                 flags = le32toh(sc-\/>\mbox{\hyperlink{structural__softc_ae6f41d256b74c83f3e2378e351138b62}{sc\_rx\_desc}}.\mbox{\hyperlink{structural__rx__desc_a705e2e4c68165ae023625c69a5b18193}{flags}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00883}00883                 \textcolor{keywordflow}{if} (flags \& (\mbox{\hyperlink{if__uralreg_8h_ae8b9c95750832a9f9f835ef58aa9db41}{RAL\_RX\_PHY\_ERROR}} | \mbox{\hyperlink{if__uralreg_8h_af435b21effa9d93570f903506105b87e}{RAL\_RX\_CRC\_ERROR}})) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00884}00884                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00885}00885 \textcolor{comment}{                         * This should not happen since we did not}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00886}00886 \textcolor{comment}{                         * request to receive those frames when we}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00887}00887 \textcolor{comment}{                         * filled RAL\_TXRX\_CSR2:}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00888}00888 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00889}00889                         DPRINTFN(5, \textcolor{stringliteral}{"{}PHY or CRC error\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00890}00890                         counter\_u64\_add(ic-\/>ic\_ierrors, 1);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00891}00891                         \textcolor{keywordflow}{goto} tr\_setup;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00892}00892                 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00893}00893 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00894}00894                 m = m\_getcl(M\_NOWAIT, MT\_DATA, M\_PKTHDR);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00895}00895                 \textcolor{keywordflow}{if} (m == NULL) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00896}00896                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}could not allocate mbuf\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00897}00897                         counter\_u64\_add(ic-\/>ic\_ierrors, 1);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00898}00898                         \textcolor{keywordflow}{goto} tr\_setup;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00899}00899                 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00900}00900                 \mbox{\hyperlink{usb__busdma_8c_af52eece45b7868dbf58386f4c9e4eb9a}{usbd\_copy\_out}}(pc, 0, mtod(m, uint8\_t *), \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00901}00901 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00902}00902                 \textcolor{comment}{/* finalize mbuf */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00903}00903                 m-\/>m\_pkthdr.len = m-\/>m\_len = (flags >> 16) \& 0xfff;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00904}00904 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00905}00905                 \textcolor{keywordflow}{if} (ieee80211\_radiotap\_active(ic)) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00906}00906                         \textcolor{keyword}{struct }\mbox{\hyperlink{structural__rx__radiotap__header}{ural\_rx\_radiotap\_header}} *tap = \&sc-\/>\mbox{\hyperlink{structural__softc_ac20277a63b844038fc3e6f8e6d38fb55}{sc\_rxtap}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00907}00907 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00908}00908                         \textcolor{comment}{/* XXX set once */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00909}00909                         tap-\/>\mbox{\hyperlink{structural__rx__radiotap__header_a604de071ffa76ebb83f1dcc9470eff1f}{wr\_flags}} = 0;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00910}00910                         tap-\/>\mbox{\hyperlink{structural__rx__radiotap__header_acd33267d0fb6606be263cf6e4250d02c}{wr\_rate}} = ieee80211\_plcp2rate(sc-\/>\mbox{\hyperlink{structural__softc_ae6f41d256b74c83f3e2378e351138b62}{sc\_rx\_desc}}.\mbox{\hyperlink{structural__rx__desc_a34a23a5726c3586910e08391e79bb541}{rate}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00911}00911                             (flags \& \mbox{\hyperlink{if__uralreg_8h_aed79f834b2f7b7324f7a9ceca4ef1fe3}{RAL\_RX\_OFDM}}) ?}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00912}00912                             IEEE80211\_T\_OFDM : IEEE80211\_T\_CCK);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00913}00913                         tap-\/>\mbox{\hyperlink{structural__rx__radiotap__header_abfd6a09693f60ec1429b544dee5a5832}{wr\_antenna}} = sc-\/>\mbox{\hyperlink{structural__softc_a0022e9a31ed2a5668da36013c1f8e569}{rx\_ant}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00914}00914                         tap-\/>\mbox{\hyperlink{structural__rx__radiotap__header_a8aa32e3fdd55dee5fb6050b42c77c955}{wr\_antsignal}} = nf + rssi;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00915}00915                         tap-\/>\mbox{\hyperlink{structural__rx__radiotap__header_a536cefd42573045bbe7b1833916538d2}{wr\_antnoise}} = nf;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00916}00916                 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00917}00917                 \textcolor{comment}{/* Strip trailing 802.11 MAC FCS. */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00918}00918                 m\_adj(m, -\/IEEE80211\_CRC\_LEN);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00919}00919 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00920}00920                 \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00921}00921         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a3aa7120c3ecab31972b8fe219530f552}{USB\_ST\_SETUP}}:}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00922}00922 tr\_setup:}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00923}00923                 \mbox{\hyperlink{usb__transfer_8c_a31786497f0f4222203b1e993d52af753}{usbd\_xfer\_set\_frame\_len}}(xfer, 0, \mbox{\hyperlink{usb__transfer_8c_ae34a7cc2f01c6dfb68bca6fd0b72647e}{usbd\_xfer\_max\_len}}(xfer));}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00924}00924                 \mbox{\hyperlink{usb__transfer_8c_a10c440b0b97cac293b4df9d558f15bac}{usbd\_transfer\_submit}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00925}00925 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00926}00926                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00927}00927 \textcolor{comment}{                 * At the end of a USB callback it is always safe to unlock}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00928}00928 \textcolor{comment}{                 * the private mutex of a device! That is why we do the}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00929}00929 \textcolor{comment}{                 * "{}ieee80211\_input"{} here, and not some lines up!}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00930}00930 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00931}00931                 \mbox{\hyperlink{if__uralvar_8h_ad221f1259af784f868b4fcdc69bec791}{RAL\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00932}00932                 \textcolor{keywordflow}{if} (m) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00933}00933                         ni = ieee80211\_find\_rxnode(ic,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00934}00934                             mtod(m, \textcolor{keyword}{struct} ieee80211\_frame\_min *));}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00935}00935                         NET\_EPOCH\_ENTER(et);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00936}00936                         \textcolor{keywordflow}{if} (ni != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00937}00937                                 (void) ieee80211\_input(ni, m, rssi, nf);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00938}00938                                 ieee80211\_free\_node(ni);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00939}00939                         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00940}00940                                 (\textcolor{keywordtype}{void}) ieee80211\_input\_all(ic, m, rssi, nf);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00941}00941                         NET\_EPOCH\_EXIT(et);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00942}00942                 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00943}00943                 \mbox{\hyperlink{if__uralvar_8h_a93cd0229ef9274db702bf17e863b1801}{RAL\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00944}00944                 \mbox{\hyperlink{if__ural_8c_a4544578b632abc63c444d18461ad920b}{ural\_start}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00945}00945                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00946}00946 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00947}00947         \textcolor{keywordflow}{default}:                        \textcolor{comment}{/* Error */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00948}00948                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}}) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00949}00949                         \textcolor{comment}{/* try to clear stall first */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00950}00950                         \mbox{\hyperlink{usb__transfer_8c_abadf9cb2f8e81a5133af0c8030039de3}{usbd\_xfer\_set\_stall}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00951}00951                         \textcolor{keywordflow}{goto} tr\_setup;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00952}00952                 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00953}00953                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00954}00954         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00955}00955 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00956}00956 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00957}00957 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00958}\mbox{\hyperlink{if__ural_8c_afa9d0ccdc63b4164398276b953ad93c7}{00958}} \mbox{\hyperlink{if__ural_8c_afa9d0ccdc63b4164398276b953ad93c7}{ural\_plcp\_signal}}(\textcolor{keywordtype}{int} rate)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00959}00959 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00960}00960         \textcolor{keywordflow}{switch} (rate) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00961}00961         \textcolor{comment}{/* OFDM rates (cf IEEE Std 802.11a-\/1999, pp. 14 Table 80) */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00962}00962         \textcolor{keywordflow}{case} 12:        \textcolor{keywordflow}{return} 0xb;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00963}00963         \textcolor{keywordflow}{case} 18:        \textcolor{keywordflow}{return} 0xf;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00964}00964         \textcolor{keywordflow}{case} 24:        \textcolor{keywordflow}{return} 0xa;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00965}00965         \textcolor{keywordflow}{case} 36:        \textcolor{keywordflow}{return} 0xe;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00966}00966         \textcolor{keywordflow}{case} 48:        \textcolor{keywordflow}{return} 0x9;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00967}00967         \textcolor{keywordflow}{case} 72:        \textcolor{keywordflow}{return} 0xd;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00968}00968         \textcolor{keywordflow}{case} 96:        \textcolor{keywordflow}{return} 0x8;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00969}00969         \textcolor{keywordflow}{case} 108:       \textcolor{keywordflow}{return} 0xc;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00970}00970 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00971}00971         \textcolor{comment}{/* CCK rates (NB: not IEEE std, device-\/specific) */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00972}00972         \textcolor{keywordflow}{case} 2:         \textcolor{keywordflow}{return} 0x0;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00973}00973         \textcolor{keywordflow}{case} 4:         \textcolor{keywordflow}{return} 0x1;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00974}00974         \textcolor{keywordflow}{case} 11:        \textcolor{keywordflow}{return} 0x2;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00975}00975         \textcolor{keywordflow}{case} 22:        \textcolor{keywordflow}{return} 0x3;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00976}00976         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00977}00977         \textcolor{keywordflow}{return} 0xff;            \textcolor{comment}{/* XXX unsupported/unknown rate */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00978}00978 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00979}00979 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00980}00980 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00981}\mbox{\hyperlink{if__ural_8c_a2edb8636f414eca7747dce65a8c83771}{00981}} \mbox{\hyperlink{if__ural_8c_a2edb8636f414eca7747dce65a8c83771}{ural\_setup\_tx\_desc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structural__tx__desc}{ural\_tx\_desc}} *\mbox{\hyperlink{usb__device_8h_ab3a00cd7fdc532cb4cd4d59733b440bf}{desc}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00982}00982     uint32\_t flags, \textcolor{keywordtype}{int} \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}}, \textcolor{keywordtype}{int} rate)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00983}00983 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00984}00984         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structural__softc_aeb6a8284acf12d2f827af82042fedafa}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00985}00985         uint16\_t plcp\_length;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00986}00986         \textcolor{keywordtype}{int} \mbox{\hyperlink{xhci_8h_a6ccdd9ce01c26d9c463f093ee27e4c84}{remainder}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00987}00987 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00988}00988         \mbox{\hyperlink{usb__device_8h_ab3a00cd7fdc532cb4cd4d59733b440bf}{desc}}-\/>flags = htole32(flags);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00989}00989         \mbox{\hyperlink{usb__device_8h_ab3a00cd7fdc532cb4cd4d59733b440bf}{desc}}-\/>flags |= htole32(\mbox{\hyperlink{if__uralreg_8h_abf9c27e4ff04c46b2f47852bfd69ebca}{RAL\_TX\_NEWSEQ}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00990}00990         \mbox{\hyperlink{usb__device_8h_ab3a00cd7fdc532cb4cd4d59733b440bf}{desc}}-\/>flags |= htole32(\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} << 16);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00991}00991 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00992}00992         \mbox{\hyperlink{usb__device_8h_ab3a00cd7fdc532cb4cd4d59733b440bf}{desc}}-\/>wme = htole16(\mbox{\hyperlink{if__uralreg_8h_ae0a98adcd4ab66236bb05a3237e47c89}{RAL\_AIFSN}}(2) | \mbox{\hyperlink{if__uralreg_8h_a7e3ef7ab33661a7c4ad477f4d5fb3640}{RAL\_LOGCWMIN}}(3) | \mbox{\hyperlink{if__uralreg_8h_a1e6f0728186a8d3e4d4beb62bf9f6ba7}{RAL\_LOGCWMAX}}(5));}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00993}00993         \mbox{\hyperlink{usb__device_8h_ab3a00cd7fdc532cb4cd4d59733b440bf}{desc}}-\/>wme |= htole16(\mbox{\hyperlink{if__uralreg_8h_a3bf2bd42c86457366ff6037853e53bd2}{RAL\_IVOFFSET}}(\textcolor{keyword}{sizeof} (\textcolor{keyword}{struct} ieee80211\_frame)));}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00994}00994 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00995}00995         \textcolor{comment}{/* setup PLCP fields */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00996}00996         \mbox{\hyperlink{usb__device_8h_ab3a00cd7fdc532cb4cd4d59733b440bf}{desc}}-\/>plcp\_signal  = \mbox{\hyperlink{if__ural_8c_afa9d0ccdc63b4164398276b953ad93c7}{ural\_plcp\_signal}}(rate);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00997}00997         \mbox{\hyperlink{usb__device_8h_ab3a00cd7fdc532cb4cd4d59733b440bf}{desc}}-\/>plcp\_service = 4;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00998}00998 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l00999}00999         \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} += IEEE80211\_CRC\_LEN;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01000}01000         \textcolor{keywordflow}{if} (ieee80211\_rate2phytype(ic-\/>ic\_rt, rate) == IEEE80211\_T\_OFDM) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01001}01001                 \mbox{\hyperlink{usb__device_8h_ab3a00cd7fdc532cb4cd4d59733b440bf}{desc}}-\/>flags |= htole32(\mbox{\hyperlink{if__uralreg_8h_acdc893541391c520b0e52cc997f2f37a}{RAL\_TX\_OFDM}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01002}01002 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01003}01003                 plcp\_length = \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} \& 0xfff;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01004}01004                 \mbox{\hyperlink{usb__device_8h_ab3a00cd7fdc532cb4cd4d59733b440bf}{desc}}-\/>plcp\_length\_hi = plcp\_length >> 6;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01005}01005                 \mbox{\hyperlink{usb__device_8h_ab3a00cd7fdc532cb4cd4d59733b440bf}{desc}}-\/>plcp\_length\_lo = plcp\_length \& 0x3f;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01006}01006         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01007}01007                 \textcolor{keywordflow}{if} (rate == 0)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01008}01008                         rate = 2;       \textcolor{comment}{/* avoid division by zero */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01009}01009                 plcp\_length = howmany(16 * \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}}, rate);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01010}01010                 \textcolor{keywordflow}{if} (rate == 22) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01011}01011                         \mbox{\hyperlink{xhci_8h_a6ccdd9ce01c26d9c463f093ee27e4c84}{remainder}} = (16 * \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}}) \% 22;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01012}01012                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{xhci_8h_a6ccdd9ce01c26d9c463f093ee27e4c84}{remainder}} != 0 \&\& \mbox{\hyperlink{xhci_8h_a6ccdd9ce01c26d9c463f093ee27e4c84}{remainder}} < 7)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01013}01013                                 \mbox{\hyperlink{usb__device_8h_ab3a00cd7fdc532cb4cd4d59733b440bf}{desc}}-\/>plcp\_service |= \mbox{\hyperlink{if__uralreg_8h_a18ed31aa5b68bd84eb143442ca7d6f78}{RAL\_PLCP\_LENGEXT}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01014}01014                 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01015}01015                 \mbox{\hyperlink{usb__device_8h_ab3a00cd7fdc532cb4cd4d59733b440bf}{desc}}-\/>plcp\_length\_hi = plcp\_length >> 8;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01016}01016                 \mbox{\hyperlink{usb__device_8h_ab3a00cd7fdc532cb4cd4d59733b440bf}{desc}}-\/>plcp\_length\_lo = plcp\_length \& 0xff;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01017}01017 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01018}01018                 \textcolor{keywordflow}{if} (rate != 2 \&\& (ic-\/>ic\_flags \& IEEE80211\_F\_SHPREAMBLE))}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01019}01019                         \mbox{\hyperlink{usb__device_8h_ab3a00cd7fdc532cb4cd4d59733b440bf}{desc}}-\/>plcp\_signal |= 0x08;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01020}01020         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01021}01021 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01022}01022         \mbox{\hyperlink{usb__device_8h_ab3a00cd7fdc532cb4cd4d59733b440bf}{desc}}-\/>iv = 0;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01023}01023         \mbox{\hyperlink{usb__device_8h_ab3a00cd7fdc532cb4cd4d59733b440bf}{desc}}-\/>eiv = 0;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01024}01024 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01025}01025 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01026}\mbox{\hyperlink{if__ural_8c_ae034ad8f0711572f640ee29593576497}{01026}} \textcolor{preprocessor}{\#define RAL\_TX\_TIMEOUT  5000}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01027}01027 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01028}01028 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01029}\mbox{\hyperlink{if__ural_8c_afd639c953e0e4543f2f042fa4642d07c}{01029}} \mbox{\hyperlink{if__ural_8c_afd639c953e0e4543f2f042fa4642d07c}{ural\_tx\_bcn}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *sc, \textcolor{keyword}{struct} mbuf *m0, \textcolor{keyword}{struct} ieee80211\_node *ni)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01030}01030 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01031}01031         \textcolor{keyword}{struct }ieee80211vap *vap = ni-\/>ni\_vap;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01032}01032         \textcolor{keyword}{struct }ieee80211com *ic = ni-\/>ni\_ic;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01033}01033         \textcolor{keyword}{const} \textcolor{keyword}{struct }ieee80211\_txparam *tp;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01034}01034         \textcolor{keyword}{struct }\mbox{\hyperlink{structural__tx__data}{ural\_tx\_data}} *data;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01035}01035 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01036}01036         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structural__tx__data_ac8925316eaa365bb9fab90ebe85bed4d}{sc}}-\/>\mbox{\hyperlink{structural__softc_aa8798b71126c0a52b711df7e6a4112d5}{tx\_nfree}} == 0) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01037}01037                 m\_freem(m0);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01038}01038                 ieee80211\_free\_node(\mbox{\hyperlink{structural__tx__data_a7e06ff7ccbf472c04d4441e6e45609f5}{ni}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01039}01039                 \textcolor{keywordflow}{return} (EIO);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01040}01040         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01041}01041         \textcolor{keywordflow}{if} (ic-\/>ic\_bsschan == IEEE80211\_CHAN\_ANYC) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01042}01042                 m\_freem(m0);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01043}01043                 ieee80211\_free\_node(\mbox{\hyperlink{structural__tx__data_a7e06ff7ccbf472c04d4441e6e45609f5}{ni}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01044}01044                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01045}01045         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01046}01046         data = STAILQ\_FIRST(\&\mbox{\hyperlink{structural__tx__data_ac8925316eaa365bb9fab90ebe85bed4d}{sc}}-\/>\mbox{\hyperlink{structural__softc_a5ec5f1771d59cea60ed37fbbad952d1d}{tx\_free}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01047}01047         STAILQ\_REMOVE\_HEAD(\&\mbox{\hyperlink{structural__tx__data_ac8925316eaa365bb9fab90ebe85bed4d}{sc}}-\/>\mbox{\hyperlink{structural__softc_a5ec5f1771d59cea60ed37fbbad952d1d}{tx\_free}}, \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01048}01048         \mbox{\hyperlink{structural__tx__data_ac8925316eaa365bb9fab90ebe85bed4d}{sc}}-\/>\mbox{\hyperlink{structural__softc_aa8798b71126c0a52b711df7e6a4112d5}{tx\_nfree}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01049}01049         tp = \&vap-\/>iv\_txparms[ieee80211\_chan2mode(ic-\/>ic\_bsschan)];}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01050}01050 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01051}01051         data-\/>m = m0;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01052}01052         data-\/>ni = \mbox{\hyperlink{structural__tx__data_a7e06ff7ccbf472c04d4441e6e45609f5}{ni}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01053}01053         data-\/>rate = tp-\/>mgmtrate;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01054}01054 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01055}01055         \mbox{\hyperlink{if__ural_8c_a2edb8636f414eca7747dce65a8c83771}{ural\_setup\_tx\_desc}}(\mbox{\hyperlink{structural__tx__data_ac8925316eaa365bb9fab90ebe85bed4d}{sc}}, \&data-\/>desc,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01056}01056             \mbox{\hyperlink{if__uralreg_8h_a3a79a587125ff510b0f64621169faf11}{RAL\_TX\_IFS\_NEWBACKOFF}} | \mbox{\hyperlink{if__uralreg_8h_a84e55a4d46c642e5d7a4155d3a8aff7f}{RAL\_TX\_TIMESTAMP}}, m0-\/>m\_pkthdr.len,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01057}01057             tp-\/>mgmtrate);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01058}01058 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01059}01059         DPRINTFN(10, \textcolor{stringliteral}{"{}sending beacon frame len=\%u rate=\%u\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01060}01060             m0-\/>m\_pkthdr.len, tp-\/>mgmtrate);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01061}01061 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01062}01062         STAILQ\_INSERT\_TAIL(\&\mbox{\hyperlink{structural__tx__data_ac8925316eaa365bb9fab90ebe85bed4d}{sc}}-\/>\mbox{\hyperlink{structural__softc_add16159208b328816b0a0a6ed4e04ad9}{tx\_q}}, data, \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01063}01063         \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(\mbox{\hyperlink{structural__tx__data_ac8925316eaa365bb9fab90ebe85bed4d}{sc}}-\/>\mbox{\hyperlink{structural__softc_a3e5570470c9d66c12212993513f422f1}{sc\_xfer}}[\mbox{\hyperlink{if__uralvar_8h_a8420dba71b9cc240cf981b0bef892004a34597192b784e03fb5ae2167810e5a85}{URAL\_BULK\_WR}}]);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01064}01064 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01065}01065         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01066}01066 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01067}01067 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01068}01068 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01069}\mbox{\hyperlink{if__ural_8c_a235f19abd4284d6cfcdaa8fa783b1ec6}{01069}} \mbox{\hyperlink{if__ural_8c_a235f19abd4284d6cfcdaa8fa783b1ec6}{ural\_tx\_mgt}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *\mbox{\hyperlink{structural__tx__data_ac8925316eaa365bb9fab90ebe85bed4d}{sc}}, \textcolor{keyword}{struct} mbuf *m0, \textcolor{keyword}{struct} ieee80211\_node *\mbox{\hyperlink{structural__tx__data_a7e06ff7ccbf472c04d4441e6e45609f5}{ni}})}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01070}01070 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01071}01071         \textcolor{keyword}{const} \textcolor{keyword}{struct }ieee80211\_txparam *tp = ni-\/>ni\_txparms;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01072}01072         \textcolor{keyword}{struct }ieee80211com *ic = ni-\/>ni\_ic;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01073}01073         \textcolor{keyword}{struct }\mbox{\hyperlink{structural__tx__data}{ural\_tx\_data}} *data;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01074}01074         \textcolor{keyword}{struct }ieee80211\_frame *wh;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01075}01075         \textcolor{keyword}{struct }ieee80211\_key *\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01076}01076         uint32\_t flags;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01077}01077         uint16\_t dur;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01078}01078 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01079}01079         \mbox{\hyperlink{if__uralvar_8h_a911339fbbe5d297eb64c57db121dfbe4}{RAL\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01080}01080 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01081}01081         data = STAILQ\_FIRST(\&sc-\/>\mbox{\hyperlink{structural__softc_a5ec5f1771d59cea60ed37fbbad952d1d}{tx\_free}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01082}01082         STAILQ\_REMOVE\_HEAD(\&sc-\/>\mbox{\hyperlink{structural__softc_a5ec5f1771d59cea60ed37fbbad952d1d}{tx\_free}}, \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01083}01083         sc-\/>\mbox{\hyperlink{structural__softc_aa8798b71126c0a52b711df7e6a4112d5}{tx\_nfree}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01084}01084 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01085}01085         wh = mtod(m0, \textcolor{keyword}{struct} ieee80211\_frame *);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01086}01086         \textcolor{keywordflow}{if} (wh-\/>i\_fc[1] \& IEEE80211\_FC1\_PROTECTED) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01087}01087                 \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}} = ieee80211\_crypto\_encap(ni, m0);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01088}01088                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01089}01089                         m\_freem(m0);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01090}01090                         \textcolor{keywordflow}{return} ENOBUFS;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01091}01091                 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01092}01092                 wh = mtod(m0, \textcolor{keyword}{struct} ieee80211\_frame *);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01093}01093         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01094}01094 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01095}01095         data-\/>m = m0;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01096}01096         data-\/>ni = ni;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01097}01097         data-\/>rate = tp-\/>mgmtrate;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01098}01098 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01099}01099         flags = 0;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01100}01100         \textcolor{keywordflow}{if} (!IEEE80211\_IS\_MULTICAST(wh-\/>i\_addr1)) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01101}01101                 flags |= \mbox{\hyperlink{if__uralreg_8h_adeb8fcb138d788146e86f47e82974017}{RAL\_TX\_ACK}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01102}01102 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01103}01103                 dur = ieee80211\_ack\_duration(ic-\/>ic\_rt, tp-\/>mgmtrate, }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01104}01104                     ic-\/>ic\_flags \& IEEE80211\_F\_SHPREAMBLE);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01105}01105                 \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(wh-\/>i\_dur, dur);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01106}01106 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01107}01107                 \textcolor{comment}{/* tell hardware to add timestamp for probe responses */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01108}01108                 \textcolor{keywordflow}{if} ((wh-\/>i\_fc[0] \& IEEE80211\_FC0\_TYPE\_MASK) ==}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01109}01109                     IEEE80211\_FC0\_TYPE\_MGT \&\&}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01110}01110                     (wh-\/>i\_fc[0] \& IEEE80211\_FC0\_SUBTYPE\_MASK) ==}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01111}01111                     IEEE80211\_FC0\_SUBTYPE\_PROBE\_RESP)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01112}01112                         flags |= \mbox{\hyperlink{if__uralreg_8h_a84e55a4d46c642e5d7a4155d3a8aff7f}{RAL\_TX\_TIMESTAMP}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01113}01113         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01114}01114 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01115}01115         \mbox{\hyperlink{if__ural_8c_a2edb8636f414eca7747dce65a8c83771}{ural\_setup\_tx\_desc}}(sc, \&data-\/>desc, flags, m0-\/>m\_pkthdr.len, tp-\/>mgmtrate);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01116}01116 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01117}01117         DPRINTFN(10, \textcolor{stringliteral}{"{}sending mgt frame len=\%u rate=\%u\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01118}01118             m0-\/>m\_pkthdr.len, tp-\/>mgmtrate);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01119}01119 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01120}01120         STAILQ\_INSERT\_TAIL(\&sc-\/>\mbox{\hyperlink{structural__softc_add16159208b328816b0a0a6ed4e04ad9}{tx\_q}}, data, \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01121}01121         \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structural__softc_a3e5570470c9d66c12212993513f422f1}{sc\_xfer}}[\mbox{\hyperlink{if__uralvar_8h_a8420dba71b9cc240cf981b0bef892004a34597192b784e03fb5ae2167810e5a85}{URAL\_BULK\_WR}}]);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01122}01122 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01123}01123         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01124}01124 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01125}01125 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01126}01126 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01127}\mbox{\hyperlink{if__ural_8c_ae86d2d20c9f36b3bb1b5eb72bb1e7349}{01127}} \mbox{\hyperlink{if__ural_8c_ae86d2d20c9f36b3bb1b5eb72bb1e7349}{ural\_sendprot}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01128}01128     \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__ural_8c_source_l01129}01129 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01130}01130         \textcolor{keyword}{struct }ieee80211com *ic = ni-\/>ni\_ic;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01131}01131         \textcolor{keyword}{struct }\mbox{\hyperlink{structural__tx__data}{ural\_tx\_data}} *data;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01132}01132         \textcolor{keyword}{struct }mbuf *mprot;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01133}01133         \textcolor{keywordtype}{int} protrate, flags;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01134}01134 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01135}01135         mprot = ieee80211\_alloc\_prot(ni, m, rate, prot);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01136}01136         \textcolor{keywordflow}{if} (mprot == NULL) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01137}01137                 if\_inc\_counter(ni-\/>ni\_vap-\/>iv\_ifp, IFCOUNTER\_OERRORS, 1);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01138}01138                 device\_printf(sc-\/>\mbox{\hyperlink{structural__softc_a9d89d62867ac69a1180cd469ba1e8492}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01139}01139                     \textcolor{stringliteral}{"{}could not allocate mbuf for protection mode \%d\(\backslash\)n"{}}, prot);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01140}01140                 \textcolor{keywordflow}{return} ENOBUFS;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01141}01141         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01142}01142 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01143}01143         protrate = ieee80211\_ctl\_rate(ic-\/>ic\_rt, rate);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01144}01144         flags = \mbox{\hyperlink{if__uralreg_8h_a21f82006933091d1d875c918aa7fcfd2}{RAL\_TX\_RETRY}}(7);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01145}01145         \textcolor{keywordflow}{if} (prot == IEEE80211\_PROT\_RTSCTS)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01146}01146                 flags |= \mbox{\hyperlink{if__uralreg_8h_adeb8fcb138d788146e86f47e82974017}{RAL\_TX\_ACK}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01147}01147 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01148}01148         data = STAILQ\_FIRST(\&sc-\/>\mbox{\hyperlink{structural__softc_a5ec5f1771d59cea60ed37fbbad952d1d}{tx\_free}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01149}01149         STAILQ\_REMOVE\_HEAD(\&sc-\/>\mbox{\hyperlink{structural__softc_a5ec5f1771d59cea60ed37fbbad952d1d}{tx\_free}}, \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01150}01150         sc-\/>\mbox{\hyperlink{structural__softc_aa8798b71126c0a52b711df7e6a4112d5}{tx\_nfree}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01151}01151 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01152}01152         data-\/>m = mprot;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01153}01153         data-\/>ni = ieee80211\_ref\_node(ni);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01154}01154         data-\/>rate = protrate;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01155}01155         \mbox{\hyperlink{if__ural_8c_a2edb8636f414eca7747dce65a8c83771}{ural\_setup\_tx\_desc}}(sc, \&data-\/>desc, flags, mprot-\/>m\_pkthdr.len, protrate);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01156}01156 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01157}01157         STAILQ\_INSERT\_TAIL(\&sc-\/>\mbox{\hyperlink{structural__softc_add16159208b328816b0a0a6ed4e04ad9}{tx\_q}}, data, \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01158}01158         \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structural__softc_a3e5570470c9d66c12212993513f422f1}{sc\_xfer}}[\mbox{\hyperlink{if__uralvar_8h_a8420dba71b9cc240cf981b0bef892004a34597192b784e03fb5ae2167810e5a85}{URAL\_BULK\_WR}}]);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01159}01159 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01160}01160         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01161}01161 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01162}01162 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01163}01163 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01164}\mbox{\hyperlink{if__ural_8c_af31fe933f53b4ada2fd6989fdde819d1}{01164}} \mbox{\hyperlink{if__ural_8c_af31fe933f53b4ada2fd6989fdde819d1}{ural\_tx\_raw}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *sc, \textcolor{keyword}{struct} mbuf *m0, \textcolor{keyword}{struct} ieee80211\_node *ni,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01165}01165     \textcolor{keyword}{const} \textcolor{keyword}{struct} ieee80211\_bpf\_params *params)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01166}01166 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01167}01167         \textcolor{keyword}{struct }ieee80211com *ic = ni-\/>ni\_ic;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01168}01168         \textcolor{keyword}{struct }\mbox{\hyperlink{structural__tx__data}{ural\_tx\_data}} *data;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01169}01169         uint32\_t flags;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01170}01170         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01171}01171         \textcolor{keywordtype}{int} \mbox{\hyperlink{structural__tx__data_a3d2730d8883ac66add33d1b19801a278}{rate}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01172}01172 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01173}01173         \mbox{\hyperlink{if__uralvar_8h_a911339fbbe5d297eb64c57db121dfbe4}{RAL\_LOCK\_ASSERT}}(\mbox{\hyperlink{structural__tx__data_ac8925316eaa365bb9fab90ebe85bed4d}{sc}}, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01174}01174         KASSERT(params != NULL, (\textcolor{stringliteral}{"{}no raw xmit params"{}}));}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01175}01175 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01176}01176         \mbox{\hyperlink{structural__tx__data_a3d2730d8883ac66add33d1b19801a278}{rate}} = params-\/>ibp\_rate0;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01177}01177         \textcolor{keywordflow}{if} (!ieee80211\_isratevalid(ic-\/>ic\_rt, \mbox{\hyperlink{structural__tx__data_a3d2730d8883ac66add33d1b19801a278}{rate}})) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01178}01178                 m\_freem(m0);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01179}01179                 \textcolor{keywordflow}{return} EINVAL;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01180}01180         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01181}01181         flags = 0;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01182}01182         \textcolor{keywordflow}{if} ((params-\/>ibp\_flags \& IEEE80211\_BPF\_NOACK) == 0)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01183}01183                 flags |= \mbox{\hyperlink{if__uralreg_8h_adeb8fcb138d788146e86f47e82974017}{RAL\_TX\_ACK}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01184}01184         \textcolor{keywordflow}{if} (params-\/>ibp\_flags \& (IEEE80211\_BPF\_RTS|IEEE80211\_BPF\_CTS)) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01185}01185                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__ural_8c_ae86d2d20c9f36b3bb1b5eb72bb1e7349}{ural\_sendprot}}(\mbox{\hyperlink{structural__tx__data_ac8925316eaa365bb9fab90ebe85bed4d}{sc}}, m0, \mbox{\hyperlink{structural__tx__data_a7e06ff7ccbf472c04d4441e6e45609f5}{ni}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01186}01186                     params-\/>ibp\_flags \& IEEE80211\_BPF\_RTS ?}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01187}01187                          IEEE80211\_PROT\_RTSCTS : IEEE80211\_PROT\_CTSONLY,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01188}01188                     \mbox{\hyperlink{structural__tx__data_a3d2730d8883ac66add33d1b19801a278}{rate}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01189}01189                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} || \mbox{\hyperlink{structural__tx__data_ac8925316eaa365bb9fab90ebe85bed4d}{sc}}-\/>\mbox{\hyperlink{structural__softc_aa8798b71126c0a52b711df7e6a4112d5}{tx\_nfree}} == 0) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01190}01190                         m\_freem(m0);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01191}01191                         \textcolor{keywordflow}{return} ENOBUFS;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01192}01192                 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01193}01193                 flags |= \mbox{\hyperlink{if__uralreg_8h_a5356402eef0b62a4f70b9c594c195f69}{RAL\_TX\_IFS\_SIFS}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01194}01194         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01195}01195 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01196}01196         data = STAILQ\_FIRST(\&\mbox{\hyperlink{structural__tx__data_ac8925316eaa365bb9fab90ebe85bed4d}{sc}}-\/>\mbox{\hyperlink{structural__softc_a5ec5f1771d59cea60ed37fbbad952d1d}{tx\_free}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01197}01197         STAILQ\_REMOVE\_HEAD(\&\mbox{\hyperlink{structural__tx__data_ac8925316eaa365bb9fab90ebe85bed4d}{sc}}-\/>\mbox{\hyperlink{structural__softc_a5ec5f1771d59cea60ed37fbbad952d1d}{tx\_free}}, \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01198}01198         \mbox{\hyperlink{structural__tx__data_ac8925316eaa365bb9fab90ebe85bed4d}{sc}}-\/>\mbox{\hyperlink{structural__softc_aa8798b71126c0a52b711df7e6a4112d5}{tx\_nfree}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01199}01199 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01200}01200         data-\/>m = m0;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01201}01201         data-\/>ni = \mbox{\hyperlink{structural__tx__data_a7e06ff7ccbf472c04d4441e6e45609f5}{ni}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01202}01202         data-\/>rate = \mbox{\hyperlink{structural__tx__data_a3d2730d8883ac66add33d1b19801a278}{rate}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01203}01203 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01204}01204         \textcolor{comment}{/* XXX need to setup descriptor ourself */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01205}01205         \mbox{\hyperlink{if__ural_8c_a2edb8636f414eca7747dce65a8c83771}{ural\_setup\_tx\_desc}}(\mbox{\hyperlink{structural__tx__data_ac8925316eaa365bb9fab90ebe85bed4d}{sc}}, \&data-\/>desc, flags, m0-\/>m\_pkthdr.len, \mbox{\hyperlink{structural__tx__data_a3d2730d8883ac66add33d1b19801a278}{rate}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01206}01206 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01207}01207         DPRINTFN(10, \textcolor{stringliteral}{"{}sending raw frame len=\%u rate=\%u\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01208}01208             m0-\/>m\_pkthdr.len, \mbox{\hyperlink{structural__tx__data_a3d2730d8883ac66add33d1b19801a278}{rate}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01209}01209 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01210}01210         STAILQ\_INSERT\_TAIL(\&\mbox{\hyperlink{structural__tx__data_ac8925316eaa365bb9fab90ebe85bed4d}{sc}}-\/>\mbox{\hyperlink{structural__softc_add16159208b328816b0a0a6ed4e04ad9}{tx\_q}}, data, \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01211}01211         \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(\mbox{\hyperlink{structural__tx__data_ac8925316eaa365bb9fab90ebe85bed4d}{sc}}-\/>\mbox{\hyperlink{structural__softc_a3e5570470c9d66c12212993513f422f1}{sc\_xfer}}[\mbox{\hyperlink{if__uralvar_8h_a8420dba71b9cc240cf981b0bef892004a34597192b784e03fb5ae2167810e5a85}{URAL\_BULK\_WR}}]);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01212}01212 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01213}01213         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01214}01214 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01215}01215 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01216}01216 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01217}\mbox{\hyperlink{if__ural_8c_ab28d22a347ad528b33a10eb793d4f6e4}{01217}} \mbox{\hyperlink{if__ural_8c_ab28d22a347ad528b33a10eb793d4f6e4}{ural\_tx\_data}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *\mbox{\hyperlink{structural__tx__data_ac8925316eaa365bb9fab90ebe85bed4d}{sc}}, \textcolor{keyword}{struct} mbuf *m0, \textcolor{keyword}{struct} ieee80211\_node *\mbox{\hyperlink{structural__tx__data_a7e06ff7ccbf472c04d4441e6e45609f5}{ni}})}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01218}01218 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01219}01219         \textcolor{keyword}{struct }ieee80211vap *vap = ni-\/>ni\_vap;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01220}01220         \textcolor{keyword}{struct }ieee80211com *ic = ni-\/>ni\_ic;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01221}01221         \textcolor{keyword}{struct }\mbox{\hyperlink{structural__tx__data}{ural\_tx\_data}} *data;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01222}01222         \textcolor{keyword}{struct }ieee80211\_frame *wh;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01223}01223         \textcolor{keyword}{const} \textcolor{keyword}{struct }ieee80211\_txparam *tp = ni-\/>ni\_txparms;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01224}01224         \textcolor{keyword}{struct }ieee80211\_key *\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01225}01225         uint32\_t flags = 0;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01226}01226         uint16\_t dur;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01227}01227         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}, rate;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01228}01228 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01229}01229         \mbox{\hyperlink{if__uralvar_8h_a911339fbbe5d297eb64c57db121dfbe4}{RAL\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01230}01230 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01231}01231         wh = mtod(m0, \textcolor{keyword}{struct} ieee80211\_frame *);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01232}01232 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01233}01233         \textcolor{keywordflow}{if} (m0-\/>m\_flags \& M\_EAPOL)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01234}01234                 rate = tp-\/>mgmtrate;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01235}01235         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (IEEE80211\_IS\_MULTICAST(wh-\/>i\_addr1))}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01236}01236                 rate = tp-\/>mcastrate;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01237}01237         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (tp-\/>ucastrate != IEEE80211\_FIXED\_RATE\_NONE)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01238}01238                 rate = tp-\/>ucastrate;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01239}01239         \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01240}01240                 (void) ieee80211\_ratectl\_rate(ni, NULL, 0);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01241}01241                 rate = ni-\/>ni\_txrate;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01242}01242         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01243}01243 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01244}01244         \textcolor{keywordflow}{if} (wh-\/>i\_fc[1] \& IEEE80211\_FC1\_PROTECTED) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01245}01245                 \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}} = ieee80211\_crypto\_encap(ni, m0);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01246}01246                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01247}01247                         m\_freem(m0);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01248}01248                         \textcolor{keywordflow}{return} ENOBUFS;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01249}01249                 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01250}01250                 \textcolor{comment}{/* packet header may have moved, reset our local pointer */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01251}01251                 wh = mtod(m0, \textcolor{keyword}{struct} ieee80211\_frame *);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01252}01252         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01253}01253 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01254}01254         \textcolor{keywordflow}{if} (!IEEE80211\_IS\_MULTICAST(wh-\/>i\_addr1)) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01255}01255                 \textcolor{keywordtype}{int} prot = IEEE80211\_PROT\_NONE;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01256}01256                 \textcolor{keywordflow}{if} (m0-\/>m\_pkthdr.len + IEEE80211\_CRC\_LEN > vap-\/>iv\_rtsthreshold)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01257}01257                         prot = IEEE80211\_PROT\_RTSCTS;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01258}01258                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((ic-\/>ic\_flags \& IEEE80211\_F\_USEPROT) \&\&}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01259}01259                     ieee80211\_rate2phytype(ic-\/>ic\_rt, rate) == IEEE80211\_T\_OFDM)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01260}01260                         prot = ic-\/>ic\_protmode;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01261}01261                 \textcolor{keywordflow}{if} (prot != IEEE80211\_PROT\_NONE) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01262}01262                         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__ural_8c_ae86d2d20c9f36b3bb1b5eb72bb1e7349}{ural\_sendprot}}(sc, m0, ni, prot, rate);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01263}01263                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} || sc-\/>\mbox{\hyperlink{structural__softc_aa8798b71126c0a52b711df7e6a4112d5}{tx\_nfree}} == 0) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01264}01264                                 m\_freem(m0);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01265}01265                                 \textcolor{keywordflow}{return} ENOBUFS;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01266}01266                         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01267}01267                         flags |= \mbox{\hyperlink{if__uralreg_8h_a5356402eef0b62a4f70b9c594c195f69}{RAL\_TX\_IFS\_SIFS}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01268}01268                 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01269}01269         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01270}01270 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01271}01271         data = STAILQ\_FIRST(\&sc-\/>\mbox{\hyperlink{structural__softc_a5ec5f1771d59cea60ed37fbbad952d1d}{tx\_free}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01272}01272         STAILQ\_REMOVE\_HEAD(\&sc-\/>\mbox{\hyperlink{structural__softc_a5ec5f1771d59cea60ed37fbbad952d1d}{tx\_free}}, \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01273}01273         sc-\/>\mbox{\hyperlink{structural__softc_aa8798b71126c0a52b711df7e6a4112d5}{tx\_nfree}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01274}01274 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01275}01275         data-\/>m = m0;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01276}01276         data-\/>ni = ni;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01277}01277         data-\/>rate = rate;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01278}01278 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01279}01279         \textcolor{keywordflow}{if} (!IEEE80211\_IS\_MULTICAST(wh-\/>i\_addr1)) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01280}01280                 flags |= \mbox{\hyperlink{if__uralreg_8h_adeb8fcb138d788146e86f47e82974017}{RAL\_TX\_ACK}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01281}01281                 flags |= \mbox{\hyperlink{if__uralreg_8h_a21f82006933091d1d875c918aa7fcfd2}{RAL\_TX\_RETRY}}(7);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01282}01282 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01283}01283                 dur = ieee80211\_ack\_duration(ic-\/>ic\_rt, rate, }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01284}01284                     ic-\/>ic\_flags \& IEEE80211\_F\_SHPREAMBLE);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01285}01285                 \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(wh-\/>i\_dur, dur);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01286}01286         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01287}01287 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01288}01288         \mbox{\hyperlink{if__ural_8c_a2edb8636f414eca7747dce65a8c83771}{ural\_setup\_tx\_desc}}(sc, \&data-\/>desc, flags, m0-\/>m\_pkthdr.len, rate);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01289}01289 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01290}01290         DPRINTFN(10, \textcolor{stringliteral}{"{}sending data frame len=\%u rate=\%u\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01291}01291             m0-\/>m\_pkthdr.len, rate);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01292}01292 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01293}01293         STAILQ\_INSERT\_TAIL(\&sc-\/>\mbox{\hyperlink{structural__softc_add16159208b328816b0a0a6ed4e04ad9}{tx\_q}}, data, \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01294}01294         \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structural__softc_a3e5570470c9d66c12212993513f422f1}{sc\_xfer}}[\mbox{\hyperlink{if__uralvar_8h_a8420dba71b9cc240cf981b0bef892004a34597192b784e03fb5ae2167810e5a85}{URAL\_BULK\_WR}}]);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01295}01295 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01296}01296         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01297}01297 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01298}01298 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01299}01299 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01300}\mbox{\hyperlink{if__ural_8c_a9a1762163c9216f40d08061e19f8a845}{01300}} \mbox{\hyperlink{if__ural_8c_a9a1762163c9216f40d08061e19f8a845}{ural\_transmit}}(\textcolor{keyword}{struct} ieee80211com *ic, \textcolor{keyword}{struct} mbuf *m)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01301}01301 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01302}01302         \textcolor{keyword}{struct }\mbox{\hyperlink{structural__softc}{ural\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01303}01303         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01304}01304 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01305}01305         \mbox{\hyperlink{if__uralvar_8h_a93cd0229ef9274db702bf17e863b1801}{RAL\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01306}01306         \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structural__softc_a107ff634a4a6743b7a2a5c022f0d4177}{sc\_running}}) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01307}01307                 \mbox{\hyperlink{if__uralvar_8h_ad221f1259af784f868b4fcdc69bec791}{RAL\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01308}01308                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01309}01309         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01310}01310         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = mbufq\_enqueue(\&sc-\/>\mbox{\hyperlink{structural__softc_a0dff4c16e3c5b53933e914cc60880e0a}{sc\_snd}}, m);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01311}01311         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01312}01312                 \mbox{\hyperlink{if__uralvar_8h_ad221f1259af784f868b4fcdc69bec791}{RAL\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01313}01313                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01314}01314         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01315}01315         \mbox{\hyperlink{if__ural_8c_a4544578b632abc63c444d18461ad920b}{ural\_start}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01316}01316         \mbox{\hyperlink{if__uralvar_8h_ad221f1259af784f868b4fcdc69bec791}{RAL\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01317}01317 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01318}01318         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01319}01319 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01320}01320 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01321}01321 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01322}\mbox{\hyperlink{if__ural_8c_a4544578b632abc63c444d18461ad920b}{01322}} \mbox{\hyperlink{if__ural_8c_a4544578b632abc63c444d18461ad920b}{ural\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01323}01323 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01324}01324         \textcolor{keyword}{struct }ieee80211\_node *ni;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01325}01325         \textcolor{keyword}{struct }mbuf *m;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01326}01326 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01327}01327         \mbox{\hyperlink{if__uralvar_8h_a911339fbbe5d297eb64c57db121dfbe4}{RAL\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01328}01328 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01329}01329         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structural__softc_a107ff634a4a6743b7a2a5c022f0d4177}{sc\_running}} == 0)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01330}01330                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01331}01331 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01332}01332         \textcolor{keywordflow}{while} (sc-\/>\mbox{\hyperlink{structural__softc_aa8798b71126c0a52b711df7e6a4112d5}{tx\_nfree}} >= \mbox{\hyperlink{if__uralvar_8h_ac8560dfe827ccd677ecabc14bb6d434c}{RAL\_TX\_MINFREE}} \&\&}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01333}01333             (m = mbufq\_dequeue(\&sc-\/>\mbox{\hyperlink{structural__softc_a0dff4c16e3c5b53933e914cc60880e0a}{sc\_snd}})) != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01334}01334                 ni = (\textcolor{keyword}{struct }ieee80211\_node *) m-\/>m\_pkthdr.rcvif;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01335}01335                 if (\mbox{\hyperlink{if__ural_8c_ab28d22a347ad528b33a10eb793d4f6e4}{ural\_tx\_data}}(sc, m, ni) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01336}01336                         if\_inc\_counter(ni-\/>ni\_vap-\/>iv\_ifp,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01337}01337                              IFCOUNTER\_OERRORS, 1);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01338}01338                         ieee80211\_free\_node(ni);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01339}01339                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01340}01340                 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01341}01341         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01342}01342 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01343}01343 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01344}01344 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01345}\mbox{\hyperlink{if__ural_8c_a722e2fabb6ba2363af0febe34af4746a}{01345}} \mbox{\hyperlink{if__ural_8c_a722e2fabb6ba2363af0febe34af4746a}{ural\_parent}}(\textcolor{keyword}{struct} ieee80211com *ic)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01346}01346 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01347}01347         \textcolor{keyword}{struct }\mbox{\hyperlink{structural__softc}{ural\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01348}01348         \textcolor{keywordtype}{int} startall = 0;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01349}01349 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01350}01350         \mbox{\hyperlink{if__uralvar_8h_a93cd0229ef9274db702bf17e863b1801}{RAL\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01351}01351         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structural__softc_aeec225909c9b4560de06ee9ffea8f27f}{sc\_detached}}) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01352}01352                 \mbox{\hyperlink{if__uralvar_8h_ad221f1259af784f868b4fcdc69bec791}{RAL\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01353}01353                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01354}01354         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01355}01355         \textcolor{keywordflow}{if} (ic-\/>ic\_nrunning > 0) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01356}01356                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structural__softc_a107ff634a4a6743b7a2a5c022f0d4177}{sc\_running}} == 0) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01357}01357                         \mbox{\hyperlink{if__ural_8c_a450ec6373cbdfa57cead5c24cf04f0f5}{ural\_init}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01358}01358                         startall = 1;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01359}01359                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01360}01360                         \mbox{\hyperlink{if__ural_8c_ae2dbd9716bc0ecc23fef6b323c577d45}{ural\_setpromisc}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01361}01361         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structural__softc_a107ff634a4a6743b7a2a5c022f0d4177}{sc\_running}})}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01362}01362                 \mbox{\hyperlink{if__ural_8c_aba31e94a52762fbeea522e30e85a57fc}{ural\_stop}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01363}01363         \mbox{\hyperlink{if__uralvar_8h_ad221f1259af784f868b4fcdc69bec791}{RAL\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01364}01364         \textcolor{keywordflow}{if} (startall)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01365}01365                 ieee80211\_start\_all(ic);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01366}01366 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01367}01367 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01368}01368 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01369}\mbox{\hyperlink{if__ural_8c_a5b85199fd4642cc4eb0b23138c629bd2}{01369}} \mbox{\hyperlink{if__ural_8c_a5b85199fd4642cc4eb0b23138c629bd2}{ural\_set\_testmode}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01370}01370 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01371}01371         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01372}01372         \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01373}01373 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01374}01374         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bmRequestType = \mbox{\hyperlink{usb_8h_a6aafebff48631e00449299005c4a858c}{UT\_WRITE\_VENDOR\_DEVICE}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01375}01375         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bRequest = \mbox{\hyperlink{if__uralreg_8h_ac51d4852c02c975fcc0d1f748a3f2a3e}{RAL\_VENDOR\_REQUEST}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01376}01376         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wValue, 4);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01377}01377         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex, 1);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01378}01378         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wLength, 0);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01379}01379 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01380}01380         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__ural_8c_af1bb2baad43c13da5daf210f5ee678a8}{ural\_do\_request}}(sc, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, NULL);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01381}01381         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != 0) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01382}01382                 device\_printf(sc-\/>\mbox{\hyperlink{structural__softc_a9d89d62867ac69a1180cd469ba1e8492}{sc\_dev}}, \textcolor{stringliteral}{"{}could not set test mode: \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01383}01383                     \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}));}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01384}01384         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01385}01385 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01386}01386 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01387}01387 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01388}\mbox{\hyperlink{if__ural_8c_ae9b66d57826f066bb137fee7b6959655}{01388}} \mbox{\hyperlink{if__ural_8c_ae9b66d57826f066bb137fee7b6959655}{ural\_eeprom\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *sc, uint16\_t addr, \textcolor{keywordtype}{void} *buf, \textcolor{keywordtype}{int} \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}})}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01389}01389 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01390}01390         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01391}01391         \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01392}01392 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01393}01393         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bmRequestType = \mbox{\hyperlink{usb_8h_a6da49500e864a3c33c9eed3dd49d3e59}{UT\_READ\_VENDOR\_DEVICE}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01394}01394         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bRequest = \mbox{\hyperlink{if__uralreg_8h_a2e6817f5e89892007602d0e6be620655}{RAL\_READ\_EEPROM}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01395}01395         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wValue, 0);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01396}01396         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex, addr);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01397}01397         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wLength, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01398}01398 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01399}01399         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__ural_8c_af1bb2baad43c13da5daf210f5ee678a8}{ural\_do\_request}}(sc, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, buf);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01400}01400         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != 0) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01401}01401                 device\_printf(sc-\/>\mbox{\hyperlink{structural__softc_a9d89d62867ac69a1180cd469ba1e8492}{sc\_dev}}, \textcolor{stringliteral}{"{}could not read EEPROM: \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01402}01402                     \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}));}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01403}01403         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01404}01404 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01405}01405 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01406}01406 \textcolor{keyword}{static} uint16\_t}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01407}\mbox{\hyperlink{if__ural_8c_a7913027ad070d91c902a3ea1ee1bd909}{01407}} \mbox{\hyperlink{if__ural_8c_a7913027ad070d91c902a3ea1ee1bd909}{ural\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *sc, uint16\_t \mbox{\hyperlink{if__ural_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}})}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01408}01408 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01409}01409         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01410}01410         \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01411}01411         uint16\_t \mbox{\hyperlink{if__ural_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01412}01412 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01413}01413         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bmRequestType = \mbox{\hyperlink{usb_8h_a6da49500e864a3c33c9eed3dd49d3e59}{UT\_READ\_VENDOR\_DEVICE}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01414}01414         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bRequest = \mbox{\hyperlink{if__uralreg_8h_a015f88b994ec6e5198a0ff0a2a091fdb}{RAL\_READ\_MAC}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01415}01415         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wValue, 0);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01416}01416         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex, \mbox{\hyperlink{if__ural_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01417}01417         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wLength, sizeof (uint16\_t));}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01418}01418 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01419}01419         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__ural_8c_af1bb2baad43c13da5daf210f5ee678a8}{ural\_do\_request}}(sc, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, \&\mbox{\hyperlink{if__ural_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01420}01420         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != 0) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01421}01421                 device\_printf(sc-\/>\mbox{\hyperlink{structural__softc_a9d89d62867ac69a1180cd469ba1e8492}{sc\_dev}}, \textcolor{stringliteral}{"{}could not read MAC register: \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01422}01422                     \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}));}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01423}01423                 \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01424}01424         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01425}01425 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01426}01426         \textcolor{keywordflow}{return} le16toh(\mbox{\hyperlink{if__ural_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01427}01427 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01428}01428 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01429}01429 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01430}\mbox{\hyperlink{if__ural_8c_ab72567c232af58f9f106b00874fffc46}{01430}} \mbox{\hyperlink{if__ural_8c_ab72567c232af58f9f106b00874fffc46}{ural\_read\_multi}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *sc, uint16\_t \mbox{\hyperlink{if__ural_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, \textcolor{keywordtype}{void} *buf, \textcolor{keywordtype}{int} \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}})}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01431}01431 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01432}01432         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01433}01433         \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01434}01434 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01435}01435         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bmRequestType = \mbox{\hyperlink{usb_8h_a6da49500e864a3c33c9eed3dd49d3e59}{UT\_READ\_VENDOR\_DEVICE}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01436}01436         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bRequest = \mbox{\hyperlink{if__uralreg_8h_af7b0dcce438b3e3ae3a46d9eaf137708}{RAL\_READ\_MULTI\_MAC}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01437}01437         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wValue, 0);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01438}01438         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex, \mbox{\hyperlink{if__ural_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01439}01439         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wLength, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01440}01440 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01441}01441         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__ural_8c_af1bb2baad43c13da5daf210f5ee678a8}{ural\_do\_request}}(sc, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, buf);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01442}01442         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != 0) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01443}01443                 device\_printf(sc-\/>\mbox{\hyperlink{structural__softc_a9d89d62867ac69a1180cd469ba1e8492}{sc\_dev}}, \textcolor{stringliteral}{"{}could not read MAC register: \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01444}01444                     \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}));}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01445}01445         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01446}01446 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01447}01447 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01448}01448 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01449}\mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{01449}} \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *sc, uint16\_t \mbox{\hyperlink{if__ural_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, uint16\_t \mbox{\hyperlink{if__ural_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}})}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01450}01450 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01451}01451         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01452}01452         \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01453}01453 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01454}01454         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bmRequestType = \mbox{\hyperlink{usb_8h_a6aafebff48631e00449299005c4a858c}{UT\_WRITE\_VENDOR\_DEVICE}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01455}01455         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bRequest = \mbox{\hyperlink{if__uralreg_8h_af98e1faccab0dd9cebb883fe6d8aa4d5}{RAL\_WRITE\_MAC}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01456}01456         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wValue, \mbox{\hyperlink{if__ural_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01457}01457         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex, \mbox{\hyperlink{if__ural_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01458}01458         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wLength, 0);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01459}01459 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01460}01460         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__ural_8c_af1bb2baad43c13da5daf210f5ee678a8}{ural\_do\_request}}(sc, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, NULL);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01461}01461         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != 0) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01462}01462                 device\_printf(sc-\/>\mbox{\hyperlink{structural__softc_a9d89d62867ac69a1180cd469ba1e8492}{sc\_dev}}, \textcolor{stringliteral}{"{}could not write MAC register: \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01463}01463                     \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}));}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01464}01464         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01465}01465 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01466}01466 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01467}01467 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01468}\mbox{\hyperlink{if__ural_8c_a94ee97c18fc17fd5011c47123d3d5043}{01468}} \mbox{\hyperlink{if__ural_8c_aaf1724408c69ef783ac788513e0b6f5a}{ural\_write\_multi}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *sc, uint16\_t \mbox{\hyperlink{if__ural_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, \textcolor{keywordtype}{void} *buf, \textcolor{keywordtype}{int} \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}})}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01469}01469 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01470}01470         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01471}01471         \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01472}01472 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01473}01473         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bmRequestType = \mbox{\hyperlink{usb_8h_a6aafebff48631e00449299005c4a858c}{UT\_WRITE\_VENDOR\_DEVICE}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01474}01474         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bRequest = \mbox{\hyperlink{if__uralreg_8h_a477cb4cac03164981d587bbea071a3b2}{RAL\_WRITE\_MULTI\_MAC}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01475}01475         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wValue, 0);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01476}01476         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex, \mbox{\hyperlink{if__ural_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01477}01477         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wLength, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01478}01478 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01479}01479         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__ural_8c_af1bb2baad43c13da5daf210f5ee678a8}{ural\_do\_request}}(sc, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, buf);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01480}01480         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != 0) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01481}01481                 device\_printf(sc-\/>\mbox{\hyperlink{structural__softc_a9d89d62867ac69a1180cd469ba1e8492}{sc\_dev}}, \textcolor{stringliteral}{"{}could not write MAC register: \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01482}01482                     \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}));}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01483}01483         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01484}01484 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01485}01485 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01486}01486 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01487}\mbox{\hyperlink{if__ural_8c_a05778372c30d5f6418625218af1387df}{01487}} \mbox{\hyperlink{if__ural_8c_a05778372c30d5f6418625218af1387df}{ural\_bbp\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *sc, uint8\_t \mbox{\hyperlink{if__ural_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, uint8\_t \mbox{\hyperlink{if__ural_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}})}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01488}01488 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01489}01489         uint16\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01490}01490         \textcolor{keywordtype}{int} ntries;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01491}01491 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01492}01492         \textcolor{keywordflow}{for} (ntries = 0; ntries < 100; ntries++) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01493}01493                 \textcolor{keywordflow}{if} (!(\mbox{\hyperlink{if__ural_8c_a7913027ad070d91c902a3ea1ee1bd909}{ural\_read}}(sc, \mbox{\hyperlink{if__uralreg_8h_a3aa009395d696a4b23aac746464729ed}{RAL\_PHY\_CSR8}}) \& \mbox{\hyperlink{if__uralreg_8h_af535868fddf3960b516c63c4279d25d3}{RAL\_BBP\_BUSY}}))}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01494}01494                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01495}01495                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_aed23bee71d5b051318db64dbd2754f98}{ural\_pause}}(sc, hz / 100))}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01496}01496                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01497}01497         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01498}01498         \textcolor{keywordflow}{if} (ntries == 100) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01499}01499                 device\_printf(sc-\/>\mbox{\hyperlink{structural__softc_a9d89d62867ac69a1180cd469ba1e8492}{sc\_dev}}, \textcolor{stringliteral}{"{}could not write to BBP\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01500}01500                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01501}01501         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01502}01502 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01503}01503         tmp = \mbox{\hyperlink{if__ural_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} << 8 | \mbox{\hyperlink{if__ural_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01504}01504         \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a97c6afbb7c4aa571051f5ae9eda34647}{RAL\_PHY\_CSR7}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01505}01505 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01506}01506 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01507}01507 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01508}\mbox{\hyperlink{if__ural_8c_a35a9a237e19bb884c6f7af3aa4b278a0}{01508}} \mbox{\hyperlink{if__ural_8c_a35a9a237e19bb884c6f7af3aa4b278a0}{ural\_bbp\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *sc, uint8\_t \mbox{\hyperlink{if__ural_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}})}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01509}01509 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01510}01510         uint16\_t \mbox{\hyperlink{if__ural_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01511}01511         \textcolor{keywordtype}{int} ntries;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01512}01512 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01513}01513         \mbox{\hyperlink{if__ural_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = \mbox{\hyperlink{if__uralreg_8h_ac867be46bc3f532a5407d961c31c4aa0}{RAL\_BBP\_WRITE}} | \mbox{\hyperlink{if__ural_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} << 8;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01514}01514         \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a97c6afbb7c4aa571051f5ae9eda34647}{RAL\_PHY\_CSR7}}, \mbox{\hyperlink{if__ural_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01515}01515 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01516}01516         \textcolor{keywordflow}{for} (ntries = 0; ntries < 100; ntries++) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01517}01517                 \textcolor{keywordflow}{if} (!(\mbox{\hyperlink{if__ural_8c_a7913027ad070d91c902a3ea1ee1bd909}{ural\_read}}(sc, \mbox{\hyperlink{if__uralreg_8h_a3aa009395d696a4b23aac746464729ed}{RAL\_PHY\_CSR8}}) \& \mbox{\hyperlink{if__uralreg_8h_af535868fddf3960b516c63c4279d25d3}{RAL\_BBP\_BUSY}}))}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01518}01518                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01519}01519                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_aed23bee71d5b051318db64dbd2754f98}{ural\_pause}}(sc, hz / 100))}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01520}01520                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01521}01521         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01522}01522         \textcolor{keywordflow}{if} (ntries == 100) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01523}01523                 device\_printf(sc-\/>\mbox{\hyperlink{structural__softc_a9d89d62867ac69a1180cd469ba1e8492}{sc\_dev}}, \textcolor{stringliteral}{"{}could not read BBP\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01524}01524                 \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01525}01525         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01526}01526 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01527}01527         \textcolor{keywordflow}{return} \mbox{\hyperlink{if__ural_8c_a7913027ad070d91c902a3ea1ee1bd909}{ural\_read}}(sc, \mbox{\hyperlink{if__uralreg_8h_a97c6afbb7c4aa571051f5ae9eda34647}{RAL\_PHY\_CSR7}}) \& 0xff;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01528}01528 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01529}01529 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01530}01530 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01531}\mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{01531}} \mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{ural\_rf\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *sc, uint8\_t \mbox{\hyperlink{if__ural_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, uint32\_t \mbox{\hyperlink{if__ural_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}})}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01532}01532 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01533}01533         uint32\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01534}01534         \textcolor{keywordtype}{int} ntries;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01535}01535 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01536}01536         \textcolor{keywordflow}{for} (ntries = 0; ntries < 100; ntries++) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01537}01537                 \textcolor{keywordflow}{if} (!(\mbox{\hyperlink{if__ural_8c_a7913027ad070d91c902a3ea1ee1bd909}{ural\_read}}(sc, \mbox{\hyperlink{if__uralreg_8h_a33ca45f97614bec93d27763b71e7a41e}{RAL\_PHY\_CSR10}}) \& \mbox{\hyperlink{if__uralreg_8h_a3249da27f57b4285b4e94047f71f0bd7}{RAL\_RF\_LOBUSY}}))}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01538}01538                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01539}01539                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_aed23bee71d5b051318db64dbd2754f98}{ural\_pause}}(sc, hz / 100))}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01540}01540                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01541}01541         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01542}01542         \textcolor{keywordflow}{if} (ntries == 100) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01543}01543                 device\_printf(sc-\/>\mbox{\hyperlink{structural__softc_a9d89d62867ac69a1180cd469ba1e8492}{sc\_dev}}, \textcolor{stringliteral}{"{}could not write to RF\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01544}01544                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01545}01545         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01546}01546 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01547}01547         tmp = \mbox{\hyperlink{if__uralreg_8h_ae2944bf847e61f792146f58126227d7d}{RAL\_RF\_BUSY}} | \mbox{\hyperlink{if__uralreg_8h_ade99a5d3b192cb5180fff79c50a898c7}{RAL\_RF\_20BIT}} | (\mbox{\hyperlink{if__ural_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0xfffff) << 2 | (\mbox{\hyperlink{if__ural_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} \& 0x3);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01548}01548         \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_aef1f51ec2c88d0fba83595312d5908cb}{RAL\_PHY\_CSR9}},  tmp \& 0xffff);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01549}01549         \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a33ca45f97614bec93d27763b71e7a41e}{RAL\_PHY\_CSR10}}, tmp >> 16);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01550}01550 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01551}01551         \textcolor{comment}{/* remember last written value in sc */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01552}01552         sc-\/>\mbox{\hyperlink{structural__softc_a5eb3cbb3ab9d4b34d1b9a883a7bf775d}{rf\_regs}}[\mbox{\hyperlink{if__ural_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}] = \mbox{\hyperlink{if__ural_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01553}01553 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01554}01554         DPRINTFN(15, \textcolor{stringliteral}{"{}RF R[\%u] <-\/ 0x\%05x\(\backslash\)n"{}}, \mbox{\hyperlink{if__ural_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} \& 0x3, \mbox{\hyperlink{if__ural_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0xfffff);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01555}01555 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01556}01556 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01557}01557 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01558}\mbox{\hyperlink{if__ural_8c_ac2902a785cdb6779f5035e298ce33eb0}{01558}} \mbox{\hyperlink{if__ural_8c_ac2902a785cdb6779f5035e298ce33eb0}{ural\_scan\_start}}(\textcolor{keyword}{struct} ieee80211com *ic)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01559}01559 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01560}01560         \textcolor{keyword}{struct }\mbox{\hyperlink{structural__softc}{ural\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01561}01561 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01562}01562         \mbox{\hyperlink{if__uralvar_8h_a93cd0229ef9274db702bf17e863b1801}{RAL\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01563}01563         \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_af154a71f9fafae9e2b2ce9e630ee82b5}{RAL\_TXRX\_CSR19}}, 0);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01564}01564         \mbox{\hyperlink{if__ural_8c_a985010b0a238d4f0054a4ae2d467973a}{ural\_set\_bssid}}(sc, ieee80211broadcastaddr);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01565}01565         \mbox{\hyperlink{if__uralvar_8h_ad221f1259af784f868b4fcdc69bec791}{RAL\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01566}01566 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01567}01567 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01568}01568 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01569}\mbox{\hyperlink{if__ural_8c_a5a08243b378dd0cb0a8b31c3cb6bc5fe}{01569}} \mbox{\hyperlink{if__ural_8c_a5a08243b378dd0cb0a8b31c3cb6bc5fe}{ural\_scan\_end}}(\textcolor{keyword}{struct} ieee80211com *ic)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01570}01570 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01571}01571         \textcolor{keyword}{struct }\mbox{\hyperlink{structural__softc}{ural\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01572}01572 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01573}01573         \mbox{\hyperlink{if__uralvar_8h_a93cd0229ef9274db702bf17e863b1801}{RAL\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01574}01574         \mbox{\hyperlink{if__ural_8c_a47c8d7efee44543bf17b69c95c529c68}{ural\_enable\_tsf\_sync}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01575}01575         \mbox{\hyperlink{if__ural_8c_a985010b0a238d4f0054a4ae2d467973a}{ural\_set\_bssid}}(sc, sc-\/>\mbox{\hyperlink{structural__softc_a03d104f1811b1bfc5f81d98b4be2c64d}{sc\_bssid}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01576}01576         \mbox{\hyperlink{if__uralvar_8h_ad221f1259af784f868b4fcdc69bec791}{RAL\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01577}01577 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01578}01578 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01579}01579 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01580}01580 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01581}\mbox{\hyperlink{if__ural_8c_ad058c8db390fd4d849be812bb4fb0599}{01581}} \mbox{\hyperlink{if__ural_8c_ad058c8db390fd4d849be812bb4fb0599}{ural\_getradiocaps}}(\textcolor{keyword}{struct} ieee80211com *ic,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01582}01582     \textcolor{keywordtype}{int} maxchans, \textcolor{keywordtype}{int} *nchans, \textcolor{keyword}{struct} ieee80211\_channel chans[])}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01583}01583 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01584}01584         \textcolor{keyword}{struct }\mbox{\hyperlink{structural__softc}{ural\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01585}01585         uint8\_t bands[IEEE80211\_MODE\_BYTES];}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01586}01586 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01587}01587         memset(bands, 0, \textcolor{keyword}{sizeof}(bands));}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01588}01588         setbit(bands, IEEE80211\_MODE\_11B);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01589}01589         setbit(bands, IEEE80211\_MODE\_11G);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01590}01590         ieee80211\_add\_channels\_default\_2ghz(chans, maxchans, nchans, bands, 0);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01591}01591 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01592}01592         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structural__softc_a48abc1b58b7765e90047daf07ad57f3c}{rf\_rev}} == \mbox{\hyperlink{if__uralreg_8h_a54441ffd586284a970c39fd3fc4b0aa0}{RAL\_RF\_5222}}) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01593}01593                 setbit(bands, IEEE80211\_MODE\_11A);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01594}01594                 ieee80211\_add\_channel\_list\_5ghz(chans, maxchans, nchans,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01595}01595                     \mbox{\hyperlink{if__ural_8c_a5e1776a78068d92dc5a730d0dcb6577c}{ural\_chan\_5ghz}}, nitems(\mbox{\hyperlink{if__ural_8c_a5e1776a78068d92dc5a730d0dcb6577c}{ural\_chan\_5ghz}}), bands, 0);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01596}01596         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01597}01597 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01598}01598 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01599}01599 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01600}\mbox{\hyperlink{if__ural_8c_a2c75fd84aa20e38bf4df89507f87eba2}{01600}} \mbox{\hyperlink{if__ural_8c_a2c75fd84aa20e38bf4df89507f87eba2}{ural\_set\_channel}}(\textcolor{keyword}{struct} ieee80211com *ic)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01601}01601 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01602}01602         \textcolor{keyword}{struct }\mbox{\hyperlink{structural__softc}{ural\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01603}01603 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01604}01604         \mbox{\hyperlink{if__uralvar_8h_a93cd0229ef9274db702bf17e863b1801}{RAL\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01605}01605         \mbox{\hyperlink{if__ural_8c_a7dc1bc79b36d2cbe582c14cfd283e1f7}{ural\_set\_chan}}(sc, ic-\/>ic\_curchan);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01606}01606         \mbox{\hyperlink{if__uralvar_8h_ad221f1259af784f868b4fcdc69bec791}{RAL\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01607}01607 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01608}01608 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01609}01609 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01610}\mbox{\hyperlink{if__ural_8c_a7dc1bc79b36d2cbe582c14cfd283e1f7}{01610}} \mbox{\hyperlink{if__ural_8c_a7dc1bc79b36d2cbe582c14cfd283e1f7}{ural\_set\_chan}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *sc, \textcolor{keyword}{struct} ieee80211\_channel *c)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01611}01611 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01612}01612         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structural__softc_aeb6a8284acf12d2f827af82042fedafa}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01613}01613         uint8\_t power, tmp;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01614}01614         \textcolor{keywordtype}{int} i, \mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01615}01615 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01616}01616         \mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} = ieee80211\_chan2ieee(ic, c);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01617}01617         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} == 0 || \mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} == IEEE80211\_CHAN\_ANY)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01618}01618                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01619}01619 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01620}01620         \textcolor{keywordflow}{if} (IEEE80211\_IS\_CHAN\_2GHZ(c))}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01621}01621                 power = min(sc-\/>\mbox{\hyperlink{structural__softc_a37efa7d69679531e7da858392396bb07}{txpow}}[\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} -\/ 1], 31);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01622}01622         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01623}01623                 power = 31;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01624}01624 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01625}01625         \textcolor{comment}{/* adjust txpower using ifconfig settings */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01626}01626         power -\/= (100 -\/ ic-\/>ic\_txpowlimit) / 8;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01627}01627 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01628}01628         DPRINTFN(2, \textcolor{stringliteral}{"{}setting channel to \%u, txpower to \%u\(\backslash\)n"{}}, \mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}}, power);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01629}01629 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01630}01630         \textcolor{keywordflow}{switch} (sc-\/>\mbox{\hyperlink{structural__softc_a48abc1b58b7765e90047daf07ad57f3c}{rf\_rev}}) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01631}01631         \textcolor{keywordflow}{case} \mbox{\hyperlink{if__uralreg_8h_a62eb0c5c7b29711f5ea9058df09c6a09}{RAL\_RF\_2522}}:}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01632}01632                 \mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{ural\_rf\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_aa52b3d0f8c7cf256abacb96c9b991143}{RAL\_RF1}}, 0x00814);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01633}01633                 \mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{ural\_rf\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a60e26d824aceb18877f178f4ee377ff2}{RAL\_RF2}}, \mbox{\hyperlink{if__ural_8c_a6f699f00041cdcb0ae4c44766ebd3d96}{ural\_rf2522\_r2}}[\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} -\/ 1]);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01634}01634                 \mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{ural\_rf\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a2ab2ff6ef73344ef4c5a11b3d37fed1f}{RAL\_RF3}}, power << 7 | 0x00040);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01635}01635                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01636}01636 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01637}01637         \textcolor{keywordflow}{case} \mbox{\hyperlink{if__uralreg_8h_a763373b23f226b5a5f4d567051006b0e}{RAL\_RF\_2523}}:}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01638}01638                 \mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{ural\_rf\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_aa52b3d0f8c7cf256abacb96c9b991143}{RAL\_RF1}}, 0x08804);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01639}01639                 \mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{ural\_rf\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a60e26d824aceb18877f178f4ee377ff2}{RAL\_RF2}}, \mbox{\hyperlink{if__ural_8c_a682dab87bb637684cba5fc0f86007a90}{ural\_rf2523\_r2}}[\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} -\/ 1]);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01640}01640                 \mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{ural\_rf\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a2ab2ff6ef73344ef4c5a11b3d37fed1f}{RAL\_RF3}}, power << 7 | 0x38044);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01641}01641                 \mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{ural\_rf\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a6b2b3beec45eb6b7f54c9e52d30ed751}{RAL\_RF4}}, (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} == 14) ? 0x00280 : 0x00286);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01642}01642                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01643}01643 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01644}01644         \textcolor{keywordflow}{case} \mbox{\hyperlink{if__uralreg_8h_a578a95cee669168788d7387173462db0}{RAL\_RF\_2524}}:}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01645}01645                 \mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{ural\_rf\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_aa52b3d0f8c7cf256abacb96c9b991143}{RAL\_RF1}}, 0x0c808);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01646}01646                 \mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{ural\_rf\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a60e26d824aceb18877f178f4ee377ff2}{RAL\_RF2}}, \mbox{\hyperlink{if__ural_8c_a94d54af16ea6ff943f2e4a5bd1f6d41d}{ural\_rf2524\_r2}}[\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} -\/ 1]);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01647}01647                 \mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{ural\_rf\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a2ab2ff6ef73344ef4c5a11b3d37fed1f}{RAL\_RF3}}, power << 7 | 0x00040);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01648}01648                 \mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{ural\_rf\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a6b2b3beec45eb6b7f54c9e52d30ed751}{RAL\_RF4}}, (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} == 14) ? 0x00280 : 0x00286);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01649}01649                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01650}01650 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01651}01651         \textcolor{keywordflow}{case} \mbox{\hyperlink{if__uralreg_8h_ab1acad10ee1b5415a6bca6a4f4e90614}{RAL\_RF\_2525}}:}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01652}01652                 \mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{ural\_rf\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_aa52b3d0f8c7cf256abacb96c9b991143}{RAL\_RF1}}, 0x08808);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01653}01653                 \mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{ural\_rf\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a60e26d824aceb18877f178f4ee377ff2}{RAL\_RF2}}, \mbox{\hyperlink{if__ural_8c_a2a333ea27e08d40e6a01aa44ff502516}{ural\_rf2525\_hi\_r2}}[\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} -\/ 1]);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01654}01654                 \mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{ural\_rf\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a2ab2ff6ef73344ef4c5a11b3d37fed1f}{RAL\_RF3}}, power << 7 | 0x18044);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01655}01655                 \mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{ural\_rf\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a6b2b3beec45eb6b7f54c9e52d30ed751}{RAL\_RF4}}, (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} == 14) ? 0x00280 : 0x00286);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01656}01656 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01657}01657                 \mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{ural\_rf\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_aa52b3d0f8c7cf256abacb96c9b991143}{RAL\_RF1}}, 0x08808);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01658}01658                 \mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{ural\_rf\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a60e26d824aceb18877f178f4ee377ff2}{RAL\_RF2}}, \mbox{\hyperlink{if__ural_8c_a28c1706ab1b215a564f42d4763209a51}{ural\_rf2525\_r2}}[\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} -\/ 1]);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01659}01659                 \mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{ural\_rf\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a2ab2ff6ef73344ef4c5a11b3d37fed1f}{RAL\_RF3}}, power << 7 | 0x18044);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01660}01660                 \mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{ural\_rf\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a6b2b3beec45eb6b7f54c9e52d30ed751}{RAL\_RF4}}, (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} == 14) ? 0x00280 : 0x00286);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01661}01661                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01662}01662 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01663}01663         \textcolor{keywordflow}{case} \mbox{\hyperlink{if__uralreg_8h_a1b730134dd47e76befa71c62e3b59085}{RAL\_RF\_2525E}}:}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01664}01664                 \mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{ural\_rf\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_aa52b3d0f8c7cf256abacb96c9b991143}{RAL\_RF1}}, 0x08808);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01665}01665                 \mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{ural\_rf\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a60e26d824aceb18877f178f4ee377ff2}{RAL\_RF2}}, \mbox{\hyperlink{if__ural_8c_ab425eb9d7c1cfebfff39dfbb46beee57}{ural\_rf2525e\_r2}}[\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} -\/ 1]);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01666}01666                 \mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{ural\_rf\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a2ab2ff6ef73344ef4c5a11b3d37fed1f}{RAL\_RF3}}, power << 7 | 0x18044);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01667}01667                 \mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{ural\_rf\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a6b2b3beec45eb6b7f54c9e52d30ed751}{RAL\_RF4}}, (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} == 14) ? 0x00286 : 0x00282);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01668}01668                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01669}01669 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01670}01670         \textcolor{keywordflow}{case} \mbox{\hyperlink{if__uralreg_8h_ae978a98f8ab8725f7a87a483d449074a}{RAL\_RF\_2526}}:}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01671}01671                 \mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{ural\_rf\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a60e26d824aceb18877f178f4ee377ff2}{RAL\_RF2}}, \mbox{\hyperlink{if__ural_8c_a27a250157b757339a2c66765a537dc5c}{ural\_rf2526\_hi\_r2}}[\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} -\/ 1]);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01672}01672                 \mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{ural\_rf\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a6b2b3beec45eb6b7f54c9e52d30ed751}{RAL\_RF4}}, (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} \& 1) ? 0x00386 : 0x00381);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01673}01673                 \mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{ural\_rf\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_aa52b3d0f8c7cf256abacb96c9b991143}{RAL\_RF1}}, 0x08804);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01674}01674 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01675}01675                 \mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{ural\_rf\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a60e26d824aceb18877f178f4ee377ff2}{RAL\_RF2}}, \mbox{\hyperlink{if__ural_8c_a9fc1961def3254dcc471c5bd2c830788}{ural\_rf2526\_r2}}[\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} -\/ 1]);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01676}01676                 \mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{ural\_rf\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a2ab2ff6ef73344ef4c5a11b3d37fed1f}{RAL\_RF3}}, power << 7 | 0x18044);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01677}01677                 \mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{ural\_rf\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a6b2b3beec45eb6b7f54c9e52d30ed751}{RAL\_RF4}}, (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} \& 1) ? 0x00386 : 0x00381);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01678}01678                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01679}01679 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01680}01680         \textcolor{comment}{/* dual-\/band RF */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01681}01681         \textcolor{keywordflow}{case} \mbox{\hyperlink{if__uralreg_8h_a54441ffd586284a970c39fd3fc4b0aa0}{RAL\_RF\_5222}}:}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01682}01682                 \textcolor{keywordflow}{for} (i = 0; \mbox{\hyperlink{if__ural_8c_a8f5cadb14448b3ff25f012e7ca7f7c2f}{ural\_rf5222}}[i].chan != \mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}}; i++);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01683}01683 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01684}01684                 \mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{ural\_rf\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_aa52b3d0f8c7cf256abacb96c9b991143}{RAL\_RF1}}, \mbox{\hyperlink{if__ural_8c_a8f5cadb14448b3ff25f012e7ca7f7c2f}{ural\_rf5222}}[i].\mbox{\hyperlink{if__ural_8c_a241f774bd9124717ac8d6cfa094a6d1b}{r1}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01685}01685                 \mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{ural\_rf\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a60e26d824aceb18877f178f4ee377ff2}{RAL\_RF2}}, \mbox{\hyperlink{if__ural_8c_a8f5cadb14448b3ff25f012e7ca7f7c2f}{ural\_rf5222}}[i].\mbox{\hyperlink{if__ural_8c_a3f3de83e4d1261e394f4547c8ec0198f}{r2}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01686}01686                 \mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{ural\_rf\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a2ab2ff6ef73344ef4c5a11b3d37fed1f}{RAL\_RF3}}, power << 7 | 0x00040);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01687}01687                 \mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{ural\_rf\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a6b2b3beec45eb6b7f54c9e52d30ed751}{RAL\_RF4}}, \mbox{\hyperlink{if__ural_8c_a8f5cadb14448b3ff25f012e7ca7f7c2f}{ural\_rf5222}}[i].\mbox{\hyperlink{if__ural_8c_abb350ded3920a0199969707b46c10f8a}{r4}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01688}01688                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01689}01689         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01690}01690 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01691}01691         \textcolor{keywordflow}{if} (ic-\/>ic\_opmode != IEEE80211\_M\_MONITOR \&\&}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01692}01692             (ic-\/>ic\_flags \& IEEE80211\_F\_SCAN) == 0) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01693}01693                 \textcolor{comment}{/* set Japan filter bit for channel 14 */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01694}01694                 tmp = \mbox{\hyperlink{if__ural_8c_a35a9a237e19bb884c6f7af3aa4b278a0}{ural\_bbp\_read}}(sc, 70);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01695}01695 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01696}01696                 tmp \&= \string~RAL\_JAPAN\_FILTER;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01697}01697                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a95bf1cc71e297ff6628c56a21ad3a438}{chan}} == 14)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01698}01698                         tmp |= \mbox{\hyperlink{if__uralreg_8h_a22c0116291b08f4a29794e19bb1d8f3e}{RAL\_JAPAN\_FILTER}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01699}01699 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01700}01700                 \mbox{\hyperlink{if__ural_8c_a05778372c30d5f6418625218af1387df}{ural\_bbp\_write}}(sc, 70, tmp);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01701}01701 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01702}01702                 \textcolor{comment}{/* clear CRC errors */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01703}01703                 \mbox{\hyperlink{if__ural_8c_a7913027ad070d91c902a3ea1ee1bd909}{ural\_read}}(sc, \mbox{\hyperlink{if__uralreg_8h_ab8c7205e72d3830ef4bc2428f7ebff88}{RAL\_STA\_CSR0}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01704}01704 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01705}01705                 \mbox{\hyperlink{if__ural_8c_aed23bee71d5b051318db64dbd2754f98}{ural\_pause}}(sc, hz / 100);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01706}01706                 \mbox{\hyperlink{if__ural_8c_ae70bd0a2ff79740badd9790a08c1e558}{ural\_disable\_rf\_tune}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01707}01707         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01708}01708 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01709}01709         \textcolor{comment}{/* XXX doesn't belong here */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01710}01710         \textcolor{comment}{/* update basic rate set */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01711}01711         \mbox{\hyperlink{if__ural_8c_a982c365195030065700b595042b915ba}{ural\_set\_basicrates}}(sc, c);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01712}01712 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01713}01713         \textcolor{comment}{/* give the hardware some time to do the switchover */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01714}01714         \mbox{\hyperlink{if__ural_8c_aed23bee71d5b051318db64dbd2754f98}{ural\_pause}}(sc, hz / 100);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01715}01715 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01716}01716 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01717}01717 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01718}01718 \textcolor{comment}{ * Disable RF auto-\/tuning.}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01719}01719 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01720}01720 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01721}\mbox{\hyperlink{if__ural_8c_ae70bd0a2ff79740badd9790a08c1e558}{01721}} \mbox{\hyperlink{if__ural_8c_ae70bd0a2ff79740badd9790a08c1e558}{ural\_disable\_rf\_tune}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01722}01722 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01723}01723         uint32\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01724}01724 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01725}01725         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structural__softc_a48abc1b58b7765e90047daf07ad57f3c}{rf\_rev}} != \mbox{\hyperlink{if__uralreg_8h_a763373b23f226b5a5f4d567051006b0e}{RAL\_RF\_2523}}) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01726}01726                 tmp = sc-\/>\mbox{\hyperlink{structural__softc_a5eb3cbb3ab9d4b34d1b9a883a7bf775d}{rf\_regs}}[\mbox{\hyperlink{if__uralreg_8h_aa52b3d0f8c7cf256abacb96c9b991143}{RAL\_RF1}}] \& \string~RAL\_RF1\_AUTOTUNE;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01727}01727                 \mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{ural\_rf\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_aa52b3d0f8c7cf256abacb96c9b991143}{RAL\_RF1}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01728}01728         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01729}01729 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01730}01730         tmp = sc-\/>\mbox{\hyperlink{structural__softc_a5eb3cbb3ab9d4b34d1b9a883a7bf775d}{rf\_regs}}[\mbox{\hyperlink{if__uralreg_8h_a2ab2ff6ef73344ef4c5a11b3d37fed1f}{RAL\_RF3}}] \& \string~RAL\_RF3\_AUTOTUNE;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01731}01731         \mbox{\hyperlink{if__ural_8c_aecc53b7232b61c7c407e2360125cb24f}{ural\_rf\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a2ab2ff6ef73344ef4c5a11b3d37fed1f}{RAL\_RF3}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01732}01732 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01733}01733         DPRINTFN(2, \textcolor{stringliteral}{"{}disabling RF autotune\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01734}01734 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01735}01735 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01736}01736 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01737}01737 \textcolor{comment}{ * Refer to IEEE Std 802.11-\/1999 pp. 123 for more information on TSF}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01738}01738 \textcolor{comment}{ * synchronization.}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01739}01739 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01740}01740 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01741}\mbox{\hyperlink{if__ural_8c_a47c8d7efee44543bf17b69c95c529c68}{01741}} \mbox{\hyperlink{if__ural_8c_a47c8d7efee44543bf17b69c95c529c68}{ural\_enable\_tsf\_sync}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01742}01742 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01743}01743         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structural__softc_aeb6a8284acf12d2f827af82042fedafa}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01744}01744         \textcolor{keyword}{struct }ieee80211vap *vap = TAILQ\_FIRST(\&ic-\/>ic\_vaps);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01745}01745         uint16\_t logcwmin, preload, tmp;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01746}01746 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01747}01747         \textcolor{comment}{/* first, disable TSF synchronization */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01748}01748         \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_af154a71f9fafae9e2b2ce9e630ee82b5}{RAL\_TXRX\_CSR19}}, 0);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01749}01749 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01750}01750         tmp = (16 * vap-\/>iv\_bss-\/>ni\_intval) << 4;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01751}01751         \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a822d387ff1cd0085d1636aa3c700a775}{RAL\_TXRX\_CSR18}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01752}01752 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01753}01753         logcwmin = (ic-\/>ic\_opmode == IEEE80211\_M\_IBSS) ? 2 : 0;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01754}01754         preload = (ic-\/>ic\_opmode == IEEE80211\_M\_IBSS) ? 320 : 6;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01755}01755         tmp = logcwmin << 12 | preload;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01756}01756         \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a1bf51730f7792a7ddd96e74a871394e4}{RAL\_TXRX\_CSR20}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01757}01757 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01758}01758         \textcolor{comment}{/* finally, enable TSF synchronization */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01759}01759         tmp = \mbox{\hyperlink{if__uralreg_8h_af0ae10787177c00f98d4ac3cc00a82a0}{RAL\_ENABLE\_TSF}} | \mbox{\hyperlink{if__uralreg_8h_a3d59716e23aa6066cee0c0d17f935d43}{RAL\_ENABLE\_TBCN}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01760}01760         \textcolor{keywordflow}{if} (ic-\/>ic\_opmode == IEEE80211\_M\_STA)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01761}01761                 tmp |= \mbox{\hyperlink{if__uralreg_8h_a835a22a0f4ebc24692b6ad787d4852b8}{RAL\_ENABLE\_TSF\_SYNC}}(1);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01762}01762         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01763}01763                 tmp |= \mbox{\hyperlink{if__uralreg_8h_a835a22a0f4ebc24692b6ad787d4852b8}{RAL\_ENABLE\_TSF\_SYNC}}(2) | \mbox{\hyperlink{if__uralreg_8h_ab5c49559a7324a5d44de467642e13f5c}{RAL\_ENABLE\_BEACON\_GENERATOR}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01764}01764         \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_af154a71f9fafae9e2b2ce9e630ee82b5}{RAL\_TXRX\_CSR19}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01765}01765 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01766}01766         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}enabling TSF synchronization\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01767}01767 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01768}01768 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01769}01769 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01770}\mbox{\hyperlink{if__ural_8c_a5698e49b973d139f01db259f1920b781}{01770}} \mbox{\hyperlink{if__ural_8c_a5698e49b973d139f01db259f1920b781}{ural\_enable\_tsf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01771}01771 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01772}01772         \textcolor{comment}{/* first, disable TSF synchronization */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01773}01773         \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_af154a71f9fafae9e2b2ce9e630ee82b5}{RAL\_TXRX\_CSR19}}, 0);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01774}01774         \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_af154a71f9fafae9e2b2ce9e630ee82b5}{RAL\_TXRX\_CSR19}}, \mbox{\hyperlink{if__uralreg_8h_af0ae10787177c00f98d4ac3cc00a82a0}{RAL\_ENABLE\_TSF}} | \mbox{\hyperlink{if__uralreg_8h_a835a22a0f4ebc24692b6ad787d4852b8}{RAL\_ENABLE\_TSF\_SYNC}}(2));}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01775}01775 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01776}01776 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01777}\mbox{\hyperlink{if__ural_8c_a5646c8d5ad19f71ac7872c2b9d717f28}{01777}} \textcolor{preprocessor}{\#define RAL\_RXTX\_TURNAROUND     5       }\textcolor{comment}{/* us */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01778}01778 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01779}\mbox{\hyperlink{if__ural_8c_a21a132eeb495d82ea96bced77a6b0cc5}{01779}} \mbox{\hyperlink{if__ural_8c_a21a132eeb495d82ea96bced77a6b0cc5}{ural\_update\_slot}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01780}01780 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01781}01781         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structural__softc_aeb6a8284acf12d2f827af82042fedafa}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01782}01782         uint16\_t slottime, sifs, eifs;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01783}01783 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01784}01784         slottime = IEEE80211\_GET\_SLOTTIME(ic);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01785}01785 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01786}01786         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01787}01787 \textcolor{comment}{         * These settings may sound a bit inconsistent but this is what the}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01788}01788 \textcolor{comment}{         * reference driver does.}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01789}01789 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01790}01790         \textcolor{keywordflow}{if} (ic-\/>ic\_curmode == IEEE80211\_MODE\_11B) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01791}01791                 sifs = 16 -\/ \mbox{\hyperlink{if__ural_8c_a5646c8d5ad19f71ac7872c2b9d717f28}{RAL\_RXTX\_TURNAROUND}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01792}01792                 eifs = 364;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01793}01793         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01794}01794                 sifs = 10 -\/ \mbox{\hyperlink{if__ural_8c_a5646c8d5ad19f71ac7872c2b9d717f28}{RAL\_RXTX\_TURNAROUND}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01795}01795                 eifs = 64;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01796}01796         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01797}01797 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01798}01798         \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_acb64a98f1e03370ac5e68aa2d17890d0}{RAL\_MAC\_CSR10}}, slottime);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01799}01799         \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a9f76daf4b802f98ef5c70a83e453e2a6}{RAL\_MAC\_CSR11}}, sifs);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01800}01800         \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a0f905752586731e8c293cb0c03da9a9c}{RAL\_MAC\_CSR12}}, eifs);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01801}01801 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01802}01802 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01803}01803 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01804}\mbox{\hyperlink{if__ural_8c_aa3552f6bde04e774f909d4724b785f30}{01804}} \mbox{\hyperlink{if__ural_8c_aa3552f6bde04e774f909d4724b785f30}{ural\_set\_txpreamble}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01805}01805 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01806}01806         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structural__softc_aeb6a8284acf12d2f827af82042fedafa}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01807}01807         uint16\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01808}01808 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01809}01809         tmp = \mbox{\hyperlink{if__ural_8c_a7913027ad070d91c902a3ea1ee1bd909}{ural\_read}}(sc, \mbox{\hyperlink{if__uralreg_8h_a0548e49112f051e361ca3f3a92b8131e}{RAL\_TXRX\_CSR10}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01810}01810 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01811}01811         tmp \&= \string~RAL\_SHORT\_PREAMBLE;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01812}01812         \textcolor{keywordflow}{if} (ic-\/>ic\_flags \& IEEE80211\_F\_SHPREAMBLE)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01813}01813                 tmp |= \mbox{\hyperlink{if__uralreg_8h_a06d0b5ec60f380212c8bbb201724f40a}{RAL\_SHORT\_PREAMBLE}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01814}01814 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01815}01815         \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a0548e49112f051e361ca3f3a92b8131e}{RAL\_TXRX\_CSR10}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01816}01816 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01817}01817 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01818}01818 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01819}\mbox{\hyperlink{if__ural_8c_a982c365195030065700b595042b915ba}{01819}} \mbox{\hyperlink{if__ural_8c_a982c365195030065700b595042b915ba}{ural\_set\_basicrates}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *sc, \textcolor{keyword}{const} \textcolor{keyword}{struct} ieee80211\_channel *c)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01820}01820 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01821}01821         \textcolor{comment}{/* XXX wrong, take from rate set */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01822}01822         \textcolor{comment}{/* update basic rate set */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01823}01823         \textcolor{keywordflow}{if} (IEEE80211\_IS\_CHAN\_5GHZ(c)) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01824}01824                 \textcolor{comment}{/* 11a basic rates: 6, 12, 24Mbps */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01825}01825                 \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a4f7706256506b33e7344ffe0e2aa2c63}{RAL\_TXRX\_CSR11}}, 0x150);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01826}01826         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (IEEE80211\_IS\_CHAN\_ANYG(c)) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01827}01827                 \textcolor{comment}{/* 11g basic rates: 1, 2, 5.5, 11, 6, 12, 24Mbps */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01828}01828                 \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a4f7706256506b33e7344ffe0e2aa2c63}{RAL\_TXRX\_CSR11}}, 0x15f);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01829}01829         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01830}01830                 \textcolor{comment}{/* 11b basic rates: 1, 2Mbps */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01831}01831                 \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a4f7706256506b33e7344ffe0e2aa2c63}{RAL\_TXRX\_CSR11}}, 0x3);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01832}01832         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01833}01833 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01834}01834 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01835}01835 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01836}\mbox{\hyperlink{if__ural_8c_a985010b0a238d4f0054a4ae2d467973a}{01836}} \mbox{\hyperlink{if__ural_8c_a985010b0a238d4f0054a4ae2d467973a}{ural\_set\_bssid}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *sc, \textcolor{keyword}{const} uint8\_t *bssid)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01837}01837 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01838}01838         uint16\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01839}01839 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01840}01840         tmp = bssid[0] | bssid[1] << 8;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01841}01841         \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_ad079a4d96187aeaee845ed6cc8b84009}{RAL\_MAC\_CSR5}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01842}01842 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01843}01843         tmp = bssid[2] | bssid[3] << 8;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01844}01844         \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_af703670957de64d7a2e6fb12deec49bd}{RAL\_MAC\_CSR6}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01845}01845 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01846}01846         tmp = bssid[4] | bssid[5] << 8;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01847}01847         \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a1b0ddb43983325e93b92e0d5fa80dd26}{RAL\_MAC\_CSR7}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01848}01848 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01849}01849         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}setting BSSID to \%6D\(\backslash\)n"{}}, bssid, \textcolor{stringliteral}{"{}:"{}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01850}01850 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01851}01851 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01852}01852 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01853}\mbox{\hyperlink{if__ural_8c_a966bdf04687fbcb3971d6fcb7669006a}{01853}} \mbox{\hyperlink{if__ural_8c_a966bdf04687fbcb3971d6fcb7669006a}{ural\_set\_macaddr}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *sc, \textcolor{keyword}{const} uint8\_t *addr)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01854}01854 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01855}01855         uint16\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01856}01856 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01857}01857         tmp = addr[0] | addr[1] << 8;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01858}01858         \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a3f6e3a4a5d1df6d9d127f159c0f5f3fb}{RAL\_MAC\_CSR2}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01859}01859 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01860}01860         tmp = addr[2] | addr[3] << 8;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01861}01861         \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a1b36e6831d5cda609ba3ec448b527d0d}{RAL\_MAC\_CSR3}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01862}01862 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01863}01863         tmp = addr[4] | addr[5] << 8;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01864}01864         \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a90a7a7fbbc62d51236d53328a210bae7}{RAL\_MAC\_CSR4}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01865}01865 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01866}01866         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}setting MAC address to \%6D\(\backslash\)n"{}}, addr, \textcolor{stringliteral}{"{}:"{}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01867}01867 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01868}01868 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01869}01869 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01870}\mbox{\hyperlink{if__ural_8c_ae2dbd9716bc0ecc23fef6b323c577d45}{01870}} \mbox{\hyperlink{if__ural_8c_ae2dbd9716bc0ecc23fef6b323c577d45}{ural\_setpromisc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01871}01871 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01872}01872         uint32\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01873}01873 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01874}01874         tmp = \mbox{\hyperlink{if__ural_8c_a7913027ad070d91c902a3ea1ee1bd909}{ural\_read}}(sc, \mbox{\hyperlink{if__uralreg_8h_a44d10ff1609b9f353ed0ce293ad73853}{RAL\_TXRX\_CSR2}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01875}01875 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01876}01876         tmp \&= \string~RAL\_DROP\_NOT\_TO\_ME;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01877}01877         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structural__softc_aeb6a8284acf12d2f827af82042fedafa}{sc\_ic}}.ic\_promisc == 0)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01878}01878                 tmp |= \mbox{\hyperlink{if__uralreg_8h_afd7d139ae186b385d4c135f094f7c71c}{RAL\_DROP\_NOT\_TO\_ME}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01879}01879 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01880}01880         \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a44d10ff1609b9f353ed0ce293ad73853}{RAL\_TXRX\_CSR2}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01881}01881 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01882}01882         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}\%s promiscuous mode\(\backslash\)n"{}}, sc-\/>\mbox{\hyperlink{structural__softc_aeb6a8284acf12d2f827af82042fedafa}{sc\_ic}}.ic\_promisc ?}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01883}01883             \textcolor{stringliteral}{"{}entering"{}} : \textcolor{stringliteral}{"{}leaving"{}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01884}01884 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01885}01885 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01886}01886 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01887}\mbox{\hyperlink{if__ural_8c_a290315c3205ff54a326e2f76c3b917c2}{01887}} \mbox{\hyperlink{if__ural_8c_a290315c3205ff54a326e2f76c3b917c2}{ural\_update\_promisc}}(\textcolor{keyword}{struct} ieee80211com *ic)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01888}01888 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01889}01889         \textcolor{keyword}{struct }\mbox{\hyperlink{structural__softc}{ural\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01890}01890 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01891}01891         \mbox{\hyperlink{if__uralvar_8h_a93cd0229ef9274db702bf17e863b1801}{RAL\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01892}01892         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structural__softc_a107ff634a4a6743b7a2a5c022f0d4177}{sc\_running}})}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01893}01893                 \mbox{\hyperlink{if__ural_8c_ae2dbd9716bc0ecc23fef6b323c577d45}{ural\_setpromisc}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01894}01894         \mbox{\hyperlink{if__uralvar_8h_ad221f1259af784f868b4fcdc69bec791}{RAL\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01895}01895 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01896}01896 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01897}01897 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01898}\mbox{\hyperlink{if__ural_8c_ae37740021332c8fd2f76aeb0ee0cb5df}{01898}} \mbox{\hyperlink{if__ural_8c_ae37740021332c8fd2f76aeb0ee0cb5df}{ural\_get\_rf}}(\textcolor{keywordtype}{int} rev)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01899}01899 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01900}01900         \textcolor{keywordflow}{switch} (rev) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01901}01901         \textcolor{keywordflow}{case} \mbox{\hyperlink{if__uralreg_8h_a62eb0c5c7b29711f5ea9058df09c6a09}{RAL\_RF\_2522}}:    \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}RT2522"{}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01902}01902         \textcolor{keywordflow}{case} \mbox{\hyperlink{if__uralreg_8h_a763373b23f226b5a5f4d567051006b0e}{RAL\_RF\_2523}}:    \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}RT2523"{}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01903}01903         \textcolor{keywordflow}{case} \mbox{\hyperlink{if__uralreg_8h_a578a95cee669168788d7387173462db0}{RAL\_RF\_2524}}:    \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}RT2524"{}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01904}01904         \textcolor{keywordflow}{case} \mbox{\hyperlink{if__uralreg_8h_ab1acad10ee1b5415a6bca6a4f4e90614}{RAL\_RF\_2525}}:    \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}RT2525"{}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01905}01905         \textcolor{keywordflow}{case} \mbox{\hyperlink{if__uralreg_8h_a1b730134dd47e76befa71c62e3b59085}{RAL\_RF\_2525E}}:  \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}RT2525e"{}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01906}01906         \textcolor{keywordflow}{case} \mbox{\hyperlink{if__uralreg_8h_ae978a98f8ab8725f7a87a483d449074a}{RAL\_RF\_2526}}:    \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}RT2526"{}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01907}01907         \textcolor{keywordflow}{case} \mbox{\hyperlink{if__uralreg_8h_a54441ffd586284a970c39fd3fc4b0aa0}{RAL\_RF\_5222}}:    \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}RT5222"{}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01908}01908         \textcolor{keywordflow}{default}:                \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}unknown"{}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01909}01909         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01910}01910 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01911}01911 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01912}01912 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01913}\mbox{\hyperlink{if__ural_8c_a07172e5b2830395045cc79aad812c042}{01913}} \mbox{\hyperlink{if__ural_8c_a07172e5b2830395045cc79aad812c042}{ural\_read\_eeprom}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01914}01914 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01915}01915         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structural__softc_aeb6a8284acf12d2f827af82042fedafa}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01916}01916         uint16\_t \mbox{\hyperlink{if__ural_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01917}01917 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01918}01918         \mbox{\hyperlink{if__ural_8c_ae9b66d57826f066bb137fee7b6959655}{ural\_eeprom\_read}}(sc, \mbox{\hyperlink{if__uralreg_8h_a8aa7163bb658860b9b55d05fe89ef1ad}{RAL\_EEPROM\_CONFIG0}}, \&\mbox{\hyperlink{if__ural_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, 2);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01919}01919         \mbox{\hyperlink{if__ural_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = le16toh(\mbox{\hyperlink{if__ural_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01920}01920         sc-\/>\mbox{\hyperlink{structural__softc_a48abc1b58b7765e90047daf07ad57f3c}{rf\_rev}} =   (\mbox{\hyperlink{if__ural_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >> 11) \& 0x7;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01921}01921         sc-\/>\mbox{\hyperlink{structural__softc_a7af2871ec6aa6120408cc6fd1483db1c}{hw\_radio}} = (\mbox{\hyperlink{if__ural_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >> 10) \& 0x1;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01922}01922         sc-\/>\mbox{\hyperlink{structural__softc_a734bae58fa0e987d9fc7d9555ae6609f}{led\_mode}} = (\mbox{\hyperlink{if__ural_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >> 6)  \& 0x7;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01923}01923         sc-\/>\mbox{\hyperlink{structural__softc_a0022e9a31ed2a5668da36013c1f8e569}{rx\_ant}} =   (\mbox{\hyperlink{if__ural_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >> 4)  \& 0x3;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01924}01924         sc-\/>\mbox{\hyperlink{structural__softc_af11c8cfb01da2def7b07281a9e5329ac}{tx\_ant}} =   (\mbox{\hyperlink{if__ural_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >> 2)  \& 0x3;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01925}01925         sc-\/>\mbox{\hyperlink{structural__softc_a59363e7b2fa102bee083dd3606a40aba}{nb\_ant}} =   \mbox{\hyperlink{if__ural_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0x3;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01926}01926 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01927}01927         \textcolor{comment}{/* read MAC address */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01928}01928         \mbox{\hyperlink{if__ural_8c_ae9b66d57826f066bb137fee7b6959655}{ural\_eeprom\_read}}(sc, \mbox{\hyperlink{if__uralreg_8h_ad37d669c09949962340eb654971aecd4}{RAL\_EEPROM\_ADDRESS}}, ic-\/>ic\_macaddr, 6);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01929}01929 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01930}01930         \textcolor{comment}{/* read default values for BBP registers */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01931}01931         \mbox{\hyperlink{if__ural_8c_ae9b66d57826f066bb137fee7b6959655}{ural\_eeprom\_read}}(sc, \mbox{\hyperlink{if__uralreg_8h_a1a9925ffe0706f266693372ea4fdbf37}{RAL\_EEPROM\_BBP\_BASE}}, sc-\/>\mbox{\hyperlink{structural__softc_ae3192a20438356d1a58d96fa0d3ecc0b}{bbp\_prom}}, 2 * 16);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01932}01932 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01933}01933         \textcolor{comment}{/* read Tx power for all b/g channels */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01934}01934         \mbox{\hyperlink{if__ural_8c_ae9b66d57826f066bb137fee7b6959655}{ural\_eeprom\_read}}(sc, \mbox{\hyperlink{if__uralreg_8h_ab0b88854c2b1d3bed5cf46c2b4be1683}{RAL\_EEPROM\_TXPOWER}}, sc-\/>\mbox{\hyperlink{structural__softc_a37efa7d69679531e7da858392396bb07}{txpow}}, 14);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01935}01935 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01936}01936 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01937}01937 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01938}\mbox{\hyperlink{if__ural_8c_a61a726e84904ea899e21d4e5959fa701}{01938}} \mbox{\hyperlink{if__ural_8c_a61a726e84904ea899e21d4e5959fa701}{ural\_bbp\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01939}01939 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01940}01940         \textcolor{keywordtype}{int} i, ntries;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01941}01941 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01942}01942         \textcolor{comment}{/* wait for BBP to be ready */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01943}01943         \textcolor{keywordflow}{for} (ntries = 0; ntries < 100; ntries++) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01944}01944                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a35a9a237e19bb884c6f7af3aa4b278a0}{ural\_bbp\_read}}(sc, \mbox{\hyperlink{if__uralreg_8h_a10536b9fd14efcd6e48705c89aabac7e}{RAL\_BBP\_VERSION}}) != 0)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01945}01945                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01946}01946                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_aed23bee71d5b051318db64dbd2754f98}{ural\_pause}}(sc, hz / 100))}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01947}01947                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01948}01948         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01949}01949         \textcolor{keywordflow}{if} (ntries == 100) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01950}01950                 device\_printf(sc-\/>\mbox{\hyperlink{structural__softc_a9d89d62867ac69a1180cd469ba1e8492}{sc\_dev}}, \textcolor{stringliteral}{"{}timeout waiting for BBP\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01951}01951                 \textcolor{keywordflow}{return} EIO;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01952}01952         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01953}01953 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01954}01954         \textcolor{comment}{/* initialize BBP registers to default values */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01955}01955         \textcolor{keywordflow}{for} (i = 0; i < nitems(\mbox{\hyperlink{if__ural_8c_a56008e935dc020c7542b618286e68d97}{ural\_def\_bbp}}); i++)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01956}01956                 \mbox{\hyperlink{if__ural_8c_a05778372c30d5f6418625218af1387df}{ural\_bbp\_write}}(sc, \mbox{\hyperlink{if__ural_8c_a56008e935dc020c7542b618286e68d97}{ural\_def\_bbp}}[i].\mbox{\hyperlink{if__ural_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, \mbox{\hyperlink{if__ural_8c_a56008e935dc020c7542b618286e68d97}{ural\_def\_bbp}}[i].\mbox{\hyperlink{if__ural_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01957}01957 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01958}01958 \textcolor{preprocessor}{\#if 0}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01959}01959         \textcolor{comment}{/* initialize BBP registers to values stored in EEPROM */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01960}01960         \textcolor{keywordflow}{for} (i = 0; i < 16; i++) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01961}01961                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structural__softc_ae3192a20438356d1a58d96fa0d3ecc0b}{bbp\_prom}}[i].\mbox{\hyperlink{structural__softc_aa8c9f52252ff3d41a634d7c4f617f28e}{reg}} == 0xff)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01962}01962                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01963}01963                 \mbox{\hyperlink{if__ural_8c_a05778372c30d5f6418625218af1387df}{ural\_bbp\_write}}(sc, sc-\/>\mbox{\hyperlink{structural__softc_ae3192a20438356d1a58d96fa0d3ecc0b}{bbp\_prom}}[i].\mbox{\hyperlink{structural__softc_aa8c9f52252ff3d41a634d7c4f617f28e}{reg}}, sc-\/>\mbox{\hyperlink{structural__softc_ae3192a20438356d1a58d96fa0d3ecc0b}{bbp\_prom}}[i].\mbox{\hyperlink{structural__softc_adf71b46cbd74973b8f0d5556499b70d7}{val}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01964}01964         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01965}01965 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01966}01966 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01967}01967         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01968}01968 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01969}01969 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01970}01970 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01971}\mbox{\hyperlink{if__ural_8c_ae0a00e3f4b3f31eb0de5675c71b8c900}{01971}} \mbox{\hyperlink{if__ural_8c_ae0a00e3f4b3f31eb0de5675c71b8c900}{ural\_set\_txantenna}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *sc, \textcolor{keywordtype}{int} antenna)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01972}01972 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01973}01973         uint16\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01974}01974         uint8\_t \mbox{\hyperlink{if__runreg_8h_a2bf3366a5ada8172ffca744154ce72a6}{tx}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01975}01975 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01976}01976         \mbox{\hyperlink{if__runreg_8h_a2bf3366a5ada8172ffca744154ce72a6}{tx}} = \mbox{\hyperlink{if__ural_8c_a35a9a237e19bb884c6f7af3aa4b278a0}{ural\_bbp\_read}}(sc, \mbox{\hyperlink{if__uralreg_8h_a6247811b9619b55e8e48a51c0fea20f7}{RAL\_BBP\_TX}}) \& \string~RAL\_BBP\_ANTMASK;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01977}01977         \textcolor{keywordflow}{if} (antenna == 1)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01978}01978                 \mbox{\hyperlink{if__runreg_8h_a2bf3366a5ada8172ffca744154ce72a6}{tx}} |= \mbox{\hyperlink{if__uralreg_8h_abe24618d991ff2b3c4e8ed6a165d095b}{RAL\_BBP\_ANTA}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01979}01979         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (antenna == 2)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01980}01980                 \mbox{\hyperlink{if__runreg_8h_a2bf3366a5ada8172ffca744154ce72a6}{tx}} |= \mbox{\hyperlink{if__uralreg_8h_a4a9756ca568fbb2196966aea2df5021a}{RAL\_BBP\_ANTB}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01981}01981         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01982}01982                 \mbox{\hyperlink{if__runreg_8h_a2bf3366a5ada8172ffca744154ce72a6}{tx}} |= \mbox{\hyperlink{if__uralreg_8h_abed704e9ee22ed7f039dd77f811b4a19}{RAL\_BBP\_DIVERSITY}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01983}01983 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01984}01984         \textcolor{comment}{/* need to force I/Q flip for RF 2525e, 2526 and 5222 */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01985}01985         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structural__softc_a48abc1b58b7765e90047daf07ad57f3c}{rf\_rev}} == \mbox{\hyperlink{if__uralreg_8h_a1b730134dd47e76befa71c62e3b59085}{RAL\_RF\_2525E}} || sc-\/>\mbox{\hyperlink{structural__softc_a48abc1b58b7765e90047daf07ad57f3c}{rf\_rev}} == \mbox{\hyperlink{if__uralreg_8h_ae978a98f8ab8725f7a87a483d449074a}{RAL\_RF\_2526}} ||}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01986}01986             sc-\/>\mbox{\hyperlink{structural__softc_a48abc1b58b7765e90047daf07ad57f3c}{rf\_rev}} == \mbox{\hyperlink{if__uralreg_8h_a54441ffd586284a970c39fd3fc4b0aa0}{RAL\_RF\_5222}})}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01987}01987                 \mbox{\hyperlink{if__runreg_8h_a2bf3366a5ada8172ffca744154ce72a6}{tx}} |= \mbox{\hyperlink{if__uralreg_8h_a76a8524c15ada8bcfbf5bdcfac0daa20}{RAL\_BBP\_FLIPIQ}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01988}01988 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01989}01989         \mbox{\hyperlink{if__ural_8c_a05778372c30d5f6418625218af1387df}{ural\_bbp\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a6247811b9619b55e8e48a51c0fea20f7}{RAL\_BBP\_TX}}, \mbox{\hyperlink{if__runreg_8h_a2bf3366a5ada8172ffca744154ce72a6}{tx}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01990}01990 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01991}01991         \textcolor{comment}{/* update values in PHY\_CSR5 and PHY\_CSR6 */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01992}01992         tmp = \mbox{\hyperlink{if__ural_8c_a7913027ad070d91c902a3ea1ee1bd909}{ural\_read}}(sc, \mbox{\hyperlink{if__uralreg_8h_afc46e6f947a859197f39d8bc323d852e}{RAL\_PHY\_CSR5}}) \& \string~0x7;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01993}01993         \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_afc46e6f947a859197f39d8bc323d852e}{RAL\_PHY\_CSR5}}, tmp | (\mbox{\hyperlink{if__runreg_8h_a2bf3366a5ada8172ffca744154ce72a6}{tx}} \& 0x7));}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01994}01994 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01995}01995         tmp = \mbox{\hyperlink{if__ural_8c_a7913027ad070d91c902a3ea1ee1bd909}{ural\_read}}(sc, \mbox{\hyperlink{if__uralreg_8h_a075bacd7c11a4491630ad4b14993c594}{RAL\_PHY\_CSR6}}) \& \string~0x7;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01996}01996         \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a075bacd7c11a4491630ad4b14993c594}{RAL\_PHY\_CSR6}}, tmp | (\mbox{\hyperlink{if__runreg_8h_a2bf3366a5ada8172ffca744154ce72a6}{tx}} \& 0x7));}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01997}01997 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01998}01998 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l01999}01999 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02000}\mbox{\hyperlink{if__ural_8c_a6e78710b98bd52f1621730631578f8b2}{02000}} \mbox{\hyperlink{if__ural_8c_a6e78710b98bd52f1621730631578f8b2}{ural\_set\_rxantenna}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *sc, \textcolor{keywordtype}{int} antenna)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02001}02001 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02002}02002         uint8\_t rx;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02003}02003 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02004}02004         rx = \mbox{\hyperlink{if__ural_8c_a35a9a237e19bb884c6f7af3aa4b278a0}{ural\_bbp\_read}}(sc, \mbox{\hyperlink{if__uralreg_8h_a78e3322893717c91c2cd3a1492adb8fd}{RAL\_BBP\_RX}}) \& \string~RAL\_BBP\_ANTMASK;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02005}02005         \textcolor{keywordflow}{if} (antenna == 1)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02006}02006                 rx |= \mbox{\hyperlink{if__uralreg_8h_abe24618d991ff2b3c4e8ed6a165d095b}{RAL\_BBP\_ANTA}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02007}02007         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (antenna == 2)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02008}02008                 rx |= \mbox{\hyperlink{if__uralreg_8h_a4a9756ca568fbb2196966aea2df5021a}{RAL\_BBP\_ANTB}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02009}02009         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02010}02010                 rx |= \mbox{\hyperlink{if__uralreg_8h_abed704e9ee22ed7f039dd77f811b4a19}{RAL\_BBP\_DIVERSITY}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02011}02011 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02012}02012         \textcolor{comment}{/* need to force no I/Q flip for RF 2525e and 2526 */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02013}02013         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structural__softc_a48abc1b58b7765e90047daf07ad57f3c}{rf\_rev}} == \mbox{\hyperlink{if__uralreg_8h_a1b730134dd47e76befa71c62e3b59085}{RAL\_RF\_2525E}} || sc-\/>\mbox{\hyperlink{structural__softc_a48abc1b58b7765e90047daf07ad57f3c}{rf\_rev}} == \mbox{\hyperlink{if__uralreg_8h_ae978a98f8ab8725f7a87a483d449074a}{RAL\_RF\_2526}})}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02014}02014                 rx \&= \string~RAL\_BBP\_FLIPIQ;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02015}02015 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02016}02016         \mbox{\hyperlink{if__ural_8c_a05778372c30d5f6418625218af1387df}{ural\_bbp\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a78e3322893717c91c2cd3a1492adb8fd}{RAL\_BBP\_RX}}, rx);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02017}02017 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02018}02018 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02019}02019 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02020}\mbox{\hyperlink{if__ural_8c_a450ec6373cbdfa57cead5c24cf04f0f5}{02020}} \mbox{\hyperlink{if__ural_8c_a450ec6373cbdfa57cead5c24cf04f0f5}{ural\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02021}02021 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02022}02022         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structural__softc_aeb6a8284acf12d2f827af82042fedafa}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02023}02023         \textcolor{keyword}{struct }ieee80211vap *vap = TAILQ\_FIRST(\&ic-\/>ic\_vaps);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02024}02024         uint16\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02025}02025         \textcolor{keywordtype}{int} i, ntries;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02026}02026 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02027}02027         \mbox{\hyperlink{if__uralvar_8h_a911339fbbe5d297eb64c57db121dfbe4}{RAL\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02028}02028 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02029}02029         \mbox{\hyperlink{if__ural_8c_a5b85199fd4642cc4eb0b23138c629bd2}{ural\_set\_testmode}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02030}02030         \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, 0x308, 0x00f0);        \textcolor{comment}{/* XXX magic */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02031}02031 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02032}02032         \mbox{\hyperlink{if__ural_8c_aba31e94a52762fbeea522e30e85a57fc}{ural\_stop}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02033}02033 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02034}02034         \textcolor{comment}{/* initialize MAC registers to default values */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02035}02035         \textcolor{keywordflow}{for} (i = 0; i < nitems(\mbox{\hyperlink{if__ural_8c_a60a25ffc298e1910997dc61fcf81d49b}{ural\_def\_mac}}); i++)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02036}02036                 \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, \mbox{\hyperlink{if__ural_8c_a60a25ffc298e1910997dc61fcf81d49b}{ural\_def\_mac}}[i].\mbox{\hyperlink{if__ural_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, \mbox{\hyperlink{if__ural_8c_a60a25ffc298e1910997dc61fcf81d49b}{ural\_def\_mac}}[i].\mbox{\hyperlink{if__ural_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02037}02037 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02038}02038         \textcolor{comment}{/* wait for BBP and RF to wake up (this can take a long time!) */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02039}02039         \textcolor{keywordflow}{for} (ntries = 0; ntries < 100; ntries++) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02040}02040                 tmp = \mbox{\hyperlink{if__ural_8c_a7913027ad070d91c902a3ea1ee1bd909}{ural\_read}}(sc, \mbox{\hyperlink{if__uralreg_8h_ad5f4008b1204882630a19bf0df760211}{RAL\_MAC\_CSR17}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02041}02041                 \textcolor{keywordflow}{if} ((tmp \& (\mbox{\hyperlink{if__uralreg_8h_a1603b2fe06ed2a14320620e1940cc609}{RAL\_BBP\_AWAKE}} | \mbox{\hyperlink{if__uralreg_8h_a34dd1ed63a8adfdb87859c010b4d2699}{RAL\_RF\_AWAKE}})) ==}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02042}02042                     (\mbox{\hyperlink{if__uralreg_8h_a1603b2fe06ed2a14320620e1940cc609}{RAL\_BBP\_AWAKE}} | \mbox{\hyperlink{if__uralreg_8h_a34dd1ed63a8adfdb87859c010b4d2699}{RAL\_RF\_AWAKE}}))}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02043}02043                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02044}02044                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_aed23bee71d5b051318db64dbd2754f98}{ural\_pause}}(sc, hz / 100))}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02045}02045                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02046}02046         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02047}02047         \textcolor{keywordflow}{if} (ntries == 100) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02048}02048                 device\_printf(sc-\/>\mbox{\hyperlink{structural__softc_a9d89d62867ac69a1180cd469ba1e8492}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02049}02049                     \textcolor{stringliteral}{"{}timeout waiting for BBP/RF to wakeup\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02050}02050                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02051}02051         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02052}02052 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02053}02053         \textcolor{comment}{/* we're ready! */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02054}02054         \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_ab15edbec05a44d69c4a5000e154a6205}{RAL\_MAC\_CSR1}}, \mbox{\hyperlink{if__uralreg_8h_a266b90a5846903a3718b02a1c9a5c6ff}{RAL\_HOST\_READY}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02055}02055 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02056}02056         \textcolor{comment}{/* set basic rate set (will be updated later) */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02057}02057         \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a4f7706256506b33e7344ffe0e2aa2c63}{RAL\_TXRX\_CSR11}}, 0x15f);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02058}02058 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02059}02059         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a61a726e84904ea899e21d4e5959fa701}{ural\_bbp\_init}}(sc) != 0)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02060}02060                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02061}02061 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02062}02062         \mbox{\hyperlink{if__ural_8c_a7dc1bc79b36d2cbe582c14cfd283e1f7}{ural\_set\_chan}}(sc, ic-\/>ic\_curchan);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02063}02063 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02064}02064         \textcolor{comment}{/* clear statistic registers (STA\_CSR0 to STA\_CSR10) */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02065}02065         \mbox{\hyperlink{if__ural_8c_ab72567c232af58f9f106b00874fffc46}{ural\_read\_multi}}(sc, \mbox{\hyperlink{if__uralreg_8h_ab8c7205e72d3830ef4bc2428f7ebff88}{RAL\_STA\_CSR0}}, sc-\/>\mbox{\hyperlink{structural__softc_a69f3c8a085ced1a2dc0654bdc975e54e}{sta}}, \textcolor{keyword}{sizeof} sc-\/>\mbox{\hyperlink{structural__softc_a69f3c8a085ced1a2dc0654bdc975e54e}{sta}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02066}02066 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02067}02067         \mbox{\hyperlink{if__ural_8c_ae0a00e3f4b3f31eb0de5675c71b8c900}{ural\_set\_txantenna}}(sc, sc-\/>\mbox{\hyperlink{structural__softc_af11c8cfb01da2def7b07281a9e5329ac}{tx\_ant}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02068}02068         \mbox{\hyperlink{if__ural_8c_a6e78710b98bd52f1621730631578f8b2}{ural\_set\_rxantenna}}(sc, sc-\/>\mbox{\hyperlink{structural__softc_a0022e9a31ed2a5668da36013c1f8e569}{rx\_ant}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02069}02069 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02070}02070         \mbox{\hyperlink{if__ural_8c_a966bdf04687fbcb3971d6fcb7669006a}{ural\_set\_macaddr}}(sc, vap ? vap-\/>iv\_myaddr : ic-\/>ic\_macaddr);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02071}02071 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02072}02072         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02073}02073 \textcolor{comment}{         * Allocate Tx and Rx xfer queues.}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02074}02074 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02075}02075         \mbox{\hyperlink{if__ural_8c_a80e4a84f8908aa9f270bdfe02ec2b129}{ural\_setup\_tx\_list}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02076}02076 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02077}02077         \textcolor{comment}{/* kick Rx */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02078}02078         tmp = \mbox{\hyperlink{if__uralreg_8h_aa60ca68abfd8c1b8c43377e76ec934ce}{RAL\_DROP\_PHY}} | \mbox{\hyperlink{if__uralreg_8h_a8e1eb3dab04675fe27c3ae8e4ab2a40a}{RAL\_DROP\_CRC}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02079}02079         \textcolor{keywordflow}{if} (ic-\/>ic\_opmode != IEEE80211\_M\_MONITOR) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02080}02080                 tmp |= \mbox{\hyperlink{if__uralreg_8h_a3c11274d8b4e5b21c51cc9e50995ac13}{RAL\_DROP\_CTL}} | \mbox{\hyperlink{if__uralreg_8h_a3d9433b7a7db3c307458445de8a78d19}{RAL\_DROP\_BAD\_VERSION}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02081}02081                 \textcolor{keywordflow}{if} (ic-\/>ic\_opmode != IEEE80211\_M\_HOSTAP)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02082}02082                         tmp |= \mbox{\hyperlink{if__uralreg_8h_acf699a7c10fa8c69ddf8415a452cf81c}{RAL\_DROP\_TODS}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02083}02083                 \textcolor{keywordflow}{if} (ic-\/>ic\_promisc == 0)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02084}02084                         tmp |= \mbox{\hyperlink{if__uralreg_8h_afd7d139ae186b385d4c135f094f7c71c}{RAL\_DROP\_NOT\_TO\_ME}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02085}02085         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02086}02086         \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a44d10ff1609b9f353ed0ce293ad73853}{RAL\_TXRX\_CSR2}}, tmp);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02087}02087 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02088}02088         sc-\/>\mbox{\hyperlink{structural__softc_a107ff634a4a6743b7a2a5c022f0d4177}{sc\_running}} = 1;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02089}02089         \mbox{\hyperlink{usb__transfer_8c_abadf9cb2f8e81a5133af0c8030039de3}{usbd\_xfer\_set\_stall}}(sc-\/>\mbox{\hyperlink{structural__softc_a3e5570470c9d66c12212993513f422f1}{sc\_xfer}}[\mbox{\hyperlink{if__uralvar_8h_a8420dba71b9cc240cf981b0bef892004a34597192b784e03fb5ae2167810e5a85}{URAL\_BULK\_WR}}]);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02090}02090         \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structural__softc_a3e5570470c9d66c12212993513f422f1}{sc\_xfer}}[\mbox{\hyperlink{if__uralvar_8h_a8420dba71b9cc240cf981b0bef892004a6136ee40df1b5c9e551e23a51d23576a}{URAL\_BULK\_RD}}]);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02091}02091         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02092}02092 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02093}02093 \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}}:       \mbox{\hyperlink{if__ural_8c_aba31e94a52762fbeea522e30e85a57fc}{ural\_stop}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02094}02094 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02095}02095 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02096}02096 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02097}\mbox{\hyperlink{if__ural_8c_aba31e94a52762fbeea522e30e85a57fc}{02097}} \mbox{\hyperlink{if__ural_8c_aba31e94a52762fbeea522e30e85a57fc}{ural\_stop}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02098}02098 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02099}02099 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02100}02100         \mbox{\hyperlink{if__uralvar_8h_a911339fbbe5d297eb64c57db121dfbe4}{RAL\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02101}02101 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02102}02102         sc-\/>\mbox{\hyperlink{structural__softc_a107ff634a4a6743b7a2a5c022f0d4177}{sc\_running}} = 0;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02103}02103 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02104}02104         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02105}02105 \textcolor{comment}{         * Drain all the transfers, if not already drained:}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02106}02106 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02107}02107         \mbox{\hyperlink{if__uralvar_8h_ad221f1259af784f868b4fcdc69bec791}{RAL\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02108}02108         \mbox{\hyperlink{usb__transfer_8c_aa525d15cc84d40dafaaecf86537e2c7f}{usbd\_transfer\_drain}}(sc-\/>\mbox{\hyperlink{structural__softc_a3e5570470c9d66c12212993513f422f1}{sc\_xfer}}[\mbox{\hyperlink{if__uralvar_8h_a8420dba71b9cc240cf981b0bef892004a34597192b784e03fb5ae2167810e5a85}{URAL\_BULK\_WR}}]);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02109}02109         \mbox{\hyperlink{usb__transfer_8c_aa525d15cc84d40dafaaecf86537e2c7f}{usbd\_transfer\_drain}}(sc-\/>\mbox{\hyperlink{structural__softc_a3e5570470c9d66c12212993513f422f1}{sc\_xfer}}[\mbox{\hyperlink{if__uralvar_8h_a8420dba71b9cc240cf981b0bef892004a6136ee40df1b5c9e551e23a51d23576a}{URAL\_BULK\_RD}}]);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02110}02110         \mbox{\hyperlink{if__uralvar_8h_a93cd0229ef9274db702bf17e863b1801}{RAL\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02111}02111 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02112}02112         \mbox{\hyperlink{if__ural_8c_add9b06d85ee2a88068a5a97e939fbc21}{ural\_unsetup\_tx\_list}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02113}02113 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02114}02114         \textcolor{comment}{/* disable Rx */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02115}02115         \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_a44d10ff1609b9f353ed0ce293ad73853}{RAL\_TXRX\_CSR2}}, \mbox{\hyperlink{if__uralreg_8h_adbadadb81c250f40cb6377e18e6f218d}{RAL\_DISABLE\_RX}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02116}02116         \textcolor{comment}{/* reset ASIC and BBP (but won't reset MAC registers!) */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02117}02117         \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_ab15edbec05a44d69c4a5000e154a6205}{RAL\_MAC\_CSR1}}, \mbox{\hyperlink{if__uralreg_8h_a8db21502b33b1f2bfba6e5e25a5b1930}{RAL\_RESET\_ASIC}} | \mbox{\hyperlink{if__uralreg_8h_a1d968a421950cfb92259ce5631f5c80c}{RAL\_RESET\_BBP}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02118}02118         \textcolor{comment}{/* wait a little */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02119}02119         \mbox{\hyperlink{if__ural_8c_aed23bee71d5b051318db64dbd2754f98}{ural\_pause}}(sc, hz / 10);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02120}02120         \mbox{\hyperlink{if__ural_8c_a6fed2d088b11a0934c88f9ec15eb9e5f}{ural\_write}}(sc, \mbox{\hyperlink{if__uralreg_8h_ab15edbec05a44d69c4a5000e154a6205}{RAL\_MAC\_CSR1}}, 0);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02121}02121         \textcolor{comment}{/* wait a little */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02122}02122         \mbox{\hyperlink{if__ural_8c_aed23bee71d5b051318db64dbd2754f98}{ural\_pause}}(sc, hz / 10);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02123}02123 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02124}02124 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02125}02125 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02126}\mbox{\hyperlink{if__ural_8c_ac6bc0aaa72c05f795836a3d8ba89088b}{02126}} \mbox{\hyperlink{if__ural_8c_ac6bc0aaa72c05f795836a3d8ba89088b}{ural\_raw\_xmit}}(\textcolor{keyword}{struct} ieee80211\_node *ni, \textcolor{keyword}{struct} mbuf *m,}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02127}02127         \textcolor{keyword}{const} \textcolor{keyword}{struct} ieee80211\_bpf\_params *params)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02128}02128 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02129}02129         \textcolor{keyword}{struct }ieee80211com *ic = ni-\/>ni\_ic;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02130}02130         \textcolor{keyword}{struct }\mbox{\hyperlink{structural__softc}{ural\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02131}02131 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02132}02132         \mbox{\hyperlink{if__uralvar_8h_a93cd0229ef9274db702bf17e863b1801}{RAL\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02133}02133         \textcolor{comment}{/* prevent management frames from being sent if we're not ready */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02134}02134         \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structural__softc_a107ff634a4a6743b7a2a5c022f0d4177}{sc\_running}}) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02135}02135                 \mbox{\hyperlink{if__uralvar_8h_ad221f1259af784f868b4fcdc69bec791}{RAL\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02136}02136                 m\_freem(m);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02137}02137                 \textcolor{keywordflow}{return} ENETDOWN;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02138}02138         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02139}02139         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structural__softc_aa8798b71126c0a52b711df7e6a4112d5}{tx\_nfree}} < \mbox{\hyperlink{if__uralvar_8h_ac8560dfe827ccd677ecabc14bb6d434c}{RAL\_TX\_MINFREE}}) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02140}02140                 \mbox{\hyperlink{if__uralvar_8h_ad221f1259af784f868b4fcdc69bec791}{RAL\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02141}02141                 m\_freem(m);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02142}02142                 \textcolor{keywordflow}{return} EIO;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02143}02143         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02144}02144 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02145}02145         \textcolor{keywordflow}{if} (params == NULL) \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02146}02146                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02147}02147 \textcolor{comment}{                 * Legacy path; interpret frame contents to decide}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02148}02148 \textcolor{comment}{                 * precisely how to send the frame.}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02149}02149 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02150}02150                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_a235f19abd4284d6cfcdaa8fa783b1ec6}{ural\_tx\_mgt}}(sc, m, ni) != 0)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02151}02151                         \textcolor{keywordflow}{goto} bad;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02152}02152         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02153}02153                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02154}02154 \textcolor{comment}{                 * Caller supplied explicit parameters to use in}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02155}02155 \textcolor{comment}{                 * sending the frame.}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02156}02156 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02157}02157                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ural_8c_af31fe933f53b4ada2fd6989fdde819d1}{ural\_tx\_raw}}(sc, m, ni, params) != 0)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02158}02158                         \textcolor{keywordflow}{goto} bad;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02159}02159         \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02160}02160         \mbox{\hyperlink{if__uralvar_8h_ad221f1259af784f868b4fcdc69bec791}{RAL\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02161}02161         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02162}02162 bad:}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02163}02163         \mbox{\hyperlink{if__uralvar_8h_ad221f1259af784f868b4fcdc69bec791}{RAL\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02164}02164         \textcolor{keywordflow}{return} EIO;             \textcolor{comment}{/* XXX */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02165}02165 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02166}02166 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02167}02167 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02168}\mbox{\hyperlink{if__ural_8c_a9c268e5610f3e3d4b6c38aa9368b33b4}{02168}} \mbox{\hyperlink{if__ural_8c_a9c268e5610f3e3d4b6c38aa9368b33b4}{ural\_ratectl\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *sc, \textcolor{keyword}{struct} ieee80211\_node *ni)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02169}02169 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02170}02170         \textcolor{keyword}{struct }ieee80211vap *vap = ni-\/>ni\_vap;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02171}02171         \textcolor{keyword}{struct }\mbox{\hyperlink{structural__vap}{ural\_vap}} *uvp = \mbox{\hyperlink{if__uralvar_8h_a237ee6dd1e0e534f3a299bda13679499}{URAL\_VAP}}(\mbox{\hyperlink{structural__vap_ae2de69589de6baa3e44db2c35f2b224e}{vap}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02172}02172 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02173}02173         \textcolor{comment}{/* clear statistic registers (STA\_CSR0 to STA\_CSR10) */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02174}02174         \mbox{\hyperlink{if__ural_8c_ab72567c232af58f9f106b00874fffc46}{ural\_read\_multi}}(sc, \mbox{\hyperlink{if__uralreg_8h_ab8c7205e72d3830ef4bc2428f7ebff88}{RAL\_STA\_CSR0}}, sc-\/>\mbox{\hyperlink{structural__softc_a69f3c8a085ced1a2dc0654bdc975e54e}{sta}}, \textcolor{keyword}{sizeof} sc-\/>\mbox{\hyperlink{structural__softc_a69f3c8a085ced1a2dc0654bdc975e54e}{sta}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02175}02175 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02176}02176         \mbox{\hyperlink{usbdi_8h_a5ba556ca3595eb8006822a123ac9d54f}{usb\_callout\_reset}}(\&uvp-\/>\mbox{\hyperlink{structural__vap_a130c9ceed1df78b6d542a26db2697e52}{ratectl\_ch}}, hz, \mbox{\hyperlink{if__ural_8c_aff321e8a5c523f6aa60152cae3d05eaf}{ural\_ratectl\_timeout}}, uvp);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02177}02177 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02178}02178 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02179}02179 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02180}\mbox{\hyperlink{if__ural_8c_aff321e8a5c523f6aa60152cae3d05eaf}{02180}} \mbox{\hyperlink{if__ural_8c_aff321e8a5c523f6aa60152cae3d05eaf}{ural\_ratectl\_timeout}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02181}02181 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02182}02182         \textcolor{keyword}{struct }\mbox{\hyperlink{structural__vap}{ural\_vap}} *uvp = arg;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02183}02183         \textcolor{keyword}{struct }ieee80211vap *vap = \&uvp-\/>\mbox{\hyperlink{structural__vap_ae2de69589de6baa3e44db2c35f2b224e}{vap}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02184}02184         \textcolor{keyword}{struct }ieee80211com *ic = vap-\/>iv\_ic;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02185}02185 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02186}02186         ieee80211\_runtask(ic, \&uvp-\/>\mbox{\hyperlink{structural__vap_ac35a2da0d7106cc98d87c6290ef33a0e}{ratectl\_task}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02187}02187 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02188}02188 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02189}02189 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02190}\mbox{\hyperlink{if__ural_8c_aa19436c74b075ce255c2cf95a62a37dd}{02190}} \mbox{\hyperlink{if__ural_8c_aa19436c74b075ce255c2cf95a62a37dd}{ural\_ratectl\_task}}(\textcolor{keywordtype}{void} *arg, \textcolor{keywordtype}{int} pending)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02191}02191 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02192}02192         \textcolor{keyword}{struct }\mbox{\hyperlink{structural__vap}{ural\_vap}} *uvp = arg;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02193}02193         \textcolor{keyword}{struct }ieee80211vap *vap = \&uvp-\/>\mbox{\hyperlink{structural__vap_ae2de69589de6baa3e44db2c35f2b224e}{vap}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02194}02194         \textcolor{keyword}{struct }\mbox{\hyperlink{structural__softc}{ural\_softc}} *sc = vap-\/>iv\_ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02195}02195         \textcolor{keyword}{struct }ieee80211\_ratectl\_tx\_stats *txs = \&sc-\/>\mbox{\hyperlink{structural__softc_a0ac5824d03ea535c9be738b3c5b2cf68}{sc\_txs}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02196}02196         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02197}02197 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02198}02198         \mbox{\hyperlink{if__uralvar_8h_a93cd0229ef9274db702bf17e863b1801}{RAL\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02199}02199         \textcolor{comment}{/* read and clear statistic registers (STA\_CSR0 to STA\_CSR10) */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02200}02200         \mbox{\hyperlink{if__ural_8c_ab72567c232af58f9f106b00874fffc46}{ural\_read\_multi}}(sc, \mbox{\hyperlink{if__uralreg_8h_ab8c7205e72d3830ef4bc2428f7ebff88}{RAL\_STA\_CSR0}}, sc-\/>\mbox{\hyperlink{structural__softc_a69f3c8a085ced1a2dc0654bdc975e54e}{sta}}, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structural__softc_a69f3c8a085ced1a2dc0654bdc975e54e}{sta}}));}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02201}02201 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02202}02202         txs-\/>flags = IEEE80211\_RATECTL\_TX\_STATS\_RETRIES;}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02203}02203         txs-\/>nsuccess = sc-\/>\mbox{\hyperlink{structural__softc_a69f3c8a085ced1a2dc0654bdc975e54e}{sta}}[7] + \textcolor{comment}{/* TX ok w/o retry */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02204}02204                         sc-\/>\mbox{\hyperlink{structural__softc_a69f3c8a085ced1a2dc0654bdc975e54e}{sta}}[8];  \textcolor{comment}{/* TX ok w/ retry */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02205}02205         \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}} = sc-\/>\mbox{\hyperlink{structural__softc_a69f3c8a085ced1a2dc0654bdc975e54e}{sta}}[9];               \textcolor{comment}{/* TX retry-\/fail count */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02206}02206         txs-\/>nframes = txs-\/>nsuccess + \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02207}02207         \textcolor{comment}{/* XXX fail * maxretry */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02208}02208         txs-\/>nretries = sc-\/>\mbox{\hyperlink{structural__softc_a69f3c8a085ced1a2dc0654bdc975e54e}{sta}}[8] + \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02209}02209 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02210}02210         ieee80211\_ratectl\_tx\_update(vap, txs);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02211}02211 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02212}02212         \textcolor{comment}{/* count TX retry-\/fail as Tx errors */}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02213}02213         if\_inc\_counter(vap-\/>iv\_ifp, IFCOUNTER\_OERRORS, \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}});}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02214}02214 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02215}02215         \mbox{\hyperlink{usbdi_8h_a5ba556ca3595eb8006822a123ac9d54f}{usb\_callout\_reset}}(\&uvp-\/>\mbox{\hyperlink{structural__vap_a130c9ceed1df78b6d542a26db2697e52}{ratectl\_ch}}, hz, \mbox{\hyperlink{if__ural_8c_aff321e8a5c523f6aa60152cae3d05eaf}{ural\_ratectl\_timeout}}, uvp);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02216}02216         \mbox{\hyperlink{if__uralvar_8h_ad221f1259af784f868b4fcdc69bec791}{RAL\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02217}02217 \}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02218}02218 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02219}02219 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02220}\mbox{\hyperlink{if__ural_8c_aed23bee71d5b051318db64dbd2754f98}{02220}} \mbox{\hyperlink{if__ural_8c_aed23bee71d5b051318db64dbd2754f98}{ural\_pause}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structural__softc}{ural\_softc}} *sc, \textcolor{keywordtype}{int} timeout)}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02221}02221 \{}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02222}02222 }
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02223}02223         \mbox{\hyperlink{usb__util_8c_a7ad9fc3660f5ecf96d72e499cdfeb963}{usb\_pause\_mtx}}(\&sc-\/>\mbox{\hyperlink{structural__softc_a2996ec9ed770925172b00ac947b71ce7}{sc\_mtx}}, timeout);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02224}02224         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__ural_8c_source_l02225}02225 \}}

\end{DoxyCode}
