\hypertarget{if__rsu_8c_source}{}\doxysection{if\+\_\+rsu.\+c}
\label{if__rsu_8c_source}\index{dev/usb/wlan/if\_rsu.c@{dev/usb/wlan/if\_rsu.c}}
\mbox{\hyperlink{if__rsu_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00001}00001 \textcolor{comment}{/*      \$OpenBSD: if\_rsu.c,v 1.17 2013/04/15 09:23:01 mglocker Exp \$    */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00002}00002 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00003}00003 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00005}00005 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00006}00006 \textcolor{comment}{ * Permission to use, copy, modify, and distribute this software for any}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00007}00007 \textcolor{comment}{ * purpose with or without fee is hereby granted, provided that the above}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00008}00008 \textcolor{comment}{ * copyright notice and this permission notice appear in all copies.}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00009}00009 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00010}00010 \textcolor{comment}{ * THE SOFTWARE IS PROVIDED "{}AS IS"{} AND THE AUTHOR DISCLAIMS ALL WARRANTIES}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00011}00011 \textcolor{comment}{ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00012}00012 \textcolor{comment}{ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00013}00013 \textcolor{comment}{ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00014}00014 \textcolor{comment}{ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00015}00015 \textcolor{comment}{ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00016}00016 \textcolor{comment}{ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00017}00017 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00018}00018 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00019}\mbox{\hyperlink{if__rsu_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00019}} \mbox{\hyperlink{if__rsu_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00020}00020 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00021}00021 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00022}00022 \textcolor{comment}{ * Driver for Realtek RTL8188SU/RTL8191SU/RTL8192SU.}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00023}00023 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00024}00024 \textcolor{comment}{ * TODO:}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00025}00025 \textcolor{comment}{ *   o tx a-\/mpdu}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00026}00026 \textcolor{comment}{ *   o hostap / ibss / mesh}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00027}00027 \textcolor{comment}{ *   o power-\/save operation}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00028}00028 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00029}00029 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00030}00030 \textcolor{preprocessor}{\#include "{}opt\_wlan.h"{}}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00031}00031 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00032}00032 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00033}00033 \textcolor{preprocessor}{\#include <sys/endian.h>}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00034}00034 \textcolor{preprocessor}{\#include <sys/sockio.h>}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00035}00035 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00036}00036 \textcolor{preprocessor}{\#include <sys/mbuf.h>}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00037}00037 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00038}00038 \textcolor{preprocessor}{\#include <sys/socket.h>}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00039}00039 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00040}00040 \textcolor{preprocessor}{\#include <sys/conf.h>}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00041}00041 \textcolor{preprocessor}{\#include <sys/bus.h>}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00042}00042 \textcolor{preprocessor}{\#include <sys/firmware.h>}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00043}00043 \textcolor{preprocessor}{\#include <sys/module.h>}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00044}00044 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00045}00045 \textcolor{preprocessor}{\#include <net/bpf.h>}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00046}00046 \textcolor{preprocessor}{\#include <net/if.h>}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00047}00047 \textcolor{preprocessor}{\#include <net/if\_var.h>}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00048}00048 \textcolor{preprocessor}{\#include <net/if\_arp.h>}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00049}00049 \textcolor{preprocessor}{\#include <net/if\_dl.h>}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00050}00050 \textcolor{preprocessor}{\#include <net/if\_media.h>}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00051}00051 \textcolor{preprocessor}{\#include <net/if\_types.h>}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00052}00052 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00053}00053 \textcolor{preprocessor}{\#include <netinet/in.h>}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00054}00054 \textcolor{preprocessor}{\#include <netinet/in\_systm.h>}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00055}00055 \textcolor{preprocessor}{\#include <netinet/in\_var.h>}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00056}00056 \textcolor{preprocessor}{\#include <netinet/if\_ether.h>}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00057}00057 \textcolor{preprocessor}{\#include <netinet/ip.h>}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00058}00058 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00059}00059 \textcolor{preprocessor}{\#include <net80211/ieee80211\_var.h>}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00060}00060 \textcolor{preprocessor}{\#include <net80211/ieee80211\_regdomain.h>}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00061}00061 \textcolor{preprocessor}{\#include <net80211/ieee80211\_radiotap.h>}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00062}00062 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00063}00063 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb_8h}{dev/usb/usb.h}}>}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00064}00064 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usbdi_8h}{dev/usb/usbdi.h}}>}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00065}00065 \textcolor{preprocessor}{\#include "{}usbdevs.h"{}}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00066}00066 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00067}00067 \textcolor{preprocessor}{\#include <dev/rtwn/if\_rtwn\_ridx.h>}      \textcolor{comment}{/* XXX */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00068}00068 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{if__rsureg_8h}{dev/usb/wlan/if\_rsureg.h}}>}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00069}00069 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00070}\mbox{\hyperlink{if__rsu_8c_a5b1086b7fa13924458bac3c6045d60de}{00070}} \textcolor{preprocessor}{\#define RSU\_RATE\_IS\_CCK RTWN\_RATE\_IS\_CCK}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00071}00071 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00072}00072 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00073}00073 \textcolor{keyword}{static} \textcolor{keywordtype}{int} rsu\_debug = 0;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00074}00074 \mbox{\hyperlink{dwc__otg_8c_a58e125bcf985ce2333baef42f97b33b3}{SYSCTL\_NODE}}(\_hw\_usb, OID\_AUTO, rsu, CTLFLAG\_RW | CTLFLAG\_MPSAFE, 0,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00075}00075     \textcolor{stringliteral}{"{}USB rsu"{}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00076}00076 \mbox{\hyperlink{dwc__otg_8c_a83d020f0b15dc2783f3f1a6966c75e36}{SYSCTL\_INT}}(\_hw\_usb\_rsu, OID\_AUTO, \mbox{\hyperlink{cfumass_8c_ac3e1795766a80ec63b157951b4b9a7d4}{debug}}, CTLFLAG\_RWTUN, \&rsu\_debug, 0,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00077}00077     \textcolor{stringliteral}{"{}Debug level"{}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00078}00078 \textcolor{preprocessor}{\#define RSU\_DPRINTF(\_sc, \_flg, ...)                                     \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00079}00079 \textcolor{preprocessor}{        do                                                              \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00080}00080 \textcolor{preprocessor}{                if (((\_flg) == (RSU\_DEBUG\_ANY)) || (rsu\_debug \& (\_flg))) \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00081}00081 \textcolor{preprocessor}{                        device\_printf((\_sc)-\/>sc\_dev, \_\_VA\_ARGS\_\_);      \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00082}00082 \textcolor{preprocessor}{        while (0)}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00083}00083 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00084}\mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{00084}} \textcolor{preprocessor}{\#define RSU\_DPRINTF(\_sc, \_flg, ...)}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00085}00085 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00086}00086 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00087}\mbox{\hyperlink{if__rsu_8c_a382c2d926a83da0d976cb08c61cd9741}{00087}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{if__rsu_8c_a382c2d926a83da0d976cb08c61cd9741}{rsu\_enable\_11n}} = 1;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00088}\mbox{\hyperlink{if__rsu_8c_a2628d654037f43b19dfe0cd0d0b72eb9}{00088}} \mbox{\hyperlink{if__rsu_8c_a2628d654037f43b19dfe0cd0d0b72eb9}{TUNABLE\_INT}}(\textcolor{stringliteral}{"{}hw.usb.rsu.enable\_11n"{}}, \&\mbox{\hyperlink{if__rsu_8c_a382c2d926a83da0d976cb08c61cd9741}{rsu\_enable\_11n}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00089}00089 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00090}\mbox{\hyperlink{if__rsu_8c_ac1122c0f4f785bdbad53926f38201847}{00090}} \textcolor{preprocessor}{\#define RSU\_DEBUG\_ANY           0xffffffff}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00091}\mbox{\hyperlink{if__rsu_8c_a038e3dcd0fb5266c1184770947cceaab}{00091}} \textcolor{preprocessor}{\#define RSU\_DEBUG\_TX            0x00000001}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00092}\mbox{\hyperlink{if__rsu_8c_a2c4ce8fa1fcca611091ffa09de80b878}{00092}} \textcolor{preprocessor}{\#define RSU\_DEBUG\_RX            0x00000002}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00093}\mbox{\hyperlink{if__rsu_8c_a09a67fdd4c21366cb6b0691e667fdce6}{00093}} \textcolor{preprocessor}{\#define RSU\_DEBUG\_RESET         0x00000004}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00094}\mbox{\hyperlink{if__rsu_8c_a77bae8a49857fb519c7a2628373f3297}{00094}} \textcolor{preprocessor}{\#define RSU\_DEBUG\_CALIB         0x00000008}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00095}\mbox{\hyperlink{if__rsu_8c_a9613ad7ae941ad16f1af7a7b64c94b51}{00095}} \textcolor{preprocessor}{\#define RSU\_DEBUG\_STATE         0x00000010}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00096}\mbox{\hyperlink{if__rsu_8c_aee40def35d0f7bc3712d3f2eedbcf843}{00096}} \textcolor{preprocessor}{\#define RSU\_DEBUG\_SCAN          0x00000020}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00097}\mbox{\hyperlink{if__rsu_8c_a1b821762ca600087d89f818174fbf23f}{00097}} \textcolor{preprocessor}{\#define RSU\_DEBUG\_FWCMD         0x00000040}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00098}\mbox{\hyperlink{if__rsu_8c_ae7bc60a03a3ab817c0fa863054732dbf}{00098}} \textcolor{preprocessor}{\#define RSU\_DEBUG\_TXDONE        0x00000080}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00099}\mbox{\hyperlink{if__rsu_8c_a0d95e435d48d69eb1acb08278b237da9}{00099}} \textcolor{preprocessor}{\#define RSU\_DEBUG\_FW            0x00000100}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00100}\mbox{\hyperlink{if__rsu_8c_adee9143c379dd8aac25f9ebd8447574b}{00100}} \textcolor{preprocessor}{\#define RSU\_DEBUG\_FWDBG         0x00000200}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00101}\mbox{\hyperlink{if__rsu_8c_a3e742fa1f3739636ca3c3eb2893960fa}{00101}} \textcolor{preprocessor}{\#define RSU\_DEBUG\_AMPDU         0x00000400}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00102}\mbox{\hyperlink{if__rsu_8c_a842d6f48715b4d5a7600eb26a322c0c2}{00102}} \textcolor{preprocessor}{\#define RSU\_DEBUG\_KEY           0x00000800}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00103}\mbox{\hyperlink{if__rsu_8c_a0d1e97f6820a1de91b6c029eb0f13f5f}{00103}} \textcolor{preprocessor}{\#define RSU\_DEBUG\_USB           0x00001000}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00104}00104 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00105}\mbox{\hyperlink{if__rsu_8c_a5e03b93b8e0886c84eed0d95ddf4d76f}{00105}} \textcolor{keyword}{static} \textcolor{keyword}{const} \mbox{\hyperlink{usbdi_8h_acf836fd8d6349b66a31f45420728da8d}{STRUCT\_USB\_HOST\_ID}} \mbox{\hyperlink{if__rsu_8c_a5e03b93b8e0886c84eed0d95ddf4d76f}{rsu\_devs}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00106}00106 \textcolor{preprocessor}{\#define RSU\_HT\_NOT\_SUPPORTED 0}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00107}00107 \textcolor{preprocessor}{\#define RSU\_HT\_SUPPORTED 1}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00108}00108 \textcolor{preprocessor}{\#define RSU\_DEV\_HT(v,p)  \{ USB\_VPI(USB\_VENDOR\_\#\#v, USB\_PRODUCT\_\#\#v\#\#\_\#\#p, \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00109}00109 \textcolor{preprocessor}{                                   RSU\_HT\_SUPPORTED) \}}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00110}00110 \textcolor{preprocessor}{\#define RSU\_DEV(v,p)     \{ USB\_VPI(USB\_VENDOR\_\#\#v, USB\_PRODUCT\_\#\#v\#\#\_\#\#p, \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00111}00111 \textcolor{preprocessor}{                                   RSU\_HT\_NOT\_SUPPORTED) \}}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00112}00112         \mbox{\hyperlink{if__rsu_8c_a9cf94e89f13406ec93c24f71c3b8fb5c}{RSU\_DEV}}(ASUS,                    RTL8192SU),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00113}00113         \mbox{\hyperlink{if__rsu_8c_a9cf94e89f13406ec93c24f71c3b8fb5c}{RSU\_DEV}}(AZUREWAVE,               RTL8192SU\_4),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00114}00114         \mbox{\hyperlink{if__rsu_8c_a9cf94e89f13406ec93c24f71c3b8fb5c}{RSU\_DEV}}(SITECOMEU,               WLA1000),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00115}00115         \mbox{\hyperlink{if__rsu_8c_a3043a6910281d4a95104ada028a22182}{RSU\_DEV\_HT}}(ACCTON,            RTL8192SU),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00116}00116         \mbox{\hyperlink{if__rsu_8c_a3043a6910281d4a95104ada028a22182}{RSU\_DEV\_HT}}(ASUS,              USBN10),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00117}00117         \mbox{\hyperlink{if__rsu_8c_a3043a6910281d4a95104ada028a22182}{RSU\_DEV\_HT}}(AZUREWAVE,         RTL8192SU\_1),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00118}00118         \mbox{\hyperlink{if__rsu_8c_a3043a6910281d4a95104ada028a22182}{RSU\_DEV\_HT}}(AZUREWAVE,         RTL8192SU\_2),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00119}00119         \mbox{\hyperlink{if__rsu_8c_a3043a6910281d4a95104ada028a22182}{RSU\_DEV\_HT}}(AZUREWAVE,         RTL8192SU\_3),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00120}00120         \mbox{\hyperlink{if__rsu_8c_a3043a6910281d4a95104ada028a22182}{RSU\_DEV\_HT}}(AZUREWAVE,         RTL8192SU\_5),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00121}00121         \mbox{\hyperlink{if__rsu_8c_a3043a6910281d4a95104ada028a22182}{RSU\_DEV\_HT}}(BELKIN,            RTL8192SU\_1),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00122}00122         \mbox{\hyperlink{if__rsu_8c_a3043a6910281d4a95104ada028a22182}{RSU\_DEV\_HT}}(BELKIN,            RTL8192SU\_2),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00123}00123         \mbox{\hyperlink{if__rsu_8c_a3043a6910281d4a95104ada028a22182}{RSU\_DEV\_HT}}(BELKIN,            RTL8192SU\_3),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00124}00124         \mbox{\hyperlink{if__rsu_8c_a3043a6910281d4a95104ada028a22182}{RSU\_DEV\_HT}}(CONCEPTRONIC2,     RTL8192SU\_1),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00125}00125         \mbox{\hyperlink{if__rsu_8c_a3043a6910281d4a95104ada028a22182}{RSU\_DEV\_HT}}(CONCEPTRONIC2,     RTL8192SU\_2),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00126}00126         \mbox{\hyperlink{if__rsu_8c_a3043a6910281d4a95104ada028a22182}{RSU\_DEV\_HT}}(CONCEPTRONIC2,     RTL8192SU\_3),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00127}00127         \mbox{\hyperlink{if__rsu_8c_a3043a6910281d4a95104ada028a22182}{RSU\_DEV\_HT}}(COREGA,            RTL8192SU),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00128}00128         \mbox{\hyperlink{if__rsu_8c_a3043a6910281d4a95104ada028a22182}{RSU\_DEV\_HT}}(DLINK2,            DWA131A1),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00129}00129         \mbox{\hyperlink{if__rsu_8c_a3043a6910281d4a95104ada028a22182}{RSU\_DEV\_HT}}(DLINK2,            RTL8192SU\_1),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00130}00130         \mbox{\hyperlink{if__rsu_8c_a3043a6910281d4a95104ada028a22182}{RSU\_DEV\_HT}}(DLINK2,            RTL8192SU\_2),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00131}00131         \mbox{\hyperlink{if__rsu_8c_a3043a6910281d4a95104ada028a22182}{RSU\_DEV\_HT}}(EDIMAX,            RTL8192SU\_1),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00132}00132         \mbox{\hyperlink{if__rsu_8c_a3043a6910281d4a95104ada028a22182}{RSU\_DEV\_HT}}(EDIMAX,            RTL8192SU\_2),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00133}00133         \mbox{\hyperlink{if__rsu_8c_a3043a6910281d4a95104ada028a22182}{RSU\_DEV\_HT}}(EDIMAX,            EW7622UMN),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00134}00134         \mbox{\hyperlink{if__rsu_8c_a3043a6910281d4a95104ada028a22182}{RSU\_DEV\_HT}}(GUILLEMOT,         HWGUN54),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00135}00135         \mbox{\hyperlink{if__rsu_8c_a3043a6910281d4a95104ada028a22182}{RSU\_DEV\_HT}}(GUILLEMOT,         HWNUM300),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00136}00136         \mbox{\hyperlink{if__rsu_8c_a3043a6910281d4a95104ada028a22182}{RSU\_DEV\_HT}}(HAWKING,           RTL8192SU\_1),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00137}00137         \mbox{\hyperlink{if__rsu_8c_a3043a6910281d4a95104ada028a22182}{RSU\_DEV\_HT}}(HAWKING,           RTL8192SU\_2),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00138}00138         \mbox{\hyperlink{if__rsu_8c_a3043a6910281d4a95104ada028a22182}{RSU\_DEV\_HT}}(PLANEX2,           GWUSNANO),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00139}00139         \mbox{\hyperlink{if__rsu_8c_a3043a6910281d4a95104ada028a22182}{RSU\_DEV\_HT}}(REALTEK,           RTL8171),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00140}00140         \mbox{\hyperlink{if__rsu_8c_a3043a6910281d4a95104ada028a22182}{RSU\_DEV\_HT}}(REALTEK,           RTL8172),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00141}00141         \mbox{\hyperlink{if__rsu_8c_a3043a6910281d4a95104ada028a22182}{RSU\_DEV\_HT}}(REALTEK,           RTL8173),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00142}00142         \mbox{\hyperlink{if__rsu_8c_a3043a6910281d4a95104ada028a22182}{RSU\_DEV\_HT}}(REALTEK,           RTL8174),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00143}00143         \mbox{\hyperlink{if__rsu_8c_a3043a6910281d4a95104ada028a22182}{RSU\_DEV\_HT}}(REALTEK,           RTL8192SU),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00144}00144         \mbox{\hyperlink{if__rsu_8c_a3043a6910281d4a95104ada028a22182}{RSU\_DEV\_HT}}(REALTEK,           RTL8712),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00145}00145         \mbox{\hyperlink{if__rsu_8c_a3043a6910281d4a95104ada028a22182}{RSU\_DEV\_HT}}(REALTEK,           RTL8713),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00146}00146         \mbox{\hyperlink{if__rsu_8c_a3043a6910281d4a95104ada028a22182}{RSU\_DEV\_HT}}(SENAO,             RTL8192SU\_1),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00147}00147         \mbox{\hyperlink{if__rsu_8c_a3043a6910281d4a95104ada028a22182}{RSU\_DEV\_HT}}(SENAO,             RTL8192SU\_2),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00148}00148         \mbox{\hyperlink{if__rsu_8c_a3043a6910281d4a95104ada028a22182}{RSU\_DEV\_HT}}(SITECOMEU,         WL349V1),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00149}00149         \mbox{\hyperlink{if__rsu_8c_a3043a6910281d4a95104ada028a22182}{RSU\_DEV\_HT}}(SITECOMEU,         WL353),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00150}00150         \mbox{\hyperlink{if__rsu_8c_a3043a6910281d4a95104ada028a22182}{RSU\_DEV\_HT}}(SWEEX2,            LW154),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00151}00151         \mbox{\hyperlink{if__rsu_8c_a3043a6910281d4a95104ada028a22182}{RSU\_DEV\_HT}}(TRENDNET,          TEW646UBH),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00152}00152 \textcolor{preprocessor}{\#undef RSU\_DEV\_HT}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00153}00153 \textcolor{preprocessor}{\#undef RSU\_DEV}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00154}00154 \};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00155}00155 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00156}\mbox{\hyperlink{if__rsu_8c_a85e75752c3b801ce176495338a6dc865}{00156}} \textcolor{keyword}{static} device\_probe\_t   \mbox{\hyperlink{if__rsu_8c_a85e75752c3b801ce176495338a6dc865}{rsu\_match}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00157}\mbox{\hyperlink{if__rsu_8c_a300ebbe5b09c96642ea01aace9a725e8}{00157}} \textcolor{keyword}{static} device\_attach\_t  \mbox{\hyperlink{if__rsu_8c_a300ebbe5b09c96642ea01aace9a725e8}{rsu\_attach}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00158}\mbox{\hyperlink{if__rsu_8c_ae1b5e401165c3f41e517d1c0e258fb07}{00158}} \textcolor{keyword}{static} device\_detach\_t  \mbox{\hyperlink{if__rsu_8c_ae1b5e401165c3f41e517d1c0e258fb07}{rsu\_detach}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00159}\mbox{\hyperlink{if__rsu_8c_a4d31e0ca40fdd48925ca7225fd0940b9}{00159}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}}   \mbox{\hyperlink{if__rsu_8c_a4d31e0ca40fdd48925ca7225fd0940b9}{rsu\_bulk\_tx\_callback\_be\_bk}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00160}\mbox{\hyperlink{if__rsu_8c_ad489e6f6819ca525facaeefc9a16e075}{00160}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}}   \mbox{\hyperlink{if__rsu_8c_ad489e6f6819ca525facaeefc9a16e075}{rsu\_bulk\_tx\_callback\_vi\_vo}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00161}\mbox{\hyperlink{if__rsu_8c_a1b4a02a92dd79a36a16eade3c68b459f}{00161}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}}   \mbox{\hyperlink{if__rsu_8c_a1b4a02a92dd79a36a16eade3c68b459f}{rsu\_bulk\_tx\_callback\_h2c}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00162}\mbox{\hyperlink{if__rsu_8c_a6e4326e6cf09dbdcb5c76f437eded664}{00162}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}}   \mbox{\hyperlink{if__rsu_8c_a6e4326e6cf09dbdcb5c76f437eded664}{rsu\_bulk\_rx\_callback}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00163}00163 \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}}   \mbox{\hyperlink{if__rsu_8c_a2567a7ad7f1eb6ac0b6479cc9dca5fe4}{rsu\_do\_request}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00164}00164                             \textcolor{keyword}{struct} \mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} *, \textcolor{keywordtype}{void} *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00165}00165 \textcolor{keyword}{static} \textcolor{keyword}{struct }ieee80211vap *}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00166}\mbox{\hyperlink{if__rsu_8c_ac040a7f98c2a22d54aaaac9c7633902c}{00166}}                 \mbox{\hyperlink{if__rsu_8c_ac040a7f98c2a22d54aaaac9c7633902c}{rsu\_vap\_create}}(\textcolor{keyword}{struct} ieee80211com *, \textcolor{keyword}{const} \textcolor{keywordtype}{char} name[],}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00167}00167                     \textcolor{keywordtype}{int}, \textcolor{keyword}{enum} ieee80211\_opmode, \textcolor{keywordtype}{int}, \textcolor{keyword}{const} uint8\_t bssid[],}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00168}00168                     \textcolor{keyword}{const} uint8\_t mac[]);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00169}00169 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__rsu_8c_a18b50f3791a759bb41c18f93e55d254d}{rsu\_vap\_delete}}(\textcolor{keyword}{struct} ieee80211vap *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00170}00170 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__rsu_8c_a4cb94d1cb04135e7cc75800391c27680}{rsu\_scan\_start}}(\textcolor{keyword}{struct} ieee80211com *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00171}00171 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__rsu_8c_a6ab24c2af3fd64f9434c17f73e706a3c}{rsu\_scan\_end}}(\textcolor{keyword}{struct} ieee80211com *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00172}00172 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__rsu_8c_a17ae57abecad7edb2c93140e72d246e4}{rsu\_getradiocaps}}(\textcolor{keyword}{struct} ieee80211com *, \textcolor{keywordtype}{int}, \textcolor{keywordtype}{int} *,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00173}00173                     \textcolor{keyword}{struct} ieee80211\_channel[]);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00174}00174 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__rsu_8c_a163efc4822d99a553569c063d2691158}{rsu\_set\_channel}}(\textcolor{keyword}{struct} ieee80211com *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00175}00175 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__rsu_8c_ac3b9aa6ae387056e6c8b491965d3d215}{rsu\_scan\_curchan}}(\textcolor{keyword}{struct} ieee80211\_scan\_state *, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00176}00176 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__rsu_8c_ace47cb3b5413fb8f0f8bfbb7edc8f61e}{rsu\_scan\_mindwell}}(\textcolor{keyword}{struct} ieee80211\_scan\_state *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00177}00177 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__rsu_8c_a4947e8c49a3ed16f432704642340a80f}{rsu\_update\_promisc}}(\textcolor{keyword}{struct} ieee80211com *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00178}00178 \textcolor{keyword}{static} uint8\_t  \mbox{\hyperlink{if__rsu_8c_abfd373c7ab64d01a15c2b39baaf73bcb}{rsu\_get\_multi\_pos}}(\textcolor{keyword}{const} uint8\_t[]);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00179}00179 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__rsu_8c_ae2ba5c5cc9b037a2b4f1b75f47b0d95e}{rsu\_set\_multi}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00180}00180 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__rsu_8c_a170330f1f6f81374e015eeea4c6a858a}{rsu\_update\_mcast}}(\textcolor{keyword}{struct} ieee80211com *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00181}00181 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__rsu_8c_a93275f0068dcf127385a594e43f1f2ae}{rsu\_alloc\_rx\_list}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00182}00182 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__rsu_8c_a061b2cb0418ed3e514543acc5e409425}{rsu\_free\_rx\_list}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00183}00183 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__rsu_8c_a413728d936018cf56ee3311859745e44}{rsu\_alloc\_tx\_list}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00184}00184 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__rsu_8c_a5b790c202a8799601e097d890275dc7a}{rsu\_free\_tx\_list}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00185}00185 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__rsu_8c_ae27132a0ad83742d43dbd176db050a23}{rsu\_free\_list}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *, \textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__data}{rsu\_data}} [], \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00186}00186 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__data}{rsu\_data}} *\mbox{\hyperlink{if__rsu_8c_ac7e7abc1f67f4ffa65ea9779c045f93e}{\_rsu\_getbuf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00187}00187 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__data}{rsu\_data}} *\mbox{\hyperlink{if__rsu_8c_a13eb301a8bdf61624acff9e3b4e4c1c4}{rsu\_getbuf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00188}00188 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__rsu_8c_a74136760c03cfc36cda9847b7e8dde65}{rsu\_freebuf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *, \textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__data}{rsu\_data}} *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00189}00189 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__rsu_8c_a023000c2a50143efcf337d36caee9245}{rsu\_write\_region\_1}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *, uint16\_t, uint8\_t *,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00190}00190                     \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00191}00191 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *, uint16\_t, uint8\_t);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00192}00192 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__rsu_8c_adfff5565daadbabd674ba3dd1e7a48bc}{rsu\_write\_2}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *, uint16\_t, uint16\_t);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00193}00193 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__rsu_8c_abf65ff90f534d06c7131e43ace2e7d5e}{rsu\_write\_4}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *, uint16\_t, uint32\_t);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00194}00194 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__rsu_8c_a0d9d0eb1a2b22d4c85f0ef346b7b8365}{rsu\_read\_region\_1}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *, uint16\_t, uint8\_t *,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00195}00195                     \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00196}00196 \textcolor{keyword}{static} uint8\_t  \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *, uint16\_t);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00197}00197 \textcolor{keyword}{static} uint16\_t \mbox{\hyperlink{if__rsu_8c_ae642a30fa954c7978f0ff24859d7a7a9}{rsu\_read\_2}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *, uint16\_t);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00198}00198 \textcolor{keyword}{static} uint32\_t \mbox{\hyperlink{if__rsu_8c_a1741f47255e3a970e39706ca00fa428b}{rsu\_read\_4}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *, uint16\_t);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00199}00199 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__rsu_8c_a63625f25e8a3a2f4853e64df04c2f400}{rsu\_fw\_iocmd}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *, uint32\_t);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00200}00200 \textcolor{keyword}{static} uint8\_t  \mbox{\hyperlink{if__rsu_8c_ab934e99c6309121280bdc77e7903b9fe}{rsu\_efuse\_read\_1}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *, uint16\_t);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00201}00201 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__rsu_8c_a76b90045b8aa7fc2bced44c208c4a7f6}{rsu\_read\_rom}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00202}00202 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__rsu_8c_a4ec7d2ccf04c77a70f082a7905f2fca3}{rsu\_fw\_cmd}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *, uint8\_t, \textcolor{keywordtype}{void} *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00203}\mbox{\hyperlink{if__rsu_8c_a4400148497f18539b05a819ebbff03d2}{00203}} \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__rsu_8c_a4400148497f18539b05a819ebbff03d2}{rsu\_calib\_task}}(\textcolor{keywordtype}{void} *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00204}\mbox{\hyperlink{if__rsu_8c_a01295ab8e5ccf28cfa62baf8c82a5be6}{00204}} \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__rsu_8c_a01295ab8e5ccf28cfa62baf8c82a5be6}{rsu\_tx\_task}}(\textcolor{keywordtype}{void} *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00205}00205 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__rsu_8c_ae0e4b5fc19ce4aa365f3d97863de692e}{rsu\_set\_led}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00206}00206 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__rsu_8c_a1971426ed761530b177258326d60651f}{rsu\_monitor\_newstate}}(\textcolor{keyword}{struct} ieee80211vap *,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00207}00207                     \textcolor{keyword}{enum} ieee80211\_state, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00208}00208 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__rsu_8c_ab35ac04de73cd52360037094c1fcde8f}{rsu\_newstate}}(\textcolor{keyword}{struct} ieee80211vap *, \textcolor{keyword}{enum} ieee80211\_state, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00209}00209 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__rsu_8c_a67fc315d7160ae0dac6d1376e8ef07e6}{rsu\_key\_alloc}}(\textcolor{keyword}{struct} ieee80211vap *, \textcolor{keyword}{struct} ieee80211\_key *,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00210}00210                     ieee80211\_keyix *, ieee80211\_keyix *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00211}00211 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__rsu_8c_aacd6ea294fd66808a12e283aa8632fb9}{rsu\_process\_key}}(\textcolor{keyword}{struct} ieee80211vap *,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00212}00212                     \textcolor{keyword}{const} \textcolor{keyword}{struct} ieee80211\_key *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00213}00213 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__rsu_8c_a7646a6dc11dea133d5869aee8e140a42}{rsu\_key\_set}}(\textcolor{keyword}{struct} ieee80211vap *,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00214}00214                     \textcolor{keyword}{const} \textcolor{keyword}{struct} ieee80211\_key *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00215}00215 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__rsu_8c_a51eaaeb3f1e90320c06e23a6baa4753f}{rsu\_key\_delete}}(\textcolor{keyword}{struct} ieee80211vap *,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00216}00216                     \textcolor{keyword}{const} \textcolor{keyword}{struct} ieee80211\_key *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00217}00217 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__rsu_8c_a708a41d71e8829219e4ac1bbdfe5e7e5}{rsu\_cam\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *, uint8\_t, uint32\_t *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00218}00218 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__rsu_8c_afa863032ad95fa0887bbfd09f27a6728}{rsu\_cam\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *, uint8\_t, uint32\_t);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00219}00219 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__rsu_8c_afa4c9c3dae1e0e1f7daf381abaeb9dcb}{rsu\_key\_check}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *, ieee80211\_keyix, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00220}00220 \textcolor{keyword}{static} uint8\_t  \mbox{\hyperlink{if__rsu_8c_ac4ceeda61ae425339d1294a8c9c27eca}{rsu\_crypto\_mode}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *, u\_int, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00221}00221 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__rsu_8c_a291f081c5bb41f8b041d03cd8a8271a5}{rsu\_set\_key\_group}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00222}00222                     \textcolor{keyword}{const} \textcolor{keyword}{struct} ieee80211\_key *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00223}00223 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__rsu_8c_a732c743f29308dd915470ea56d3c9be6}{rsu\_set\_key\_pair}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00224}00224                     \textcolor{keyword}{const} \textcolor{keyword}{struct} ieee80211\_key *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00225}00225 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__rsu_8c_a323ce6c1d3dcd88e42c09dd8a8cb5dbd}{rsu\_reinit\_static\_keys}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00226}00226 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__rsu_8c_a4eee74285593b3b1f1ec64d5f7867d6d}{rsu\_delete\_key}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, ieee80211\_keyix);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00227}\mbox{\hyperlink{if__rsu_8c_ae7596ce81699acdab5f00650ef8b130f}{00227}} \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__rsu_8c_ae7596ce81699acdab5f00650ef8b130f}{rsu\_delete\_key\_pair\_cb}}(\textcolor{keywordtype}{void} *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00228}00228 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__rsu_8c_a1620d0b3b8c8e3a1ede0e5f165214e36}{rsu\_site\_survey}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00229}00229                     \textcolor{keyword}{struct} ieee80211\_scan\_ssid *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00230}00230 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__rsu_8c_ab7ce7ef505fef8c7aae21326eadb98fe}{rsu\_join\_bss}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *, \textcolor{keyword}{struct} ieee80211\_node *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00231}00231 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__rsu_8c_a5fd2269a06b966d419c6c5640eac8920}{rsu\_disconnect}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00232}00232 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__rsu_8c_a5c7e22b9831d6bac31b24adc1a2e0db6}{rsu\_hwrssi\_to\_rssi}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *, \textcolor{keywordtype}{int} hw\_rssi);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00233}00233 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__rsu_8c_a09ef90d0f1cc0223b2fda1242c159bd0}{rsu\_event\_survey}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *, uint8\_t *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00234}00234 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__rsu_8c_aca11b665eaf18caf2d9ccecdaff06c96}{rsu\_event\_join\_bss}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *, uint8\_t *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00235}00235 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__rsu_8c_aee95f48280c4e88f574b81ecf3ccf741}{rsu\_rx\_event}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *, uint8\_t, uint8\_t *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00236}00236 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__rsu_8c_a088f775d4cef71d6076b9584325c9066}{rsu\_rx\_multi\_event}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *, uint8\_t *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00237}00237 \textcolor{keyword}{static} int8\_t   \mbox{\hyperlink{if__rsu_8c_a1b41b89023ff47fdd7f9c5d3aed86123}{rsu\_get\_rssi}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *, \textcolor{keywordtype}{int}, \textcolor{keywordtype}{void} *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00238}00238 \textcolor{keyword}{static} \textcolor{keyword}{struct }mbuf * \mbox{\hyperlink{if__rsu_8c_aa82647d5d46d598a0a10fa22cf4b9f78}{rsu\_rx\_copy\_to\_mbuf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00239}00239                     \textcolor{keyword}{struct} \mbox{\hyperlink{structr92s__rx__stat}{r92s\_rx\_stat}} *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00240}00240 \textcolor{keyword}{static} uint32\_t \mbox{\hyperlink{if__rsu_8c_a3da0e3522f4aab655ab48dfc490befc8}{rsu\_get\_tsf\_low}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00241}00241 \textcolor{keyword}{static} uint32\_t \mbox{\hyperlink{if__rsu_8c_a1f11a652b75a508c0d4d8fce86526541}{rsu\_get\_tsf\_high}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00242}00242 \textcolor{keyword}{static} \textcolor{keyword}{struct }ieee80211\_node * \mbox{\hyperlink{if__rsu_8c_a33298ad13e4d3752b2d2d76d8e8583a4}{rsu\_rx\_frame}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *, \textcolor{keyword}{struct} mbuf *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00243}00243 \textcolor{keyword}{static} \textcolor{keyword}{struct }mbuf * \mbox{\hyperlink{if__rsu_8c_a56f1187d15fafd6d878084880d1097c3}{rsu\_rx\_multi\_frame}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *, uint8\_t *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00244}00244 \textcolor{keyword}{static} \textcolor{keyword}{struct }mbuf *}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00245}00245                 \mbox{\hyperlink{if__rsu_8c_aa47a5b8937f789c07581dbd3ec15e5f5}{rsu\_rxeof}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *, \textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__data}{rsu\_data}} *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00246}00246 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__rsu_8c_a455bea3f949b4587f2cb0aa9d129ca2e}{rsu\_txeof}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *, \textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__data}{rsu\_data}} *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00247}00247 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__rsu_8c_a72e18450413b0ba0481f6e880c4d8120}{rsu\_raw\_xmit}}(\textcolor{keyword}{struct} ieee80211\_node *, \textcolor{keyword}{struct} mbuf *, }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00248}00248                     \textcolor{keyword}{const} \textcolor{keyword}{struct} ieee80211\_bpf\_params *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00249}00249 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__rsu_8c_a7188069abd08b4369b09832181ea6646}{rsu\_rxfilter\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00250}00250 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__rsu_8c_a66f3ada15e742a73ccd37c2aa36b6f12}{rsu\_rxfilter\_set}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *, uint32\_t, uint32\_t);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00251}00251 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__rsu_8c_a65b8dc2360a4af15d1124903842049d5}{rsu\_rxfilter\_refresh}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00252}00252 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__rsu_8c_a944f30e40fb2481d7b7a0cbd53c33648}{rsu\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00253}00253 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__rsu_8c_ae979138a473dcb59902b06b5c05d27b1}{rsu\_tx\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *, \textcolor{keyword}{struct} ieee80211\_node *, }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00254}00254                     \textcolor{keyword}{struct} mbuf *, \textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__data}{rsu\_data}} *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00255}00255 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__rsu_8c_ac28409af787dc2e5bc9d6de7d060041b}{rsu\_transmit}}(\textcolor{keyword}{struct} ieee80211com *, \textcolor{keyword}{struct} mbuf *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00256}00256 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__rsu_8c_aac8bbb20bfa4ca3f9f774a3b0f41048f}{rsu\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00257}00257 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__rsu_8c_a548502146c12f7f9cce851fcc034a028}{\_rsu\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00258}00258 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__rsu_8c_a046a645893d15b1e79c1e21a8391d39d}{rsu\_ioctl\_net}}(\textcolor{keyword}{struct} ieee80211com *, u\_long, \textcolor{keywordtype}{void} *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00259}00259 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__rsu_8c_a6e29510ee7bbeaadcc10d44136fa9e3b}{rsu\_parent}}(\textcolor{keyword}{struct} ieee80211com *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00260}00260 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__rsu_8c_a6ce5725f25752c6c05ce4459a640b08a}{rsu\_stop}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00261}00261 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__rsu_8c_aa090b4eb974d6bb02fde866094f25bd0}{rsu\_ms\_delay}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00262}00262 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00263}\mbox{\hyperlink{if__rsu_8c_a400425f0c976e5676dc6f7fe484b6bb1}{00263}} \textcolor{keyword}{static} device\_method\_t \mbox{\hyperlink{if__rsu_8c_a400425f0c976e5676dc6f7fe484b6bb1}{rsu\_methods}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00264}00264         DEVMETHOD(device\_probe,         \mbox{\hyperlink{if__rsu_8c_a85e75752c3b801ce176495338a6dc865}{rsu\_match}}),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00265}00265         DEVMETHOD(device\_attach,        \mbox{\hyperlink{if__rsu_8c_a300ebbe5b09c96642ea01aace9a725e8}{rsu\_attach}}),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00266}00266         DEVMETHOD(device\_detach,        \mbox{\hyperlink{if__rsu_8c_ae1b5e401165c3f41e517d1c0e258fb07}{rsu\_detach}}),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00267}00267 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00268}00268         DEVMETHOD\_END}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00269}00269 \};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00270}00270 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00271}\mbox{\hyperlink{if__rsu_8c_a2acbe538ad2c95936aec902b16f5af75}{00271}} \textcolor{keyword}{static} driver\_t \mbox{\hyperlink{if__rsu_8c_a2acbe538ad2c95936aec902b16f5af75}{rsu\_driver}} = \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00272}00272         .name = \textcolor{stringliteral}{"{}rsu"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00273}00273         .methods = \mbox{\hyperlink{if__rsu_8c_a400425f0c976e5676dc6f7fe484b6bb1}{rsu\_methods}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00274}00274         .size = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__softc}{rsu\_softc}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00275}00275 \};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00276}00276 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00277}\mbox{\hyperlink{if__rsu_8c_a6308a65cfe0f4ea7ec5a03abebc3a739}{00277}} \textcolor{keyword}{static} devclass\_t \mbox{\hyperlink{if__rsu_8c_a6308a65cfe0f4ea7ec5a03abebc3a739}{rsu\_devclass}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00278}00278 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00279}\mbox{\hyperlink{if__rsu_8c_aa88527bae7a008a8b81ee5595fd7a99e}{00279}} \mbox{\hyperlink{if__rsu_8c_aa88527bae7a008a8b81ee5595fd7a99e}{DRIVER\_MODULE}}(rsu, uhub, \mbox{\hyperlink{if__rsu_8c_a2acbe538ad2c95936aec902b16f5af75}{rsu\_driver}}, \mbox{\hyperlink{if__rsu_8c_a6308a65cfe0f4ea7ec5a03abebc3a739}{rsu\_devclass}}, NULL, 0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00280}\mbox{\hyperlink{if__rsu_8c_a6d90826a0d39dcfe8c956ca71bfb51a3}{00280}} \mbox{\hyperlink{if__rsu_8c_a6d90826a0d39dcfe8c956ca71bfb51a3}{MODULE\_DEPEND}}(rsu, wlan, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00281}\mbox{\hyperlink{if__rsu_8c_a26901d2a5dedec7666468c00c0227776}{00281}} \mbox{\hyperlink{if__rsu_8c_a6d90826a0d39dcfe8c956ca71bfb51a3}{MODULE\_DEPEND}}(rsu, \mbox{\hyperlink{usb__if_8m_adfa3f6da9c4881e494b180c4ebb06470}{usb}}, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00282}\mbox{\hyperlink{if__rsu_8c_a2533a5ee9ba22633cf81cadbdeaaa716}{00282}} \mbox{\hyperlink{if__rsu_8c_a6d90826a0d39dcfe8c956ca71bfb51a3}{MODULE\_DEPEND}}(rsu, firmware, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00283}\mbox{\hyperlink{if__rsu_8c_aaa2df8f18352f46ab9c892715c2a04a4}{00283}} \mbox{\hyperlink{if__rsu_8c_aaa2df8f18352f46ab9c892715c2a04a4}{MODULE\_VERSION}}(rsu, 1);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00284}\mbox{\hyperlink{if__rsu_8c_ae0e9d2721f61dd28b12e66b1c474a844}{00284}} \mbox{\hyperlink{if__rsu_8c_ae0e9d2721f61dd28b12e66b1c474a844}{USB\_PNP\_HOST\_INFO}}(\mbox{\hyperlink{if__rsu_8c_a5e03b93b8e0886c84eed0d95ddf4d76f}{rsu\_devs}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00285}00285 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00286}\mbox{\hyperlink{if__rsu_8c_a9deb6bab961ef3989d3713bebcfc8510}{00286}} \textcolor{keyword}{static} uint8\_t \mbox{\hyperlink{if__rsu_8c_a9deb6bab961ef3989d3713bebcfc8510}{rsu\_wme\_ac\_xfer\_map}}[4] = \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00287}00287         [WME\_AC\_BE] = \mbox{\hyperlink{if__rsureg_8h_aea33efd5e2c69d615faad5c5965510aaa69ace2f4c8eae39cdb71ae5da4bdd043}{RSU\_BULK\_TX\_BE\_BK}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00288}00288         [WME\_AC\_BK] = \mbox{\hyperlink{if__rsureg_8h_aea33efd5e2c69d615faad5c5965510aaa69ace2f4c8eae39cdb71ae5da4bdd043}{RSU\_BULK\_TX\_BE\_BK}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00289}00289         [WME\_AC\_VI] = \mbox{\hyperlink{if__rsureg_8h_aea33efd5e2c69d615faad5c5965510aaae7fe4538061baa3eedfd9606e81a5f46}{RSU\_BULK\_TX\_VI\_VO}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00290}00290         [WME\_AC\_VO] = \mbox{\hyperlink{if__rsureg_8h_aea33efd5e2c69d615faad5c5965510aaae7fe4538061baa3eedfd9606e81a5f46}{RSU\_BULK\_TX\_VI\_VO}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00291}00291 \};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00292}00292 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00293}00293 \textcolor{comment}{/* XXX hard-\/coded */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00294}\mbox{\hyperlink{if__rsu_8c_a97500fa871d922876eccc497e21c3997}{00294}} \textcolor{preprocessor}{\#define RSU\_H2C\_ENDPOINT        3}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00295}00295 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00296}\mbox{\hyperlink{if__rsu_8c_a1c9b0d125b539aeccd30ccde89262f7a}{00296}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__config}{usb\_config}} \mbox{\hyperlink{if__rsu_8c_a1c9b0d125b539aeccd30ccde89262f7a}{rsu\_config}}[\mbox{\hyperlink{if__rsureg_8h_aea33efd5e2c69d615faad5c5965510aaacbc9816d2e5ae5145d511ee76a7c9f9d}{RSU\_N\_TRANSFER}}] = \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00297}00297         [\mbox{\hyperlink{if__rsureg_8h_aea33efd5e2c69d615faad5c5965510aaa27135cb61a1d5a8fbaed8cda314248a7}{RSU\_BULK\_RX}}] = \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00298}00298                 .\mbox{\hyperlink{structusb__config_a5bd5d569870291a54d9bed8377ed8b10}{type}} = \mbox{\hyperlink{usb_8h_a25240fc009aa67bb7a2b635d2e9401e4}{UE\_BULK}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00299}00299                 .endpoint = \mbox{\hyperlink{usb_8h_a1e8d1f402536e634471569b83f603197}{UE\_ADDR\_ANY}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00300}00300                 .direction = \mbox{\hyperlink{usb_8h_a72bb077a860132c175c166f344c75893}{UE\_DIR\_IN}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00301}00301                 .bufsize = \mbox{\hyperlink{if__rsureg_8h_a2c4fcb6a5ce3243492bfd4c42311db85}{RSU\_RXBUFSZ}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00302}00302                 .flags = \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00303}00303                         .pipe\_bof = 1,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00304}00304                         .short\_xfer\_ok = 1}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00305}00305                 \},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00306}00306                 .callback = \mbox{\hyperlink{if__rsu_8c_a6e4326e6cf09dbdcb5c76f437eded664}{rsu\_bulk\_rx\_callback}}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00307}00307         \},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00308}00308         [\mbox{\hyperlink{if__rsureg_8h_aea33efd5e2c69d615faad5c5965510aaa69ace2f4c8eae39cdb71ae5da4bdd043}{RSU\_BULK\_TX\_BE\_BK}}] = \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00309}00309                 .type = \mbox{\hyperlink{usb_8h_a25240fc009aa67bb7a2b635d2e9401e4}{UE\_BULK}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00310}00310                 .endpoint = 0x06,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00311}00311                 .direction = \mbox{\hyperlink{usb_8h_a9a98e1bc9388db2ab5213e9d6496e851}{UE\_DIR\_OUT}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00312}00312                 .bufsize = \mbox{\hyperlink{if__rsureg_8h_a0a7a7faec12b268dfb06d8da0db55000}{RSU\_TXBUFSZ}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00313}00313                 .flags = \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00314}00314                         .ext\_buffer = 1,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00315}00315                         .pipe\_bof = 1,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00316}00316                         .force\_short\_xfer = 1}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00317}00317                 \},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00318}00318                 .callback = \mbox{\hyperlink{if__rsu_8c_a4d31e0ca40fdd48925ca7225fd0940b9}{rsu\_bulk\_tx\_callback\_be\_bk}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00319}00319                 .timeout = \mbox{\hyperlink{if__rsureg_8h_af496ea7e0106b6752e93b6617ada8313}{RSU\_TX\_TIMEOUT}}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00320}00320         \},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00321}00321         [\mbox{\hyperlink{if__rsureg_8h_aea33efd5e2c69d615faad5c5965510aaae7fe4538061baa3eedfd9606e81a5f46}{RSU\_BULK\_TX\_VI\_VO}}] = \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00322}00322                 .type = \mbox{\hyperlink{usb_8h_a25240fc009aa67bb7a2b635d2e9401e4}{UE\_BULK}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00323}00323                 .endpoint = 0x04,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00324}00324                 .direction = \mbox{\hyperlink{usb_8h_a9a98e1bc9388db2ab5213e9d6496e851}{UE\_DIR\_OUT}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00325}00325                 .bufsize = \mbox{\hyperlink{if__rsureg_8h_a0a7a7faec12b268dfb06d8da0db55000}{RSU\_TXBUFSZ}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00326}00326                 .flags = \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00327}00327                         .ext\_buffer = 1,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00328}00328                         .pipe\_bof = 1,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00329}00329                         .force\_short\_xfer = 1}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00330}00330                 \},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00331}00331                 .callback = \mbox{\hyperlink{if__rsu_8c_ad489e6f6819ca525facaeefc9a16e075}{rsu\_bulk\_tx\_callback\_vi\_vo}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00332}00332                 .timeout = \mbox{\hyperlink{if__rsureg_8h_af496ea7e0106b6752e93b6617ada8313}{RSU\_TX\_TIMEOUT}}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00333}00333         \},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00334}00334         [\mbox{\hyperlink{if__rsureg_8h_aea33efd5e2c69d615faad5c5965510aaab5c7e7911bbc67616fbaaf1949f6d022}{RSU\_BULK\_TX\_H2C}}] = \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00335}00335                 .type = \mbox{\hyperlink{usb_8h_a25240fc009aa67bb7a2b635d2e9401e4}{UE\_BULK}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00336}00336                 .endpoint = 0x0d,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00337}00337                 .direction = \mbox{\hyperlink{usb_8h_a9a98e1bc9388db2ab5213e9d6496e851}{UE\_DIR\_OUT}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00338}00338                 .bufsize = \mbox{\hyperlink{if__rsureg_8h_a0a7a7faec12b268dfb06d8da0db55000}{RSU\_TXBUFSZ}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00339}00339                 .flags = \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00340}00340                         .ext\_buffer = 1,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00341}00341                         .pipe\_bof = 1,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00342}00342                         .short\_xfer\_ok = 1}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00343}00343                 \},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00344}00344                 .callback = \mbox{\hyperlink{if__rsu_8c_a1b4a02a92dd79a36a16eade3c68b459f}{rsu\_bulk\_tx\_callback\_h2c}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00345}00345                 .timeout = \mbox{\hyperlink{if__rsureg_8h_af496ea7e0106b6752e93b6617ada8313}{RSU\_TX\_TIMEOUT}}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00346}00346         \},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00347}00347 \};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00348}00348 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00349}00349 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00350}\mbox{\hyperlink{if__rsu_8c_a9469ea81b9c54fd1ba57dae24ce30958}{00350}} \mbox{\hyperlink{if__rsu_8c_a85e75752c3b801ce176495338a6dc865}{rsu\_match}}(device\_t self)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00351}00351 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00352}00352         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__attach__arg}{usb\_attach\_arg}} *uaa = device\_get\_ivars(self);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00353}00353 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00354}00354         \textcolor{keywordflow}{if} (uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a246691e99681281d3113d63e81b7e4f0}{usb\_mode}} != \mbox{\hyperlink{usb_8h_a9bc559812598988121896dceb483806ba1c7091216cfa9c9f4a252b0825ed32cb}{USB\_MODE\_HOST}} ||}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00355}00355             uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a66c2afc71fce73cc432f7d58593e1f26}{info}}.\mbox{\hyperlink{structusbd__lookup__info_a50a68740a4c82f1a9b999d4a7994b550}{bIfaceIndex}} != 0 ||}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00356}00356             uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a66c2afc71fce73cc432f7d58593e1f26}{info}}.\mbox{\hyperlink{structusbd__lookup__info_a9e2af2c9a58f0df11559c7679185b0e8}{bConfigIndex}} != 0)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00357}00357                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00358}00358 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00359}00359         \textcolor{keywordflow}{return} (\mbox{\hyperlink{usb__lookup_8c_aa691ad42d532498716f358cb1c994fb2}{usbd\_lookup\_id\_by\_uaa}}(\mbox{\hyperlink{if__rsu_8c_a5e03b93b8e0886c84eed0d95ddf4d76f}{rsu\_devs}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{if__rsu_8c_a5e03b93b8e0886c84eed0d95ddf4d76f}{rsu\_devs}}), uaa));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00360}00360 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00361}00361 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00362}00362 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00363}\mbox{\hyperlink{if__rsu_8c_a6147e0bd84c9dc5fd4f75dfa9ceaa136}{00363}} \mbox{\hyperlink{if__rsu_8c_a6147e0bd84c9dc5fd4f75dfa9ceaa136}{rsu\_send\_mgmt}}(\textcolor{keyword}{struct} ieee80211\_node *ni, \textcolor{keywordtype}{int} type, \textcolor{keywordtype}{int} arg)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00364}00364 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00365}00365 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00366}00366         \textcolor{keywordflow}{return} (ENOTSUP);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00367}00367 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00368}00368 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00369}00369 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00370}\mbox{\hyperlink{if__rsu_8c_a6a5a00fb90f158469ceb7b96e9761d35}{00370}} \mbox{\hyperlink{if__rsu_8c_a6a5a00fb90f158469ceb7b96e9761d35}{rsu\_update\_chw}}(\textcolor{keyword}{struct} ieee80211com *ic)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00371}00371 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00372}00372 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00373}00373 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00374}00374 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00375}00375 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00376}00376 \textcolor{comment}{ * notification from net80211 that it'd like to do A-\/MPDU on the given TID.}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00377}00377 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00378}00378 \textcolor{comment}{ * Note: this actually hangs traffic at the present moment, so don't use it.}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00379}00379 \textcolor{comment}{ * The firmware debug does indiciate it's sending and establishing a TX AMPDU}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00380}00380 \textcolor{comment}{ * session, but then no traffic flows.}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00381}00381 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00382}00382 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00383}\mbox{\hyperlink{if__rsu_8c_a5b445eaa88a5d604765aa7eb582b865d}{00383}} \mbox{\hyperlink{if__rsu_8c_a5b445eaa88a5d604765aa7eb582b865d}{rsu\_ampdu\_enable}}(\textcolor{keyword}{struct} ieee80211\_node *ni, \textcolor{keyword}{struct} ieee80211\_tx\_ampdu *tap)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00384}00384 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00385}00385 \textcolor{preprocessor}{\#if 0}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00386}00386         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc = ni-\/>ni\_ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00387}00387         \textcolor{keyword}{struct }\mbox{\hyperlink{structr92s__add__ba__req}{r92s\_add\_ba\_req}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00388}00388 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00389}00389         \textcolor{comment}{/* Don't enable if it's requested or running */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00390}00390         \textcolor{keywordflow}{if} (IEEE80211\_AMPDU\_REQUESTED(tap))}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00391}00391                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00392}00392         \textcolor{keywordflow}{if} (IEEE80211\_AMPDU\_RUNNING(tap))}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00393}00393                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00394}00394 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00395}00395         \textcolor{comment}{/* We've decided to send addba; so send it */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00396}00396         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.tid = htole32(tap-\/>txa\_tid);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00397}00397 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00398}00398         \textcolor{comment}{/* Attempt net80211 state */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00399}00399         \textcolor{keywordflow}{if} (ieee80211\_ampdu\_tx\_request\_ext(ni, tap-\/>txa\_tid) != 1)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00400}00400                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00401}00401 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00402}00402         \textcolor{comment}{/* Send the firmware command */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00403}00403         \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a3e742fa1f3739636ca3c3eb2893960fa}{RSU\_DEBUG\_AMPDU}}, \textcolor{stringliteral}{"{}\%s: establishing AMPDU TX for TID \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00404}00404             \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00405}00405             tap-\/>txa\_tid);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00406}00406 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00407}00407         \mbox{\hyperlink{if__rsureg_8h_a48532232b39d8fa728a8a10df1d3f4b7}{RSU\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00408}00408         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__rsu_8c_a4ec7d2ccf04c77a70f082a7905f2fca3}{rsu\_fw\_cmd}}(sc, \mbox{\hyperlink{if__rsureg_8h_ac06574a2a00216b385231a8b1c8be2f3}{R92S\_CMD\_ADDBA\_REQ}}, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}})) != 1) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00409}00409                 \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00410}00410                 \textcolor{comment}{/* Mark failure */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00411}00411                 (void) ieee80211\_ampdu\_tx\_request\_active\_ext(ni, tap-\/>txa\_tid, 0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00412}00412                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00413}00413         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00414}00414         \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00415}00415 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00416}00416         \textcolor{comment}{/* Mark success; we don't get any further notifications */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00417}00417         (void) ieee80211\_ampdu\_tx\_request\_active\_ext(ni, tap-\/>txa\_tid, 1);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00418}00418 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00419}00419         \textcolor{comment}{/* Return 0, we're driving this ourselves */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00420}00420         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00421}00421 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00422}00422 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00423}00423 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00424}\mbox{\hyperlink{if__rsu_8c_adea01cf8e0942caac1c933a5a8b69491}{00424}} \mbox{\hyperlink{if__rsu_8c_adea01cf8e0942caac1c933a5a8b69491}{rsu\_wme\_update}}(\textcolor{keyword}{struct} ieee80211com *ic)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00425}00425 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00426}00426 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00427}00427         \textcolor{comment}{/* Firmware handles this; not our problem */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00428}00428         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00429}00429 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00430}00430 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00431}00431 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00432}\mbox{\hyperlink{if__rsu_8c_a7728e5777cffb6961ae251b9a4225df5}{00432}} \mbox{\hyperlink{if__rsu_8c_a300ebbe5b09c96642ea01aace9a725e8}{rsu\_attach}}(device\_t self)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00433}00433 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00434}00434         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__attach__arg}{usb\_attach\_arg}} *uaa = device\_get\_ivars(self);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00435}00435         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc = device\_get\_softc(self);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00436}00436         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structrsu__softc_a67bd1a5c6762d8cd8c5b7e7b5bdfddd6}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00437}00437         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00438}00438         uint8\_t iface\_index;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00439}00439         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__interface}{usb\_interface}} *iface;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00440}00440         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *rft;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00441}00441 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00442}00442         \mbox{\hyperlink{usb__util_8c_a2f65a197990caa1a69a16691ce4dc66a}{device\_set\_usb\_desc}}(self);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00443}00443         sc-\/>\mbox{\hyperlink{structrsu__softc_abfed8d58f895fb1dcb1179428da8cbee}{sc\_udev}} = uaa-\/>\mbox{\hyperlink{structusb__attach__arg_ac86557d3eaf77874d436ce38648b0276}{device}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00444}00444         sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}} = self;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00445}00445         sc-\/>\mbox{\hyperlink{structrsu__softc_a705cf55f151f9f1f313d586f44f2102c}{sc\_rx\_checksum\_enable}} = 1;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00446}00446         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__rsu_8c_a382c2d926a83da0d976cb08c61cd9741}{rsu\_enable\_11n}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00447}00447                 sc-\/>\mbox{\hyperlink{structrsu__softc_adeb512b5ce2a80d816b6879fbb0a1ae7}{sc\_ht}} = !! (\mbox{\hyperlink{usbdi_8h_ad61be4846786fb86de5691968d1e9b66}{USB\_GET\_DRIVER\_INFO}}(uaa) \& \mbox{\hyperlink{if__rsu_8c_acba46af51401e6aafbef91da81cf9564}{RSU\_HT\_SUPPORTED}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00448}00448 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00449}00449         \textcolor{comment}{/* Get number of endpoints */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00450}00450         iface = \mbox{\hyperlink{usb__device_8c_ad241549c2225f6ccb72345851d5b9ed8}{usbd\_get\_iface}}(sc-\/>\mbox{\hyperlink{structrsu__softc_abfed8d58f895fb1dcb1179428da8cbee}{sc\_udev}}, 0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00451}00451         sc-\/>\mbox{\hyperlink{structrsu__softc_aeb6b6402333a29aed72b9a47578cc353}{sc\_nendpoints}} = iface-\/>\mbox{\hyperlink{structusb__interface_aa5cea795ac14467ffdbe70b7f59beaba}{idesc}}-\/>\mbox{\hyperlink{structusb__interface__descriptor_a0d29c20151d83ce2610cd98d268d95df}{bNumEndpoints}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00452}00452 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00453}00453         \textcolor{comment}{/* Endpoints are hard-\/coded for now, so enforce 4-\/endpoint only */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00454}00454         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrsu__softc_aeb6b6402333a29aed72b9a47578cc353}{sc\_nendpoints}} != 4) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00455}00455                 device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00456}00456                     \textcolor{stringliteral}{"{}the driver currently only supports 4-\/endpoint devices\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00457}00457                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00458}00458         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00459}00459 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00460}00460         mtx\_init(\&sc-\/>\mbox{\hyperlink{structrsu__softc_a9e08138256e5159028935ade723bcf50}{sc\_mtx}}, device\_get\_nameunit(self), MTX\_NETWORK\_LOCK,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00461}00461             MTX\_DEF);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00462}00462         \mbox{\hyperlink{if__rsureg_8h_a3b6f468dc4e2f3af085a0125002671dd}{RSU\_DELKEY\_BMAP\_LOCK\_INIT}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00463}00463         TIMEOUT\_TASK\_INIT(taskqueue\_thread, \&sc-\/>\mbox{\hyperlink{structrsu__softc_a58bb50377ccc3066c3291d5b2bc404c8}{calib\_task}}, 0, }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00464}00464             \mbox{\hyperlink{if__rsu_8c_a4400148497f18539b05a819ebbff03d2}{rsu\_calib\_task}}, sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00465}00465         TASK\_INIT(\&sc-\/>\mbox{\hyperlink{structrsu__softc_ac8129ebea9dbe09bcf1a80aee10dad7a}{del\_key\_task}}, 0, \mbox{\hyperlink{if__rsu_8c_ae7596ce81699acdab5f00650ef8b130f}{rsu\_delete\_key\_pair\_cb}}, sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00466}00466         TASK\_INIT(\&sc-\/>\mbox{\hyperlink{structrsu__softc_a7b88c0223e24c181020c79ce0cf54248}{tx\_task}}, 0, \mbox{\hyperlink{if__rsu_8c_a01295ab8e5ccf28cfa62baf8c82a5be6}{rsu\_tx\_task}}, sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00467}00467         mbufq\_init(\&sc-\/>\mbox{\hyperlink{structrsu__softc_a44f3bb6915f5db2ac3d4ce949856f38e}{sc\_snd}}, ifqmaxlen);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00468}00468 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00469}00469         \textcolor{comment}{/* Allocate Tx/Rx buffers. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00470}00470         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__rsu_8c_a93275f0068dcf127385a594e43f1f2ae}{rsu\_alloc\_rx\_list}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00471}00471         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != 0) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00472}00472                 device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}}, \textcolor{stringliteral}{"{}could not allocate Rx buffers\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00473}00473                 \textcolor{keywordflow}{goto} fail\_usb;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00474}00474         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00475}00475 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00476}00476         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__rsu_8c_a413728d936018cf56ee3311859745e44}{rsu\_alloc\_tx\_list}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00477}00477         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != 0) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00478}00478                 device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}}, \textcolor{stringliteral}{"{}could not allocate Tx buffers\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00479}00479                 \mbox{\hyperlink{if__rsu_8c_a061b2cb0418ed3e514543acc5e409425}{rsu\_free\_rx\_list}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00480}00480                 \textcolor{keywordflow}{goto} fail\_usb;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00481}00481         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00482}00482 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00483}00483         iface\_index = 0;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00484}00484         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{usb__transfer_8c_a7494c04fae5c5e7ef1af436308670a21}{usbd\_transfer\_setup}}(uaa-\/>\mbox{\hyperlink{structusb__attach__arg_ac86557d3eaf77874d436ce38648b0276}{device}}, \&iface\_index, sc-\/>\mbox{\hyperlink{structrsu__softc_abbd456b3b6c1981a4daf906bb5f1299f}{sc\_xfer}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00485}00485             \mbox{\hyperlink{if__rsu_8c_a1c9b0d125b539aeccd30ccde89262f7a}{rsu\_config}}, \mbox{\hyperlink{if__rsureg_8h_aea33efd5e2c69d615faad5c5965510aaacbc9816d2e5ae5145d511ee76a7c9f9d}{RSU\_N\_TRANSFER}}, sc, \&sc-\/>\mbox{\hyperlink{structrsu__softc_a9e08138256e5159028935ade723bcf50}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00486}00486         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00487}00487                 device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00488}00488                     \textcolor{stringliteral}{"{}could not allocate USB transfers, err=\%s\(\backslash\)n"{}}, }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00489}00489                     \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00490}00490                 \textcolor{keywordflow}{goto} fail\_usb;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00491}00491         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00492}00492         \mbox{\hyperlink{if__rsureg_8h_a48532232b39d8fa728a8a10df1d3f4b7}{RSU\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00493}00493         \textcolor{comment}{/* Read chip revision. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00494}00494         sc-\/>\mbox{\hyperlink{structrsu__softc_a46fd0bb3463eca5432ecda267c45f114}{cut}} = \mbox{\hyperlink{if__rsureg_8h_aa1f710025311c0169fbc5b1296d914b6}{MS}}(\mbox{\hyperlink{if__rsu_8c_a1741f47255e3a970e39706ca00fa428b}{rsu\_read\_4}}(sc, \mbox{\hyperlink{if__rsureg_8h_a2ff933284b7b44baa7cfc6364f5805c2}{R92S\_PMC\_FSM}}), R92S\_PMC\_FSM\_CUT);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00495}00495         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrsu__softc_a46fd0bb3463eca5432ecda267c45f114}{cut}} != 3)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00496}00496                 sc-\/>\mbox{\hyperlink{structrsu__softc_a46fd0bb3463eca5432ecda267c45f114}{cut}} = (sc-\/>\mbox{\hyperlink{structrsu__softc_a46fd0bb3463eca5432ecda267c45f114}{cut}} >> 1) + 1;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00497}00497         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__rsu_8c_a76b90045b8aa7fc2bced44c208c4a7f6}{rsu\_read\_rom}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00498}00498         \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00499}00499         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != 0) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00500}00500                 device\_printf(self, \textcolor{stringliteral}{"{}could not read ROM\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00501}00501                 \textcolor{keywordflow}{goto} fail\_rom;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00502}00502         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00503}00503 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00504}00504         \textcolor{comment}{/* Figure out TX/RX streams */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00505}00505         \textcolor{keywordflow}{switch} (sc-\/>\mbox{\hyperlink{structrsu__softc_af035941d329ad65b36963693af806ec6}{rom}}[84]) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00506}00506         \textcolor{keywordflow}{case} 0x0:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00507}00507                 sc-\/>\mbox{\hyperlink{structrsu__softc_ae27cdc914356cf0e5553d1bf9d465d11}{sc\_rftype}} = \mbox{\hyperlink{if__rsureg_8h_a2dbb833ef0dcc466dd02ee76badaf709a5aae4c451344f07c74a86d07834c1dc3}{RTL8712\_RFCONFIG\_1T1R}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00508}00508                 sc-\/>\mbox{\hyperlink{structrsu__softc_ae2d6dc7aa1e4a4b392e63d549f00de3d}{sc\_nrxstream}} = 1;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00509}00509                 sc-\/>\mbox{\hyperlink{structrsu__softc_adb87fdcf22ec8a04e1a6e47d1cf6f7da}{sc\_ntxstream}} = 1;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00510}00510                 rft = \textcolor{stringliteral}{"{}1T1R"{}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00511}00511                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00512}00512         \textcolor{keywordflow}{case} 0x1:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00513}00513                 sc-\/>\mbox{\hyperlink{structrsu__softc_ae27cdc914356cf0e5553d1bf9d465d11}{sc\_rftype}} = \mbox{\hyperlink{if__rsureg_8h_a2dbb833ef0dcc466dd02ee76badaf709ad16459394bb5403d0d00948949c50840}{RTL8712\_RFCONFIG\_1T2R}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00514}00514                 sc-\/>\mbox{\hyperlink{structrsu__softc_ae2d6dc7aa1e4a4b392e63d549f00de3d}{sc\_nrxstream}} = 2;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00515}00515                 sc-\/>\mbox{\hyperlink{structrsu__softc_adb87fdcf22ec8a04e1a6e47d1cf6f7da}{sc\_ntxstream}} = 1;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00516}00516                 rft = \textcolor{stringliteral}{"{}1T2R"{}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00517}00517                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00518}00518         \textcolor{keywordflow}{case} 0x2:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00519}00519                 sc-\/>\mbox{\hyperlink{structrsu__softc_ae27cdc914356cf0e5553d1bf9d465d11}{sc\_rftype}} = \mbox{\hyperlink{if__rsureg_8h_a2dbb833ef0dcc466dd02ee76badaf709a4a89ae2fadcb8c95812c97448e937fde}{RTL8712\_RFCONFIG\_2T2R}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00520}00520                 sc-\/>\mbox{\hyperlink{structrsu__softc_ae2d6dc7aa1e4a4b392e63d549f00de3d}{sc\_nrxstream}} = 2;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00521}00521                 sc-\/>\mbox{\hyperlink{structrsu__softc_adb87fdcf22ec8a04e1a6e47d1cf6f7da}{sc\_ntxstream}} = 2;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00522}00522                 rft = \textcolor{stringliteral}{"{}2T2R"{}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00523}00523                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00524}00524         \textcolor{keywordflow}{case} 0x3:       \textcolor{comment}{/* "{}green"{} NIC */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00525}00525                 sc-\/>\mbox{\hyperlink{structrsu__softc_ae27cdc914356cf0e5553d1bf9d465d11}{sc\_rftype}} = \mbox{\hyperlink{if__rsureg_8h_a2dbb833ef0dcc466dd02ee76badaf709ad16459394bb5403d0d00948949c50840}{RTL8712\_RFCONFIG\_1T2R}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00526}00526                 sc-\/>\mbox{\hyperlink{structrsu__softc_ae2d6dc7aa1e4a4b392e63d549f00de3d}{sc\_nrxstream}} = 2;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00527}00527                 sc-\/>\mbox{\hyperlink{structrsu__softc_adb87fdcf22ec8a04e1a6e47d1cf6f7da}{sc\_ntxstream}} = 1;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00528}00528                 rft = \textcolor{stringliteral}{"{}1T2R ('green')"{}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00529}00529                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00530}00530         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00531}00531                 device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00532}00532                     \textcolor{stringliteral}{"{}\%s: unknown board type (rfconfig=0x\%02x)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00533}00533                     \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00534}00534                     sc-\/>\mbox{\hyperlink{structrsu__softc_af035941d329ad65b36963693af806ec6}{rom}}[84]);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00535}00535                 \textcolor{keywordflow}{goto} fail\_rom;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00536}00536         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00537}00537 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00538}00538         IEEE80211\_ADDR\_COPY(ic-\/>ic\_macaddr, \&sc-\/>\mbox{\hyperlink{structrsu__softc_af035941d329ad65b36963693af806ec6}{rom}}[0x12]);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00539}00539         device\_printf(self, \textcolor{stringliteral}{"{}MAC/BB RTL8712 cut \%d \%s\(\backslash\)n"{}}, sc-\/>\mbox{\hyperlink{structrsu__softc_a46fd0bb3463eca5432ecda267c45f114}{cut}}, rft);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00540}00540 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00541}00541         ic-\/>ic\_softc = sc;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00542}00542         ic-\/>ic\_name = device\_get\_nameunit(self);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00543}00543         ic-\/>ic\_phytype = IEEE80211\_T\_OFDM;      \textcolor{comment}{/* Not only, but not used. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00544}00544         ic-\/>ic\_opmode = IEEE80211\_M\_STA;        \textcolor{comment}{/* Default to BSS mode. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00545}00545 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00546}00546         \textcolor{comment}{/* Set device capabilities. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00547}00547         ic-\/>ic\_caps =}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00548}00548             IEEE80211\_C\_STA |           \textcolor{comment}{/* station mode */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00549}00549             IEEE80211\_C\_MONITOR |       \textcolor{comment}{/* monitor mode supported */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00550}00550 \textcolor{preprocessor}{\#if 0}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00551}00551             IEEE80211\_C\_BGSCAN |        \textcolor{comment}{/* Background scan. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00552}00552 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00553}00553             IEEE80211\_C\_SHPREAMBLE |    \textcolor{comment}{/* Short preamble supported. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00554}00554             IEEE80211\_C\_WME |           \textcolor{comment}{/* WME/QoS */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00555}00555             IEEE80211\_C\_SHSLOT |        \textcolor{comment}{/* Short slot time supported. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00556}00556             IEEE80211\_C\_WPA;            \textcolor{comment}{/* WPA/RSN. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00557}00557 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00558}00558         ic-\/>ic\_cryptocaps =}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00559}00559             IEEE80211\_CRYPTO\_WEP |}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00560}00560             IEEE80211\_CRYPTO\_TKIP |}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00561}00561             IEEE80211\_CRYPTO\_AES\_CCM;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00562}00562 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00563}00563         \textcolor{comment}{/* Check if HT support is present. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00564}00564         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrsu__softc_adeb512b5ce2a80d816b6879fbb0a1ae7}{sc\_ht}}) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00565}00565                 device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%s: enabling 11n\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00566}00566 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00567}00567                 \textcolor{comment}{/* Enable basic HT */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00568}00568                 ic-\/>ic\_htcaps = IEEE80211\_HTC\_HT |}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00569}00569 \textcolor{preprocessor}{\#if 0}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00570}00570                     IEEE80211\_HTC\_AMPDU |}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00571}00571 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00572}00572                     IEEE80211\_HTC\_AMSDU |}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00573}00573                     IEEE80211\_HTCAP\_MAXAMSDU\_3839 |}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00574}00574                     IEEE80211\_HTCAP\_SMPS\_OFF;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00575}00575                 ic-\/>ic\_htcaps |= IEEE80211\_HTCAP\_CHWIDTH40;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00576}00576 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00577}00577                 \textcolor{comment}{/* set number of spatial streams */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00578}00578                 ic-\/>ic\_txstream = sc-\/>\mbox{\hyperlink{structrsu__softc_adb87fdcf22ec8a04e1a6e47d1cf6f7da}{sc\_ntxstream}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00579}00579                 ic-\/>ic\_rxstream = sc-\/>\mbox{\hyperlink{structrsu__softc_ae2d6dc7aa1e4a4b392e63d549f00de3d}{sc\_nrxstream}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00580}00580         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00581}00581         ic-\/>ic\_flags\_ext |= IEEE80211\_FEXT\_SCAN\_OFFLOAD;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00582}00582 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00583}00583         \mbox{\hyperlink{if__rsu_8c_a17ae57abecad7edb2c93140e72d246e4}{rsu\_getradiocaps}}(ic, IEEE80211\_CHAN\_MAX, \&ic-\/>ic\_nchans,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00584}00584             ic-\/>ic\_channels);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00585}00585 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00586}00586         ieee80211\_ifattach(ic);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00587}00587         ic-\/>ic\_raw\_xmit = \mbox{\hyperlink{if__rsu_8c_a72e18450413b0ba0481f6e880c4d8120}{rsu\_raw\_xmit}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00588}00588         ic-\/>ic\_scan\_start = \mbox{\hyperlink{if__rsu_8c_a4cb94d1cb04135e7cc75800391c27680}{rsu\_scan\_start}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00589}00589         ic-\/>ic\_scan\_end = \mbox{\hyperlink{if__rsu_8c_a6ab24c2af3fd64f9434c17f73e706a3c}{rsu\_scan\_end}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00590}00590         ic-\/>ic\_getradiocaps = \mbox{\hyperlink{if__rsu_8c_a17ae57abecad7edb2c93140e72d246e4}{rsu\_getradiocaps}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00591}00591         ic-\/>ic\_set\_channel = \mbox{\hyperlink{if__rsu_8c_a163efc4822d99a553569c063d2691158}{rsu\_set\_channel}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00592}00592         ic-\/>ic\_scan\_curchan = \mbox{\hyperlink{if__rsu_8c_ac3b9aa6ae387056e6c8b491965d3d215}{rsu\_scan\_curchan}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00593}00593         ic-\/>ic\_scan\_mindwell = \mbox{\hyperlink{if__rsu_8c_ace47cb3b5413fb8f0f8bfbb7edc8f61e}{rsu\_scan\_mindwell}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00594}00594         ic-\/>ic\_vap\_create = \mbox{\hyperlink{if__rsu_8c_ac040a7f98c2a22d54aaaac9c7633902c}{rsu\_vap\_create}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00595}00595         ic-\/>ic\_vap\_delete = \mbox{\hyperlink{if__rsu_8c_a18b50f3791a759bb41c18f93e55d254d}{rsu\_vap\_delete}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00596}00596         ic-\/>ic\_update\_promisc = \mbox{\hyperlink{if__rsu_8c_a4947e8c49a3ed16f432704642340a80f}{rsu\_update\_promisc}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00597}00597         ic-\/>ic\_update\_mcast = \mbox{\hyperlink{if__rsu_8c_a170330f1f6f81374e015eeea4c6a858a}{rsu\_update\_mcast}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00598}00598         ic-\/>ic\_ioctl = \mbox{\hyperlink{if__rsu_8c_a046a645893d15b1e79c1e21a8391d39d}{rsu\_ioctl\_net}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00599}00599         ic-\/>ic\_parent = \mbox{\hyperlink{if__rsu_8c_a6e29510ee7bbeaadcc10d44136fa9e3b}{rsu\_parent}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00600}00600         ic-\/>ic\_transmit = \mbox{\hyperlink{if__rsu_8c_ac28409af787dc2e5bc9d6de7d060041b}{rsu\_transmit}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00601}00601         ic-\/>ic\_send\_mgmt = \mbox{\hyperlink{if__rsu_8c_a6147e0bd84c9dc5fd4f75dfa9ceaa136}{rsu\_send\_mgmt}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00602}00602         ic-\/>ic\_update\_chw = \mbox{\hyperlink{if__rsu_8c_a6a5a00fb90f158469ceb7b96e9761d35}{rsu\_update\_chw}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00603}00603         ic-\/>ic\_ampdu\_enable = \mbox{\hyperlink{if__rsu_8c_a5b445eaa88a5d604765aa7eb582b865d}{rsu\_ampdu\_enable}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00604}00604         ic-\/>ic\_wme.wme\_update = \mbox{\hyperlink{if__rsu_8c_adea01cf8e0942caac1c933a5a8b69491}{rsu\_wme\_update}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00605}00605 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00606}00606         ieee80211\_radiotap\_attach(ic, \&sc-\/>sc\_txtap.wt\_ihdr,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00607}00607             \textcolor{keyword}{sizeof}(sc-\/>sc\_txtap), \mbox{\hyperlink{if__rsureg_8h_ab9c7c45f4c0bca94b3f51cc071e6c89d}{RSU\_TX\_RADIOTAP\_PRESENT}}, }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00608}00608             \&sc-\/>sc\_rxtap.wr\_ihdr, \textcolor{keyword}{sizeof}(sc-\/>sc\_rxtap),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00609}00609             \mbox{\hyperlink{if__rsureg_8h_a5fdd60872d0b42238aae6063747260fc}{RSU\_RX\_RADIOTAP\_PRESENT}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00610}00610 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00611}00611         \textcolor{keywordflow}{if} (bootverbose)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00612}00612                 ieee80211\_announce(ic);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00613}00613 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00614}00614         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00615}00615 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00616}00616 fail\_rom:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00617}00617         \mbox{\hyperlink{usb__transfer_8c_a2f5ab55bfe7f356bb7a7505ff35c9741}{usbd\_transfer\_unsetup}}(sc-\/>\mbox{\hyperlink{structrsu__softc_abbd456b3b6c1981a4daf906bb5f1299f}{sc\_xfer}}, \mbox{\hyperlink{if__rsureg_8h_aea33efd5e2c69d615faad5c5965510aaacbc9816d2e5ae5145d511ee76a7c9f9d}{RSU\_N\_TRANSFER}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00618}00618 fail\_usb:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00619}00619         mtx\_destroy(\&sc-\/>\mbox{\hyperlink{structrsu__softc_a9e08138256e5159028935ade723bcf50}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00620}00620         \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00621}00621 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00622}00622 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00623}00623 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00624}\mbox{\hyperlink{if__rsu_8c_a2207f30cf0652dc4f85f42c1c5283270}{00624}} \mbox{\hyperlink{if__rsu_8c_ae1b5e401165c3f41e517d1c0e258fb07}{rsu\_detach}}(device\_t self)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00625}00625 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00626}00626         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc = device\_get\_softc(self);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00627}00627         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structrsu__softc_a67bd1a5c6762d8cd8c5b7e7b5bdfddd6}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00628}00628 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00629}00629         \mbox{\hyperlink{if__rsu_8c_a6ce5725f25752c6c05ce4459a640b08a}{rsu\_stop}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00630}00630 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00631}00631         \mbox{\hyperlink{usb__transfer_8c_a2f5ab55bfe7f356bb7a7505ff35c9741}{usbd\_transfer\_unsetup}}(sc-\/>\mbox{\hyperlink{structrsu__softc_abbd456b3b6c1981a4daf906bb5f1299f}{sc\_xfer}}, \mbox{\hyperlink{if__rsureg_8h_aea33efd5e2c69d615faad5c5965510aaacbc9816d2e5ae5145d511ee76a7c9f9d}{RSU\_N\_TRANSFER}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00632}00632 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00633}00633         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00634}00634 \textcolor{comment}{         * Free buffers /before/ we detach from net80211, else node}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00635}00635 \textcolor{comment}{         * references to destroyed vaps will lead to a panic.}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00636}00636 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00637}00637         \textcolor{comment}{/* Free Tx/Rx buffers. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00638}00638         \mbox{\hyperlink{if__rsureg_8h_a48532232b39d8fa728a8a10df1d3f4b7}{RSU\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00639}00639         \mbox{\hyperlink{if__rsu_8c_a5b790c202a8799601e097d890275dc7a}{rsu\_free\_tx\_list}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00640}00640         \mbox{\hyperlink{if__rsu_8c_a061b2cb0418ed3e514543acc5e409425}{rsu\_free\_rx\_list}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00641}00641         \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00642}00642 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00643}00643         \textcolor{comment}{/* Frames are freed; detach from net80211 */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00644}00644         ieee80211\_ifdetach(ic);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00645}00645 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00646}00646         taskqueue\_drain\_timeout(taskqueue\_thread, \&sc-\/>\mbox{\hyperlink{structrsu__softc_a58bb50377ccc3066c3291d5b2bc404c8}{calib\_task}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00647}00647         taskqueue\_drain(taskqueue\_thread, \&sc-\/>\mbox{\hyperlink{structrsu__softc_ac8129ebea9dbe09bcf1a80aee10dad7a}{del\_key\_task}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00648}00648         taskqueue\_drain(taskqueue\_thread, \&sc-\/>\mbox{\hyperlink{structrsu__softc_a7b88c0223e24c181020c79ce0cf54248}{tx\_task}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00649}00649 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00650}00650         \mbox{\hyperlink{if__rsureg_8h_ae32e2487e5af6c3e5275ac9610f3ac63}{RSU\_DELKEY\_BMAP\_LOCK\_DESTROY}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00651}00651         mtx\_destroy(\&sc-\/>\mbox{\hyperlink{structrsu__softc_a9e08138256e5159028935ade723bcf50}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00652}00652 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00653}00653         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00654}00654 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00655}00655 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00656}00656 \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00657}\mbox{\hyperlink{if__rsu_8c_a2567a7ad7f1eb6ac0b6479cc9dca5fe4}{00657}} \mbox{\hyperlink{if__rsu_8c_a2567a7ad7f1eb6ac0b6479cc9dca5fe4}{rsu\_do\_request}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} *\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00658}00658     \textcolor{keywordtype}{void} *data)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00659}00659 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00660}00660         \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} err;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00661}00661         \textcolor{keywordtype}{int} ntries = 10;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00662}00662 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00663}00663         \mbox{\hyperlink{if__rsureg_8h_aced96ac92d4bb829407616864037ea8d}{RSU\_ASSERT\_LOCKED}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00664}00664 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00665}00665         \textcolor{keywordflow}{while} (ntries-\/-\/) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00666}00666                 err = \mbox{\hyperlink{usb__request_8c_ae914a46bd63666caf7f4d8c182fa5e71}{usbd\_do\_request\_flags}}(sc-\/>\mbox{\hyperlink{structrsu__softc_abfed8d58f895fb1dcb1179428da8cbee}{sc\_udev}}, \&sc-\/>\mbox{\hyperlink{structrsu__softc_a9e08138256e5159028935ade723bcf50}{sc\_mtx}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00667}00667                     \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, data, 0, NULL, 250 \textcolor{comment}{/* ms */});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00668}00668                 \textcolor{keywordflow}{if} (err == 0 || err == \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945afc29c33fc101c147a8da2e51daa061bf}{USB\_ERR\_NOT\_CONFIGURED}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00669}00669                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00670}00670                 \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a0d1e97f6820a1de91b6c029eb0f13f5f}{RSU\_DEBUG\_USB}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00671}00671                     \textcolor{stringliteral}{"{}Control request failed, \%s (retries left: \%d)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00672}00672                     \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(err), ntries);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00673}00673                 \mbox{\hyperlink{if__rsu_8c_aa090b4eb974d6bb02fde866094f25bd0}{rsu\_ms\_delay}}(sc, 10);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00674}00674         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00675}00675 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00676}00676         \textcolor{keywordflow}{return} (err);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00677}00677 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00678}00678 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00679}00679 \textcolor{keyword}{static} \textcolor{keyword}{struct }ieee80211vap *}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00680}\mbox{\hyperlink{if__rsu_8c_a74fd97baec2bf4ba26f1ae733534feb9}{00680}} \mbox{\hyperlink{if__rsu_8c_ac040a7f98c2a22d54aaaac9c7633902c}{rsu\_vap\_create}}(\textcolor{keyword}{struct} ieee80211com *ic, \textcolor{keyword}{const} \textcolor{keywordtype}{char} name[IFNAMSIZ], \textcolor{keywordtype}{int} unit,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00681}00681     \textcolor{keyword}{enum} ieee80211\_opmode opmode, \textcolor{keywordtype}{int} flags,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00682}00682     \textcolor{keyword}{const} uint8\_t bssid[IEEE80211\_ADDR\_LEN],}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00683}00683     \textcolor{keyword}{const} uint8\_t mac[IEEE80211\_ADDR\_LEN])}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00684}00684 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00685}00685         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00686}00686         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__vap}{rsu\_vap}} *uvp;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00687}00687         \textcolor{keyword}{struct }ieee80211vap *vap;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00688}00688         \textcolor{keyword}{struct }ifnet *ifp;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00689}00689 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00690}00690         \textcolor{keywordflow}{if} (!TAILQ\_EMPTY(\&ic-\/>ic\_vaps))         \textcolor{comment}{/* only one at a time */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00691}00691                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00692}00692 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00693}00693         uvp =  malloc(\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__vap}{rsu\_vap}}), M\_80211\_VAP, M\_WAITOK | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00694}00694         vap = \&uvp-\/>\mbox{\hyperlink{structrsu__vap_ac8b2a8f879acd7823925e0d28a1145ec}{vap}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00695}00695 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00696}00696         \textcolor{keywordflow}{if} (ieee80211\_vap\_setup(ic, vap, name, unit, opmode,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00697}00697             flags, bssid) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00698}00698                 \textcolor{comment}{/* out of memory */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00699}00699                 free(uvp, M\_80211\_VAP);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00700}00700                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00701}00701         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00702}00702 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00703}00703         ifp = vap-\/>iv\_ifp;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00704}00704         ifp-\/>if\_capabilities = IFCAP\_RXCSUM | IFCAP\_RXCSUM\_IPV6;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00705}00705         \mbox{\hyperlink{if__rsureg_8h_a48532232b39d8fa728a8a10df1d3f4b7}{RSU\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00706}00706         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrsu__softc_a705cf55f151f9f1f313d586f44f2102c}{sc\_rx\_checksum\_enable}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00707}00707                 ifp-\/>if\_capenable |= IFCAP\_RXCSUM | IFCAP\_RXCSUM\_IPV6;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00708}00708         \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00709}00709 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00710}00710         \textcolor{comment}{/* override state transition machine */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00711}00711         uvp-\/>\mbox{\hyperlink{structrsu__vap_a7d27e4a28fa3a93ed127585ba0e9daf1}{newstate}} = vap-\/>iv\_newstate;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00712}00712         \textcolor{keywordflow}{if} (opmode == IEEE80211\_M\_MONITOR)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00713}00713                 vap-\/>iv\_newstate = \mbox{\hyperlink{if__rsu_8c_a1971426ed761530b177258326d60651f}{rsu\_monitor\_newstate}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00714}00714         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00715}00715                 vap-\/>iv\_newstate = \mbox{\hyperlink{if__rsu_8c_ab35ac04de73cd52360037094c1fcde8f}{rsu\_newstate}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00716}00716         vap-\/>iv\_key\_alloc = \mbox{\hyperlink{if__rsu_8c_a67fc315d7160ae0dac6d1376e8ef07e6}{rsu\_key\_alloc}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00717}00717         vap-\/>iv\_key\_set = \mbox{\hyperlink{if__rsu_8c_a7646a6dc11dea133d5869aee8e140a42}{rsu\_key\_set}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00718}00718         vap-\/>iv\_key\_delete = \mbox{\hyperlink{if__rsu_8c_a51eaaeb3f1e90320c06e23a6baa4753f}{rsu\_key\_delete}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00719}00719 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00720}00720         \textcolor{comment}{/* Limits from the r92su driver */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00721}00721         vap-\/>iv\_ampdu\_density = IEEE80211\_HTCAP\_MPDUDENSITY\_16;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00722}00722         vap-\/>iv\_ampdu\_rxmax = IEEE80211\_HTCAP\_MAXRXAMPDU\_32K;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00723}00723 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00724}00724         \textcolor{comment}{/* complete setup */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00725}00725         ieee80211\_vap\_attach(vap, ieee80211\_media\_change,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00726}00726             ieee80211\_media\_status, mac);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00727}00727         ic-\/>ic\_opmode = opmode;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00728}00728 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00729}00729         \textcolor{keywordflow}{return} (vap);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00730}00730 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00731}00731 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00732}00732 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00733}\mbox{\hyperlink{if__rsu_8c_a18b50f3791a759bb41c18f93e55d254d}{00733}} \mbox{\hyperlink{if__rsu_8c_a18b50f3791a759bb41c18f93e55d254d}{rsu\_vap\_delete}}(\textcolor{keyword}{struct} ieee80211vap *vap)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00734}00734 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00735}00735         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__vap}{rsu\_vap}} *uvp = \mbox{\hyperlink{if__rsureg_8h_a59e1fb4242204c29501cc9a28f49bb07}{RSU\_VAP}}(\mbox{\hyperlink{structrsu__vap_ac8b2a8f879acd7823925e0d28a1145ec}{vap}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00736}00736 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00737}00737         ieee80211\_vap\_detach(\mbox{\hyperlink{structrsu__vap_ac8b2a8f879acd7823925e0d28a1145ec}{vap}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00738}00738         free(uvp, M\_80211\_VAP);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00739}00739 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00740}00740 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00741}00741 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00742}\mbox{\hyperlink{if__rsu_8c_a4cb94d1cb04135e7cc75800391c27680}{00742}} \mbox{\hyperlink{if__rsu_8c_a4cb94d1cb04135e7cc75800391c27680}{rsu\_scan\_start}}(\textcolor{keyword}{struct} ieee80211com *ic)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00743}00743 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00744}00744         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00745}00745         \textcolor{keyword}{struct }ieee80211\_scan\_state *ss = ic-\/>ic\_scan;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00746}00746         \textcolor{keyword}{struct }ieee80211vap *vap = TAILQ\_FIRST(\&ic-\/>ic\_vaps);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00747}00747         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00748}00748 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00749}00749         \textcolor{comment}{/* Scanning is done by the firmware. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00750}00750         \mbox{\hyperlink{if__rsureg_8h_a48532232b39d8fa728a8a10df1d3f4b7}{RSU\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00751}00751         sc-\/>\mbox{\hyperlink{structrsu__softc_a3e44ca35ef4030352300283cc8a9d02c}{sc\_active\_scan}} = !!(ss-\/>ss\_flags \& IEEE80211\_SCAN\_ACTIVE);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00752}00752         \textcolor{comment}{/* XXX TODO: force awake if in network-\/sleep? */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00753}00753         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__rsu_8c_a1620d0b3b8c8e3a1ede0e5f165214e36}{rsu\_site\_survey}}(sc, ss-\/>ss\_nssid > 0 ? \&ss-\/>ss\_ssid[0] : NULL);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00754}00754         \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00755}00755         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != 0) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00756}00756                 device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00757}00757                     \textcolor{stringliteral}{"{}could not send site survey command\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00758}00758                 ieee80211\_cancel\_scan(vap);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00759}00759         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00760}00760 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00761}00761 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00762}00762 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00763}\mbox{\hyperlink{if__rsu_8c_a6ab24c2af3fd64f9434c17f73e706a3c}{00763}} \mbox{\hyperlink{if__rsu_8c_a6ab24c2af3fd64f9434c17f73e706a3c}{rsu\_scan\_end}}(\textcolor{keyword}{struct} ieee80211com *ic)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00764}00764 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00765}00765         \textcolor{comment}{/* Nothing to do here. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00766}00766 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00767}00767 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00768}00768 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00769}\mbox{\hyperlink{if__rsu_8c_a17ae57abecad7edb2c93140e72d246e4}{00769}} \mbox{\hyperlink{if__rsu_8c_a17ae57abecad7edb2c93140e72d246e4}{rsu\_getradiocaps}}(\textcolor{keyword}{struct} ieee80211com *ic,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00770}00770     \textcolor{keywordtype}{int} maxchans, \textcolor{keywordtype}{int} *nchans, \textcolor{keyword}{struct} ieee80211\_channel chans[])}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00771}00771 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00772}00772         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00773}00773         uint8\_t bands[IEEE80211\_MODE\_BYTES];}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00774}00774 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00775}00775         \textcolor{comment}{/* Set supported .11b and .11g rates. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00776}00776         memset(bands, 0, \textcolor{keyword}{sizeof}(bands));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00777}00777         setbit(bands, IEEE80211\_MODE\_11B);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00778}00778         setbit(bands, IEEE80211\_MODE\_11G);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00779}00779         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrsu__softc_adeb512b5ce2a80d816b6879fbb0a1ae7}{sc\_ht}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00780}00780                 setbit(bands, IEEE80211\_MODE\_11NG);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00781}00781         ieee80211\_add\_channels\_default\_2ghz(chans, maxchans, nchans,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00782}00782             bands, (ic-\/>ic\_htcaps \& IEEE80211\_HTCAP\_CHWIDTH40) ?}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00783}00783                 NET80211\_CBW\_FLAG\_HT40 : 0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00784}00784 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00785}00785 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00786}00786 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00787}\mbox{\hyperlink{if__rsu_8c_a163efc4822d99a553569c063d2691158}{00787}} \mbox{\hyperlink{if__rsu_8c_a163efc4822d99a553569c063d2691158}{rsu\_set\_channel}}(\textcolor{keyword}{struct} ieee80211com *ic)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00788}00788 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00789}00789         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00790}00790 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00791}00791         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00792}00792 \textcolor{comment}{         * Only need to set the channel in Monitor mode. AP scanning and auth}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00793}00793 \textcolor{comment}{         * are already taken care of by their respective firmware commands.}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00794}00794 \textcolor{comment}{         */}     }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00795}00795         \textcolor{keywordflow}{if} (ic-\/>ic\_opmode == IEEE80211\_M\_MONITOR) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00796}00796                 \textcolor{keyword}{struct }\mbox{\hyperlink{structr92s__set__channel}{r92s\_set\_channel}} cmd;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00797}00797                 \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00798}00798 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00799}00799                 cmd.\mbox{\hyperlink{structr92s__set__channel_a47479d7100ea9a866c3dd05368c5894b}{channel}} = IEEE80211\_CHAN2IEEE(ic-\/>ic\_curchan);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00800}00800 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00801}00801                 \mbox{\hyperlink{if__rsureg_8h_a48532232b39d8fa728a8a10df1d3f4b7}{RSU\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00802}00802                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__rsu_8c_a4ec7d2ccf04c77a70f082a7905f2fca3}{rsu\_fw\_cmd}}(sc, \mbox{\hyperlink{if__rsureg_8h_a7684f7edaa8a8f36cce80e2b06618d61}{R92S\_CMD\_SET\_CHANNEL}}, \&cmd,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00803}00803                     \textcolor{keyword}{sizeof}(cmd));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00804}00804                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != 0) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00805}00805                         device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00806}00806                             \textcolor{stringliteral}{"{}\%s: error \%d setting channel\(\backslash\)n"{}}, \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00807}00807                             \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00808}00808                 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00809}00809                 \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00810}00810         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00811}00811 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00812}00812 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00813}00813 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00814}\mbox{\hyperlink{if__rsu_8c_ac3b9aa6ae387056e6c8b491965d3d215}{00814}} \mbox{\hyperlink{if__rsu_8c_ac3b9aa6ae387056e6c8b491965d3d215}{rsu\_scan\_curchan}}(\textcolor{keyword}{struct} ieee80211\_scan\_state *ss, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} maxdwell)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00815}00815 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00816}00816         \textcolor{comment}{/* Scan is done in rsu\_scan\_start(). */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00817}00817 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00818}00818 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00825}00825 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00826}\mbox{\hyperlink{if__rsu_8c_ace47cb3b5413fb8f0f8bfbb7edc8f61e}{00826}} \mbox{\hyperlink{if__rsu_8c_ace47cb3b5413fb8f0f8bfbb7edc8f61e}{rsu\_scan\_mindwell}}(\textcolor{keyword}{struct} ieee80211\_scan\_state *ss)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00827}00827 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00828}00828         \textcolor{comment}{/* NB: don't try to abort scan; wait for firmware to finish */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00829}00829 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00830}00830 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00831}00831 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00832}\mbox{\hyperlink{if__rsu_8c_a4947e8c49a3ed16f432704642340a80f}{00832}} \mbox{\hyperlink{if__rsu_8c_a4947e8c49a3ed16f432704642340a80f}{rsu\_update\_promisc}}(\textcolor{keyword}{struct} ieee80211com *ic)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00833}00833 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00834}00834         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00835}00835 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00836}00836         \mbox{\hyperlink{if__rsureg_8h_a48532232b39d8fa728a8a10df1d3f4b7}{RSU\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00837}00837         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrsu__softc_acc01333e62919e38b1a73ac8c96b1f3f}{sc\_running}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00838}00838                 \mbox{\hyperlink{if__rsu_8c_a65b8dc2360a4af15d1124903842049d5}{rsu\_rxfilter\_refresh}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00839}00839         \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00840}00840 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00841}00841 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00842}00842 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00843}00843 \textcolor{comment}{ * The same as rtwn\_get\_multi\_pos() / rtwn\_set\_multi().}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00844}00844 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00845}00845 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00846}\mbox{\hyperlink{if__rsu_8c_abfd373c7ab64d01a15c2b39baaf73bcb}{00846}} \mbox{\hyperlink{if__rsu_8c_abfd373c7ab64d01a15c2b39baaf73bcb}{rsu\_get\_multi\_pos}}(\textcolor{keyword}{const} uint8\_t maddr[])}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00847}00847 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00848}00848         uint64\_t mask = 0x00004d101df481b4;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00849}00849         uint8\_t pos = 0x27;     \textcolor{comment}{/* initial value */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00850}00850         \textcolor{keywordtype}{int} i, j;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00851}00851 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00852}00852         \textcolor{keywordflow}{for} (i = 0; i < IEEE80211\_ADDR\_LEN; i++)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00853}00853                 \textcolor{keywordflow}{for} (j = (i == 0) ? 1 : 0; j < 8; j++)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00854}00854                         \textcolor{keywordflow}{if} ((maddr[i] >> j) \& 1)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00855}00855                                 pos \string^= (mask >> (i * 8 + j -\/ 1));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00856}00856 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00857}00857         pos \&= 0x3f;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00858}00858 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00859}00859         \textcolor{keywordflow}{return} (pos);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00860}00860 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00861}00861 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00862}00862 \textcolor{keyword}{static} u\_int}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00863}\mbox{\hyperlink{if__rsu_8c_ac5f9207ec9c70b45123fb8db642ccc44}{00863}} \mbox{\hyperlink{if__rsu_8c_ac5f9207ec9c70b45123fb8db642ccc44}{rsu\_hash\_maddr}}(\textcolor{keywordtype}{void} *arg, \textcolor{keyword}{struct} sockaddr\_dl *sdl, u\_int cnt)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00864}00864 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00865}00865         uint32\_t *mfilt = arg;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00866}00866         uint8\_t pos;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00867}00867 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00868}00868         pos = \mbox{\hyperlink{if__rsu_8c_abfd373c7ab64d01a15c2b39baaf73bcb}{rsu\_get\_multi\_pos}}(LLADDR(sdl));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00869}00869         mfilt[pos / 32] |= (1 << (pos \% 32));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00870}00870 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00871}00871         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00872}00872 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00873}00873 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00874}00874 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00875}\mbox{\hyperlink{if__rsu_8c_ae2ba5c5cc9b037a2b4f1b75f47b0d95e}{00875}} \mbox{\hyperlink{if__rsu_8c_ae2ba5c5cc9b037a2b4f1b75f47b0d95e}{rsu\_set\_multi}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00876}00876 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00877}00877         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structrsu__softc_a67bd1a5c6762d8cd8c5b7e7b5bdfddd6}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00878}00878         uint32\_t mfilt[2];}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00879}00879 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00880}00880         \mbox{\hyperlink{if__rsureg_8h_aced96ac92d4bb829407616864037ea8d}{RSU\_ASSERT\_LOCKED}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00881}00881 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00882}00882         \textcolor{comment}{/* general structure was copied from ath(4). */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00883}00883         \textcolor{keywordflow}{if} (ic-\/>ic\_allmulti == 0) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00884}00884                 \textcolor{keyword}{struct }ieee80211vap *vap;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00885}00885 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00886}00886                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00887}00887 \textcolor{comment}{                 * Merge multicast addresses to form the hardware filter.}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00888}00888 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00889}00889                 mfilt[0] = mfilt[1] = 0;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00890}00890                 TAILQ\_FOREACH(vap, \&ic-\/>ic\_vaps, iv\_next)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00891}00891                         if\_foreach\_llmaddr(vap-\/>iv\_ifp, \mbox{\hyperlink{if__rsu_8c_ac5f9207ec9c70b45123fb8db642ccc44}{rsu\_hash\_maddr}}, \&mfilt);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00892}00892         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00893}00893                 mfilt[0] = mfilt[1] = \string~0;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00894}00894 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00895}00895         \mbox{\hyperlink{if__rsu_8c_abf65ff90f534d06c7131e43ace2e7d5e}{rsu\_write\_4}}(sc, \mbox{\hyperlink{if__rsureg_8h_a8de0338c579fb5010f45a5ab9b1a274a}{R92S\_MAR}} + 0, mfilt[0]);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00896}00896         \mbox{\hyperlink{if__rsu_8c_abf65ff90f534d06c7131e43ace2e7d5e}{rsu\_write\_4}}(sc, \mbox{\hyperlink{if__rsureg_8h_a8de0338c579fb5010f45a5ab9b1a274a}{R92S\_MAR}} + 4, mfilt[1]);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00897}00897 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00898}00898         \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a9613ad7ae941ad16f1af7a7b64c94b51}{RSU\_DEBUG\_STATE}}, \textcolor{stringliteral}{"{}\%s: MC filter \%08x:\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00899}00899             \_\_func\_\_, mfilt[0], mfilt[1]);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00900}00900 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00901}00901 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00902}00902 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00903}\mbox{\hyperlink{if__rsu_8c_a170330f1f6f81374e015eeea4c6a858a}{00903}} \mbox{\hyperlink{if__rsu_8c_a170330f1f6f81374e015eeea4c6a858a}{rsu\_update\_mcast}}(\textcolor{keyword}{struct} ieee80211com *ic)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00904}00904 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00905}00905         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00906}00906 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00907}00907         \mbox{\hyperlink{if__rsureg_8h_a48532232b39d8fa728a8a10df1d3f4b7}{RSU\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00908}00908         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrsu__softc_acc01333e62919e38b1a73ac8c96b1f3f}{sc\_running}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00909}00909                 \mbox{\hyperlink{if__rsu_8c_ae2ba5c5cc9b037a2b4f1b75f47b0d95e}{rsu\_set\_multi}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00910}00910         \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00911}00911 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00912}00912 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00913}00913 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00914}\mbox{\hyperlink{if__rsu_8c_a689b6ca5c274557503ac22d92f33ff1a}{00914}} \mbox{\hyperlink{if__rsu_8c_a689b6ca5c274557503ac22d92f33ff1a}{rsu\_alloc\_list}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__data}{rsu\_data}} data[],}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00915}00915     \textcolor{keywordtype}{int} ndata, \textcolor{keywordtype}{int} maxsz)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00916}00916 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00917}00917         \textcolor{keywordtype}{int} i, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00918}00918 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00919}00919         \textcolor{keywordflow}{for} (i = 0; i < ndata; i++) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00920}00920                 \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__data}{rsu\_data}} *dp = \&data[i];}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00921}00921                 dp-\/>\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}} = \mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00922}00922                 dp-\/>\mbox{\hyperlink{structrsu__data_aa3e17352ec826033534a59855aa2b846}{m}} = NULL;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00923}00923                 dp-\/>\mbox{\hyperlink{structrsu__data_a227b09be7c6eefdd367f8c7fa1e7ef6a}{buf}} = malloc(maxsz, M\_USBDEV, M\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00924}00924                 \textcolor{keywordflow}{if} (dp-\/>\mbox{\hyperlink{structrsu__data_a227b09be7c6eefdd367f8c7fa1e7ef6a}{buf}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00925}00925                         device\_printf(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00926}00926                             \textcolor{stringliteral}{"{}could not allocate buffer\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00927}00927                         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = ENOMEM;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00928}00928                         \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00929}00929                 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00930}00930                 dp-\/>\mbox{\hyperlink{structrsu__data_a3df504f5581b55d2215359aaabfc049e}{ni}} = NULL;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00931}00931         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00932}00932 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00933}00933         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00934}00934 \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}}:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00935}00935         \mbox{\hyperlink{if__rsu_8c_ae27132a0ad83742d43dbd176db050a23}{rsu\_free\_list}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, data, ndata);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00936}00936         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00937}00937 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00938}00938 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00939}00939 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00940}\mbox{\hyperlink{if__rsu_8c_a93275f0068dcf127385a594e43f1f2ae}{00940}} \mbox{\hyperlink{if__rsu_8c_a93275f0068dcf127385a594e43f1f2ae}{rsu\_alloc\_rx\_list}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00941}00941 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00942}00942         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}, i;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00943}00943 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00944}00944         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__rsu_8c_a689b6ca5c274557503ac22d92f33ff1a}{rsu\_alloc\_list}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, \mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>\mbox{\hyperlink{structrsu__softc_aecaa5954a2916e3a74d8403c782a2c97}{sc\_rx}}, \mbox{\hyperlink{if__rsureg_8h_a58561b749d889e57f878ffd3f6480e1d}{RSU\_RX\_LIST\_COUNT}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00945}00945             \mbox{\hyperlink{if__rsureg_8h_a2c4fcb6a5ce3243492bfd4c42311db85}{RSU\_RXBUFSZ}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00946}00946         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != 0)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00947}00947                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00948}00948 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00949}00949         STAILQ\_INIT(\&\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>sc\_rx\_active);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00950}00950         STAILQ\_INIT(\&\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>sc\_rx\_inactive);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00951}00951 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00952}00952         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{if__rsureg_8h_a58561b749d889e57f878ffd3f6480e1d}{RSU\_RX\_LIST\_COUNT}}; i++)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00953}00953                 STAILQ\_INSERT\_HEAD(\&\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>sc\_rx\_inactive, \&\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>\mbox{\hyperlink{structrsu__softc_aecaa5954a2916e3a74d8403c782a2c97}{sc\_rx}}[i], \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00954}00954 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00955}00955         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00956}00956 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00957}00957 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00958}00958 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00959}\mbox{\hyperlink{if__rsu_8c_a413728d936018cf56ee3311859745e44}{00959}} \mbox{\hyperlink{if__rsu_8c_a413728d936018cf56ee3311859745e44}{rsu\_alloc\_tx\_list}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00960}00960 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00961}00961         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}, i;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00962}00962 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00963}00963         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__rsu_8c_a689b6ca5c274557503ac22d92f33ff1a}{rsu\_alloc\_list}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, \mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>\mbox{\hyperlink{structrsu__softc_aa3b5c1a04f0e3161fc7d2d9135a3372f}{sc\_tx}}, \mbox{\hyperlink{if__rsureg_8h_a41175057657d4722d4d1e145be8ed3d3}{RSU\_TX\_LIST\_COUNT}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00964}00964             \mbox{\hyperlink{if__rsureg_8h_a0a7a7faec12b268dfb06d8da0db55000}{RSU\_TXBUFSZ}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00965}00965         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != 0)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00966}00966                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00967}00967 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00968}00968         STAILQ\_INIT(\&\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>sc\_tx\_inactive);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00969}00969 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00970}00970         \textcolor{keywordflow}{for} (i = 0; i != \mbox{\hyperlink{if__rsureg_8h_aea33efd5e2c69d615faad5c5965510aaacbc9816d2e5ae5145d511ee76a7c9f9d}{RSU\_N\_TRANSFER}}; i++) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00971}00971                 STAILQ\_INIT(\&\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>sc\_tx\_active[i]);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00972}00972                 STAILQ\_INIT(\&\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>sc\_tx\_pending[i]);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00973}00973         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00974}00974 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00975}00975         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{if__rsureg_8h_a41175057657d4722d4d1e145be8ed3d3}{RSU\_TX\_LIST\_COUNT}}; i++) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00976}00976                 STAILQ\_INSERT\_HEAD(\&\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>sc\_tx\_inactive, \&\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>\mbox{\hyperlink{structrsu__softc_aa3b5c1a04f0e3161fc7d2d9135a3372f}{sc\_tx}}[i], \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00977}00977         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00978}00978 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00979}00979         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00980}00980 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00981}00981 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00982}00982 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00983}\mbox{\hyperlink{if__rsu_8c_a5b790c202a8799601e097d890275dc7a}{00983}} \mbox{\hyperlink{if__rsu_8c_a5b790c202a8799601e097d890275dc7a}{rsu\_free\_tx\_list}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00984}00984 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00985}00985         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00986}00986 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00987}00987         \textcolor{comment}{/* prevent further allocations from TX list(s) */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00988}00988         STAILQ\_INIT(\&\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>sc\_tx\_inactive);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00989}00989 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00990}00990         \textcolor{keywordflow}{for} (i = 0; i != \mbox{\hyperlink{if__rsureg_8h_aea33efd5e2c69d615faad5c5965510aaacbc9816d2e5ae5145d511ee76a7c9f9d}{RSU\_N\_TRANSFER}}; i++) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00991}00991                 STAILQ\_INIT(\&\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>sc\_tx\_active[i]);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00992}00992                 STAILQ\_INIT(\&\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>sc\_tx\_pending[i]);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00993}00993         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00994}00994 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00995}00995         \mbox{\hyperlink{if__rsu_8c_ae27132a0ad83742d43dbd176db050a23}{rsu\_free\_list}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, \mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>\mbox{\hyperlink{structrsu__softc_aa3b5c1a04f0e3161fc7d2d9135a3372f}{sc\_tx}}, \mbox{\hyperlink{if__rsureg_8h_a41175057657d4722d4d1e145be8ed3d3}{RSU\_TX\_LIST\_COUNT}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00996}00996 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00997}00997 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00998}00998 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l00999}\mbox{\hyperlink{if__rsu_8c_a061b2cb0418ed3e514543acc5e409425}{00999}} \mbox{\hyperlink{if__rsu_8c_a061b2cb0418ed3e514543acc5e409425}{rsu\_free\_rx\_list}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01000}01000 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01001}01001         \textcolor{comment}{/* prevent further allocations from RX list(s) */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01002}01002         STAILQ\_INIT(\&\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>sc\_rx\_inactive);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01003}01003         STAILQ\_INIT(\&\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>sc\_rx\_active);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01004}01004 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01005}01005         \mbox{\hyperlink{if__rsu_8c_ae27132a0ad83742d43dbd176db050a23}{rsu\_free\_list}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, \mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>\mbox{\hyperlink{structrsu__softc_aecaa5954a2916e3a74d8403c782a2c97}{sc\_rx}}, \mbox{\hyperlink{if__rsureg_8h_a58561b749d889e57f878ffd3f6480e1d}{RSU\_RX\_LIST\_COUNT}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01006}01006 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01007}01007 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01008}01008 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01009}\mbox{\hyperlink{if__rsu_8c_ae27132a0ad83742d43dbd176db050a23}{01009}} \mbox{\hyperlink{if__rsu_8c_ae27132a0ad83742d43dbd176db050a23}{rsu\_free\_list}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__data}{rsu\_data}} data[], \textcolor{keywordtype}{int} ndata)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01010}01010 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01011}01011         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01012}01012 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01013}01013         \textcolor{keywordflow}{for} (i = 0; i < ndata; i++) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01014}01014                 \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__data}{rsu\_data}} *dp = \&data[i];}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01015}01015 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01016}01016                 \textcolor{keywordflow}{if} (dp-\/>\mbox{\hyperlink{structrsu__data_a227b09be7c6eefdd367f8c7fa1e7ef6a}{buf}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01017}01017                         free(dp-\/>\mbox{\hyperlink{structrsu__data_a227b09be7c6eefdd367f8c7fa1e7ef6a}{buf}}, M\_USBDEV);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01018}01018                         dp-\/>\mbox{\hyperlink{structrsu__data_a227b09be7c6eefdd367f8c7fa1e7ef6a}{buf}} = NULL;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01019}01019                 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01020}01020                 \textcolor{keywordflow}{if} (dp-\/>\mbox{\hyperlink{structrsu__data_a3df504f5581b55d2215359aaabfc049e}{ni}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01021}01021                         ieee80211\_free\_node(dp-\/>\mbox{\hyperlink{structrsu__data_a3df504f5581b55d2215359aaabfc049e}{ni}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01022}01022                         dp-\/>\mbox{\hyperlink{structrsu__data_a3df504f5581b55d2215359aaabfc049e}{ni}} = NULL;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01023}01023                 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01024}01024         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01025}01025 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01026}01026 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01027}01027 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__data}{rsu\_data}} *}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01028}\mbox{\hyperlink{if__rsu_8c_ac7e7abc1f67f4ffa65ea9779c045f93e}{01028}} \mbox{\hyperlink{if__rsu_8c_ac7e7abc1f67f4ffa65ea9779c045f93e}{\_rsu\_getbuf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01029}01029 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01030}01030         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__data}{rsu\_data}} *bf;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01031}01031 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01032}01032         bf = STAILQ\_FIRST(\&\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>sc\_tx\_inactive);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01033}01033         \textcolor{keywordflow}{if} (bf != NULL)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01034}01034                 STAILQ\_REMOVE\_HEAD(\&\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>sc\_tx\_inactive, \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01035}01035         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01036}01036                 bf = NULL;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01037}01037         \textcolor{keywordflow}{return} (bf);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01038}01038 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01039}01039 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01040}01040 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__data}{rsu\_data}} *}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01041}\mbox{\hyperlink{if__rsu_8c_a13eb301a8bdf61624acff9e3b4e4c1c4}{01041}} \mbox{\hyperlink{if__rsu_8c_a13eb301a8bdf61624acff9e3b4e4c1c4}{rsu\_getbuf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01042}01042 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01043}01043         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__data}{rsu\_data}} *bf;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01044}01044 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01045}01045         \mbox{\hyperlink{if__rsureg_8h_aced96ac92d4bb829407616864037ea8d}{RSU\_ASSERT\_LOCKED}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01046}01046 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01047}01047         bf = \mbox{\hyperlink{if__rsu_8c_ac7e7abc1f67f4ffa65ea9779c045f93e}{\_rsu\_getbuf}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01048}01048         \textcolor{keywordflow}{if} (bf == NULL) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01049}01049                 \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, \mbox{\hyperlink{if__rsu_8c_a038e3dcd0fb5266c1184770947cceaab}{RSU\_DEBUG\_TX}}, \textcolor{stringliteral}{"{}\%s: no buffers\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01050}01050         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01051}01051         \textcolor{keywordflow}{return} (bf);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01052}01052 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01053}01053 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01054}01054 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01055}\mbox{\hyperlink{if__rsu_8c_a74136760c03cfc36cda9847b7e8dde65}{01055}} \mbox{\hyperlink{if__rsu_8c_a74136760c03cfc36cda9847b7e8dde65}{rsu\_freebuf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__data}{rsu\_data}} *bf)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01056}01056 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01057}01057 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01058}01058         \mbox{\hyperlink{if__rsureg_8h_aced96ac92d4bb829407616864037ea8d}{RSU\_ASSERT\_LOCKED}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01059}01059         STAILQ\_INSERT\_TAIL(\&\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>sc\_tx\_inactive, bf, \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01060}01060 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01061}01061 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01062}01062 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01063}\mbox{\hyperlink{if__rsu_8c_a023000c2a50143efcf337d36caee9245}{01063}} \mbox{\hyperlink{if__rsu_8c_a023000c2a50143efcf337d36caee9245}{rsu\_write\_region\_1}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, uint16\_t addr, uint8\_t *\mbox{\hyperlink{structrsu__data_a227b09be7c6eefdd367f8c7fa1e7ef6a}{buf}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01064}01064     \textcolor{keywordtype}{int} \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01065}01065 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01066}01066         \mbox{\hyperlink{structusb__device__request}{usb\_device\_request\_t}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01067}01067 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01068}01068         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bmRequestType = \mbox{\hyperlink{usb_8h_a6aafebff48631e00449299005c4a858c}{UT\_WRITE\_VENDOR\_DEVICE}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01069}01069         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bRequest = \mbox{\hyperlink{if__rsureg_8h_a0b940feb775e4b01e0165f06d4d50d02}{R92S\_REQ\_REGS}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01070}01070         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wValue, addr);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01071}01071         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex, 0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01072}01072         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wLength, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01073}01073 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01074}01074         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__rsu_8c_a2567a7ad7f1eb6ac0b6479cc9dca5fe4}{rsu\_do\_request}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, \mbox{\hyperlink{structrsu__data_a227b09be7c6eefdd367f8c7fa1e7ef6a}{buf}}));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01075}01075 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01076}01076 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01077}01077 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01078}\mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{01078}} \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, uint16\_t addr, uint8\_t \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01079}01079 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01080}01080         \mbox{\hyperlink{if__rsu_8c_a023000c2a50143efcf337d36caee9245}{rsu\_write\_region\_1}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, addr, \&\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, 1);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01081}01081 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01082}01082 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01083}01083 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01084}\mbox{\hyperlink{if__rsu_8c_adfff5565daadbabd674ba3dd1e7a48bc}{01084}} \mbox{\hyperlink{if__rsu_8c_adfff5565daadbabd674ba3dd1e7a48bc}{rsu\_write\_2}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, uint16\_t addr, uint16\_t \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01085}01085 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01086}01086         \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = htole16(\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01087}01087         \mbox{\hyperlink{if__rsu_8c_a023000c2a50143efcf337d36caee9245}{rsu\_write\_region\_1}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, addr, (uint8\_t *)\&\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, 2);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01088}01088 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01089}01089 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01090}01090 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01091}\mbox{\hyperlink{if__rsu_8c_abf65ff90f534d06c7131e43ace2e7d5e}{01091}} \mbox{\hyperlink{if__rsu_8c_abf65ff90f534d06c7131e43ace2e7d5e}{rsu\_write\_4}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, uint16\_t addr, uint32\_t \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01092}01092 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01093}01093         \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = htole32(\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01094}01094         \mbox{\hyperlink{if__rsu_8c_a023000c2a50143efcf337d36caee9245}{rsu\_write\_region\_1}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, addr, (uint8\_t *)\&\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, 4);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01095}01095 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01096}01096 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01097}01097 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01098}\mbox{\hyperlink{if__rsu_8c_a0d9d0eb1a2b22d4c85f0ef346b7b8365}{01098}} \mbox{\hyperlink{if__rsu_8c_a0d9d0eb1a2b22d4c85f0ef346b7b8365}{rsu\_read\_region\_1}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, uint16\_t addr, uint8\_t *\mbox{\hyperlink{structrsu__data_a227b09be7c6eefdd367f8c7fa1e7ef6a}{buf}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01099}01099     \textcolor{keywordtype}{int} \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01100}01100 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01101}01101         \mbox{\hyperlink{structusb__device__request}{usb\_device\_request\_t}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01102}01102 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01103}01103         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bmRequestType = \mbox{\hyperlink{usb_8h_a6da49500e864a3c33c9eed3dd49d3e59}{UT\_READ\_VENDOR\_DEVICE}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01104}01104         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bRequest = \mbox{\hyperlink{if__rsureg_8h_a0b940feb775e4b01e0165f06d4d50d02}{R92S\_REQ\_REGS}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01105}01105         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wValue, addr);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01106}01106         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex, 0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01107}01107         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wLength, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01108}01108 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01109}01109         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__rsu_8c_a2567a7ad7f1eb6ac0b6479cc9dca5fe4}{rsu\_do\_request}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, \mbox{\hyperlink{structrsu__data_a227b09be7c6eefdd367f8c7fa1e7ef6a}{buf}}));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01110}01110 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01111}01111 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01112}01112 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01113}\mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{01113}} \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, uint16\_t addr)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01114}01114 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01115}01115         uint8\_t \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01116}01116 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01117}01117         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__rsu_8c_a0d9d0eb1a2b22d4c85f0ef346b7b8365}{rsu\_read\_region\_1}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, addr, \&\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, 1) != 0)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01118}01118                 \textcolor{keywordflow}{return} (0xff);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01119}01119         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01120}01120 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01121}01121 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01122}01122 \textcolor{keyword}{static} uint16\_t}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01123}\mbox{\hyperlink{if__rsu_8c_ae642a30fa954c7978f0ff24859d7a7a9}{01123}} \mbox{\hyperlink{if__rsu_8c_ae642a30fa954c7978f0ff24859d7a7a9}{rsu\_read\_2}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, uint16\_t addr)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01124}01124 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01125}01125         uint16\_t \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01126}01126 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01127}01127         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__rsu_8c_a0d9d0eb1a2b22d4c85f0ef346b7b8365}{rsu\_read\_region\_1}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, addr, (uint8\_t *)\&\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, 2) != 0)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01128}01128                 \textcolor{keywordflow}{return} (0xffff);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01129}01129         \textcolor{keywordflow}{return} (le16toh(\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01130}01130 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01131}01131 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01132}01132 \textcolor{keyword}{static} uint32\_t}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01133}\mbox{\hyperlink{if__rsu_8c_a1741f47255e3a970e39706ca00fa428b}{01133}} \mbox{\hyperlink{if__rsu_8c_a1741f47255e3a970e39706ca00fa428b}{rsu\_read\_4}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, uint16\_t addr)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01134}01134 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01135}01135         uint32\_t \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01136}01136 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01137}01137         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__rsu_8c_a0d9d0eb1a2b22d4c85f0ef346b7b8365}{rsu\_read\_region\_1}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, addr, (uint8\_t *)\&\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, 4) != 0)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01138}01138                 \textcolor{keywordflow}{return} (0xffffffff);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01139}01139         \textcolor{keywordflow}{return} (le32toh(\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01140}01140 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01141}01141 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01142}01142 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01143}\mbox{\hyperlink{if__rsu_8c_a63625f25e8a3a2f4853e64df04c2f400}{01143}} \mbox{\hyperlink{if__rsu_8c_a63625f25e8a3a2f4853e64df04c2f400}{rsu\_fw\_iocmd}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, uint32\_t iocmd)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01144}01144 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01145}01145         \textcolor{keywordtype}{int} ntries;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01146}01146 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01147}01147         \mbox{\hyperlink{if__rsu_8c_abf65ff90f534d06c7131e43ace2e7d5e}{rsu\_write\_4}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, \mbox{\hyperlink{if__rsureg_8h_a74c5b0a88c167303bbfadfde2e201266}{R92S\_IOCMD\_CTRL}}, iocmd);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01148}01148         \mbox{\hyperlink{if__rsu_8c_aa090b4eb974d6bb02fde866094f25bd0}{rsu\_ms\_delay}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, 1);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01149}01149         \textcolor{keywordflow}{for} (ntries = 0; ntries < 50; ntries++) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01150}01150                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__rsu_8c_a1741f47255e3a970e39706ca00fa428b}{rsu\_read\_4}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, \mbox{\hyperlink{if__rsureg_8h_a74c5b0a88c167303bbfadfde2e201266}{R92S\_IOCMD\_CTRL}}) == 0)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01151}01151                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01152}01152                 \mbox{\hyperlink{if__rsu_8c_aa090b4eb974d6bb02fde866094f25bd0}{rsu\_ms\_delay}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, 1);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01153}01153         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01154}01154         \textcolor{keywordflow}{return} (ETIMEDOUT);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01155}01155 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01156}01156 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01157}01157 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01158}\mbox{\hyperlink{if__rsu_8c_ab934e99c6309121280bdc77e7903b9fe}{01158}} \mbox{\hyperlink{if__rsu_8c_ab934e99c6309121280bdc77e7903b9fe}{rsu\_efuse\_read\_1}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, uint16\_t addr)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01159}01159 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01160}01160         uint32\_t \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01161}01161         \textcolor{keywordtype}{int} ntries;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01162}01162 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01163}01163         \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} = \mbox{\hyperlink{if__rsu_8c_a1741f47255e3a970e39706ca00fa428b}{rsu\_read\_4}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, \mbox{\hyperlink{if__rsureg_8h_ac3e564b98a642a8cfadd3581c256e6eb}{R92S\_EFUSE\_CTRL}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01164}01164         \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} = \mbox{\hyperlink{if__rsureg_8h_a7d2f5f047243331054cff9dae1a1af31}{RW}}(\mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, R92S\_EFUSE\_CTRL\_ADDR, addr);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01165}01165         \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} \&= \string~R92S\_EFUSE\_CTRL\_VALID;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01166}01166         \mbox{\hyperlink{if__rsu_8c_abf65ff90f534d06c7131e43ace2e7d5e}{rsu\_write\_4}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, \mbox{\hyperlink{if__rsureg_8h_ac3e564b98a642a8cfadd3581c256e6eb}{R92S\_EFUSE\_CTRL}}, \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01167}01167         \textcolor{comment}{/* Wait for read operation to complete. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01168}01168         \textcolor{keywordflow}{for} (ntries = 0; ntries < 100; ntries++) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01169}01169                 \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} = \mbox{\hyperlink{if__rsu_8c_a1741f47255e3a970e39706ca00fa428b}{rsu\_read\_4}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, \mbox{\hyperlink{if__rsureg_8h_ac3e564b98a642a8cfadd3581c256e6eb}{R92S\_EFUSE\_CTRL}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01170}01170                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} \& \mbox{\hyperlink{if__rsureg_8h_a69349e85d7ed0e1e7605450cb1e04efe}{R92S\_EFUSE\_CTRL\_VALID}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01171}01171                         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__rsureg_8h_aa1f710025311c0169fbc5b1296d914b6}{MS}}(\mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, R92S\_EFUSE\_CTRL\_DATA));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01172}01172                 \mbox{\hyperlink{if__rsu_8c_aa090b4eb974d6bb02fde866094f25bd0}{rsu\_ms\_delay}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, 1);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01173}01173         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01174}01174         device\_printf(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01175}01175             \textcolor{stringliteral}{"{}could not read efuse byte at address 0x\%x\(\backslash\)n"{}}, addr);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01176}01176         \textcolor{keywordflow}{return} (0xff);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01177}01177 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01178}01178 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01179}01179 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01180}\mbox{\hyperlink{if__rsu_8c_a76b90045b8aa7fc2bced44c208c4a7f6}{01180}} \mbox{\hyperlink{if__rsu_8c_a76b90045b8aa7fc2bced44c208c4a7f6}{rsu\_read\_rom}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01181}01181 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01182}01182         uint8\_t *rom = \mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>\mbox{\hyperlink{structrsu__softc_af035941d329ad65b36963693af806ec6}{rom}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01183}01183         uint16\_t addr = 0;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01184}01184         uint32\_t \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01185}01185         uint8\_t off, msk;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01186}01186         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01187}01187 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01188}01188         \textcolor{comment}{/* Make sure that ROM type is eFuse and that autoload succeeded. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01189}01189         \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} = \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, \mbox{\hyperlink{if__rsureg_8h_a967deee68d704a4154fcb09dae8817fd}{R92S\_EE\_9346CR}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01190}01190         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} \& (\mbox{\hyperlink{if__rsureg_8h_a9c20b9686cdfcfaf1066008ac3c3bb11}{R92S\_9356SEL}} | \mbox{\hyperlink{if__rsureg_8h_abcaf9d182727d51691a2871cf552eb41}{R92S\_EEPROM\_EN}})) != \mbox{\hyperlink{if__rsureg_8h_abcaf9d182727d51691a2871cf552eb41}{R92S\_EEPROM\_EN}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01191}01191                 \textcolor{keywordflow}{return} (EIO);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01192}01192 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01193}01193         \textcolor{comment}{/* Turn on 2.5V to prevent eFuse leakage. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01194}01194         \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} = \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, \mbox{\hyperlink{if__rsureg_8h_ad8905f4bb925d07d81a1d630f413559a}{R92S\_EFUSE\_TEST}} + 3);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01195}01195         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, \mbox{\hyperlink{if__rsureg_8h_ad8905f4bb925d07d81a1d630f413559a}{R92S\_EFUSE\_TEST}} + 3, \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} | 0x80);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01196}01196         \mbox{\hyperlink{if__rsu_8c_aa090b4eb974d6bb02fde866094f25bd0}{rsu\_ms\_delay}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, 1);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01197}01197         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, \mbox{\hyperlink{if__rsureg_8h_ad8905f4bb925d07d81a1d630f413559a}{R92S\_EFUSE\_TEST}} + 3, \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} \& \string~0x80);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01198}01198 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01199}01199         \textcolor{comment}{/* Read full ROM image. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01200}01200         memset(\&\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>\mbox{\hyperlink{structrsu__softc_af035941d329ad65b36963693af806ec6}{rom}}, 0xff, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>\mbox{\hyperlink{structrsu__softc_af035941d329ad65b36963693af806ec6}{rom}}));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01201}01201         \textcolor{keywordflow}{while} (addr < 512) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01202}01202                 \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} = \mbox{\hyperlink{if__rsu_8c_ab934e99c6309121280bdc77e7903b9fe}{rsu\_efuse\_read\_1}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, addr);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01203}01203                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} == 0xff)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01204}01204                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01205}01205                 addr++;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01206}01206                 off = \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} >> 4;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01207}01207                 msk = \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} \& 0xf;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01208}01208                 \textcolor{keywordflow}{for} (i = 0; i < 4; i++) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01209}01209                         \textcolor{keywordflow}{if} (msk \& (1 << i))}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01210}01210                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01211}01211                         rom[off * 8 + i * 2 + 0] =}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01212}01212                             \mbox{\hyperlink{if__rsu_8c_ab934e99c6309121280bdc77e7903b9fe}{rsu\_efuse\_read\_1}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, addr);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01213}01213                         addr++;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01214}01214                         rom[off * 8 + i * 2 + 1] =}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01215}01215                             \mbox{\hyperlink{if__rsu_8c_ab934e99c6309121280bdc77e7903b9fe}{rsu\_efuse\_read\_1}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, addr);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01216}01216                         addr++;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01217}01217                 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01218}01218         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01219}01219 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01220}01220         \textcolor{keywordflow}{if} (rsu\_debug \& \mbox{\hyperlink{if__rsu_8c_a09a67fdd4c21366cb6b0691e667fdce6}{RSU\_DEBUG\_RESET}}) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01221}01221                 \textcolor{comment}{/* Dump ROM content. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01222}01222                 printf(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01223}01223                 \textcolor{keywordflow}{for} (i = 0; i < \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>\mbox{\hyperlink{structrsu__softc_af035941d329ad65b36963693af806ec6}{rom}}); i++)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01224}01224                         printf(\textcolor{stringliteral}{"{}\%02x:"{}}, rom[i]);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01225}01225                 printf(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01226}01226         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01227}01227 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01228}01228         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01229}01229 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01230}01230 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01231}01231 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01232}\mbox{\hyperlink{if__rsu_8c_a4ec7d2ccf04c77a70f082a7905f2fca3}{01232}} \mbox{\hyperlink{if__rsu_8c_a4ec7d2ccf04c77a70f082a7905f2fca3}{rsu\_fw\_cmd}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, uint8\_t code, \textcolor{keywordtype}{void} *\mbox{\hyperlink{structrsu__data_a227b09be7c6eefdd367f8c7fa1e7ef6a}{buf}}, \textcolor{keywordtype}{int} \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01233}01233 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01234}01234         \textcolor{keyword}{const} uint8\_t which = \mbox{\hyperlink{if__rsu_8c_a97500fa871d922876eccc497e21c3997}{RSU\_H2C\_ENDPOINT}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01235}01235         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__data}{rsu\_data}} *data;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01236}01236         \textcolor{keyword}{struct }\mbox{\hyperlink{structr92s__tx__desc}{r92s\_tx\_desc}} *txd;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01237}01237         \textcolor{keyword}{struct }\mbox{\hyperlink{structr92s__fw__cmd__hdr}{r92s\_fw\_cmd\_hdr}} *cmd;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01238}01238         \textcolor{keywordtype}{int} cmdsz;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01239}01239         \textcolor{keywordtype}{int} xferlen;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01240}01240 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01241}01241         \mbox{\hyperlink{if__rsureg_8h_aced96ac92d4bb829407616864037ea8d}{RSU\_ASSERT\_LOCKED}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01242}01242 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01243}01243         data = \mbox{\hyperlink{if__rsu_8c_a13eb301a8bdf61624acff9e3b4e4c1c4}{rsu\_getbuf}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01244}01244         \textcolor{keywordflow}{if} (data == NULL)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01245}01245                 \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01246}01246 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01247}01247         \textcolor{comment}{/* Blank the entire payload, just to be safe */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01248}01248         memset(data-\/>buf, \textcolor{charliteral}{'\(\backslash\)0'}, \mbox{\hyperlink{if__rsureg_8h_a0a7a7faec12b268dfb06d8da0db55000}{RSU\_TXBUFSZ}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01249}01249 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01250}01250         \textcolor{comment}{/* Round-\/up command length to a multiple of 8 bytes. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01251}01251         \textcolor{comment}{/* XXX TODO: is this required? */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01252}01252         cmdsz = (\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} + 7) \& \string~7;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01253}01253 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01254}01254         xferlen = \textcolor{keyword}{sizeof}(*txd) + \textcolor{keyword}{sizeof}(*cmd) + cmdsz;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01255}01255         KASSERT(xferlen <= \mbox{\hyperlink{if__rsureg_8h_a0a7a7faec12b268dfb06d8da0db55000}{RSU\_TXBUFSZ}}, (\textcolor{stringliteral}{"{}\%s: invalid length"{}}, \_\_func\_\_));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01256}01256         memset(data-\/>buf, 0, xferlen);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01257}01257 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01258}01258         \textcolor{comment}{/* Setup Tx descriptor. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01259}01259         txd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structr92s__tx__desc}{r92s\_tx\_desc}} *)data-\/>buf;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01260}01260         txd-\/>\mbox{\hyperlink{structr92s__tx__desc_a77a2623c71315351ddf435ba3063af01}{txdw0}} = htole32(}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01261}01261             \mbox{\hyperlink{if__rsureg_8h_a14155179e01608510206b9cdf4790068}{SM}}(R92S\_TXDW0\_OFFSET, \textcolor{keyword}{sizeof}(*txd)) |}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01262}01262             \mbox{\hyperlink{if__rsureg_8h_a14155179e01608510206b9cdf4790068}{SM}}(R92S\_TXDW0\_PKTLEN, \textcolor{keyword}{sizeof}(*cmd) + cmdsz) |}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01263}01263             \mbox{\hyperlink{if__rsureg_8h_aaa182869abe369a95d3901d7b31bdd5a}{R92S\_TXDW0\_OWN}} | \mbox{\hyperlink{if__rsureg_8h_a696ae2cf3a9f6dbe50313153e35ac0ea}{R92S\_TXDW0\_FSG}} | \mbox{\hyperlink{if__rsureg_8h_a3518571ca56430d4a97e95e816b94331}{R92S\_TXDW0\_LSG}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01264}01264         txd-\/>\mbox{\hyperlink{structr92s__tx__desc_a33ac74af0e83c6fb068c26681bf97cea}{txdw1}} = htole32(\mbox{\hyperlink{if__rsureg_8h_a14155179e01608510206b9cdf4790068}{SM}}(R92S\_TXDW1\_QSEL, \mbox{\hyperlink{if__rsureg_8h_a1b9f2047ef3d13da2ba10fb2e48fffb2}{R92S\_TXDW1\_QSEL\_H2C}}));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01265}01265 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01266}01266         \textcolor{comment}{/* Setup command header. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01267}01267         cmd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structr92s__fw__cmd__hdr}{r92s\_fw\_cmd\_hdr}} *)\&txd[1];}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01268}01268         cmd-\/>\mbox{\hyperlink{structr92s__fw__cmd__hdr_a081cdc793b3b33387d20cfc2c5412665}{len}} = htole16(cmdsz);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01269}01269         cmd-\/>\mbox{\hyperlink{structr92s__fw__cmd__hdr_a9f07f91635c369e0f08bad4a8e275e63}{code}} = \mbox{\hyperlink{structr92s__fw__cmd__hdr_a9f07f91635c369e0f08bad4a8e275e63}{code}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01270}01270         cmd-\/>\mbox{\hyperlink{structr92s__fw__cmd__hdr_a033f9d8254b4056b8da123e282992bb5}{seq}} = sc-\/>\mbox{\hyperlink{structrsu__softc_ab08a7583825f8f4cb1b8d5863135bb65}{cmd\_seq}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01271}01271         sc-\/>\mbox{\hyperlink{structrsu__softc_ab08a7583825f8f4cb1b8d5863135bb65}{cmd\_seq}} = (sc-\/>\mbox{\hyperlink{structrsu__softc_ab08a7583825f8f4cb1b8d5863135bb65}{cmd\_seq}} + 1) \& 0x7f;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01272}01272 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01273}01273         \textcolor{comment}{/* Copy command payload. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01274}01274         memcpy(\&cmd[1], buf, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01275}01275 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01276}01276         \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a038e3dcd0fb5266c1184770947cceaab}{RSU\_DEBUG\_TX}} | \mbox{\hyperlink{if__rsu_8c_a1b821762ca600087d89f818174fbf23f}{RSU\_DEBUG\_FWCMD}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01277}01277             \textcolor{stringliteral}{"{}\%s: Tx cmd code=0x\%x len=0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01278}01278             \_\_func\_\_, \mbox{\hyperlink{structr92s__fw__cmd__hdr_a9f07f91635c369e0f08bad4a8e275e63}{code}}, cmdsz);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01279}01279         data-\/>buflen = xferlen;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01280}01280         STAILQ\_INSERT\_TAIL(\&sc-\/>sc\_tx\_pending[which], data, \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01281}01281         \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structrsu__softc_abbd456b3b6c1981a4daf906bb5f1299f}{sc\_xfer}}[which]);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01282}01282 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01283}01283         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01284}01284 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01285}01285 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01286}01286 \textcolor{comment}{/* ARGSUSED */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01287}01287 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01288}\mbox{\hyperlink{if__rsu_8c_a469f71e72e7c996b33dfaed9ea4e796f}{01288}} \mbox{\hyperlink{if__rsu_8c_a4400148497f18539b05a819ebbff03d2}{rsu\_calib\_task}}(\textcolor{keywordtype}{void} *arg, \textcolor{keywordtype}{int} pending \_\_unused)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01289}01289 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01290}01290         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc = arg;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01291}01291 \textcolor{preprocessor}{\#ifdef notyet}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01292}01292         uint32\_t \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01293}01293 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01294}01294 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01295}01295         \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a77bae8a49857fb519c7a2628373f3297}{RSU\_DEBUG\_CALIB}}, \textcolor{stringliteral}{"{}\%s: running calibration task\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01296}01296             \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01297}01297 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01298}01298         \mbox{\hyperlink{if__rsureg_8h_a48532232b39d8fa728a8a10df1d3f4b7}{RSU\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01299}01299 \textcolor{preprocessor}{\#ifdef notyet}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01300}01300         \textcolor{comment}{/* Read WPS PBC status. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01301}01301         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_acfeb86c08946848584ed688c7d499e8d}{R92S\_MAC\_PINMUX\_CTRL}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01302}01302             \mbox{\hyperlink{if__rsureg_8h_a5d7665951c964b4b23e302b41569ff52}{R92S\_GPIOMUX\_EN}} | \mbox{\hyperlink{if__rsureg_8h_a14155179e01608510206b9cdf4790068}{SM}}(R92S\_GPIOSEL\_GPIO, \mbox{\hyperlink{if__rsureg_8h_a116d3c40c34ab589ae5a437248ce6243}{R92S\_GPIOSEL\_GPIO\_JTAG}}));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01303}01303         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a127db9ffe1525b5002876766d3fb8594}{R92S\_GPIO\_IO\_SEL}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01304}01304             \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a127db9ffe1525b5002876766d3fb8594}{R92S\_GPIO\_IO\_SEL}}) \& \string~\mbox{\hyperlink{if__rsureg_8h_a3da707ef51e3864c97e5fe27f6df7695}{R92S\_GPIO\_WPS}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01305}01305         \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} = \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_ad8074634a19fcc8e65f61c19f491d707}{R92S\_GPIO\_CTRL}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01306}01306         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} != 0xff \&\& (\mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} \& \mbox{\hyperlink{if__rsureg_8h_a3da707ef51e3864c97e5fe27f6df7695}{R92S\_GPIO\_WPS}}))}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01307}01307                 \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a77bae8a49857fb519c7a2628373f3297}{RSU\_DEBUG\_CALIB}}, \textcolor{stringliteral}{"{}WPS PBC is pushed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01308}01308 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01309}01309         \textcolor{comment}{/* Read current signal level. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01310}01310         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__rsu_8c_a63625f25e8a3a2f4853e64df04c2f400}{rsu\_fw\_iocmd}}(sc, 0xf4000001) == 0) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01311}01311                 sc-\/>\mbox{\hyperlink{structrsu__softc_a6f7d0cb362cb9e33e9136d0a9036be03}{sc\_currssi}} = \mbox{\hyperlink{if__rsu_8c_a1741f47255e3a970e39706ca00fa428b}{rsu\_read\_4}}(sc, \mbox{\hyperlink{if__rsureg_8h_a5c5d26aa93fe9180aee12d8b1dac3de3}{R92S\_IOCMD\_DATA}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01312}01312                 \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a77bae8a49857fb519c7a2628373f3297}{RSU\_DEBUG\_CALIB}}, \textcolor{stringliteral}{"{}\%s: RSSI=\%d (\%d)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01313}01313                     \_\_func\_\_, sc-\/>\mbox{\hyperlink{structrsu__softc_a6f7d0cb362cb9e33e9136d0a9036be03}{sc\_currssi}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01314}01314                     \mbox{\hyperlink{if__rsu_8c_a5c7e22b9831d6bac31b24adc1a2e0db6}{rsu\_hwrssi\_to\_rssi}}(sc, sc-\/>\mbox{\hyperlink{structrsu__softc_a6f7d0cb362cb9e33e9136d0a9036be03}{sc\_currssi}}));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01315}01315         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01316}01316         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrsu__softc_ad692f1cf99fa20f23d8cec471f2b7985}{sc\_calibrating}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01317}01317                 taskqueue\_enqueue\_timeout(taskqueue\_thread, \&sc-\/>\mbox{\hyperlink{structrsu__softc_a58bb50377ccc3066c3291d5b2bc404c8}{calib\_task}}, hz);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01318}01318         \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01319}01319 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01320}01320 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01321}01321 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01322}\mbox{\hyperlink{if__rsu_8c_a7d3bca7c62501729ad0f2ff14841b559}{01322}} \mbox{\hyperlink{if__rsu_8c_a01295ab8e5ccf28cfa62baf8c82a5be6}{rsu\_tx\_task}}(\textcolor{keywordtype}{void} *arg, \textcolor{keywordtype}{int} pending \_\_unused)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01323}01323 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01324}01324         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc = arg;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01325}01325 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01326}01326         \mbox{\hyperlink{if__rsureg_8h_a48532232b39d8fa728a8a10df1d3f4b7}{RSU\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01327}01327         \mbox{\hyperlink{if__rsu_8c_a548502146c12f7f9cce851fcc034a028}{\_rsu\_start}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01328}01328         \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01329}01329 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01330}01330 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01331}\mbox{\hyperlink{if__rsu_8c_a8dd2e565ad7bc7803a3cde4a918769f4}{01331}} \textcolor{preprocessor}{\#define RSU\_PWR\_UNKNOWN         0x0}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01332}\mbox{\hyperlink{if__rsu_8c_a0e7a4e52f74d34a282135ac947f4090b}{01332}} \textcolor{preprocessor}{\#define RSU\_PWR\_ACTIVE          0x1}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01333}\mbox{\hyperlink{if__rsu_8c_a817aa852c99312fa2eea0a8cb34fd676}{01333}} \textcolor{preprocessor}{\#define RSU\_PWR\_OFF             0x2}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01334}\mbox{\hyperlink{if__rsu_8c_aab11309303cc58f089bcf1426fb60893}{01334}} \textcolor{preprocessor}{\#define RSU\_PWR\_SLEEP           0x3}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01335}01335 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01336}01336 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01337}01337 \textcolor{comment}{ * Set the current power state.}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01338}01338 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01339}01339 \textcolor{comment}{ * The rtlwifi code doesn't do this so aggressively; it}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01340}01340 \textcolor{comment}{ * waits for an idle period after association with}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01341}01341 \textcolor{comment}{ * no traffic before doing this.}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01342}01342 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01343}01343 \textcolor{comment}{ * For now -\/ it's on in all states except RUN, and}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01344}01344 \textcolor{comment}{ * in RUN it'll transition to allow sleep.}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01345}01345 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01346}01346 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01347}\mbox{\hyperlink{structr92s__pwr__cmd}{01347}} \textcolor{keyword}{struct }\mbox{\hyperlink{structr92s__pwr__cmd}{r92s\_pwr\_cmd}} \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01348}\mbox{\hyperlink{structr92s__pwr__cmd_a5c83adbe7cd7581ed16ada280ea846b4}{01348}}         uint8\_t \mbox{\hyperlink{structr92s__pwr__cmd_a5c83adbe7cd7581ed16ada280ea846b4}{mode}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01349}\mbox{\hyperlink{structr92s__pwr__cmd_a329d4d359f2e4481c3271f491aae79c3}{01349}}         uint8\_t \mbox{\hyperlink{structr92s__pwr__cmd_a329d4d359f2e4481c3271f491aae79c3}{smart\_ps}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01350}\mbox{\hyperlink{structr92s__pwr__cmd_ae1ef404746347edf5f2371b913363204}{01350}}         uint8\_t \mbox{\hyperlink{structr92s__pwr__cmd_ae1ef404746347edf5f2371b913363204}{bcn\_pass\_time}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01351}01351 \};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01352}01352 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01353}01353 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01354}\mbox{\hyperlink{if__rsu_8c_a2a4cc7791c269a4b05febcd3cd67668a}{01354}} \mbox{\hyperlink{if__rsu_8c_a2a4cc7791c269a4b05febcd3cd67668a}{rsu\_set\_fw\_power\_state}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc, \textcolor{keywordtype}{int} state)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01355}01355 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01356}01356         \textcolor{keyword}{struct }\mbox{\hyperlink{structr92s__set__pwr__mode}{r92s\_set\_pwr\_mode}} cmd;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01357}01357         \textcolor{comment}{//struct r92s\_pwr\_cmd cmd;}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01358}01358         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01359}01359 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01360}01360         \mbox{\hyperlink{if__rsureg_8h_aced96ac92d4bb829407616864037ea8d}{RSU\_ASSERT\_LOCKED}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01361}01361 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01362}01362         \textcolor{comment}{/* only change state if required */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01363}01363         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrsu__softc_a76f70aabe687b5a46e0a6f4fc9751a16}{sc\_curpwrstate}} == state)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01364}01364                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01365}01365 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01366}01366         memset(\&cmd, 0, \textcolor{keyword}{sizeof}(cmd));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01367}01367 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01368}01368         \textcolor{keywordflow}{switch} (state) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01369}01369         \textcolor{keywordflow}{case} \mbox{\hyperlink{if__rsu_8c_a0e7a4e52f74d34a282135ac947f4090b}{RSU\_PWR\_ACTIVE}}:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01370}01370                 \textcolor{comment}{/* Force the hardware awake */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01371}01371                 \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_ae3e18d0ae2bc58622c2e36a12a17d370}{R92S\_USB\_HRPWM}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01372}01372                     \mbox{\hyperlink{if__rsureg_8h_a48580dad4b2f100abb0fac66844e07b9}{R92S\_USB\_HRPWM\_PS\_ST\_ACTIVE}} | \mbox{\hyperlink{if__rsureg_8h_a27d5e3f97a2ca41ac9512153b0f3eac1}{R92S\_USB\_HRPWM\_PS\_ALL\_ON}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01373}01373                 cmd.\mbox{\hyperlink{structr92s__set__pwr__mode_a6e49df94a4ce78ec609d18a5ce2977b5}{mode}} = \mbox{\hyperlink{if__rsureg_8h_ae10e537850704bb465bbc55ef757dedb}{R92S\_PS\_MODE\_ACTIVE}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01374}01374                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01375}01375         \textcolor{keywordflow}{case} \mbox{\hyperlink{if__rsu_8c_aab11309303cc58f089bcf1426fb60893}{RSU\_PWR\_SLEEP}}:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01376}01376                 cmd.\mbox{\hyperlink{structr92s__set__pwr__mode_a6e49df94a4ce78ec609d18a5ce2977b5}{mode}} = \mbox{\hyperlink{if__rsureg_8h_ad45816292170c4817a4a83119dedf85d}{R92S\_PS\_MODE\_DTIM}};      \textcolor{comment}{/* XXX configurable? */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01377}01377                 cmd.\mbox{\hyperlink{structr92s__set__pwr__mode_abf103577948b3480e0380687892992d2}{smart\_ps}} = 1; \textcolor{comment}{/* XXX 2 if doing p2p */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01378}01378                 cmd.\mbox{\hyperlink{structr92s__set__pwr__mode_acf19b53ef1602c087f8ec5548e930ad3}{bcn\_pass\_time}} = 5; \textcolor{comment}{/* in 100mS usb.c, linux/rtlwifi */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01379}01379                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01380}01380         \textcolor{keywordflow}{case} \mbox{\hyperlink{if__rsu_8c_a817aa852c99312fa2eea0a8cb34fd676}{RSU\_PWR\_OFF}}:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01381}01381                 cmd.\mbox{\hyperlink{structr92s__set__pwr__mode_a6e49df94a4ce78ec609d18a5ce2977b5}{mode}} = \mbox{\hyperlink{if__rsureg_8h_af9f04906e80e44b095ac25c519b02887}{R92S\_PS\_MODE\_RADIOOFF}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01382}01382                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01383}01383         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01384}01384                 device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%s: unknown ps mode (\%d)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01385}01385                     \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01386}01386                     state);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01387}01387                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01388}01388         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01389}01389 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01390}01390         \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a09a67fdd4c21366cb6b0691e667fdce6}{RSU\_DEBUG\_RESET}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01391}01391             \textcolor{stringliteral}{"{}\%s: setting ps mode to \%d (mode \%d)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01392}01392             \_\_func\_\_, state, cmd.\mbox{\hyperlink{structr92s__set__pwr__mode_a6e49df94a4ce78ec609d18a5ce2977b5}{mode}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01393}01393         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__rsu_8c_a4ec7d2ccf04c77a70f082a7905f2fca3}{rsu\_fw\_cmd}}(sc, \mbox{\hyperlink{if__rsureg_8h_a4e8f45d020bbee4c3d9a7c9440ceda7f}{R92S\_CMD\_SET\_PWR\_MODE}}, \&cmd, \textcolor{keyword}{sizeof}(cmd));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01394}01394         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} == 0)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01395}01395                 sc-\/>\mbox{\hyperlink{structrsu__softc_a76f70aabe687b5a46e0a6f4fc9751a16}{sc\_curpwrstate}} = state;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01396}01396 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01397}01397         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01398}01398 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01399}01399 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01400}01400 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01401}\mbox{\hyperlink{if__rsu_8c_ae0e4b5fc19ce4aa365f3d97863de692e}{01401}} \mbox{\hyperlink{if__rsu_8c_ae0e4b5fc19ce4aa365f3d97863de692e}{rsu\_set\_led}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc, \textcolor{keywordtype}{int} on)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01402}01402 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01403}01403         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_ac164bef0aaf6b4c317fc88dce9e8f1b1}{R92S\_LEDCFG}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01404}01404             (\mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_ac164bef0aaf6b4c317fc88dce9e8f1b1}{R92S\_LEDCFG}}) \& 0xf0) | (!on << 3));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01405}01405 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01406}01406 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01407}01407 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01408}\mbox{\hyperlink{if__rsu_8c_a1971426ed761530b177258326d60651f}{01408}} \mbox{\hyperlink{if__rsu_8c_a1971426ed761530b177258326d60651f}{rsu\_monitor\_newstate}}(\textcolor{keyword}{struct} ieee80211vap *vap, \textcolor{keyword}{enum} ieee80211\_state nstate,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01409}01409     \textcolor{keywordtype}{int} arg)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01410}01410 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01411}01411         \textcolor{keyword}{struct }ieee80211com *ic = vap-\/>iv\_ic;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01412}01412         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01413}01413         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__vap}{rsu\_vap}} *uvp = \mbox{\hyperlink{if__rsureg_8h_a59e1fb4242204c29501cc9a28f49bb07}{RSU\_VAP}}(\mbox{\hyperlink{structrsu__vap_ac8b2a8f879acd7823925e0d28a1145ec}{vap}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01414}01414 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01415}01415         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structrsu__vap_ac8b2a8f879acd7823925e0d28a1145ec}{vap}}-\/>iv\_state != nstate) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01416}01416                 IEEE80211\_UNLOCK(ic);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01417}01417                 \mbox{\hyperlink{if__rsureg_8h_a48532232b39d8fa728a8a10df1d3f4b7}{RSU\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01418}01418 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01419}01419                 \textcolor{keywordflow}{switch} (nstate) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01420}01420                 \textcolor{keywordflow}{case} IEEE80211\_S\_INIT:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01421}01421                         sc-\/>\mbox{\hyperlink{structrsu__softc_a843fbf0b92e8ba1878bb8e9cd84fd05f}{sc\_vap\_is\_running}} = 0;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01422}01422                         \mbox{\hyperlink{if__rsu_8c_ae0e4b5fc19ce4aa365f3d97863de692e}{rsu\_set\_led}}(sc, 0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01423}01423                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01424}01424                 \textcolor{keywordflow}{case} IEEE80211\_S\_RUN:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01425}01425                         sc-\/>\mbox{\hyperlink{structrsu__softc_a843fbf0b92e8ba1878bb8e9cd84fd05f}{sc\_vap\_is\_running}} = 1;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01426}01426                         \mbox{\hyperlink{if__rsu_8c_ae0e4b5fc19ce4aa365f3d97863de692e}{rsu\_set\_led}}(sc, 1);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01427}01427                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01428}01428                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01429}01429                         \textcolor{comment}{/* NOTREACHED */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01430}01430                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01431}01431                 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01432}01432                 \mbox{\hyperlink{if__rsu_8c_a65b8dc2360a4af15d1124903842049d5}{rsu\_rxfilter\_refresh}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01433}01433 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01434}01434                 \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01435}01435                 IEEE80211\_LOCK(ic);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01436}01436         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01437}01437 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01438}01438         \textcolor{keywordflow}{return} (uvp-\/>\mbox{\hyperlink{structrsu__vap_a7d27e4a28fa3a93ed127585ba0e9daf1}{newstate}}(\mbox{\hyperlink{structrsu__vap_ac8b2a8f879acd7823925e0d28a1145ec}{vap}}, nstate, arg));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01439}01439 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01440}01440 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01441}01441 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01442}\mbox{\hyperlink{if__rsu_8c_ab35ac04de73cd52360037094c1fcde8f}{01442}} \mbox{\hyperlink{if__rsu_8c_ab35ac04de73cd52360037094c1fcde8f}{rsu\_newstate}}(\textcolor{keyword}{struct} ieee80211vap *\mbox{\hyperlink{structrsu__vap_ac8b2a8f879acd7823925e0d28a1145ec}{vap}}, \textcolor{keyword}{enum} ieee80211\_state nstate, \textcolor{keywordtype}{int} arg)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01443}01443 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01444}01444         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__vap}{rsu\_vap}} *uvp = \mbox{\hyperlink{if__rsureg_8h_a59e1fb4242204c29501cc9a28f49bb07}{RSU\_VAP}}(\mbox{\hyperlink{structrsu__vap_ac8b2a8f879acd7823925e0d28a1145ec}{vap}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01445}01445         \textcolor{keyword}{struct }ieee80211com *ic = vap-\/>iv\_ic;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01446}01446         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01447}01447         \textcolor{keyword}{struct }ieee80211\_node *ni;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01448}01448         \textcolor{keyword}{struct }ieee80211\_rateset *rs;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01449}01449         \textcolor{keyword}{enum} ieee80211\_state ostate;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01450}01450         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}, startcal = 0;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01451}01451 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01452}01452         ostate = vap-\/>iv\_state;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01453}01453         \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a9613ad7ae941ad16f1af7a7b64c94b51}{RSU\_DEBUG\_STATE}}, \textcolor{stringliteral}{"{}\%s: \%s -\/> \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01454}01454             \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01455}01455             ieee80211\_state\_name[ostate],}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01456}01456             ieee80211\_state\_name[nstate]);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01457}01457 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01458}01458         IEEE80211\_UNLOCK(ic);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01459}01459         \textcolor{keywordflow}{if} (ostate == IEEE80211\_S\_RUN) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01460}01460                 \mbox{\hyperlink{if__rsureg_8h_a48532232b39d8fa728a8a10df1d3f4b7}{RSU\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01461}01461                 \textcolor{comment}{/* Stop calibration. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01462}01462                 sc-\/>\mbox{\hyperlink{structrsu__softc_ad692f1cf99fa20f23d8cec471f2b7985}{sc\_calibrating}} = 0;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01463}01463 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01464}01464                 \textcolor{comment}{/* Pause Tx for AC queues. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01465}01465                 \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a08a8df7e41635e6f9c467b979edf3adf}{R92S\_TXPAUSE}}, \mbox{\hyperlink{if__rsureg_8h_a1f7eda4e50df6c65928484defe22840d}{R92S\_TXPAUSE\_AC}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01466}01466                 \mbox{\hyperlink{usb__util_8c_a7ad9fc3660f5ecf96d72e499cdfeb963}{usb\_pause\_mtx}}(\&sc-\/>\mbox{\hyperlink{structrsu__softc_a9e08138256e5159028935ade723bcf50}{sc\_mtx}}, \mbox{\hyperlink{usbdi_8h_a9715d25e0db2e92bd86423a9283893b7}{USB\_MS\_TO\_TICKS}}(10));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01467}01467 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01468}01468                 \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01469}01469                 taskqueue\_drain\_timeout(taskqueue\_thread, \&sc-\/>\mbox{\hyperlink{structrsu__softc_a58bb50377ccc3066c3291d5b2bc404c8}{calib\_task}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01470}01470                 taskqueue\_drain(taskqueue\_thread, \&sc-\/>\mbox{\hyperlink{structrsu__softc_a7b88c0223e24c181020c79ce0cf54248}{tx\_task}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01471}01471                 \mbox{\hyperlink{if__rsureg_8h_a48532232b39d8fa728a8a10df1d3f4b7}{RSU\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01472}01472                 \textcolor{comment}{/* Disassociate from our current BSS. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01473}01473                 \mbox{\hyperlink{if__rsu_8c_a5fd2269a06b966d419c6c5640eac8920}{rsu\_disconnect}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01474}01474                 \mbox{\hyperlink{usb__util_8c_a7ad9fc3660f5ecf96d72e499cdfeb963}{usb\_pause\_mtx}}(\&sc-\/>\mbox{\hyperlink{structrsu__softc_a9e08138256e5159028935ade723bcf50}{sc\_mtx}}, \mbox{\hyperlink{usbdi_8h_a9715d25e0db2e92bd86423a9283893b7}{USB\_MS\_TO\_TICKS}}(10));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01475}01475 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01476}01476                 \textcolor{comment}{/* Refresh Rx filter (may be modified by firmware). */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01477}01477                 sc-\/>\mbox{\hyperlink{structrsu__softc_a843fbf0b92e8ba1878bb8e9cd84fd05f}{sc\_vap\_is\_running}} = 0;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01478}01478                 \mbox{\hyperlink{if__rsu_8c_a65b8dc2360a4af15d1124903842049d5}{rsu\_rxfilter\_refresh}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01479}01479 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01480}01480                 \textcolor{comment}{/* Reinstall static keys. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01481}01481                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrsu__softc_acc01333e62919e38b1a73ac8c96b1f3f}{sc\_running}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01482}01482                         \mbox{\hyperlink{if__rsu_8c_a323ce6c1d3dcd88e42c09dd8a8cb5dbd}{rsu\_reinit\_static\_keys}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01483}01483         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01484}01484                 \mbox{\hyperlink{if__rsureg_8h_a48532232b39d8fa728a8a10df1d3f4b7}{RSU\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01485}01485         \textcolor{keywordflow}{switch} (nstate) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01486}01486         \textcolor{keywordflow}{case} IEEE80211\_S\_INIT:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01487}01487                 (void) \mbox{\hyperlink{if__rsu_8c_a2a4cc7791c269a4b05febcd3cd67668a}{rsu\_set\_fw\_power\_state}}(sc, \mbox{\hyperlink{if__rsu_8c_a0e7a4e52f74d34a282135ac947f4090b}{RSU\_PWR\_ACTIVE}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01488}01488                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01489}01489         \textcolor{keywordflow}{case} IEEE80211\_S\_AUTH:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01490}01490                 ni = ieee80211\_ref\_node(vap-\/>iv\_bss);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01491}01491                 (void) \mbox{\hyperlink{if__rsu_8c_a2a4cc7791c269a4b05febcd3cd67668a}{rsu\_set\_fw\_power\_state}}(sc, \mbox{\hyperlink{if__rsu_8c_a0e7a4e52f74d34a282135ac947f4090b}{RSU\_PWR\_ACTIVE}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01492}01492                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__rsu_8c_ab7ce7ef505fef8c7aae21326eadb98fe}{rsu\_join\_bss}}(sc, ni);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01493}01493                 ieee80211\_free\_node(ni);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01494}01494                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != 0) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01495}01495                         device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01496}01496                             \textcolor{stringliteral}{"{}could not send join command\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01497}01497                 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01498}01498                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01499}01499         \textcolor{keywordflow}{case} IEEE80211\_S\_RUN:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01500}01500                 \textcolor{comment}{/* Flush all AC queues. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01501}01501                 \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a08a8df7e41635e6f9c467b979edf3adf}{R92S\_TXPAUSE}}, 0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01502}01502 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01503}01503                 ni = ieee80211\_ref\_node(vap-\/>iv\_bss);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01504}01504                 rs = \&ni-\/>ni\_rates;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01505}01505                 \textcolor{comment}{/* Indicate highest supported rate. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01506}01506                 ni-\/>ni\_txrate = rs-\/>rs\_rates[rs-\/>rs\_nrates -\/ 1];}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01507}01507                 (void) \mbox{\hyperlink{if__rsu_8c_a2a4cc7791c269a4b05febcd3cd67668a}{rsu\_set\_fw\_power\_state}}(sc, \mbox{\hyperlink{if__rsu_8c_aab11309303cc58f089bcf1426fb60893}{RSU\_PWR\_SLEEP}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01508}01508                 ieee80211\_free\_node(ni);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01509}01509                 startcal = 1;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01510}01510                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01511}01511         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01512}01512                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01513}01513         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01514}01514         \textcolor{keywordflow}{if} (startcal != 0) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01515}01515                 sc-\/>\mbox{\hyperlink{structrsu__softc_ad692f1cf99fa20f23d8cec471f2b7985}{sc\_calibrating}} = 1;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01516}01516                 \textcolor{comment}{/* Start periodic calibration. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01517}01517                 taskqueue\_enqueue\_timeout(taskqueue\_thread, \&sc-\/>\mbox{\hyperlink{structrsu__softc_a58bb50377ccc3066c3291d5b2bc404c8}{calib\_task}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01518}01518                     hz);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01519}01519         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01520}01520         \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01521}01521         IEEE80211\_LOCK(ic);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01522}01522         \textcolor{keywordflow}{return} (uvp-\/>\mbox{\hyperlink{structrsu__vap_a7d27e4a28fa3a93ed127585ba0e9daf1}{newstate}}(vap, nstate, arg));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01523}01523 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01524}01524 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01525}01525 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01526}\mbox{\hyperlink{if__rsu_8c_a67fc315d7160ae0dac6d1376e8ef07e6}{01526}} \mbox{\hyperlink{if__rsu_8c_a67fc315d7160ae0dac6d1376e8ef07e6}{rsu\_key\_alloc}}(\textcolor{keyword}{struct} ieee80211vap *vap, \textcolor{keyword}{struct} ieee80211\_key *\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01527}01527     ieee80211\_keyix *keyix, ieee80211\_keyix *rxkeyix)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01528}01528 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01529}01529         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc = vap-\/>iv\_ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01530}01530         \textcolor{keywordtype}{int} is\_checked = 0;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01531}01531 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01532}01532         \textcolor{keywordflow}{if} (\&vap-\/>iv\_nw\_keys[0] <= \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}} \&\&}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01533}01533             k < \&vap-\/>iv\_nw\_keys[IEEE80211\_WEP\_NKID]) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01534}01534                 *keyix = ieee80211\_crypto\_get\_key\_wepidx(vap, \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01535}01535         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01536}01536                 \textcolor{keywordflow}{if} (vap-\/>iv\_opmode != IEEE80211\_M\_STA) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01537}01537                         *keyix = 0;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01538}01538                         \textcolor{comment}{/* TODO: obtain keyix from node id */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01539}01539                         is\_checked = 1;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01540}01540                         \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_flags |= IEEE80211\_KEY\_SWCRYPT;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01541}01541                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01542}01542                         *keyix = \mbox{\hyperlink{if__rsureg_8h_aa1379f7c85b674a391720585da8c9a1b}{R92S\_MACID\_BSS}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01543}01543         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01544}01544 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01545}01545         \textcolor{keywordflow}{if} (!is\_checked) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01546}01546                 \mbox{\hyperlink{if__rsureg_8h_a48532232b39d8fa728a8a10df1d3f4b7}{RSU\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01547}01547                 \textcolor{keywordflow}{if} (isset(sc-\/>\mbox{\hyperlink{structrsu__softc_ab402f2a48c2ab749ccf123edde1d39f4}{keys\_bmap}}, *keyix)) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01548}01548                         device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01549}01549                             \textcolor{stringliteral}{"{}\%s: key slot \%d is already used!\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01550}01550                             \_\_func\_\_, *keyix);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01551}01551                         \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01552}01552                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01553}01553                 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01554}01554                 setbit(sc-\/>\mbox{\hyperlink{structrsu__softc_ab402f2a48c2ab749ccf123edde1d39f4}{keys\_bmap}}, *keyix);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01555}01555                 \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01556}01556         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01557}01557 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01558}01558         *rxkeyix = *keyix;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01559}01559 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01560}01560         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01561}01561 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01562}01562 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01563}01563 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01564}\mbox{\hyperlink{if__rsu_8c_aacd6ea294fd66808a12e283aa8632fb9}{01564}} \mbox{\hyperlink{if__rsu_8c_aacd6ea294fd66808a12e283aa8632fb9}{rsu\_process\_key}}(\textcolor{keyword}{struct} ieee80211vap *vap, \textcolor{keyword}{const} \textcolor{keyword}{struct} ieee80211\_key *\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01565}01565     \textcolor{keywordtype}{int} set)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01566}01566 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01567}01567         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc = vap-\/>iv\_ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01568}01568         \textcolor{keywordtype}{int} ret;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01569}01569 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01570}01570         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_flags \& IEEE80211\_KEY\_SWCRYPT) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01571}01571                 \textcolor{comment}{/* Not for us. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01572}01572                 \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01573}01573         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01574}01574 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01575}01575         \textcolor{comment}{/* Handle group keys. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01576}01576         \textcolor{keywordflow}{if} (\&vap-\/>iv\_nw\_keys[0] <= \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}} \&\&}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01577}01577             k < \&vap-\/>iv\_nw\_keys[IEEE80211\_WEP\_NKID]) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01578}01578                 KASSERT(\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_keyix < nitems(sc-\/>\mbox{\hyperlink{structrsu__softc_a8d249c659c7182b78e9734996cfd26da}{group\_keys}}),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01579}01579                     (\textcolor{stringliteral}{"{}keyix \%u > \%zu\(\backslash\)n"{}}, \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_keyix, nitems(sc-\/>\mbox{\hyperlink{structrsu__softc_a8d249c659c7182b78e9734996cfd26da}{group\_keys}})));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01580}01580 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01581}01581                 \mbox{\hyperlink{if__rsureg_8h_a48532232b39d8fa728a8a10df1d3f4b7}{RSU\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01582}01582                 sc-\/>\mbox{\hyperlink{structrsu__softc_a8d249c659c7182b78e9734996cfd26da}{group\_keys}}[\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_keyix] = (set ? \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}} : NULL);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01583}01583                 \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structrsu__softc_acc01333e62919e38b1a73ac8c96b1f3f}{sc\_running}}) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01584}01584                         \textcolor{comment}{/* Static keys will be set during device startup. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01585}01585                         \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01586}01586                         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01587}01587                 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01588}01588 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01589}01589                 \textcolor{keywordflow}{if} (set)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01590}01590                         ret = \mbox{\hyperlink{if__rsu_8c_a291f081c5bb41f8b041d03cd8a8271a5}{rsu\_set\_key\_group}}(sc, \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01591}01591                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01592}01592                         ret = \mbox{\hyperlink{if__rsu_8c_a4eee74285593b3b1f1ec64d5f7867d6d}{rsu\_delete\_key}}(sc, \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_keyix);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01593}01593                 \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01594}01594 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01595}01595                 \textcolor{keywordflow}{return} (!ret);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01596}01596         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01597}01597 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01598}01598         \textcolor{keywordflow}{if} (set) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01599}01599                 \textcolor{comment}{/* wait for pending key removal */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01600}01600                 taskqueue\_drain(taskqueue\_thread, \&sc-\/>\mbox{\hyperlink{structrsu__softc_ac8129ebea9dbe09bcf1a80aee10dad7a}{del\_key\_task}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01601}01601 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01602}01602                 \mbox{\hyperlink{if__rsureg_8h_a48532232b39d8fa728a8a10df1d3f4b7}{RSU\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01603}01603                 ret = \mbox{\hyperlink{if__rsu_8c_a732c743f29308dd915470ea56d3c9be6}{rsu\_set\_key\_pair}}(sc, \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01604}01604                 \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01605}01605         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01606}01606                 \mbox{\hyperlink{if__rsureg_8h_a5c0ac25a0cbe1cc54293d6500a8a2295}{RSU\_DELKEY\_BMAP\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01607}01607                 setbit(sc-\/>\mbox{\hyperlink{structrsu__softc_ad9fef301e5167d0d613a30e86ea6688f}{free\_keys\_bmap}}, \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_keyix);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01608}01608                 \mbox{\hyperlink{if__rsureg_8h_a29c21a196bacc8230cc193dc48a40875}{RSU\_DELKEY\_BMAP\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01609}01609 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01610}01610                 \textcolor{comment}{/* workaround ieee80211\_node\_delucastkey() locking */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01611}01611                 taskqueue\_enqueue(taskqueue\_thread, \&sc-\/>\mbox{\hyperlink{structrsu__softc_ac8129ebea9dbe09bcf1a80aee10dad7a}{del\_key\_task}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01612}01612                 ret = 0;        \textcolor{comment}{/* fake success */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01613}01613         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01614}01614 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01615}01615         \textcolor{keywordflow}{return} (!ret);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01616}01616 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01617}01617 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01618}01618 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01619}\mbox{\hyperlink{if__rsu_8c_a7646a6dc11dea133d5869aee8e140a42}{01619}} \mbox{\hyperlink{if__rsu_8c_a7646a6dc11dea133d5869aee8e140a42}{rsu\_key\_set}}(\textcolor{keyword}{struct} ieee80211vap *vap, \textcolor{keyword}{const} \textcolor{keyword}{struct} ieee80211\_key *\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01620}01620 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01621}01621         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__rsu_8c_aacd6ea294fd66808a12e283aa8632fb9}{rsu\_process\_key}}(vap, \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}, 1));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01622}01622 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01623}01623 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01624}01624 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01625}\mbox{\hyperlink{if__rsu_8c_a51eaaeb3f1e90320c06e23a6baa4753f}{01625}} \mbox{\hyperlink{if__rsu_8c_a51eaaeb3f1e90320c06e23a6baa4753f}{rsu\_key\_delete}}(\textcolor{keyword}{struct} ieee80211vap *vap, \textcolor{keyword}{const} \textcolor{keyword}{struct} ieee80211\_key *\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01626}01626 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01627}01627         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__rsu_8c_aacd6ea294fd66808a12e283aa8632fb9}{rsu\_process\_key}}(vap, \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}, 0));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01628}01628 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01629}01629 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01630}01630 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01631}\mbox{\hyperlink{if__rsu_8c_a708a41d71e8829219e4ac1bbdfe5e7e5}{01631}} \mbox{\hyperlink{if__rsu_8c_a708a41d71e8829219e4ac1bbdfe5e7e5}{rsu\_cam\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc, uint8\_t addr, uint32\_t *\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01632}01632 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01633}01633         \textcolor{keywordtype}{int} ntries;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01634}01634 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01635}01635         \mbox{\hyperlink{if__rsu_8c_abf65ff90f534d06c7131e43ace2e7d5e}{rsu\_write\_4}}(sc, \mbox{\hyperlink{if__rsureg_8h_acaf64ee8dc3ccf980384a54cb3361104}{R92S\_CAMCMD}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01636}01636             \mbox{\hyperlink{if__rsureg_8h_afd4119ce9a93a7694559978288df16fb}{R92S\_CAMCMD\_POLLING}} | \mbox{\hyperlink{if__rsureg_8h_a14155179e01608510206b9cdf4790068}{SM}}(R92S\_CAMCMD\_ADDR, addr));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01637}01637         \textcolor{keywordflow}{for} (ntries = 0; ntries < 10; ntries++) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01638}01638                 \textcolor{keywordflow}{if} (!(\mbox{\hyperlink{if__rsu_8c_a1741f47255e3a970e39706ca00fa428b}{rsu\_read\_4}}(sc, \mbox{\hyperlink{if__rsureg_8h_acaf64ee8dc3ccf980384a54cb3361104}{R92S\_CAMCMD}}) \& \mbox{\hyperlink{if__rsureg_8h_afd4119ce9a93a7694559978288df16fb}{R92S\_CAMCMD\_POLLING}}))}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01639}01639                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01640}01640 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01641}01641                 \mbox{\hyperlink{usb__util_8c_a7ad9fc3660f5ecf96d72e499cdfeb963}{usb\_pause\_mtx}}(\&sc-\/>\mbox{\hyperlink{structrsu__softc_a9e08138256e5159028935ade723bcf50}{sc\_mtx}}, \mbox{\hyperlink{usbdi_8h_a9715d25e0db2e92bd86423a9283893b7}{USB\_MS\_TO\_TICKS}}(1));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01642}01642         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01643}01643         \textcolor{keywordflow}{if} (ntries == 10) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01644}01644                 device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01645}01645                     \textcolor{stringliteral}{"{}\%s: cannot read CAM entry at address \%02X\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01646}01646                     \_\_func\_\_, addr);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01647}01647                 \textcolor{keywordflow}{return} (ETIMEDOUT);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01648}01648         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01649}01649 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01650}01650         *\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = \mbox{\hyperlink{if__rsu_8c_a1741f47255e3a970e39706ca00fa428b}{rsu\_read\_4}}(sc, \mbox{\hyperlink{if__rsureg_8h_afcb22fd2f4b265bc48e46b1c0d7de591}{R92S\_CAMREAD}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01651}01651 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01652}01652         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01653}01653 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01654}01654 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01655}01655 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01656}\mbox{\hyperlink{if__rsu_8c_afa863032ad95fa0887bbfd09f27a6728}{01656}} \mbox{\hyperlink{if__rsu_8c_afa863032ad95fa0887bbfd09f27a6728}{rsu\_cam\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc, uint8\_t addr, uint32\_t data)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01657}01657 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01658}01658 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01659}01659         \mbox{\hyperlink{if__rsu_8c_abf65ff90f534d06c7131e43ace2e7d5e}{rsu\_write\_4}}(sc, \mbox{\hyperlink{if__rsureg_8h_a2324817e1ee6c4b611d5ccb9b4410d4f}{R92S\_CAMWRITE}}, data);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01660}01660         \mbox{\hyperlink{if__rsu_8c_abf65ff90f534d06c7131e43ace2e7d5e}{rsu\_write\_4}}(sc, \mbox{\hyperlink{if__rsureg_8h_acaf64ee8dc3ccf980384a54cb3361104}{R92S\_CAMCMD}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01661}01661             \mbox{\hyperlink{if__rsureg_8h_afd4119ce9a93a7694559978288df16fb}{R92S\_CAMCMD\_POLLING}} | \mbox{\hyperlink{if__rsureg_8h_a9c27e68917048749355b2c801278d0e3}{R92S\_CAMCMD\_WRITE}} |}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01662}01662             \mbox{\hyperlink{if__rsureg_8h_a14155179e01608510206b9cdf4790068}{SM}}(R92S\_CAMCMD\_ADDR, addr));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01663}01663 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01664}01664 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01665}01665 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01666}\mbox{\hyperlink{if__rsu_8c_afa4c9c3dae1e0e1f7daf381abaeb9dcb}{01666}} \mbox{\hyperlink{if__rsu_8c_afa4c9c3dae1e0e1f7daf381abaeb9dcb}{rsu\_key\_check}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc, ieee80211\_keyix keyix, \textcolor{keywordtype}{int} is\_valid)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01667}01667 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01668}01668         uint32\_t \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01669}01669         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}, ntries;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01670}01670 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01671}01671         \textcolor{keywordflow}{for} (ntries = 0; ntries < 20; ntries++) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01672}01672                 \mbox{\hyperlink{usb__util_8c_a7ad9fc3660f5ecf96d72e499cdfeb963}{usb\_pause\_mtx}}(\&sc-\/>\mbox{\hyperlink{structrsu__softc_a9e08138256e5159028935ade723bcf50}{sc\_mtx}}, \mbox{\hyperlink{usbdi_8h_a9715d25e0db2e92bd86423a9283893b7}{USB\_MS\_TO\_TICKS}}(1));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01673}01673 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01674}01674                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__rsu_8c_a708a41d71e8829219e4ac1bbdfe5e7e5}{rsu\_cam\_read}}(sc, \mbox{\hyperlink{if__rsureg_8h_a4c6ea5e2ef59c0d38310df6e3c66ef56}{R92S\_CAM\_CTL0}}(keyix), \&\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01675}01675                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != 0) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01676}01676                         device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01677}01677                             \textcolor{stringliteral}{"{}\%s: cannot check key status!\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01678}01678                         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01679}01679                 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01680}01680                 \textcolor{keywordflow}{if} (((\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& \mbox{\hyperlink{if__rsureg_8h_a70dde060d464a20992aace800138c15e}{R92S\_CAM\_VALID}}) == 0) \string^ is\_valid)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01681}01681                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01682}01682         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01683}01683         \textcolor{keywordflow}{if} (ntries == 20) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01684}01684                 device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01685}01685                     \textcolor{stringliteral}{"{}\%s: key \%d is \%s marked as valid, rejecting request\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01686}01686                     \_\_func\_\_, keyix, is\_valid ? \textcolor{stringliteral}{"{}not"{}} : \textcolor{stringliteral}{"{}still"{}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01687}01687                 \textcolor{keywordflow}{return} (EIO);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01688}01688         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01689}01689 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01690}01690         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01691}01691 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01692}01692 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01693}01693 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01694}01694 \textcolor{comment}{ * Map net80211 cipher to RTL8712 security mode.}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01695}01695 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01696}01696 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01697}\mbox{\hyperlink{if__rsu_8c_ac4ceeda61ae425339d1294a8c9c27eca}{01697}} \mbox{\hyperlink{if__rsu_8c_ac4ceeda61ae425339d1294a8c9c27eca}{rsu\_crypto\_mode}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc, u\_int cipher, \textcolor{keywordtype}{int} keylen)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01698}01698 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01699}01699         \textcolor{keywordflow}{switch} (cipher) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01700}01700         \textcolor{keywordflow}{case} IEEE80211\_CIPHER\_WEP:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01701}01701                 \textcolor{keywordflow}{return} keylen < 8 ? \mbox{\hyperlink{if__rsureg_8h_aa0ec69f190b60c9732fe0118deb60696}{R92S\_KEY\_ALGO\_WEP40}} : \mbox{\hyperlink{if__rsureg_8h_ac62dcecf599d8394488997b76836a112}{R92S\_KEY\_ALGO\_WEP104}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01702}01702         \textcolor{keywordflow}{case} IEEE80211\_CIPHER\_TKIP:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01703}01703                 \textcolor{keywordflow}{return} \mbox{\hyperlink{if__rsureg_8h_ac6bca28fa255a6a7647d6aa49a0eaf0a}{R92S\_KEY\_ALGO\_TKIP}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01704}01704         \textcolor{keywordflow}{case} IEEE80211\_CIPHER\_AES\_CCM:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01705}01705                 \textcolor{keywordflow}{return} \mbox{\hyperlink{if__rsureg_8h_a6bae4eb813b47463f0be2bdc4264ab15}{R92S\_KEY\_ALGO\_AES}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01706}01706         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01707}01707                 device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}}, \textcolor{stringliteral}{"{}unknown cipher \%d\(\backslash\)n"{}}, cipher);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01708}01708                 \textcolor{keywordflow}{return} \mbox{\hyperlink{if__rsureg_8h_a55c45e4ee00569c2983ce73f38ca9082}{R92S\_KEY\_ALGO\_INVALID}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01709}01709         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01710}01710 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01711}01711 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01712}01712 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01713}\mbox{\hyperlink{if__rsu_8c_a291f081c5bb41f8b041d03cd8a8271a5}{01713}} \mbox{\hyperlink{if__rsu_8c_a291f081c5bb41f8b041d03cd8a8271a5}{rsu\_set\_key\_group}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc, \textcolor{keyword}{const} \textcolor{keyword}{struct} ieee80211\_key *\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01714}01714 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01715}01715         \textcolor{keyword}{struct }\mbox{\hyperlink{structr92s__fw__cmd__set__key}{r92s\_fw\_cmd\_set\_key}} \mbox{\hyperlink{structr92s__fw__cmd__set__key_aa1bc5a02dedb7e89502ba96aed06bc3b}{key}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01716}01716         uint8\_t \mbox{\hyperlink{structr92s__fw__cmd__set__key_a7f2a91c3451394d19028c14670cfec1c}{algo}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01717}01717         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01718}01718 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01719}01719         \mbox{\hyperlink{if__rsureg_8h_aced96ac92d4bb829407616864037ea8d}{RSU\_ASSERT\_LOCKED}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01720}01720 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01721}01721         \textcolor{comment}{/* Map net80211 cipher to HW crypto algorithm. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01722}01722         \mbox{\hyperlink{structr92s__fw__cmd__set__key_a7f2a91c3451394d19028c14670cfec1c}{algo}} = \mbox{\hyperlink{if__rsu_8c_ac4ceeda61ae425339d1294a8c9c27eca}{rsu\_crypto\_mode}}(sc, \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_cipher-\/>ic\_cipher, \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_keylen);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01723}01723         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structr92s__fw__cmd__set__key_a7f2a91c3451394d19028c14670cfec1c}{algo}} == \mbox{\hyperlink{if__rsureg_8h_a55c45e4ee00569c2983ce73f38ca9082}{R92S\_KEY\_ALGO\_INVALID}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01724}01724                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01725}01725 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01726}01726         memset(\&\mbox{\hyperlink{structr92s__fw__cmd__set__key_aa1bc5a02dedb7e89502ba96aed06bc3b}{key}}, 0, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structr92s__fw__cmd__set__key_aa1bc5a02dedb7e89502ba96aed06bc3b}{key}}));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01727}01727         \mbox{\hyperlink{structr92s__fw__cmd__set__key_aa1bc5a02dedb7e89502ba96aed06bc3b}{key}}.algo = \mbox{\hyperlink{structr92s__fw__cmd__set__key_a7f2a91c3451394d19028c14670cfec1c}{algo}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01728}01728         \mbox{\hyperlink{structr92s__fw__cmd__set__key_aa1bc5a02dedb7e89502ba96aed06bc3b}{key}}.cam\_id = \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_keyix;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01729}01729         \mbox{\hyperlink{structr92s__fw__cmd__set__key_aa1bc5a02dedb7e89502ba96aed06bc3b}{key}}.grpkey = (\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_flags \& IEEE80211\_KEY\_GROUP) != 0;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01730}01730         memcpy(\mbox{\hyperlink{structr92s__fw__cmd__set__key_aa1bc5a02dedb7e89502ba96aed06bc3b}{key}}.key, \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_key, MIN(\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_keylen, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structr92s__fw__cmd__set__key_aa1bc5a02dedb7e89502ba96aed06bc3b}{key}}.key)));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01731}01731 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01732}01732         \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a842d6f48715b4d5a7600eb26a322c0c2}{RSU\_DEBUG\_KEY}} | \mbox{\hyperlink{if__rsu_8c_a1b821762ca600087d89f818174fbf23f}{RSU\_DEBUG\_FWCMD}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01733}01733             \textcolor{stringliteral}{"{}\%s: keyix \%u, group \%u, algo \%u/\%u, flags \%04X, len \%u, "{}}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01734}01734             \textcolor{stringliteral}{"{}macaddr \%s\(\backslash\)n"{}}, \_\_func\_\_, \mbox{\hyperlink{structr92s__fw__cmd__set__key_aa1bc5a02dedb7e89502ba96aed06bc3b}{key}}.cam\_id, \mbox{\hyperlink{structr92s__fw__cmd__set__key_aa1bc5a02dedb7e89502ba96aed06bc3b}{key}}.grpkey,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01735}01735             \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_cipher-\/>ic\_cipher, \mbox{\hyperlink{structr92s__fw__cmd__set__key_aa1bc5a02dedb7e89502ba96aed06bc3b}{key}}.algo, \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_flags, \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_keylen,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01736}01736             ether\_sprintf(\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_macaddr));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01737}01737 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01738}01738         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__rsu_8c_a4ec7d2ccf04c77a70f082a7905f2fca3}{rsu\_fw\_cmd}}(sc, \mbox{\hyperlink{if__rsureg_8h_a1cd02d038eeb0a2d498486be76fc4d61}{R92S\_CMD\_SET\_KEY}}, \&\mbox{\hyperlink{structr92s__fw__cmd__set__key_aa1bc5a02dedb7e89502ba96aed06bc3b}{key}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structr92s__fw__cmd__set__key_aa1bc5a02dedb7e89502ba96aed06bc3b}{key}}));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01739}01739         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != 0) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01740}01740                 device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01741}01741                     \textcolor{stringliteral}{"{}\%s: cannot send firmware command, error \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01742}01742                     \_\_func\_\_, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01743}01743                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01744}01744         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01745}01745 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01746}01746         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__rsu_8c_afa4c9c3dae1e0e1f7daf381abaeb9dcb}{rsu\_key\_check}}(sc, \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_keyix, 1));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01747}01747 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01748}01748 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01749}01749 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01750}\mbox{\hyperlink{if__rsu_8c_a732c743f29308dd915470ea56d3c9be6}{01750}} \mbox{\hyperlink{if__rsu_8c_a732c743f29308dd915470ea56d3c9be6}{rsu\_set\_key\_pair}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc, \textcolor{keyword}{const} \textcolor{keyword}{struct} ieee80211\_key *\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01751}01751 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01752}01752         \textcolor{keyword}{struct }\mbox{\hyperlink{structr92s__fw__cmd__set__key__mac}{r92s\_fw\_cmd\_set\_key\_mac}} \mbox{\hyperlink{structr92s__fw__cmd__set__key__mac_a4b0f12b3248de219072635a3ee597547}{key}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01753}01753         uint8\_t \mbox{\hyperlink{structr92s__fw__cmd__set__key__mac_a3ea0ddd082976b7268323187a0645b03}{algo}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01754}01754         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01755}01755 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01756}01756         \mbox{\hyperlink{if__rsureg_8h_aced96ac92d4bb829407616864037ea8d}{RSU\_ASSERT\_LOCKED}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01757}01757 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01758}01758         \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structrsu__softc_acc01333e62919e38b1a73ac8c96b1f3f}{sc\_running}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01759}01759                 \textcolor{keywordflow}{return} (ESHUTDOWN);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01760}01760 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01761}01761         \textcolor{comment}{/* Map net80211 cipher to HW crypto algorithm. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01762}01762         \mbox{\hyperlink{structr92s__fw__cmd__set__key__mac_a3ea0ddd082976b7268323187a0645b03}{algo}} = \mbox{\hyperlink{if__rsu_8c_ac4ceeda61ae425339d1294a8c9c27eca}{rsu\_crypto\_mode}}(sc, \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_cipher-\/>ic\_cipher, \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_keylen);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01763}01763         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structr92s__fw__cmd__set__key__mac_a3ea0ddd082976b7268323187a0645b03}{algo}} == \mbox{\hyperlink{if__rsureg_8h_a55c45e4ee00569c2983ce73f38ca9082}{R92S\_KEY\_ALGO\_INVALID}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01764}01764                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01765}01765 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01766}01766         memset(\&\mbox{\hyperlink{structr92s__fw__cmd__set__key__mac_a4b0f12b3248de219072635a3ee597547}{key}}, 0, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structr92s__fw__cmd__set__key__mac_a4b0f12b3248de219072635a3ee597547}{key}}));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01767}01767         \mbox{\hyperlink{structr92s__fw__cmd__set__key__mac_a4b0f12b3248de219072635a3ee597547}{key}}.algo = \mbox{\hyperlink{structr92s__fw__cmd__set__key__mac_a3ea0ddd082976b7268323187a0645b03}{algo}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01768}01768         memcpy(\mbox{\hyperlink{structr92s__fw__cmd__set__key__mac_a4b0f12b3248de219072635a3ee597547}{key}}.macaddr, \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_macaddr, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structr92s__fw__cmd__set__key__mac_a4b0f12b3248de219072635a3ee597547}{key}}.macaddr));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01769}01769         memcpy(\mbox{\hyperlink{structr92s__fw__cmd__set__key__mac_a4b0f12b3248de219072635a3ee597547}{key}}.key, \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_key, MIN(\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_keylen, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structr92s__fw__cmd__set__key__mac_a4b0f12b3248de219072635a3ee597547}{key}}.key)));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01770}01770 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01771}01771         \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a842d6f48715b4d5a7600eb26a322c0c2}{RSU\_DEBUG\_KEY}} | \mbox{\hyperlink{if__rsu_8c_a1b821762ca600087d89f818174fbf23f}{RSU\_DEBUG\_FWCMD}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01772}01772             \textcolor{stringliteral}{"{}\%s: keyix \%u, algo \%u/\%u, flags \%04X, len \%u, macaddr \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01773}01773             \_\_func\_\_, \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_keyix, \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_cipher-\/>ic\_cipher, \mbox{\hyperlink{structr92s__fw__cmd__set__key__mac_a4b0f12b3248de219072635a3ee597547}{key}}.algo,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01774}01774             \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_flags, \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_keylen, ether\_sprintf(\mbox{\hyperlink{structr92s__fw__cmd__set__key__mac_a4b0f12b3248de219072635a3ee597547}{key}}.macaddr));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01775}01775 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01776}01776         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__rsu_8c_a4ec7d2ccf04c77a70f082a7905f2fca3}{rsu\_fw\_cmd}}(sc, \mbox{\hyperlink{if__rsureg_8h_a7dc99e5f3f7630e43c478c8a3d752233}{R92S\_CMD\_SET\_STA\_KEY}}, \&\mbox{\hyperlink{structr92s__fw__cmd__set__key__mac_a4b0f12b3248de219072635a3ee597547}{key}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structr92s__fw__cmd__set__key__mac_a4b0f12b3248de219072635a3ee597547}{key}}));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01777}01777         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != 0) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01778}01778                 device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01779}01779                     \textcolor{stringliteral}{"{}\%s: cannot send firmware command, error \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01780}01780                     \_\_func\_\_, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01781}01781                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01782}01782         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01783}01783 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01784}01784         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__rsu_8c_afa4c9c3dae1e0e1f7daf381abaeb9dcb}{rsu\_key\_check}}(sc, \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_keyix, 1));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01785}01785 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01786}01786 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01787}01787 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01788}\mbox{\hyperlink{if__rsu_8c_a323ce6c1d3dcd88e42c09dd8a8cb5dbd}{01788}} \mbox{\hyperlink{if__rsu_8c_a323ce6c1d3dcd88e42c09dd8a8cb5dbd}{rsu\_reinit\_static\_keys}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01789}01789 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01790}01790         \textcolor{keywordtype}{int} i, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01791}01791 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01792}01792         \textcolor{keywordflow}{for} (i = 0; i < nitems(sc-\/>\mbox{\hyperlink{structrsu__softc_a8d249c659c7182b78e9734996cfd26da}{group\_keys}}); i++) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01793}01793                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrsu__softc_a8d249c659c7182b78e9734996cfd26da}{group\_keys}}[i] != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01794}01794                         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__rsu_8c_a291f081c5bb41f8b041d03cd8a8271a5}{rsu\_set\_key\_group}}(sc, sc-\/>\mbox{\hyperlink{structrsu__softc_a8d249c659c7182b78e9734996cfd26da}{group\_keys}}[i]);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01795}01795                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != 0) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01796}01796                                 device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01797}01797                                     \textcolor{stringliteral}{"{}\%s: failed to set static key \%d, "{}}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01798}01798                                     \textcolor{stringliteral}{"{}error \%d\(\backslash\)n"{}}, \_\_func\_\_, i, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01799}01799                                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01800}01800                         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01801}01801                 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01802}01802         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01803}01803 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01804}01804         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01805}01805 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01806}01806 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01807}01807 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01808}\mbox{\hyperlink{if__rsu_8c_a4eee74285593b3b1f1ec64d5f7867d6d}{01808}} \mbox{\hyperlink{if__rsu_8c_a4eee74285593b3b1f1ec64d5f7867d6d}{rsu\_delete\_key}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc, ieee80211\_keyix keyix)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01809}01809 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01810}01810         \textcolor{keyword}{struct }\mbox{\hyperlink{structr92s__fw__cmd__set__key}{r92s\_fw\_cmd\_set\_key}} \mbox{\hyperlink{structr92s__fw__cmd__set__key_aa1bc5a02dedb7e89502ba96aed06bc3b}{key}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01811}01811         uint32\_t \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01812}01812         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01813}01813 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01814}01814         \mbox{\hyperlink{if__rsureg_8h_aced96ac92d4bb829407616864037ea8d}{RSU\_ASSERT\_LOCKED}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01815}01815 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01816}01816         \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structrsu__softc_acc01333e62919e38b1a73ac8c96b1f3f}{sc\_running}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01817}01817                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01818}01818 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01819}01819         \textcolor{comment}{/* check if it was automatically removed by firmware */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01820}01820         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__rsu_8c_a708a41d71e8829219e4ac1bbdfe5e7e5}{rsu\_cam\_read}}(sc, \mbox{\hyperlink{if__rsureg_8h_a4c6ea5e2ef59c0d38310df6e3c66ef56}{R92S\_CAM\_CTL0}}(keyix), \&\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01821}01821         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} == 0 \&\& (\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& \mbox{\hyperlink{if__rsureg_8h_a70dde060d464a20992aace800138c15e}{R92S\_CAM\_VALID}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01822}01822                 \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a842d6f48715b4d5a7600eb26a322c0c2}{RSU\_DEBUG\_KEY}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01823}01823                     \textcolor{stringliteral}{"{}\%s: key \%u does not exist\(\backslash\)n"{}}, \_\_func\_\_, keyix);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01824}01824                 clrbit(sc-\/>\mbox{\hyperlink{structrsu__softc_ab402f2a48c2ab749ccf123edde1d39f4}{keys\_bmap}}, keyix);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01825}01825                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01826}01826         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01827}01827 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01828}01828         memset(\&\mbox{\hyperlink{structr92s__fw__cmd__set__key_aa1bc5a02dedb7e89502ba96aed06bc3b}{key}}, 0, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structr92s__fw__cmd__set__key_aa1bc5a02dedb7e89502ba96aed06bc3b}{key}}));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01829}01829         \mbox{\hyperlink{structr92s__fw__cmd__set__key_aa1bc5a02dedb7e89502ba96aed06bc3b}{key}}.cam\_id = keyix;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01830}01830 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01831}01831         \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a842d6f48715b4d5a7600eb26a322c0c2}{RSU\_DEBUG\_KEY}} | \mbox{\hyperlink{if__rsu_8c_a1b821762ca600087d89f818174fbf23f}{RSU\_DEBUG\_FWCMD}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01832}01832             \textcolor{stringliteral}{"{}\%s: removing key \%u\(\backslash\)n"{}}, \_\_func\_\_, \mbox{\hyperlink{structr92s__fw__cmd__set__key_aa1bc5a02dedb7e89502ba96aed06bc3b}{key}}.cam\_id);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01833}01833 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01834}01834         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__rsu_8c_a4ec7d2ccf04c77a70f082a7905f2fca3}{rsu\_fw\_cmd}}(sc, \mbox{\hyperlink{if__rsureg_8h_a1cd02d038eeb0a2d498486be76fc4d61}{R92S\_CMD\_SET\_KEY}}, \&\mbox{\hyperlink{structr92s__fw__cmd__set__key_aa1bc5a02dedb7e89502ba96aed06bc3b}{key}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structr92s__fw__cmd__set__key_aa1bc5a02dedb7e89502ba96aed06bc3b}{key}}));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01835}01835         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != 0) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01836}01836                 device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01837}01837                     \textcolor{stringliteral}{"{}\%s: cannot send firmware command, error \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01838}01838                     \_\_func\_\_, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01839}01839                 \textcolor{keywordflow}{goto} finish;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01840}01840         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01841}01841 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01842}01842         \mbox{\hyperlink{usb__util_8c_a7ad9fc3660f5ecf96d72e499cdfeb963}{usb\_pause\_mtx}}(\&sc-\/>\mbox{\hyperlink{structrsu__softc_a9e08138256e5159028935ade723bcf50}{sc\_mtx}}, \mbox{\hyperlink{usbdi_8h_a9715d25e0db2e92bd86423a9283893b7}{USB\_MS\_TO\_TICKS}}(5));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01843}01843 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01844}01844         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01845}01845 \textcolor{comment}{         * Clear 'valid' bit manually (cannot be done via firmware command).}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01846}01846 \textcolor{comment}{         * Used for key check + when firmware command cannot be sent.}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01847}01847 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01848}01848 finish:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01849}01849         \mbox{\hyperlink{if__rsu_8c_afa863032ad95fa0887bbfd09f27a6728}{rsu\_cam\_write}}(sc, \mbox{\hyperlink{if__rsureg_8h_a4c6ea5e2ef59c0d38310df6e3c66ef56}{R92S\_CAM\_CTL0}}(keyix), 0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01850}01850 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01851}01851         clrbit(sc-\/>\mbox{\hyperlink{structrsu__softc_ab402f2a48c2ab749ccf123edde1d39f4}{keys\_bmap}}, keyix);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01852}01852 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01853}01853         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__rsu_8c_afa4c9c3dae1e0e1f7daf381abaeb9dcb}{rsu\_key\_check}}(sc, keyix, 0));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01854}01854 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01855}01855 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01856}01856 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01857}\mbox{\hyperlink{if__rsu_8c_a7cf7e821601b8d12a70526a738d8074d}{01857}} \mbox{\hyperlink{if__rsu_8c_ae7596ce81699acdab5f00650ef8b130f}{rsu\_delete\_key\_pair\_cb}}(\textcolor{keywordtype}{void} *arg, \textcolor{keywordtype}{int} pending \_\_unused)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01858}01858 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01859}01859         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc = arg;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01860}01860         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01861}01861 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01862}01862         \mbox{\hyperlink{if__rsureg_8h_a5c0ac25a0cbe1cc54293d6500a8a2295}{RSU\_DELKEY\_BMAP\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01863}01863         \textcolor{keywordflow}{for} (i = IEEE80211\_WEP\_NKID; i < \mbox{\hyperlink{if__rsureg_8h_ac11a23a86938bfa4435ce644b41573aa}{R92S\_CAM\_ENTRY\_LIMIT}}; i++) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01864}01864                 \textcolor{keywordflow}{if} (isset(sc-\/>\mbox{\hyperlink{structrsu__softc_ad9fef301e5167d0d613a30e86ea6688f}{free\_keys\_bmap}}, i)) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01865}01865                         \mbox{\hyperlink{if__rsureg_8h_a29c21a196bacc8230cc193dc48a40875}{RSU\_DELKEY\_BMAP\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01866}01866 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01867}01867                         \mbox{\hyperlink{if__rsureg_8h_a48532232b39d8fa728a8a10df1d3f4b7}{RSU\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01868}01868                         \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a842d6f48715b4d5a7600eb26a322c0c2}{RSU\_DEBUG\_KEY}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01869}01869                             \textcolor{stringliteral}{"{}\%s: calling rsu\_delete\_key() with keyix = \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01870}01870                             \_\_func\_\_, i);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01871}01871                         (void) \mbox{\hyperlink{if__rsu_8c_a4eee74285593b3b1f1ec64d5f7867d6d}{rsu\_delete\_key}}(sc, i);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01872}01872                         \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01873}01873 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01874}01874                         \mbox{\hyperlink{if__rsureg_8h_a5c0ac25a0cbe1cc54293d6500a8a2295}{RSU\_DELKEY\_BMAP\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01875}01875                         clrbit(sc-\/>\mbox{\hyperlink{structrsu__softc_ad9fef301e5167d0d613a30e86ea6688f}{free\_keys\_bmap}}, i);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01876}01876 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01877}01877                         \textcolor{comment}{/* bmap can be changed */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01878}01878                         i = IEEE80211\_WEP\_NKID -\/ 1;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01879}01879                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01880}01880                 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01881}01881         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01882}01882         \mbox{\hyperlink{if__rsureg_8h_a29c21a196bacc8230cc193dc48a40875}{RSU\_DELKEY\_BMAP\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01883}01883 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01884}01884 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01885}01885 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01886}\mbox{\hyperlink{if__rsu_8c_a1620d0b3b8c8e3a1ede0e5f165214e36}{01886}} \mbox{\hyperlink{if__rsu_8c_a1620d0b3b8c8e3a1ede0e5f165214e36}{rsu\_site\_survey}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc, \textcolor{keyword}{struct} ieee80211\_scan\_ssid *ssid)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01887}01887 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01888}01888         \textcolor{keyword}{struct }\mbox{\hyperlink{structr92s__fw__cmd__sitesurvey}{r92s\_fw\_cmd\_sitesurvey}} cmd;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01889}01889 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01890}01890         \mbox{\hyperlink{if__rsureg_8h_aced96ac92d4bb829407616864037ea8d}{RSU\_ASSERT\_LOCKED}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01891}01891 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01892}01892         memset(\&cmd, 0, \textcolor{keyword}{sizeof}(cmd));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01893}01893         \textcolor{comment}{/* TODO: passive channels? */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01894}01894         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrsu__softc_a3e44ca35ef4030352300283cc8a9d02c}{sc\_active\_scan}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01895}01895                 cmd.\mbox{\hyperlink{structr92s__fw__cmd__sitesurvey_a4d283e41f5c67a2955bfc3baa04426b1}{active}} = htole32(1);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01896}01896         cmd.\mbox{\hyperlink{structr92s__fw__cmd__sitesurvey_a7bb2937cdc860efd4acc8c44e3ed4c8c}{limit}} = htole32(48);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01897}01897 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01898}01898         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structr92s__fw__cmd__sitesurvey_ac18d0b3dcb28e0e19e7e5653512d8c85}{ssid}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01899}01899                 sc-\/>\mbox{\hyperlink{structrsu__softc_a8617f7abbb42b202a3fdbcf5e599e3dc}{sc\_extra\_scan}} = 1;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01900}01900                 cmd.\mbox{\hyperlink{structr92s__fw__cmd__sitesurvey_a048982fd2ae9bdb85b11b4594954ddd5}{ssidlen}} = htole32(\mbox{\hyperlink{structr92s__fw__cmd__sitesurvey_ac18d0b3dcb28e0e19e7e5653512d8c85}{ssid}}-\/>len);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01901}01901                 memcpy(cmd.\mbox{\hyperlink{structr92s__fw__cmd__sitesurvey_ac18d0b3dcb28e0e19e7e5653512d8c85}{ssid}}, \mbox{\hyperlink{structr92s__fw__cmd__sitesurvey_ac18d0b3dcb28e0e19e7e5653512d8c85}{ssid}}-\/>ssid, \mbox{\hyperlink{structr92s__fw__cmd__sitesurvey_ac18d0b3dcb28e0e19e7e5653512d8c85}{ssid}}-\/>len);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01902}01902         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01903}01903 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01904}01904         \textcolor{keywordflow}{if} (rsu\_debug \& (\mbox{\hyperlink{if__rsu_8c_aee40def35d0f7bc3712d3f2eedbcf843}{RSU\_DEBUG\_SCAN}} | \mbox{\hyperlink{if__rsu_8c_a1b821762ca600087d89f818174fbf23f}{RSU\_DEBUG\_FWCMD}})) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01905}01905                 device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01906}01906                     \textcolor{stringliteral}{"{}sending site survey command, active \%d"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01907}01907                     le32toh(cmd.\mbox{\hyperlink{structr92s__fw__cmd__sitesurvey_a4d283e41f5c67a2955bfc3baa04426b1}{active}}));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01908}01908                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structr92s__fw__cmd__sitesurvey_ac18d0b3dcb28e0e19e7e5653512d8c85}{ssid}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01909}01909                         printf(\textcolor{stringliteral}{"{}, ssid: "{}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01910}01910                         ieee80211\_print\_essid(cmd.\mbox{\hyperlink{structr92s__fw__cmd__sitesurvey_ac18d0b3dcb28e0e19e7e5653512d8c85}{ssid}}, le32toh(cmd.\mbox{\hyperlink{structr92s__fw__cmd__sitesurvey_a048982fd2ae9bdb85b11b4594954ddd5}{ssidlen}}));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01911}01911                 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01912}01912                 printf(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01913}01913         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01914}01914 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01915}01915         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__rsu_8c_a4ec7d2ccf04c77a70f082a7905f2fca3}{rsu\_fw\_cmd}}(sc, \mbox{\hyperlink{if__rsureg_8h_a20fd8cb69bc0600d556d33d70f691c5f}{R92S\_CMD\_SITE\_SURVEY}}, \&cmd, \textcolor{keyword}{sizeof}(cmd)));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01916}01916 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01917}01917 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01918}01918 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01919}\mbox{\hyperlink{if__rsu_8c_ab7ce7ef505fef8c7aae21326eadb98fe}{01919}} \mbox{\hyperlink{if__rsu_8c_ab7ce7ef505fef8c7aae21326eadb98fe}{rsu\_join\_bss}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc, \textcolor{keyword}{struct} ieee80211\_node *ni)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01920}01920 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01921}01921         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structrsu__softc_a67bd1a5c6762d8cd8c5b7e7b5bdfddd6}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01922}01922         \textcolor{keyword}{struct }ieee80211vap *vap = ni-\/>ni\_vap;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01923}01923         \textcolor{keyword}{struct }\mbox{\hyperlink{structndis__wlan__bssid__ex}{ndis\_wlan\_bssid\_ex}} *bss;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01924}01924         \textcolor{keyword}{struct }\mbox{\hyperlink{structndis__802__11__fixed__ies}{ndis\_802\_11\_fixed\_ies}} *fixed;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01925}01925         \textcolor{keyword}{struct }\mbox{\hyperlink{structr92s__fw__cmd__auth}{r92s\_fw\_cmd\_auth}} auth;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01926}01926         uint8\_t buf[\textcolor{keyword}{sizeof}(*bss) + 128] \mbox{\hyperlink{ehci_8h_a2b01871e17bf60def6126d95883520bf}{\_\_aligned}}(4);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01927}01927         uint8\_t *frm;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01928}01928         uint8\_t opmode;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01929}01929         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01930}01930 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01931}01931         \mbox{\hyperlink{if__rsureg_8h_aced96ac92d4bb829407616864037ea8d}{RSU\_ASSERT\_LOCKED}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01932}01932 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01933}01933         \textcolor{comment}{/* Let the FW decide the opmode based on the capinfo field. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01934}01934         opmode = \mbox{\hyperlink{if__rsureg_8h_ad543019d29edf1d5cb87f1f9d2e2a1c2}{NDIS802\_11AUTOUNKNOWN}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01935}01935         \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a09a67fdd4c21366cb6b0691e667fdce6}{RSU\_DEBUG\_RESET}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01936}01936             \textcolor{stringliteral}{"{}\%s: setting operating mode to \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01937}01937             \_\_func\_\_, opmode);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01938}01938         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__rsu_8c_a4ec7d2ccf04c77a70f082a7905f2fca3}{rsu\_fw\_cmd}}(sc, \mbox{\hyperlink{if__rsureg_8h_a04c2d2c95414f568fb6570f4af78a5a3}{R92S\_CMD\_SET\_OPMODE}}, \&opmode, \textcolor{keyword}{sizeof}(opmode));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01939}01939         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != 0)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01940}01940                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01941}01941 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01942}01942         memset(\&auth, 0, \textcolor{keyword}{sizeof}(auth));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01943}01943         \textcolor{keywordflow}{if} (vap-\/>iv\_flags \& IEEE80211\_F\_WPA) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01944}01944                 auth.\mbox{\hyperlink{structr92s__fw__cmd__auth_a1cc27f3ad031263bc43518903760ee0d}{mode}} = \mbox{\hyperlink{if__rsureg_8h_ae36fedd51d11066263935741a8a82cf1}{R92S\_AUTHMODE\_WPA}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01945}01945                 auth.\mbox{\hyperlink{structr92s__fw__cmd__auth_a1c44457a90cb91b02186a3e6f8de6609}{dot1x}} = (ni-\/>ni\_authmode == IEEE80211\_AUTH\_8021X);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01946}01946         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01947}01947                 auth.\mbox{\hyperlink{structr92s__fw__cmd__auth_a1cc27f3ad031263bc43518903760ee0d}{mode}} = \mbox{\hyperlink{if__rsureg_8h_a89e2e2124918431a715e9437bcfef196}{R92S\_AUTHMODE\_OPEN}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01948}01948         \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a09a67fdd4c21366cb6b0691e667fdce6}{RSU\_DEBUG\_RESET}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01949}01949             \textcolor{stringliteral}{"{}\%s: setting auth mode to \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01950}01950             \_\_func\_\_, auth.\mbox{\hyperlink{structr92s__fw__cmd__auth_a1cc27f3ad031263bc43518903760ee0d}{mode}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01951}01951         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__rsu_8c_a4ec7d2ccf04c77a70f082a7905f2fca3}{rsu\_fw\_cmd}}(sc, \mbox{\hyperlink{if__rsureg_8h_a6842b8020ace4ddb6336ca2dc3f74775}{R92S\_CMD\_SET\_AUTH}}, \&auth, \textcolor{keyword}{sizeof}(auth));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01952}01952         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != 0)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01953}01953                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01954}01954 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01955}01955         memset(buf, 0, \textcolor{keyword}{sizeof}(buf));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01956}01956         bss = (\textcolor{keyword}{struct }\mbox{\hyperlink{structndis__wlan__bssid__ex}{ndis\_wlan\_bssid\_ex}} *)buf;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01957}01957         IEEE80211\_ADDR\_COPY(bss-\/>\mbox{\hyperlink{structndis__wlan__bssid__ex_a8a0275a9f1c513f4aee83c2ab7fe00df}{macaddr}}, ni-\/>ni\_bssid);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01958}01958         bss-\/>\mbox{\hyperlink{structndis__wlan__bssid__ex_abd4da76a82a0213fc355c71aef8c7823}{ssid}}.\mbox{\hyperlink{structndis__802__11__ssid_a269c55fe0af20f76124822c944100c65}{ssidlen}} = htole32(ni-\/>ni\_esslen);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01959}01959         memcpy(bss-\/>\mbox{\hyperlink{structndis__wlan__bssid__ex_abd4da76a82a0213fc355c71aef8c7823}{ssid}}.\mbox{\hyperlink{structndis__802__11__ssid_ae5423bb056b9ca39009ae98cadc552fd}{ssid}}, ni-\/>ni\_essid, ni-\/>ni\_esslen);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01960}01960         \textcolor{keywordflow}{if} (vap-\/>iv\_flags \& (IEEE80211\_F\_PRIVACY | IEEE80211\_F\_WPA))}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01961}01961                 bss-\/>\mbox{\hyperlink{structndis__wlan__bssid__ex_a68cc2137a72bd2617192da1563853517}{privacy}} = htole32(1);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01962}01962         bss-\/>\mbox{\hyperlink{structndis__wlan__bssid__ex_ac134e3e46f6c26d5104ca2107c73b877}{rssi}} = htole32(ni-\/>ni\_avgrssi);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01963}01963         \textcolor{keywordflow}{if} (ic-\/>ic\_curmode == IEEE80211\_MODE\_11B)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01964}01964                 bss-\/>\mbox{\hyperlink{structndis__wlan__bssid__ex_ab6acfe23aec2b3b421da541da2ee2d87}{networktype}} = htole32(\mbox{\hyperlink{if__rsureg_8h_a55c3f89abeaa9885671e669940527c14}{NDIS802\_11DS}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01965}01965         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01966}01966                 bss-\/>\mbox{\hyperlink{structndis__wlan__bssid__ex_ab6acfe23aec2b3b421da541da2ee2d87}{networktype}} = htole32(\mbox{\hyperlink{if__rsureg_8h_a0f56f50996cf82c2e3b82df89cf63132}{NDIS802\_11OFDM24}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01967}01967         bss-\/>\mbox{\hyperlink{structndis__wlan__bssid__ex_a7a15ba2644bde5cc3123c507da79ce18}{config}}.\mbox{\hyperlink{structndis__802__11__configuration_a3e175c11401a1703b719d2eea352d17b}{len}} = htole32(\textcolor{keyword}{sizeof}(bss-\/>\mbox{\hyperlink{structndis__wlan__bssid__ex_a7a15ba2644bde5cc3123c507da79ce18}{config}}));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01968}01968         bss-\/>\mbox{\hyperlink{structndis__wlan__bssid__ex_a7a15ba2644bde5cc3123c507da79ce18}{config}}.\mbox{\hyperlink{structndis__802__11__configuration_af426cc4d10f64c6ce7a945d99681bda4}{bintval}} = htole32(ni-\/>ni\_intval);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01969}01969         bss-\/>\mbox{\hyperlink{structndis__wlan__bssid__ex_a7a15ba2644bde5cc3123c507da79ce18}{config}}.\mbox{\hyperlink{structndis__802__11__configuration_ae7859aa0aea54ed3145d5a52bdd0696b}{dsconfig}} = htole32(ieee80211\_chan2ieee(ic, ni-\/>ni\_chan));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01970}01970         bss-\/>\mbox{\hyperlink{structndis__wlan__bssid__ex_a15e5595d7d575d60c5733b249a9230cd}{inframode}} = htole32(\mbox{\hyperlink{if__rsureg_8h_a72cf2ff468af09f6c66f9973e9a1baa9}{NDIS802\_11INFRASTRUCTURE}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01971}01971         \textcolor{comment}{/* XXX verify how this is supposed to look! */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01972}01972         memcpy(bss-\/>\mbox{\hyperlink{structndis__wlan__bssid__ex_ab98d311de7a5a9035a6d5d302779ad6f}{supprates}}, ni-\/>ni\_rates.rs\_rates,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01973}01973             ni-\/>ni\_rates.rs\_nrates);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01974}01974         \textcolor{comment}{/* Write the fixed fields of the beacon frame. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01975}01975         fixed = (\textcolor{keyword}{struct }\mbox{\hyperlink{structndis__802__11__fixed__ies}{ndis\_802\_11\_fixed\_ies}} *)\&bss[1];}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01976}01976         memcpy(\&fixed-\/>\mbox{\hyperlink{structndis__802__11__fixed__ies_a910f89c3da4c24d1fa05b9be88404b37}{tstamp}}, ni-\/>ni\_tstamp.data, 8);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01977}01977         fixed-\/>\mbox{\hyperlink{structndis__802__11__fixed__ies_a2383c6f47c6bba0eeebf993945c00e1d}{bintval}} = htole16(ni-\/>ni\_intval);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01978}01978         fixed-\/>\mbox{\hyperlink{structndis__802__11__fixed__ies_a8d6646468fca910cbdee2423df59d43c}{capabilities}} = htole16(ni-\/>ni\_capinfo);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01979}01979         \textcolor{comment}{/* Write IEs to be included in the association request. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01980}01980         frm = (uint8\_t *)\&fixed[1];}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01981}01981         frm = ieee80211\_add\_rsn(frm, vap);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01982}01982         frm = ieee80211\_add\_wpa(frm, vap);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01983}01983         frm = ieee80211\_add\_qos(frm, ni);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01984}01984         \textcolor{keywordflow}{if} ((ic-\/>ic\_flags \& IEEE80211\_F\_WME) \&\&}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01985}01985             (ni-\/>ni\_ies.wme\_ie != NULL))}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01986}01986                 frm = ieee80211\_add\_wme\_info(frm, \&ic-\/>ic\_wme, ni);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01987}01987         \textcolor{keywordflow}{if} (ni-\/>ni\_flags \& IEEE80211\_NODE\_HT) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01988}01988                 frm = ieee80211\_add\_htcap(frm, ni);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01989}01989                 frm = ieee80211\_add\_htinfo(frm, ni);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01990}01990         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01991}01991         bss-\/>\mbox{\hyperlink{structndis__wlan__bssid__ex_a641c039799d65cdab4c77de47cf6f145}{ieslen}} = htole32(frm -\/ (uint8\_t *)fixed);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01992}01992         bss-\/>\mbox{\hyperlink{structndis__wlan__bssid__ex_aa72bea7050f42e67c9ea36c02f1af196}{len}} = htole32(((frm -\/ buf) + 3) \& \string~3);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01993}01993         \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a09a67fdd4c21366cb6b0691e667fdce6}{RSU\_DEBUG\_RESET}} | \mbox{\hyperlink{if__rsu_8c_a1b821762ca600087d89f818174fbf23f}{RSU\_DEBUG\_FWCMD}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01994}01994             \textcolor{stringliteral}{"{}\%s: sending join bss command to \%s chan \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01995}01995             \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01996}01996             ether\_sprintf(bss-\/>\mbox{\hyperlink{structndis__wlan__bssid__ex_a8a0275a9f1c513f4aee83c2ab7fe00df}{macaddr}}), le32toh(bss-\/>\mbox{\hyperlink{structndis__wlan__bssid__ex_a7a15ba2644bde5cc3123c507da79ce18}{config}}.\mbox{\hyperlink{structndis__802__11__configuration_ae7859aa0aea54ed3145d5a52bdd0696b}{dsconfig}}));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01997}01997         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__rsu_8c_a4ec7d2ccf04c77a70f082a7905f2fca3}{rsu\_fw\_cmd}}(sc, \mbox{\hyperlink{if__rsureg_8h_aeec41b2db3051853c190741ec368b9eb}{R92S\_CMD\_JOIN\_BSS}}, buf, \textcolor{keyword}{sizeof}(buf)));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01998}01998 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l01999}01999 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02000}02000 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02001}\mbox{\hyperlink{if__rsu_8c_a5fd2269a06b966d419c6c5640eac8920}{02001}} \mbox{\hyperlink{if__rsu_8c_a5fd2269a06b966d419c6c5640eac8920}{rsu\_disconnect}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02002}02002 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02003}02003         uint32\_t zero = 0;      \textcolor{comment}{/* :-\/) */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02004}02004 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02005}02005         \textcolor{comment}{/* Disassociate from our current BSS. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02006}02006         \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a9613ad7ae941ad16f1af7a7b64c94b51}{RSU\_DEBUG\_STATE}} | \mbox{\hyperlink{if__rsu_8c_a1b821762ca600087d89f818174fbf23f}{RSU\_DEBUG\_FWCMD}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02007}02007             \textcolor{stringliteral}{"{}\%s: sending disconnect command\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02008}02008         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__rsu_8c_a4ec7d2ccf04c77a70f082a7905f2fca3}{rsu\_fw\_cmd}}(sc, \mbox{\hyperlink{if__rsureg_8h_a799b24bc784c728e48429a202a76c332}{R92S\_CMD\_DISCONNECT}}, \&zero, \textcolor{keyword}{sizeof}(zero)));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02009}02009 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02010}02010 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02011}02011 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02012}02012 \textcolor{comment}{ * Map the hardware provided RSSI value to a signal level.}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02013}02013 \textcolor{comment}{ * For the most part it's just something we divide by and cap}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02014}02014 \textcolor{comment}{ * so it doesn't overflow the representation by net80211.}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02015}02015 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02016}02016 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02017}\mbox{\hyperlink{if__rsu_8c_a5c7e22b9831d6bac31b24adc1a2e0db6}{02017}} \mbox{\hyperlink{if__rsu_8c_a5c7e22b9831d6bac31b24adc1a2e0db6}{rsu\_hwrssi\_to\_rssi}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc, \textcolor{keywordtype}{int} hw\_rssi)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02018}02018 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02019}02019         \textcolor{keywordtype}{int} v;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02020}02020 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02021}02021         \textcolor{keywordflow}{if} (hw\_rssi == 0)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02022}02022                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02023}02023         v = hw\_rssi >> 4;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02024}02024         \textcolor{keywordflow}{if} (v > 80)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02025}02025                 v = 80;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02026}02026         \textcolor{keywordflow}{return} (v);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02027}02027 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02028}02028 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02029}\mbox{\hyperlink{if__rsu_8c_a6d18a212a24a2041be89fc4079f13d53}{02029}} \mbox{\hyperlink{if__rsu_8c_a6d18a212a24a2041be89fc4079f13d53}{CTASSERT}}(MCLBYTES > \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} ieee80211\_frame));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02030}02030 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02031}02031 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02032}\mbox{\hyperlink{if__rsu_8c_a09ef90d0f1cc0223b2fda1242c159bd0}{02032}} \mbox{\hyperlink{if__rsu_8c_a09ef90d0f1cc0223b2fda1242c159bd0}{rsu\_event\_survey}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc, uint8\_t *buf, \textcolor{keywordtype}{int} \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02033}02033 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02034}02034         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structrsu__softc_a67bd1a5c6762d8cd8c5b7e7b5bdfddd6}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02035}02035         \textcolor{keyword}{struct }ieee80211\_frame *wh;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02036}02036         \textcolor{keyword}{struct }\mbox{\hyperlink{structndis__wlan__bssid__ex}{ndis\_wlan\_bssid\_ex}} *bss;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02037}02037         \textcolor{keyword}{struct }ieee80211\_rx\_stats rxs;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02038}02038         \textcolor{keyword}{struct }mbuf *m;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02039}02039         uint32\_t ieslen;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02040}02040         uint32\_t pktlen;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02041}02041 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02042}02042         \textcolor{keywordflow}{if} (\_\_predict\_false(\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} < \textcolor{keyword}{sizeof}(*bss)))}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02043}02043                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02044}02044         bss = (\textcolor{keyword}{struct }\mbox{\hyperlink{structndis__wlan__bssid__ex}{ndis\_wlan\_bssid\_ex}} *)buf;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02045}02045         \mbox{\hyperlink{structndis__wlan__bssid__ex_a641c039799d65cdab4c77de47cf6f145}{ieslen}} = le32toh(bss-\/>\mbox{\hyperlink{structndis__wlan__bssid__ex_a641c039799d65cdab4c77de47cf6f145}{ieslen}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02046}02046         \textcolor{comment}{/* range check length of information element */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02047}02047         \textcolor{keywordflow}{if} (\_\_predict\_false(\mbox{\hyperlink{structndis__wlan__bssid__ex_a641c039799d65cdab4c77de47cf6f145}{ieslen}} > (uint32\_t)(\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} -\/ \textcolor{keyword}{sizeof}(*bss))))}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02048}02048                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02049}02049 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02050}02050         \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_aee40def35d0f7bc3712d3f2eedbcf843}{RSU\_DEBUG\_SCAN}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02051}02051             \textcolor{stringliteral}{"{}\%s: found BSS \%s: len=\%d chan=\%d inframode=\%d "{}}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02052}02052             \textcolor{stringliteral}{"{}networktype=\%d privacy=\%d, RSSI=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02053}02053             \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02054}02054             ether\_sprintf(bss-\/>\mbox{\hyperlink{structndis__wlan__bssid__ex_a8a0275a9f1c513f4aee83c2ab7fe00df}{macaddr}}), \mbox{\hyperlink{structndis__wlan__bssid__ex_a641c039799d65cdab4c77de47cf6f145}{ieslen}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02055}02055             le32toh(bss-\/>\mbox{\hyperlink{structndis__wlan__bssid__ex_a7a15ba2644bde5cc3123c507da79ce18}{config}}.\mbox{\hyperlink{structndis__802__11__configuration_ae7859aa0aea54ed3145d5a52bdd0696b}{dsconfig}}), le32toh(bss-\/>\mbox{\hyperlink{structndis__wlan__bssid__ex_a15e5595d7d575d60c5733b249a9230cd}{inframode}}),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02056}02056             le32toh(bss-\/>\mbox{\hyperlink{structndis__wlan__bssid__ex_ab6acfe23aec2b3b421da541da2ee2d87}{networktype}}), le32toh(bss-\/>\mbox{\hyperlink{structndis__wlan__bssid__ex_a68cc2137a72bd2617192da1563853517}{privacy}}),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02057}02057             le32toh(bss-\/>\mbox{\hyperlink{structndis__wlan__bssid__ex_ac134e3e46f6c26d5104ca2107c73b877}{rssi}}));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02058}02058 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02059}02059         \textcolor{comment}{/* Build a fake beacon frame to let net80211 do all the parsing. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02060}02060         \textcolor{comment}{/* XXX TODO: just call the new scan API methods! */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02061}02061         \textcolor{keywordflow}{if} (\_\_predict\_false(\mbox{\hyperlink{structndis__wlan__bssid__ex_a641c039799d65cdab4c77de47cf6f145}{ieslen}} > (\textcolor{keywordtype}{size\_t})(MCLBYTES -\/ \textcolor{keyword}{sizeof}(*wh))))}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02062}02062                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02063}02063         pktlen = \textcolor{keyword}{sizeof}(*wh) + \mbox{\hyperlink{structndis__wlan__bssid__ex_a641c039799d65cdab4c77de47cf6f145}{ieslen}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02064}02064         m = m\_get2(pktlen, M\_NOWAIT, MT\_DATA, M\_PKTHDR);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02065}02065         \textcolor{keywordflow}{if} (\_\_predict\_false(m == NULL))}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02066}02066                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02067}02067         wh = mtod(m, \textcolor{keyword}{struct} ieee80211\_frame *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02068}02068         wh-\/>i\_fc[0] = IEEE80211\_FC0\_VERSION\_0 | IEEE80211\_FC0\_TYPE\_MGT |}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02069}02069             IEEE80211\_FC0\_SUBTYPE\_BEACON;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02070}02070         wh-\/>i\_fc[1] = IEEE80211\_FC1\_DIR\_NODS;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02071}02071         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(wh-\/>i\_dur, 0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02072}02072         IEEE80211\_ADDR\_COPY(wh-\/>i\_addr1, ieee80211broadcastaddr);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02073}02073         IEEE80211\_ADDR\_COPY(wh-\/>i\_addr2, bss-\/>\mbox{\hyperlink{structndis__wlan__bssid__ex_a8a0275a9f1c513f4aee83c2ab7fe00df}{macaddr}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02074}02074         IEEE80211\_ADDR\_COPY(wh-\/>i\_addr3, bss-\/>\mbox{\hyperlink{structndis__wlan__bssid__ex_a8a0275a9f1c513f4aee83c2ab7fe00df}{macaddr}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02075}02075         *(uint16\_t *)wh-\/>i\_seq = 0;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02076}02076         memcpy(\&wh[1], (uint8\_t *)\&bss[1], \mbox{\hyperlink{structndis__wlan__bssid__ex_a641c039799d65cdab4c77de47cf6f145}{ieslen}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02077}02077 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02078}02078         \textcolor{comment}{/* Finalize mbuf. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02079}02079         m-\/>m\_pkthdr.len = m-\/>m\_len = pktlen;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02080}02080 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02081}02081         \textcolor{comment}{/* Set channel flags for input path */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02082}02082         bzero(\&rxs, \textcolor{keyword}{sizeof}(rxs));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02083}02083         rxs.r\_flags |= IEEE80211\_R\_IEEE | IEEE80211\_R\_FREQ;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02084}02084         rxs.r\_flags |= IEEE80211\_R\_BAND;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02085}02085         rxs.r\_flags |= IEEE80211\_R\_NF | IEEE80211\_R\_RSSI;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02086}02086         rxs.c\_ieee = le32toh(bss-\/>\mbox{\hyperlink{structndis__wlan__bssid__ex_a7a15ba2644bde5cc3123c507da79ce18}{config}}.\mbox{\hyperlink{structndis__802__11__configuration_ae7859aa0aea54ed3145d5a52bdd0696b}{dsconfig}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02087}02087         rxs.c\_freq = ieee80211\_ieee2mhz(rxs.c\_ieee, IEEE80211\_CHAN\_2GHZ);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02088}02088         rxs.c\_band = IEEE80211\_CHAN\_2GHZ;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02089}02089         \textcolor{comment}{/* This is a number from 0..100; so let's just divide it down a bit */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02090}02090         rxs.c\_rssi = le32toh(bss-\/>\mbox{\hyperlink{structndis__wlan__bssid__ex_ac134e3e46f6c26d5104ca2107c73b877}{rssi}}) / 2;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02091}02091         rxs.c\_nf = -\/96;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02092}02092         \textcolor{keywordflow}{if} (ieee80211\_add\_rx\_params(m, \&rxs) == 0)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02093}02093                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02094}02094 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02095}02095         \textcolor{comment}{/* XXX avoid a LOR */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02096}02096         \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02097}02097         ieee80211\_input\_mimo\_all(ic, m);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02098}02098         \mbox{\hyperlink{if__rsureg_8h_a48532232b39d8fa728a8a10df1d3f4b7}{RSU\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02099}02099 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02100}02100 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02101}02101 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02102}\mbox{\hyperlink{if__rsu_8c_aca11b665eaf18caf2d9ccecdaff06c96}{02102}} \mbox{\hyperlink{if__rsu_8c_aca11b665eaf18caf2d9ccecdaff06c96}{rsu\_event\_join\_bss}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc, uint8\_t *buf, \textcolor{keywordtype}{int} \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02103}02103 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02104}02104         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structrsu__softc_a67bd1a5c6762d8cd8c5b7e7b5bdfddd6}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02105}02105         \textcolor{keyword}{struct }ieee80211vap *vap = TAILQ\_FIRST(\&ic-\/>ic\_vaps);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02106}02106         \textcolor{keyword}{struct }ieee80211\_node *ni = vap-\/>iv\_bss;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02107}02107         \textcolor{keyword}{struct }\mbox{\hyperlink{structr92s__event__join__bss}{r92s\_event\_join\_bss}} *rsp;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02108}02108         uint32\_t tmp;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02109}02109         \textcolor{keywordtype}{int} res;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02110}02110 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02111}02111         \textcolor{keywordflow}{if} (\_\_predict\_false(\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} < \textcolor{keyword}{sizeof}(*rsp)))}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02112}02112                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02113}02113         rsp = (\textcolor{keyword}{struct }\mbox{\hyperlink{structr92s__event__join__bss}{r92s\_event\_join\_bss}} *)buf;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02114}02114         res = (int)le32toh(rsp-\/>\mbox{\hyperlink{structr92s__event__join__bss_a99998d34671133aaa296d861f8c28b06}{join\_res}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02115}02115 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02116}02116         \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a9613ad7ae941ad16f1af7a7b64c94b51}{RSU\_DEBUG\_STATE}} | \mbox{\hyperlink{if__rsu_8c_a1b821762ca600087d89f818174fbf23f}{RSU\_DEBUG\_FWCMD}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02117}02117             \textcolor{stringliteral}{"{}\%s: Rx join BSS event len=\%d res=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02118}02118             \_\_func\_\_, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}}, res);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02119}02119 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02120}02120         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02121}02121 \textcolor{comment}{         * XXX Don't do this; there's likely a better way to tell}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02122}02122 \textcolor{comment}{         * the caller we failed.}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02123}02123 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02124}02124         \textcolor{keywordflow}{if} (res <= 0) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02125}02125                 \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02126}02126                 ieee80211\_new\_state(vap, IEEE80211\_S\_SCAN, -\/1);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02127}02127                 \mbox{\hyperlink{if__rsureg_8h_a48532232b39d8fa728a8a10df1d3f4b7}{RSU\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02128}02128                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02129}02129         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02130}02130 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02131}02131         tmp = le32toh(rsp-\/>\mbox{\hyperlink{structr92s__event__join__bss_a4a6fa28fb3ab666e6bd48a690a9adbd0}{associd}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02132}02132         \textcolor{keywordflow}{if} (tmp >= vap-\/>iv\_max\_aid) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02133}02133                 \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_ac1122c0f4f785bdbad53926f38201847}{RSU\_DEBUG\_ANY}}, \textcolor{stringliteral}{"{}Assoc ID overflow\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02134}02134                 tmp = 1;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02135}02135         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02136}02136         \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a9613ad7ae941ad16f1af7a7b64c94b51}{RSU\_DEBUG\_STATE}} | \mbox{\hyperlink{if__rsu_8c_a1b821762ca600087d89f818174fbf23f}{RSU\_DEBUG\_FWCMD}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02137}02137             \textcolor{stringliteral}{"{}\%s: associated with \%s associd=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02138}02138             \_\_func\_\_, ether\_sprintf(rsp-\/>\mbox{\hyperlink{structr92s__event__join__bss_ae6ceada7bf939c56d0144e22e8d1b1bb}{bss}}.\mbox{\hyperlink{structndis__wlan__bssid__ex_a8a0275a9f1c513f4aee83c2ab7fe00df}{macaddr}}), tmp);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02139}02139         \textcolor{comment}{/* XXX is this required? What's the top two bits for again? */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02140}02140         ni-\/>ni\_associd = tmp | 0xc000;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02141}02141 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02142}02142         \textcolor{comment}{/* Refresh Rx filter (was changed by firmware). */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02143}02143         sc-\/>\mbox{\hyperlink{structrsu__softc_a843fbf0b92e8ba1878bb8e9cd84fd05f}{sc\_vap\_is\_running}} = 1;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02144}02144         \mbox{\hyperlink{if__rsu_8c_a65b8dc2360a4af15d1124903842049d5}{rsu\_rxfilter\_refresh}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02145}02145 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02146}02146         \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02147}02147         ieee80211\_new\_state(vap, IEEE80211\_S\_RUN,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02148}02148             IEEE80211\_FC0\_SUBTYPE\_ASSOC\_RESP);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02149}02149         \mbox{\hyperlink{if__rsureg_8h_a48532232b39d8fa728a8a10df1d3f4b7}{RSU\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02150}02150 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02151}02151 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02152}02152 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02153}\mbox{\hyperlink{if__rsu_8c_ab7d3419ee5f3d9ac27306c2ea1c4251a}{02153}} \mbox{\hyperlink{if__rsu_8c_ab7d3419ee5f3d9ac27306c2ea1c4251a}{rsu\_event\_addba\_req\_report}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc, uint8\_t *buf, \textcolor{keywordtype}{int} \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02154}02154 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02155}02155         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structrsu__softc_a67bd1a5c6762d8cd8c5b7e7b5bdfddd6}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02156}02156         \textcolor{keyword}{struct }ieee80211vap *vap = TAILQ\_FIRST(\&ic-\/>ic\_vaps);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02157}02157         \textcolor{keyword}{struct }\mbox{\hyperlink{structr92s__add__ba__event}{r92s\_add\_ba\_event}} *ba = (\textcolor{keywordtype}{void} *) buf;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02158}02158         \textcolor{keyword}{struct }ieee80211\_node *ni;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02159}02159 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02160}02160         \textcolor{keywordflow}{if} (\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} < \textcolor{keyword}{sizeof}(*ba)) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02161}02161                 device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%s: short read (\%d)\(\backslash\)n"{}}, \_\_func\_\_, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02162}02162                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02163}02163         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02164}02164 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02165}02165         \textcolor{keywordflow}{if} (vap == NULL)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02166}02166                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02167}02167 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02168}02168         \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a3e742fa1f3739636ca3c3eb2893960fa}{RSU\_DEBUG\_AMPDU}}, \textcolor{stringliteral}{"{}\%s: mac=\%s, tid=\%d, ssn=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02169}02169             \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02170}02170             ether\_sprintf(ba-\/>\mbox{\hyperlink{structr92s__add__ba__event_ad187b7f6de3ce129b1b3c806b11d9b10}{mac\_addr}}),}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02171}02171             (\textcolor{keywordtype}{int}) ba-\/>\mbox{\hyperlink{structr92s__add__ba__event_a27601cffbc7fab63de630427036f418f}{tid}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02172}02172             (\textcolor{keywordtype}{int}) le16toh(ba-\/>\mbox{\hyperlink{structr92s__add__ba__event_ad604146666f7ce9ca777356a09c01372}{ssn}}));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02173}02173 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02174}02174         \textcolor{comment}{/* XXX do node lookup; this is STA specific */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02175}02175 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02176}02176         ni = ieee80211\_ref\_node(vap-\/>iv\_bss);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02177}02177         ieee80211\_ampdu\_rx\_start\_ext(ni, ba-\/>\mbox{\hyperlink{structr92s__add__ba__event_a27601cffbc7fab63de630427036f418f}{tid}}, le16toh(ba-\/>\mbox{\hyperlink{structr92s__add__ba__event_ad604146666f7ce9ca777356a09c01372}{ssn}}) >> 4, 32);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02178}02178         ieee80211\_free\_node(ni);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02179}02179 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02180}02180 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02181}02181 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02182}\mbox{\hyperlink{if__rsu_8c_aee95f48280c4e88f574b81ecf3ccf741}{02182}} \mbox{\hyperlink{if__rsu_8c_aee95f48280c4e88f574b81ecf3ccf741}{rsu\_rx\_event}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc, uint8\_t code, uint8\_t *buf, \textcolor{keywordtype}{int} \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02183}02183 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02184}02184         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structrsu__softc_a67bd1a5c6762d8cd8c5b7e7b5bdfddd6}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02185}02185         \textcolor{keyword}{struct }ieee80211vap *vap = TAILQ\_FIRST(\&ic-\/>ic\_vaps);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02186}02186 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02187}02187         \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a2c4ce8fa1fcca611091ffa09de80b878}{RSU\_DEBUG\_RX}} | \mbox{\hyperlink{if__rsu_8c_a1b821762ca600087d89f818174fbf23f}{RSU\_DEBUG\_FWCMD}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02188}02188             \textcolor{stringliteral}{"{}\%s: Rx event code=\%d len=\%d\(\backslash\)n"{}}, \_\_func\_\_, code, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02189}02189         \textcolor{keywordflow}{switch} (code) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02190}02190         \textcolor{keywordflow}{case} \mbox{\hyperlink{if__rsureg_8h_a21456e5ac419d91f007b0cc5829b91f8}{R92S\_EVT\_SURVEY}}:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02191}02191                 \mbox{\hyperlink{if__rsu_8c_a09ef90d0f1cc0223b2fda1242c159bd0}{rsu\_event\_survey}}(sc, buf, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02192}02192                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02193}02193         \textcolor{keywordflow}{case} \mbox{\hyperlink{if__rsureg_8h_af6a332dce8d4753e3a66104396b628be}{R92S\_EVT\_SURVEY\_DONE}}:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02194}02194                 \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_aee40def35d0f7bc3712d3f2eedbcf843}{RSU\_DEBUG\_SCAN}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02195}02195                     \textcolor{stringliteral}{"{}\%s: \%s scan done, found \%d BSS\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02196}02196                     \_\_func\_\_, sc-\/>\mbox{\hyperlink{structrsu__softc_a8617f7abbb42b202a3fdbcf5e599e3dc}{sc\_extra\_scan}} ? \textcolor{stringliteral}{"{}direct"{}} : \textcolor{stringliteral}{"{}broadcast"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02197}02197                     le32toh(*(uint32\_t *)buf));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02198}02198                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrsu__softc_a8617f7abbb42b202a3fdbcf5e599e3dc}{sc\_extra\_scan}} == 1) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02199}02199                         \textcolor{comment}{/* Send broadcast probe request. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02200}02200                         sc-\/>\mbox{\hyperlink{structrsu__softc_a8617f7abbb42b202a3fdbcf5e599e3dc}{sc\_extra\_scan}} = 0;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02201}02201                         \textcolor{keywordflow}{if} (vap != NULL \&\& \mbox{\hyperlink{if__rsu_8c_a1620d0b3b8c8e3a1ede0e5f165214e36}{rsu\_site\_survey}}(sc, NULL) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02202}02202                                 \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02203}02203                                 ieee80211\_cancel\_scan(vap);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02204}02204                                 \mbox{\hyperlink{if__rsureg_8h_a48532232b39d8fa728a8a10df1d3f4b7}{RSU\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02205}02205                         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02206}02206                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02207}02207                 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02208}02208                 \textcolor{keywordflow}{if} (vap != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02209}02209                         \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02210}02210                         ieee80211\_scan\_done(vap);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02211}02211                         \mbox{\hyperlink{if__rsureg_8h_a48532232b39d8fa728a8a10df1d3f4b7}{RSU\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02212}02212                 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02213}02213                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02214}02214         \textcolor{keywordflow}{case} \mbox{\hyperlink{if__rsureg_8h_a041b66e5299e34813c912c239adeba47}{R92S\_EVT\_JOIN\_BSS}}:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02215}02215                 \textcolor{keywordflow}{if} (vap-\/>iv\_state == IEEE80211\_S\_AUTH)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02216}02216                         \mbox{\hyperlink{if__rsu_8c_aca11b665eaf18caf2d9ccecdaff06c96}{rsu\_event\_join\_bss}}(sc, buf, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02217}02217                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02218}02218         \textcolor{keywordflow}{case} \mbox{\hyperlink{if__rsureg_8h_a86b96b8a3064f9cb58700e65e50f1c38}{R92S\_EVT\_DEL\_STA}}:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02219}02219                 \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a1b821762ca600087d89f818174fbf23f}{RSU\_DEBUG\_FWCMD}} | \mbox{\hyperlink{if__rsu_8c_a9613ad7ae941ad16f1af7a7b64c94b51}{RSU\_DEBUG\_STATE}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02220}02220                     \textcolor{stringliteral}{"{}\%s: disassociated from \%s\(\backslash\)n"{}}, \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02221}02221                     ether\_sprintf(buf));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02222}02222                 \textcolor{keywordflow}{if} (vap-\/>iv\_state == IEEE80211\_S\_RUN \&\&}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02223}02223                     IEEE80211\_ADDR\_EQ(vap-\/>iv\_bss-\/>ni\_bssid, buf)) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02224}02224                         \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02225}02225                         ieee80211\_new\_state(vap, IEEE80211\_S\_SCAN, -\/1);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02226}02226                         \mbox{\hyperlink{if__rsureg_8h_a48532232b39d8fa728a8a10df1d3f4b7}{RSU\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02227}02227                 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02228}02228                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02229}02229         \textcolor{keywordflow}{case} \mbox{\hyperlink{if__rsureg_8h_a330fcc984babf6d8c981c4912b51e942}{R92S\_EVT\_WPS\_PBC}}:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02230}02230                 \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a2c4ce8fa1fcca611091ffa09de80b878}{RSU\_DEBUG\_RX}} | \mbox{\hyperlink{if__rsu_8c_a1b821762ca600087d89f818174fbf23f}{RSU\_DEBUG\_FWCMD}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02231}02231                     \textcolor{stringliteral}{"{}\%s: WPS PBC pushed.\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02232}02232                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02233}02233         \textcolor{keywordflow}{case} \mbox{\hyperlink{if__rsureg_8h_af1e1945541ffa252c5809ccc3e335e3c}{R92S\_EVT\_FWDBG}}:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02234}02234                 buf[60] = \textcolor{charliteral}{'\(\backslash\)0'};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02235}02235                 \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_adee9143c379dd8aac25f9ebd8447574b}{RSU\_DEBUG\_FWDBG}}, \textcolor{stringliteral}{"{}FWDBG: \%s\(\backslash\)n"{}}, (\textcolor{keywordtype}{char} *)buf);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02236}02236                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02237}02237         \textcolor{keywordflow}{case} \mbox{\hyperlink{if__rsureg_8h_a7e53b8fcb50ca012e155e1e8b777c6cf}{R92S\_EVT\_ADDBA\_REQ\_REPORT}}:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02238}02238                 \mbox{\hyperlink{if__rsu_8c_ab7d3419ee5f3d9ac27306c2ea1c4251a}{rsu\_event\_addba\_req\_report}}(sc, buf, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02239}02239                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02240}02240         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02241}02241                 device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%s: unhandled code (\%d)\(\backslash\)n"{}}, \_\_func\_\_, code);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02242}02242                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02243}02243         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02244}02244 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02245}02245 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02246}02246 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02247}\mbox{\hyperlink{if__rsu_8c_a088f775d4cef71d6076b9584325c9066}{02247}} \mbox{\hyperlink{if__rsu_8c_a088f775d4cef71d6076b9584325c9066}{rsu\_rx\_multi\_event}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc, uint8\_t *buf, \textcolor{keywordtype}{int} \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02248}02248 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02249}02249         \textcolor{keyword}{struct }\mbox{\hyperlink{structr92s__fw__cmd__hdr}{r92s\_fw\_cmd\_hdr}} *cmd;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02250}02250         \textcolor{keywordtype}{int} cmdsz;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02251}02251 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02252}02252         \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a2c4ce8fa1fcca611091ffa09de80b878}{RSU\_DEBUG\_RX}}, \textcolor{stringliteral}{"{}\%s: Rx events len=\%d\(\backslash\)n"{}}, \_\_func\_\_, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02253}02253 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02254}02254         \textcolor{comment}{/* Skip Rx status. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02255}02255         buf += \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structr92s__rx__stat}{r92s\_rx\_stat}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02256}02256         \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} -\/= \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structr92s__rx__stat}{r92s\_rx\_stat}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02257}02257 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02258}02258         \textcolor{comment}{/* Process all events. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02259}02259         \textcolor{keywordflow}{for} (;;) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02260}02260                 \textcolor{comment}{/* Check that command header fits. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02261}02261                 \textcolor{keywordflow}{if} (\_\_predict\_false(\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} < \textcolor{keyword}{sizeof}(*cmd)))}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02262}02262                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02263}02263                 cmd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structr92s__fw__cmd__hdr}{r92s\_fw\_cmd\_hdr}} *)buf;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02264}02264                 \textcolor{comment}{/* Check that command payload fits. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02265}02265                 cmdsz = le16toh(cmd-\/>\mbox{\hyperlink{structr92s__fw__cmd__hdr_a081cdc793b3b33387d20cfc2c5412665}{len}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02266}02266                 \textcolor{keywordflow}{if} (\_\_predict\_false(\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} < \textcolor{keyword}{sizeof}(*cmd) + cmdsz))}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02267}02267                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02268}02268 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02269}02269                 \textcolor{comment}{/* Process firmware event. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02270}02270                 \mbox{\hyperlink{if__rsu_8c_aee95f48280c4e88f574b81ecf3ccf741}{rsu\_rx\_event}}(sc, cmd-\/>\mbox{\hyperlink{structr92s__fw__cmd__hdr_a9f07f91635c369e0f08bad4a8e275e63}{code}}, (uint8\_t *)\&cmd[1], cmdsz);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02271}02271 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02272}02272                 \textcolor{keywordflow}{if} (!(cmd-\/>seq \& \mbox{\hyperlink{if__rsureg_8h_a1f896b75170936c4082ea72b8bebb979}{R92S\_FW\_CMD\_MORE}}))}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02273}02273                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02274}02274                 buf += \textcolor{keyword}{sizeof}(*cmd) + cmdsz;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02275}02275                 \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} -\/= \textcolor{keyword}{sizeof}(*cmd) + cmdsz;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02276}02276         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02277}02277 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02278}02278 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02279}02279 \textcolor{keyword}{static} int8\_t}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02280}\mbox{\hyperlink{if__rsu_8c_a1b41b89023ff47fdd7f9c5d3aed86123}{02280}} \mbox{\hyperlink{if__rsu_8c_a1b41b89023ff47fdd7f9c5d3aed86123}{rsu\_get\_rssi}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc, \textcolor{keywordtype}{int} rate, \textcolor{keywordtype}{void} *physt)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02281}02281 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02282}02282         \textcolor{keyword}{static} \textcolor{keyword}{const} int8\_t cckoff[] = \{ 14, -\/2, -\/20, -\/40 \};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02283}02283         \textcolor{keyword}{struct }\mbox{\hyperlink{structr92s__rx__phystat}{r92s\_rx\_phystat}} *phy;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02284}02284         \textcolor{keyword}{struct }\mbox{\hyperlink{structr92s__rx__cck}{r92s\_rx\_cck}} *cck;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02285}02285         uint8\_t rpt;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02286}02286         int8\_t rssi;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02287}02287 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02288}02288         \textcolor{keywordflow}{if} (rate <= 3) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02289}02289                 cck = (\textcolor{keyword}{struct }\mbox{\hyperlink{structr92s__rx__cck}{r92s\_rx\_cck}} *)physt;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02290}02290                 rpt = (cck-\/>\mbox{\hyperlink{structr92s__rx__cck_aec4ea2230ccacbe36eaa290ede3c9236}{agc\_rpt}} >> 6) \& 0x3;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02291}02291                 rssi = cck-\/>\mbox{\hyperlink{structr92s__rx__cck_aec4ea2230ccacbe36eaa290ede3c9236}{agc\_rpt}} \& 0x3e;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02292}02292                 rssi = cckoff[rpt] -\/ rssi;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02293}02293         \} \textcolor{keywordflow}{else} \{        \textcolor{comment}{/* OFDM/HT. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02294}02294                 phy = (\textcolor{keyword}{struct }\mbox{\hyperlink{structr92s__rx__phystat}{r92s\_rx\_phystat}} *)physt;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02295}02295                 rssi = ((le32toh(phy-\/>\mbox{\hyperlink{structr92s__rx__phystat_a4227a193d5888fc60b8f6de52660d6a6}{phydw1}}) >> 1) \& 0x7f) -\/ 106;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02296}02296         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02297}02297         \textcolor{keywordflow}{return} (rssi);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02298}02298 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02299}02299 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02300}02300 \textcolor{keyword}{static} \textcolor{keyword}{struct }mbuf *}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02301}\mbox{\hyperlink{if__rsu_8c_aa82647d5d46d598a0a10fa22cf4b9f78}{02301}} \mbox{\hyperlink{if__rsu_8c_aa82647d5d46d598a0a10fa22cf4b9f78}{rsu\_rx\_copy\_to\_mbuf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structr92s__rx__stat}{r92s\_rx\_stat}} *stat,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02302}02302     \textcolor{keywordtype}{int} totlen)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02303}02303 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02304}02304         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structrsu__softc_a67bd1a5c6762d8cd8c5b7e7b5bdfddd6}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02305}02305         \textcolor{keyword}{struct }mbuf *m;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02306}02306         uint32\_t \mbox{\hyperlink{if__rsureg_8h_ace11ca890323d7ad6a4e8938c6787b3c}{rxdw0}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02307}02307         \textcolor{keywordtype}{int} pktlen;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02308}02308 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02309}02309         \mbox{\hyperlink{if__rsureg_8h_ace11ca890323d7ad6a4e8938c6787b3c}{rxdw0}} = le32toh(stat-\/>\mbox{\hyperlink{structr92s__rx__stat_abd9a2c927ac114acba4b87c8ac351840}{rxdw0}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02310}02310         \textcolor{keywordflow}{if} (\_\_predict\_false(\mbox{\hyperlink{if__rsureg_8h_ace11ca890323d7ad6a4e8938c6787b3c}{rxdw0}} \& (\mbox{\hyperlink{if__rsureg_8h_a40ec496f14d9095927d3666f427383da}{R92S\_RXDW0\_CRCERR}} | \mbox{\hyperlink{if__rsureg_8h_aae4041ea232651de57a4353e843c1339}{R92S\_RXDW0\_ICVERR}}))) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02311}02311                 \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a2c4ce8fa1fcca611091ffa09de80b878}{RSU\_DEBUG\_RX}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02312}02312                     \textcolor{stringliteral}{"{}\%s: RX flags error (\%s)\(\backslash\)n"{}}, \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02313}02313                     \mbox{\hyperlink{if__rsureg_8h_ace11ca890323d7ad6a4e8938c6787b3c}{rxdw0}} \& \mbox{\hyperlink{if__rsureg_8h_a40ec496f14d9095927d3666f427383da}{R92S\_RXDW0\_CRCERR}} ? \textcolor{stringliteral}{"{}CRC"{}} : \textcolor{stringliteral}{"{}ICV"{}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02314}02314                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02315}02315         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02316}02316 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02317}02317         pktlen = \mbox{\hyperlink{if__rsureg_8h_aa1f710025311c0169fbc5b1296d914b6}{MS}}(\mbox{\hyperlink{if__rsureg_8h_ace11ca890323d7ad6a4e8938c6787b3c}{rxdw0}}, R92S\_RXDW0\_PKTLEN);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02318}02318         \textcolor{keywordflow}{if} (\_\_predict\_false(pktlen < \textcolor{keyword}{sizeof} (\textcolor{keyword}{struct} ieee80211\_frame\_ack))) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02319}02319                 \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a2c4ce8fa1fcca611091ffa09de80b878}{RSU\_DEBUG\_RX}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02320}02320                     \textcolor{stringliteral}{"{}\%s: frame is too short: \%d\(\backslash\)n"{}}, \_\_func\_\_, pktlen);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02321}02321                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02322}02322         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02323}02323 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02324}02324         m = m\_get2(totlen, M\_NOWAIT, MT\_DATA, M\_PKTHDR);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02325}02325         \textcolor{keywordflow}{if} (\_\_predict\_false(m == NULL)) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02326}02326                 device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02327}02327                     \textcolor{stringliteral}{"{}\%s: could not allocate RX mbuf, totlen \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02328}02328                     \_\_func\_\_, totlen);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02329}02329                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02330}02330         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02331}02331 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02332}02332         \textcolor{comment}{/* Finalize mbuf. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02333}02333         memcpy(mtod(m, uint8\_t *), (uint8\_t *)stat, totlen);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02334}02334         m-\/>m\_pkthdr.len = m-\/>m\_len = totlen;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02335}02335 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02336}02336         \textcolor{keywordflow}{return} (m);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02337}02337 \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}}:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02338}02338         counter\_u64\_add(ic-\/>ic\_ierrors, 1);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02339}02339         \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02340}02340 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02341}02341 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02342}02342 \textcolor{keyword}{static} uint32\_t}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02343}\mbox{\hyperlink{if__rsu_8c_a3da0e3522f4aab655ab48dfc490befc8}{02343}} \mbox{\hyperlink{if__rsu_8c_a3da0e3522f4aab655ab48dfc490befc8}{rsu\_get\_tsf\_low}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02344}02344 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02345}02345         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__rsu_8c_a1741f47255e3a970e39706ca00fa428b}{rsu\_read\_4}}(sc, \mbox{\hyperlink{if__rsureg_8h_a69ae6297328781390f3d0deb615d8c89}{R92S\_TSFTR}}));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02346}02346 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02347}02347 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02348}02348 \textcolor{keyword}{static} uint32\_t}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02349}\mbox{\hyperlink{if__rsu_8c_a1f11a652b75a508c0d4d8fce86526541}{02349}} \mbox{\hyperlink{if__rsu_8c_a1f11a652b75a508c0d4d8fce86526541}{rsu\_get\_tsf\_high}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02350}02350 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02351}02351         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__rsu_8c_a1741f47255e3a970e39706ca00fa428b}{rsu\_read\_4}}(sc, \mbox{\hyperlink{if__rsureg_8h_a69ae6297328781390f3d0deb615d8c89}{R92S\_TSFTR}} + 4));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02352}02352 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02353}02353 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02354}02354 \textcolor{keyword}{static} \textcolor{keyword}{struct }ieee80211\_node *}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02355}\mbox{\hyperlink{if__rsu_8c_a33298ad13e4d3752b2d2d76d8e8583a4}{02355}} \mbox{\hyperlink{if__rsu_8c_a33298ad13e4d3752b2d2d76d8e8583a4}{rsu\_rx\_frame}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc, \textcolor{keyword}{struct} mbuf *m)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02356}02356 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02357}02357         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structrsu__softc_a67bd1a5c6762d8cd8c5b7e7b5bdfddd6}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02358}02358         \textcolor{keyword}{struct }ieee80211\_frame\_min *wh;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02359}02359         \textcolor{keyword}{struct }ieee80211\_rx\_stats rxs;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02360}02360         \textcolor{keyword}{struct }\mbox{\hyperlink{structr92s__rx__stat}{r92s\_rx\_stat}} *stat;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02361}02361         uint32\_t \mbox{\hyperlink{if__rsureg_8h_ace11ca890323d7ad6a4e8938c6787b3c}{rxdw0}}, \mbox{\hyperlink{if__rsureg_8h_ae221151a21d61fb208230971ca2b7cf4}{rxdw3}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02362}02362         uint8\_t cipher, rate;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02363}02363         \textcolor{keywordtype}{int} infosz;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02364}02364         \textcolor{keywordtype}{int} rssi;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02365}02365 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02366}02366         stat = mtod(m, \textcolor{keyword}{struct} \mbox{\hyperlink{structr92s__rx__stat}{r92s\_rx\_stat}} *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02367}02367         \mbox{\hyperlink{if__rsureg_8h_ace11ca890323d7ad6a4e8938c6787b3c}{rxdw0}} = le32toh(stat-\/>\mbox{\hyperlink{structr92s__rx__stat_abd9a2c927ac114acba4b87c8ac351840}{rxdw0}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02368}02368         \mbox{\hyperlink{if__rsureg_8h_ae221151a21d61fb208230971ca2b7cf4}{rxdw3}} = le32toh(stat-\/>\mbox{\hyperlink{structr92s__rx__stat_a7f341a16f2bf0121e6a26b2b6be1951c}{rxdw3}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02369}02369 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02370}02370         rate = \mbox{\hyperlink{if__rsureg_8h_aa1f710025311c0169fbc5b1296d914b6}{MS}}(\mbox{\hyperlink{if__rsureg_8h_ae221151a21d61fb208230971ca2b7cf4}{rxdw3}}, R92S\_RXDW3\_RATE);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02371}02371         cipher = \mbox{\hyperlink{if__rsureg_8h_aa1f710025311c0169fbc5b1296d914b6}{MS}}(\mbox{\hyperlink{if__rsureg_8h_ace11ca890323d7ad6a4e8938c6787b3c}{rxdw0}}, R92S\_RXDW0\_CIPHER);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02372}02372         infosz = \mbox{\hyperlink{if__rsureg_8h_aa1f710025311c0169fbc5b1296d914b6}{MS}}(\mbox{\hyperlink{if__rsureg_8h_ace11ca890323d7ad6a4e8938c6787b3c}{rxdw0}}, R92S\_RXDW0\_INFOSZ) * 8;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02373}02373 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02374}02374         \textcolor{comment}{/* Get RSSI from PHY status descriptor if present. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02375}02375         \textcolor{keywordflow}{if} (infosz != 0 \&\& (\mbox{\hyperlink{if__rsureg_8h_ace11ca890323d7ad6a4e8938c6787b3c}{rxdw0}} \& \mbox{\hyperlink{if__rsureg_8h_a2cfb4584af35024b990208014094a3c9}{R92S\_RXDW0\_PHYST}}))}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02376}02376                 rssi = \mbox{\hyperlink{if__rsu_8c_a1b41b89023ff47fdd7f9c5d3aed86123}{rsu\_get\_rssi}}(sc, rate, \&stat[1]);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02377}02377         \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02378}02378                 \textcolor{comment}{/* Cheat and get the last calibrated RSSI */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02379}02379                 rssi = \mbox{\hyperlink{if__rsu_8c_a5c7e22b9831d6bac31b24adc1a2e0db6}{rsu\_hwrssi\_to\_rssi}}(sc, sc-\/>\mbox{\hyperlink{structrsu__softc_a6f7d0cb362cb9e33e9136d0a9036be03}{sc\_currssi}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02380}02380         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02381}02381 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02382}02382         \textcolor{comment}{/* Hardware does Rx TCP checksum offload. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02383}02383         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02384}02384 \textcolor{comment}{         * This flag can be set for some other}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02385}02385 \textcolor{comment}{         * (e.g., EAPOL) frame types, so don't rely on it.}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02386}02386 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02387}02387         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__rsureg_8h_ae221151a21d61fb208230971ca2b7cf4}{rxdw3}} \& \mbox{\hyperlink{if__rsureg_8h_a607a428cb7a7a0060f332bb21a297d98}{R92S\_RXDW3\_TCPCHKVALID}}) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02388}02388                 \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a2c4ce8fa1fcca611091ffa09de80b878}{RSU\_DEBUG\_RX}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02389}02389                     \textcolor{stringliteral}{"{}\%s: TCP/IP checksums: \%schecked / \%schecked\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02390}02390                     \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02391}02391                     (\mbox{\hyperlink{if__rsureg_8h_ae221151a21d61fb208230971ca2b7cf4}{rxdw3}} \& \mbox{\hyperlink{if__rsureg_8h_ae97fe1f784bf19f4ace8f9fd344cffe9}{R92S\_RXDW3\_TCPCHKRPT}}) ? \textcolor{stringliteral}{"{}"{}} : \textcolor{stringliteral}{"{}not "{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02392}02392                     (\mbox{\hyperlink{if__rsureg_8h_ae221151a21d61fb208230971ca2b7cf4}{rxdw3}} \& \mbox{\hyperlink{if__rsureg_8h_a09d8b8d3767b0087327db91f9956c600}{R92S\_RXDW3\_IPCHKRPT}}) ? \textcolor{stringliteral}{"{}"{}} : \textcolor{stringliteral}{"{}not "{}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02393}02393 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02394}02394                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02395}02395 \textcolor{comment}{                 * 'IP header checksum valid' bit will not be set if}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02396}02396 \textcolor{comment}{                 * the frame was not checked / has incorrect checksum /}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02397}02397 \textcolor{comment}{                 * does not have checksum (IPv6).}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02398}02398 \textcolor{comment}{                 *}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02399}02399 \textcolor{comment}{                 * NB: if DF bit is not set then frame will not be checked.}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02400}02400 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02401}02401                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__rsureg_8h_ae221151a21d61fb208230971ca2b7cf4}{rxdw3}} \& \mbox{\hyperlink{if__rsureg_8h_a09d8b8d3767b0087327db91f9956c600}{R92S\_RXDW3\_IPCHKRPT}}) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02402}02402                         m-\/>m\_pkthdr.csum\_flags = CSUM\_IP\_CHECKED;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02403}02403                         m-\/>m\_pkthdr.csum\_flags |= CSUM\_IP\_VALID;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02404}02404                 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02405}02405 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02406}02406                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02407}02407 \textcolor{comment}{                 * This is independent of the above check.}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02408}02408 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02409}02409                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__rsureg_8h_ae221151a21d61fb208230971ca2b7cf4}{rxdw3}} \& \mbox{\hyperlink{if__rsureg_8h_ae97fe1f784bf19f4ace8f9fd344cffe9}{R92S\_RXDW3\_TCPCHKRPT}}) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02410}02410                         m-\/>m\_pkthdr.csum\_flags |= CSUM\_DATA\_VALID;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02411}02411                         m-\/>m\_pkthdr.csum\_flags |= CSUM\_PSEUDO\_HDR;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02412}02412                         m-\/>m\_pkthdr.csum\_data = 0xffff;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02413}02413                 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02414}02414         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02415}02415 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02416}02416         \textcolor{comment}{/* RX flags */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02417}02417 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02418}02418         \textcolor{comment}{/* Set channel flags for input path */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02419}02419         bzero(\&rxs, \textcolor{keyword}{sizeof}(rxs));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02420}02420 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02421}02421         \textcolor{comment}{/* normal RSSI */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02422}02422         rxs.r\_flags |= IEEE80211\_R\_NF | IEEE80211\_R\_RSSI;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02423}02423         rxs.c\_rssi = rssi;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02424}02424         rxs.c\_nf = -\/96;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02425}02425 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02426}02426         \textcolor{comment}{/* Rate */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02427}02427         \textcolor{keywordflow}{if} (rate < 12) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02428}02428                 rxs.c\_rate = ridx2rate[rate];}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02429}02429                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__rsu_8c_a5b1086b7fa13924458bac3c6045d60de}{RSU\_RATE\_IS\_CCK}}(rate))}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02430}02430                         rxs.c\_pktflags |= IEEE80211\_RX\_F\_CCK;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02431}02431                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02432}02432                         rxs.c\_pktflags |= IEEE80211\_RX\_F\_OFDM;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02433}02433         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02434}02434                 rxs.c\_rate = IEEE80211\_RATE\_MCS | (rate -\/ 12);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02435}02435                 rxs.c\_pktflags |= IEEE80211\_RX\_F\_HT;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02436}02436         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02437}02437 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02438}02438         \textcolor{keywordflow}{if} (ieee80211\_radiotap\_active(ic)) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02439}02439                 \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__rx__radiotap__header}{rsu\_rx\_radiotap\_header}} *tap = \&sc-\/>sc\_rxtap;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02440}02440 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02441}02441                 \textcolor{comment}{/* Map HW rate index to 802.11 rate. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02442}02442                 tap-\/>\mbox{\hyperlink{structrsu__rx__radiotap__header_a2dec27720713678eb2e73ad832234f6a}{wr\_flags}} = 0;              \textcolor{comment}{/* TODO */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02443}02443                 tap-\/>\mbox{\hyperlink{structrsu__rx__radiotap__header_a990f8ae851556fabe664fd5d9e6fa12e}{wr\_tsft}} = \mbox{\hyperlink{if__rsu_8c_a1f11a652b75a508c0d4d8fce86526541}{rsu\_get\_tsf\_high}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02444}02444                 \textcolor{keywordflow}{if} (le32toh(stat-\/>\mbox{\hyperlink{structr92s__rx__stat_ab8d7e3ee1ab1e26a16a3c6a88ebd8df7}{tsf\_low}}) > \mbox{\hyperlink{if__rsu_8c_a3da0e3522f4aab655ab48dfc490befc8}{rsu\_get\_tsf\_low}}(sc))}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02445}02445                         tap-\/>\mbox{\hyperlink{structrsu__rx__radiotap__header_a990f8ae851556fabe664fd5d9e6fa12e}{wr\_tsft}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02446}02446                 tap-\/>\mbox{\hyperlink{structrsu__rx__radiotap__header_a990f8ae851556fabe664fd5d9e6fa12e}{wr\_tsft}} = (uint64\_t)htole32(tap-\/>\mbox{\hyperlink{structrsu__rx__radiotap__header_a990f8ae851556fabe664fd5d9e6fa12e}{wr\_tsft}}) << 32;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02447}02447                 tap-\/>\mbox{\hyperlink{structrsu__rx__radiotap__header_a990f8ae851556fabe664fd5d9e6fa12e}{wr\_tsft}} += stat-\/>\mbox{\hyperlink{structr92s__rx__stat_ab8d7e3ee1ab1e26a16a3c6a88ebd8df7}{tsf\_low}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02448}02448 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02449}02449                 tap-\/>\mbox{\hyperlink{structrsu__rx__radiotap__header_a65d6dc861667505e83223685a75d3ea4}{wr\_rate}} = rxs.c\_rate;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02450}02450                 tap-\/>\mbox{\hyperlink{structrsu__rx__radiotap__header_ae60cfabdb11fecd395abb8c7448c848f}{wr\_dbm\_antsignal}} = rssi;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02451}02451         \};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02452}02452 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02453}02453         (void) ieee80211\_add\_rx\_params(m, \&rxs);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02454}02454 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02455}02455         \textcolor{comment}{/* Drop descriptor. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02456}02456         m\_adj(m, \textcolor{keyword}{sizeof}(*stat) + infosz);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02457}02457         wh = mtod(m, \textcolor{keyword}{struct} ieee80211\_frame\_min *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02458}02458         \textcolor{keywordflow}{if} ((wh-\/>i\_fc[1] \& IEEE80211\_FC1\_PROTECTED) \&\&}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02459}02459             cipher != \mbox{\hyperlink{if__rsureg_8h_a3fb11e85e53a5dc90a7b32f4475b4e03}{R92S\_KEY\_ALGO\_NONE}}) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02460}02460                 m-\/>m\_flags |= M\_WEP;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02461}02461         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02462}02462 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02463}02463         \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a2c4ce8fa1fcca611091ffa09de80b878}{RSU\_DEBUG\_RX}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02464}02464             \textcolor{stringliteral}{"{}\%s: Rx frame len \%d, rate \%d, infosz \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02465}02465             \_\_func\_\_, m-\/>m\_len, rate, infosz);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02466}02466 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02467}02467         \textcolor{keywordflow}{if} (m-\/>m\_len >= \textcolor{keyword}{sizeof}(*wh))}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02468}02468                 \textcolor{keywordflow}{return} (ieee80211\_find\_rxnode(ic, wh));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02469}02469 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02470}02470         \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02471}02471 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02472}02472 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02473}02473 \textcolor{keyword}{static} \textcolor{keyword}{struct }mbuf *}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02474}\mbox{\hyperlink{if__rsu_8c_a56f1187d15fafd6d878084880d1097c3}{02474}} \mbox{\hyperlink{if__rsu_8c_a56f1187d15fafd6d878084880d1097c3}{rsu\_rx\_multi\_frame}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc, uint8\_t *buf, \textcolor{keywordtype}{int} \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02475}02475 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02476}02476         \textcolor{keyword}{struct }\mbox{\hyperlink{structr92s__rx__stat}{r92s\_rx\_stat}} *stat;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02477}02477         uint32\_t \mbox{\hyperlink{if__rsureg_8h_ace11ca890323d7ad6a4e8938c6787b3c}{rxdw0}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02478}02478         \textcolor{keywordtype}{int} totlen, pktlen, infosz, npkts;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02479}02479         \textcolor{keyword}{struct }mbuf *m, *m0 = NULL, *prevm = NULL;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02480}02480 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02481}02481         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02482}02482 \textcolor{comment}{         * don't pass packets to the ieee80211 framework if the driver isn't}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02483}02483 \textcolor{comment}{         * RUNNING.}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02484}02484 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02485}02485         \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structrsu__softc_acc01333e62919e38b1a73ac8c96b1f3f}{sc\_running}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02486}02486                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02487}02487 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02488}02488         \textcolor{comment}{/* Get the number of encapsulated frames. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02489}02489         stat = (\textcolor{keyword}{struct }\mbox{\hyperlink{structr92s__rx__stat}{r92s\_rx\_stat}} *)buf;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02490}02490         npkts = \mbox{\hyperlink{if__rsureg_8h_aa1f710025311c0169fbc5b1296d914b6}{MS}}(le32toh(stat-\/>\mbox{\hyperlink{structr92s__rx__stat_a2581a86a8893e701162d15f24efd9b62}{rxdw2}}), R92S\_RXDW2\_PKTCNT);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02491}02491         \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a2c4ce8fa1fcca611091ffa09de80b878}{RSU\_DEBUG\_RX}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02492}02492             \textcolor{stringliteral}{"{}\%s: Rx \%d frames in one chunk\(\backslash\)n"{}}, \_\_func\_\_, npkts);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02493}02493 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02494}02494         \textcolor{comment}{/* Process all of them. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02495}02495         \textcolor{keywordflow}{while} (npkts-\/-\/ > 0) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02496}02496                 \textcolor{keywordflow}{if} (\_\_predict\_false(\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} < \textcolor{keyword}{sizeof}(*stat)))}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02497}02497                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02498}02498                 stat = (\textcolor{keyword}{struct }\mbox{\hyperlink{structr92s__rx__stat}{r92s\_rx\_stat}} *)buf;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02499}02499                 \mbox{\hyperlink{if__rsureg_8h_ace11ca890323d7ad6a4e8938c6787b3c}{rxdw0}} = le32toh(stat-\/>\mbox{\hyperlink{structr92s__rx__stat_abd9a2c927ac114acba4b87c8ac351840}{rxdw0}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02500}02500 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02501}02501                 pktlen = \mbox{\hyperlink{if__rsureg_8h_aa1f710025311c0169fbc5b1296d914b6}{MS}}(\mbox{\hyperlink{if__rsureg_8h_ace11ca890323d7ad6a4e8938c6787b3c}{rxdw0}}, R92S\_RXDW0\_PKTLEN);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02502}02502                 \textcolor{keywordflow}{if} (\_\_predict\_false(pktlen == 0))}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02503}02503                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02504}02504 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02505}02505                 infosz = \mbox{\hyperlink{if__rsureg_8h_aa1f710025311c0169fbc5b1296d914b6}{MS}}(\mbox{\hyperlink{if__rsureg_8h_ace11ca890323d7ad6a4e8938c6787b3c}{rxdw0}}, R92S\_RXDW0\_INFOSZ) * 8;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02506}02506 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02507}02507                 \textcolor{comment}{/* Make sure everything fits in xfer. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02508}02508                 totlen = \textcolor{keyword}{sizeof}(*stat) + infosz + pktlen;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02509}02509                 \textcolor{keywordflow}{if} (\_\_predict\_false(totlen > \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}}))}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02510}02510                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02511}02511 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02512}02512                 \textcolor{comment}{/* Process 802.11 frame. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02513}02513                 m = \mbox{\hyperlink{if__rsu_8c_aa82647d5d46d598a0a10fa22cf4b9f78}{rsu\_rx\_copy\_to\_mbuf}}(sc, stat, totlen);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02514}02514                 \textcolor{keywordflow}{if} (m0 == NULL)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02515}02515                         m0 = m;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02516}02516                 \textcolor{keywordflow}{if} (prevm == NULL)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02517}02517                         prevm = m;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02518}02518                 \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02519}02519                         prevm-\/>m\_next = m;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02520}02520                         prevm = m;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02521}02521                 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02522}02522                 \textcolor{comment}{/* Next chunk is 128-\/byte aligned. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02523}02523                 totlen = (totlen + 127) \& \string~127;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02524}02524                 buf += totlen;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02525}02525                 \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} -\/= totlen;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02526}02526         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02527}02527 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02528}02528         \textcolor{keywordflow}{return} (m0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02529}02529 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02530}02530 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02531}02531 \textcolor{keyword}{static} \textcolor{keyword}{struct }mbuf *}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02532}\mbox{\hyperlink{if__rsu_8c_aa47a5b8937f789c07581dbd3ec15e5f5}{02532}} \mbox{\hyperlink{if__rsu_8c_aa47a5b8937f789c07581dbd3ec15e5f5}{rsu\_rxeof}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__data}{rsu\_data}} *data)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02533}02533 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02534}02534         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc = data-\/>sc;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02535}02535         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structrsu__softc_a67bd1a5c6762d8cd8c5b7e7b5bdfddd6}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02536}02536         \textcolor{keyword}{struct }\mbox{\hyperlink{structr92s__rx__stat}{r92s\_rx\_stat}} *stat;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02537}02537         \textcolor{keywordtype}{int} \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02538}02538 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02539}02539         \mbox{\hyperlink{usb__transfer_8c_ac0c68320222f26c2a3eba47b46c47899}{usbd\_xfer\_status}}(xfer, \&\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}}, NULL, NULL, NULL);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02540}02540 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02541}02541         \textcolor{keywordflow}{if} (\_\_predict\_false(\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} < \textcolor{keyword}{sizeof}(*stat))) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02542}02542                 \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a2c4ce8fa1fcca611091ffa09de80b878}{RSU\_DEBUG\_RX}}, \textcolor{stringliteral}{"{}xfer too short \%d\(\backslash\)n"{}}, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02543}02543                 counter\_u64\_add(ic-\/>ic\_ierrors, 1);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02544}02544                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02545}02545         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02546}02546         \textcolor{comment}{/* Determine if it is a firmware C2H event or an 802.11 frame. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02547}02547         stat = (\textcolor{keyword}{struct }\mbox{\hyperlink{structr92s__rx__stat}{r92s\_rx\_stat}} *)data-\/>buf;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02548}02548         if ((le32toh(stat-\/>\mbox{\hyperlink{structr92s__rx__stat_a0569b4f77913d12ba59fdbb9c339d63b}{rxdw1}}) \& 0x1ff) == 0x1ff) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02549}02549                 \mbox{\hyperlink{if__rsu_8c_a088f775d4cef71d6076b9584325c9066}{rsu\_rx\_multi\_event}}(sc, data-\/>buf, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02550}02550                 \textcolor{comment}{/* No packets to process. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02551}02551                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02552}02552         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02553}02553                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__rsu_8c_a56f1187d15fafd6d878084880d1097c3}{rsu\_rx\_multi\_frame}}(sc, data-\/>buf, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}}));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02554}02554 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02555}02555 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02556}02556 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02557}\mbox{\hyperlink{if__rsu_8c_a9a7922e068c19da1696ec0407072e4d4}{02557}} \mbox{\hyperlink{if__rsu_8c_a6e4326e6cf09dbdcb5c76f437eded664}{rsu\_bulk\_rx\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02558}02558 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02559}02559         \textcolor{keyword}{struct }epoch\_tracker et;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02560}02560         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02561}02561         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structrsu__softc_a67bd1a5c6762d8cd8c5b7e7b5bdfddd6}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02562}02562         \textcolor{keyword}{struct }ieee80211\_node *ni;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02563}02563         \textcolor{keyword}{struct }mbuf *m = NULL, *\mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02564}02564         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__data}{rsu\_data}} *data;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02565}02565 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02566}02566         \mbox{\hyperlink{if__rsureg_8h_aced96ac92d4bb829407616864037ea8d}{RSU\_ASSERT\_LOCKED}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02567}02567 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02568}02568         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02569}02569         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a8f0386217ba77be3e47721fae9aa9b3d}{USB\_ST\_TRANSFERRED}}:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02570}02570                 data = STAILQ\_FIRST(\&\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>sc\_rx\_active);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02571}02571                 \textcolor{keywordflow}{if} (data == NULL)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02572}02572                         \textcolor{keywordflow}{goto} tr\_setup;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02573}02573                 STAILQ\_REMOVE\_HEAD(\&\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>sc\_rx\_active, \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02574}02574                 \mbox{\hyperlink{structrsu__data_aa3e17352ec826033534a59855aa2b846}{m}} = \mbox{\hyperlink{if__rsu_8c_aa47a5b8937f789c07581dbd3ec15e5f5}{rsu\_rxeof}}(xfer, data);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02575}02575                 STAILQ\_INSERT\_TAIL(\&\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>sc\_rx\_inactive, data, \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02576}02576                 \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02577}02577         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a3aa7120c3ecab31972b8fe219530f552}{USB\_ST\_SETUP}}:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02578}02578 tr\_setup:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02579}02579                 data = STAILQ\_FIRST(\&\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>sc\_rx\_inactive);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02580}02580                 \textcolor{keywordflow}{if} (data == NULL) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02581}02581                         KASSERT(\mbox{\hyperlink{structrsu__data_aa3e17352ec826033534a59855aa2b846}{m}} == NULL, (\textcolor{stringliteral}{"{}mbuf isn't NULL"{}}));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02582}02582                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02583}02583                 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02584}02584                 STAILQ\_REMOVE\_HEAD(\&\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>sc\_rx\_inactive, \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02585}02585                 STAILQ\_INSERT\_TAIL(\&\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>sc\_rx\_active, data, \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02586}02586                 \mbox{\hyperlink{usb__transfer_8c_a30d239cbfe3c02ec7da6e6dfe5055762}{usbd\_xfer\_set\_frame\_data}}(xfer, 0, data-\/>buf,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02587}02587                     \mbox{\hyperlink{usb__transfer_8c_ae34a7cc2f01c6dfb68bca6fd0b72647e}{usbd\_xfer\_max\_len}}(xfer));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02588}02588                 \mbox{\hyperlink{usb__transfer_8c_a10c440b0b97cac293b4df9d558f15bac}{usbd\_transfer\_submit}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02589}02589                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02590}02590 \textcolor{comment}{                 * To avoid LOR we should unlock our private mutex here to call}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02591}02591 \textcolor{comment}{                 * ieee80211\_input() because here is at the end of a USB}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02592}02592 \textcolor{comment}{                 * callback and safe to unlock.}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02593}02593 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02594}02594                 NET\_EPOCH\_ENTER(et);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02595}02595                 \textcolor{keywordflow}{while} (\mbox{\hyperlink{structrsu__data_aa3e17352ec826033534a59855aa2b846}{m}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02596}02596                         \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}} = \mbox{\hyperlink{structrsu__data_aa3e17352ec826033534a59855aa2b846}{m}}-\/>m\_next;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02597}02597                         \mbox{\hyperlink{structrsu__data_aa3e17352ec826033534a59855aa2b846}{m}}-\/>m\_next = NULL;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02598}02598 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02599}02599                         \mbox{\hyperlink{structrsu__data_a3df504f5581b55d2215359aaabfc049e}{ni}} = \mbox{\hyperlink{if__rsu_8c_a33298ad13e4d3752b2d2d76d8e8583a4}{rsu\_rx\_frame}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, \mbox{\hyperlink{structrsu__data_aa3e17352ec826033534a59855aa2b846}{m}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02600}02600                         \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02601}02601 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02602}02602                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structrsu__data_a3df504f5581b55d2215359aaabfc049e}{ni}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02603}02603                                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structrsu__data_a3df504f5581b55d2215359aaabfc049e}{ni}}-\/>ni\_flags \& IEEE80211\_NODE\_HT)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02604}02604                                         \mbox{\hyperlink{structrsu__data_aa3e17352ec826033534a59855aa2b846}{m}}-\/>m\_flags |= M\_AMPDU;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02605}02605                                 (void)ieee80211\_input\_mimo(\mbox{\hyperlink{structrsu__data_a3df504f5581b55d2215359aaabfc049e}{ni}}, \mbox{\hyperlink{structrsu__data_aa3e17352ec826033534a59855aa2b846}{m}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02606}02606                                 ieee80211\_free\_node(\mbox{\hyperlink{structrsu__data_a3df504f5581b55d2215359aaabfc049e}{ni}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02607}02607                         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02608}02608                                 (\textcolor{keywordtype}{void})ieee80211\_input\_mimo\_all(ic, \mbox{\hyperlink{structrsu__data_aa3e17352ec826033534a59855aa2b846}{m}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02609}02609 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02610}02610                         \mbox{\hyperlink{if__rsureg_8h_a48532232b39d8fa728a8a10df1d3f4b7}{RSU\_LOCK}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02611}02611                         \mbox{\hyperlink{structrsu__data_aa3e17352ec826033534a59855aa2b846}{m}} = \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02612}02612                 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02613}02613                 NET\_EPOCH\_EXIT(et);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02614}02614                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02615}02615         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02616}02616                 \textcolor{comment}{/* needs it to the inactive queue due to a error. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02617}02617                 data = STAILQ\_FIRST(\&\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>sc\_rx\_active);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02618}02618                 \textcolor{keywordflow}{if} (data != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02619}02619                         STAILQ\_REMOVE\_HEAD(\&\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>sc\_rx\_active, \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02620}02620                         STAILQ\_INSERT\_TAIL(\&\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>sc\_rx\_inactive, data, \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02621}02621                 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02622}02622                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}}) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02623}02623                         \mbox{\hyperlink{usb__transfer_8c_abadf9cb2f8e81a5133af0c8030039de3}{usbd\_xfer\_set\_stall}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02624}02624                         counter\_u64\_add(ic-\/>ic\_ierrors, 1);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02625}02625                         \textcolor{keywordflow}{goto} tr\_setup;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02626}02626                 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02627}02627                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02628}02628         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02629}02629 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02630}02630 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02631}02631 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02632}02632 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02633}\mbox{\hyperlink{if__rsu_8c_a455bea3f949b4587f2cb0aa9d129ca2e}{02633}} \mbox{\hyperlink{if__rsu_8c_a455bea3f949b4587f2cb0aa9d129ca2e}{rsu\_txeof}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__data}{rsu\_data}} *data)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02634}02634 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02635}02635 \textcolor{preprocessor}{\#ifdef  USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02636}02636         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02637}02637 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02638}02638 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02639}02639         \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_ae7bc60a03a3ab817c0fa863054732dbf}{RSU\_DEBUG\_TXDONE}}, \textcolor{stringliteral}{"{}\%s: called; data=\%p\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02640}02640             \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02641}02641             data);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02642}02642 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02643}02643         \textcolor{keywordflow}{if} (data-\/>m) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02644}02644                 \textcolor{comment}{/* XXX status? */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02645}02645                 ieee80211\_tx\_complete(data-\/>ni, data-\/>m, 0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02646}02646                 data-\/>m = NULL;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02647}02647                 data-\/>ni = NULL;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02648}02648         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02649}02649 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02650}02650 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02651}02651 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02652}\mbox{\hyperlink{if__rsu_8c_a1bf1e3f468f705eee9cebebe2e77c6b0}{02652}} \mbox{\hyperlink{if__rsu_8c_a1bf1e3f468f705eee9cebebe2e77c6b0}{rsu\_bulk\_tx\_callback\_sub}}(\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__rsu_8c_source_l02653}02653     uint8\_t which)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02654}02654 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02655}02655         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02656}02656         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structrsu__softc_a67bd1a5c6762d8cd8c5b7e7b5bdfddd6}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02657}02657         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__data}{rsu\_data}} *data;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02658}02658 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02659}02659         \mbox{\hyperlink{if__rsureg_8h_aced96ac92d4bb829407616864037ea8d}{RSU\_ASSERT\_LOCKED}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02660}02660 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02661}02661         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02662}02662         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a8f0386217ba77be3e47721fae9aa9b3d}{USB\_ST\_TRANSFERRED}}:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02663}02663                 data = STAILQ\_FIRST(\&\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>sc\_tx\_active[which]);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02664}02664                 \textcolor{keywordflow}{if} (data == NULL)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02665}02665                         \textcolor{keywordflow}{goto} tr\_setup;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02666}02666                 \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, \mbox{\hyperlink{if__rsu_8c_ae7bc60a03a3ab817c0fa863054732dbf}{RSU\_DEBUG\_TXDONE}}, \textcolor{stringliteral}{"{}\%s: transfer done \%p\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02667}02667                     \_\_func\_\_, data);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02668}02668                 STAILQ\_REMOVE\_HEAD(\&\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>sc\_tx\_active[which], \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02669}02669                 \mbox{\hyperlink{if__rsu_8c_a455bea3f949b4587f2cb0aa9d129ca2e}{rsu\_txeof}}(xfer, data);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02670}02670                 \mbox{\hyperlink{if__rsu_8c_a74136760c03cfc36cda9847b7e8dde65}{rsu\_freebuf}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, data);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02671}02671                 \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02672}02672         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a3aa7120c3ecab31972b8fe219530f552}{USB\_ST\_SETUP}}:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02673}02673 tr\_setup:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02674}02674                 data = STAILQ\_FIRST(\&\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>sc\_tx\_pending[which]);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02675}02675                 \textcolor{keywordflow}{if} (data == NULL) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02676}02676                         \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, \mbox{\hyperlink{if__rsu_8c_ae7bc60a03a3ab817c0fa863054732dbf}{RSU\_DEBUG\_TXDONE}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02677}02677                             \textcolor{stringliteral}{"{}\%s: empty pending queue sc \%p\(\backslash\)n"{}}, \_\_func\_\_, \mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02678}02678                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02679}02679                 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02680}02680                 STAILQ\_REMOVE\_HEAD(\&\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>sc\_tx\_pending[which], \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02681}02681                 STAILQ\_INSERT\_TAIL(\&\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>sc\_tx\_active[which], data, \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02682}02682                 \mbox{\hyperlink{usb__transfer_8c_a30d239cbfe3c02ec7da6e6dfe5055762}{usbd\_xfer\_set\_frame\_data}}(xfer, 0, data-\/>buf, data-\/>buflen);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02683}02683                 \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, \mbox{\hyperlink{if__rsu_8c_ae7bc60a03a3ab817c0fa863054732dbf}{RSU\_DEBUG\_TXDONE}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02684}02684                     \textcolor{stringliteral}{"{}\%s: submitting transfer \%p\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02685}02685                     \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02686}02686                     data);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02687}02687                 \mbox{\hyperlink{usb__transfer_8c_a10c440b0b97cac293b4df9d558f15bac}{usbd\_transfer\_submit}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02688}02688                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02689}02689         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02690}02690                 data = STAILQ\_FIRST(\&\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>sc\_tx\_active[which]);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02691}02691                 \textcolor{keywordflow}{if} (data != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02692}02692                         STAILQ\_REMOVE\_HEAD(\&\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>sc\_tx\_active[which], \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02693}02693                         \mbox{\hyperlink{if__rsu_8c_a455bea3f949b4587f2cb0aa9d129ca2e}{rsu\_txeof}}(xfer, data);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02694}02694                         \mbox{\hyperlink{if__rsu_8c_a74136760c03cfc36cda9847b7e8dde65}{rsu\_freebuf}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, data);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02695}02695                 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02696}02696                 counter\_u64\_add(ic-\/>ic\_oerrors, 1);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02697}02697 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02698}02698                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}}) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02699}02699                         \mbox{\hyperlink{usb__transfer_8c_abadf9cb2f8e81a5133af0c8030039de3}{usbd\_xfer\_set\_stall}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02700}02700                         \textcolor{keywordflow}{goto} tr\_setup;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02701}02701                 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02702}02702                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02703}02703         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02704}02704 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02705}02705         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02706}02706 \textcolor{comment}{         * XXX TODO: if the queue is low, flush out FF TX frames.}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02707}02707 \textcolor{comment}{         * Remember to unlock the driver for now; net80211 doesn't}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02708}02708 \textcolor{comment}{         * defer it for us.}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02709}02709 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02710}02710 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02711}02711 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02712}02712 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02713}\mbox{\hyperlink{if__rsu_8c_a79e54efb4f239bfc8e0bcf081f78470e}{02713}} \mbox{\hyperlink{if__rsu_8c_a4d31e0ca40fdd48925ca7225fd0940b9}{rsu\_bulk\_tx\_callback\_be\_bk}}(\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__rsu_8c_source_l02714}02714 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02715}02715         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02716}02716 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02717}02717         \mbox{\hyperlink{if__rsu_8c_a1bf1e3f468f705eee9cebebe2e77c6b0}{rsu\_bulk\_tx\_callback\_sub}}(xfer, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}, \mbox{\hyperlink{if__rsureg_8h_aea33efd5e2c69d615faad5c5965510aaa69ace2f4c8eae39cdb71ae5da4bdd043}{RSU\_BULK\_TX\_BE\_BK}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02718}02718 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02719}02719         \textcolor{comment}{/* This kicks the TX taskqueue */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02720}02720         \mbox{\hyperlink{if__rsu_8c_aac8bbb20bfa4ca3f9f774a3b0f41048f}{rsu\_start}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02721}02721 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02722}02722 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02723}02723 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02724}\mbox{\hyperlink{if__rsu_8c_aeddeca52db50c4a54e7c0eee52774efa}{02724}} \mbox{\hyperlink{if__rsu_8c_ad489e6f6819ca525facaeefc9a16e075}{rsu\_bulk\_tx\_callback\_vi\_vo}}(\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__rsu_8c_source_l02725}02725 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02726}02726         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02727}02727 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02728}02728         \mbox{\hyperlink{if__rsu_8c_a1bf1e3f468f705eee9cebebe2e77c6b0}{rsu\_bulk\_tx\_callback\_sub}}(xfer, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}, \mbox{\hyperlink{if__rsureg_8h_aea33efd5e2c69d615faad5c5965510aaae7fe4538061baa3eedfd9606e81a5f46}{RSU\_BULK\_TX\_VI\_VO}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02729}02729 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02730}02730         \textcolor{comment}{/* This kicks the TX taskqueue */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02731}02731         \mbox{\hyperlink{if__rsu_8c_aac8bbb20bfa4ca3f9f774a3b0f41048f}{rsu\_start}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02732}02732 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02733}02733 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02734}02734 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02735}\mbox{\hyperlink{if__rsu_8c_a0532756fb10e4dd1ea26e513c65bced0}{02735}} \mbox{\hyperlink{if__rsu_8c_a1b4a02a92dd79a36a16eade3c68b459f}{rsu\_bulk\_tx\_callback\_h2c}}(\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__rsu_8c_source_l02736}02736 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02737}02737         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02738}02738 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02739}02739         \mbox{\hyperlink{if__rsu_8c_a1bf1e3f468f705eee9cebebe2e77c6b0}{rsu\_bulk\_tx\_callback\_sub}}(xfer, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}, \mbox{\hyperlink{if__rsureg_8h_aea33efd5e2c69d615faad5c5965510aaab5c7e7911bbc67616fbaaf1949f6d022}{RSU\_BULK\_TX\_H2C}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02740}02740 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02741}02741         \textcolor{comment}{/* This kicks the TX taskqueue */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02742}02742         \mbox{\hyperlink{if__rsu_8c_aac8bbb20bfa4ca3f9f774a3b0f41048f}{rsu\_start}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02743}02743 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02744}02744 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02745}02745 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02746}02746 \textcolor{comment}{ * Transmit the given frame.}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02747}02747 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02748}02748 \textcolor{comment}{ * This doesn't free the node or mbuf upon failure.}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02749}02749 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02750}02750 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02751}\mbox{\hyperlink{if__rsu_8c_ae979138a473dcb59902b06b5c05d27b1}{02751}} \mbox{\hyperlink{if__rsu_8c_ae979138a473dcb59902b06b5c05d27b1}{rsu\_tx\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc, \textcolor{keyword}{struct} ieee80211\_node *ni, }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02752}02752     \textcolor{keyword}{struct} mbuf *m0, \textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__data}{rsu\_data}} *data)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02753}02753 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02754}02754         \textcolor{keyword}{const} \textcolor{keyword}{struct }ieee80211\_txparam *tp = ni-\/>ni\_txparms;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02755}02755         \textcolor{keyword}{struct }ieee80211vap *vap = ni-\/>ni\_vap;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02756}02756         \textcolor{keyword}{struct }ieee80211\_frame *wh;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02757}02757         \textcolor{keyword}{struct }ieee80211\_key *\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}} = NULL;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02758}02758         \textcolor{keyword}{struct }\mbox{\hyperlink{structr92s__tx__desc}{r92s\_tx\_desc}} *txd;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02759}02759         uint8\_t rate, ridx, type, cipher, qos;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02760}02760         \textcolor{keywordtype}{int} prio = 0;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02761}02761         uint8\_t which;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02762}02762         \textcolor{keywordtype}{int} hasqos;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02763}02763         \textcolor{keywordtype}{int} ismcast;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02764}02764         \textcolor{keywordtype}{int} xferlen;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02765}02765         \textcolor{keywordtype}{int} qid;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02766}02766 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02767}02767         \mbox{\hyperlink{if__rsureg_8h_aced96ac92d4bb829407616864037ea8d}{RSU\_ASSERT\_LOCKED}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02768}02768 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02769}02769         wh = mtod(m0, \textcolor{keyword}{struct} ieee80211\_frame *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02770}02770         type = wh-\/>i\_fc[0] \& IEEE80211\_FC0\_TYPE\_MASK;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02771}02771         ismcast = IEEE80211\_IS\_MULTICAST(wh-\/>i\_addr1);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02772}02772 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02773}02773         \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a038e3dcd0fb5266c1184770947cceaab}{RSU\_DEBUG\_TX}}, \textcolor{stringliteral}{"{}\%s: data=\%p, m=\%p\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02774}02774             \_\_func\_\_, data, m0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02775}02775 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02776}02776         \textcolor{comment}{/* Choose a TX rate index. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02777}02777         \textcolor{keywordflow}{if} (type == IEEE80211\_FC0\_TYPE\_MGT ||}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02778}02778             type == IEEE80211\_FC0\_TYPE\_CTL ||}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02779}02779             (m0-\/>m\_flags \& M\_EAPOL) != 0)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02780}02780                 rate = tp-\/>mgmtrate;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02781}02781         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (ismcast)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02782}02782                 rate = tp-\/>mcastrate;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02783}02783         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (tp-\/>ucastrate != IEEE80211\_FIXED\_RATE\_NONE)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02784}02784                 rate = tp-\/>ucastrate;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02785}02785         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02786}02786                 rate = 0;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02787}02787 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02788}02788         \textcolor{keywordflow}{if} (rate != 0)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02789}02789                 ridx = rate2ridx(rate);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02790}02790 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02791}02791         \textcolor{keywordflow}{if} (wh-\/>i\_fc[1] \& IEEE80211\_FC1\_PROTECTED) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02792}02792                 \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}} = ieee80211\_crypto\_encap(ni, m0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02793}02793                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02794}02794                         device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02795}02795                             \textcolor{stringliteral}{"{}ieee80211\_crypto\_encap returns NULL.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02796}02796                         \textcolor{comment}{/* XXX we don't expect the fragmented frames */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02797}02797                         \textcolor{keywordflow}{return} (ENOBUFS);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02798}02798                 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02799}02799                 wh = mtod(m0, \textcolor{keyword}{struct} ieee80211\_frame *);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02800}02800         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02801}02801         \textcolor{comment}{/* If we have QoS then use it */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02802}02802         \textcolor{comment}{/* XXX TODO: mbuf WME/PRI versus TID? */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02803}02803         \textcolor{keywordflow}{if} (IEEE80211\_QOS\_HAS\_SEQ(wh)) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02804}02804                 \textcolor{comment}{/* Has QoS */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02805}02805                 prio = M\_WME\_GETAC(m0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02806}02806                 which = \mbox{\hyperlink{if__rsu_8c_a9deb6bab961ef3989d3713bebcfc8510}{rsu\_wme\_ac\_xfer\_map}}[prio];}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02807}02807                 hasqos = 1;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02808}02808                 qos = ((\textcolor{keyword}{const} \textcolor{keyword}{struct }ieee80211\_qosframe *)wh)-\/>i\_qos[0];}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02809}02809         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02810}02810                 \textcolor{comment}{/* Non-\/QoS TID */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02811}02811                 \textcolor{comment}{/* XXX TODO: tid=0 for non-\/qos TID? */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02812}02812                 which = \mbox{\hyperlink{if__rsu_8c_a9deb6bab961ef3989d3713bebcfc8510}{rsu\_wme\_ac\_xfer\_map}}[WME\_AC\_BE];}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02813}02813                 hasqos = 0;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02814}02814                 prio = 0;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02815}02815                 qos = 0;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02816}02816         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02817}02817 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02818}02818         qid = \mbox{\hyperlink{if__rsureg_8h_a5cdf4e3f3656eec2aa749c81c9e3c4af}{rsu\_ac2qid}}[prio];}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02819}02819 \textcolor{preprocessor}{\#if 0}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02820}02820         \textcolor{keywordflow}{switch} (type) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02821}02821         \textcolor{keywordflow}{case} IEEE80211\_FC0\_TYPE\_CTL:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02822}02822         \textcolor{keywordflow}{case} IEEE80211\_FC0\_TYPE\_MGT:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02823}02823                 which = \mbox{\hyperlink{if__rsu_8c_a9deb6bab961ef3989d3713bebcfc8510}{rsu\_wme\_ac\_xfer\_map}}[WME\_AC\_VO];}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02824}02824                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02825}02825         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02826}02826                 which = \mbox{\hyperlink{if__rsu_8c_a9deb6bab961ef3989d3713bebcfc8510}{rsu\_wme\_ac\_xfer\_map}}[M\_WME\_GETAC(m0)];}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02827}02827                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02828}02828         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02829}02829         hasqos = 0;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02830}02830 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02831}02831 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02832}02832         \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a038e3dcd0fb5266c1184770947cceaab}{RSU\_DEBUG\_TX}}, \textcolor{stringliteral}{"{}\%s: pri=\%d, which=\%d, hasqos=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02833}02833             \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02834}02834             prio,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02835}02835             which,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02836}02836             hasqos);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02837}02837 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02838}02838         \textcolor{comment}{/* Fill Tx descriptor. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02839}02839         txd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structr92s__tx__desc}{r92s\_tx\_desc}} *)data-\/>buf;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02840}02840         memset(txd, 0, \textcolor{keyword}{sizeof}(*txd));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02841}02841 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02842}02842         txd-\/>\mbox{\hyperlink{structr92s__tx__desc_a77a2623c71315351ddf435ba3063af01}{txdw0}} |= htole32(}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02843}02843             \mbox{\hyperlink{if__rsureg_8h_a14155179e01608510206b9cdf4790068}{SM}}(R92S\_TXDW0\_PKTLEN, m0-\/>m\_pkthdr.len) |}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02844}02844             \mbox{\hyperlink{if__rsureg_8h_a14155179e01608510206b9cdf4790068}{SM}}(R92S\_TXDW0\_OFFSET, \textcolor{keyword}{sizeof}(*txd)) |}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02845}02845             \mbox{\hyperlink{if__rsureg_8h_aaa182869abe369a95d3901d7b31bdd5a}{R92S\_TXDW0\_OWN}} | \mbox{\hyperlink{if__rsureg_8h_a696ae2cf3a9f6dbe50313153e35ac0ea}{R92S\_TXDW0\_FSG}} | \mbox{\hyperlink{if__rsureg_8h_a3518571ca56430d4a97e95e816b94331}{R92S\_TXDW0\_LSG}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02846}02846 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02847}02847         txd-\/>\mbox{\hyperlink{structr92s__tx__desc_a33ac74af0e83c6fb068c26681bf97cea}{txdw1}} |= htole32(}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02848}02848             \mbox{\hyperlink{if__rsureg_8h_a14155179e01608510206b9cdf4790068}{SM}}(R92S\_TXDW1\_MACID, \mbox{\hyperlink{if__rsureg_8h_aa1379f7c85b674a391720585da8c9a1b}{R92S\_MACID\_BSS}}) | \mbox{\hyperlink{if__rsureg_8h_a14155179e01608510206b9cdf4790068}{SM}}(R92S\_TXDW1\_QSEL, qid));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02849}02849         \textcolor{keywordflow}{if} (!hasqos)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02850}02850                 txd-\/>\mbox{\hyperlink{structr92s__tx__desc_a33ac74af0e83c6fb068c26681bf97cea}{txdw1}} |= htole32(\mbox{\hyperlink{if__rsureg_8h_a2188db103840bcbea4ab49d6d087c530}{R92S\_TXDW1\_NONQOS}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02851}02851         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}} != NULL \&\& !(\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_flags \& IEEE80211\_KEY\_SWENCRYPT)) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02852}02852                 \textcolor{keywordflow}{switch} (\mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_cipher-\/>ic\_cipher) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02853}02853                 \textcolor{keywordflow}{case} IEEE80211\_CIPHER\_WEP:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02854}02854                         cipher = \mbox{\hyperlink{if__rsureg_8h_a7688fc5168105987596ba74e2091391f}{R92S\_TXDW1\_CIPHER\_WEP}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02855}02855                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02856}02856                 \textcolor{keywordflow}{case} IEEE80211\_CIPHER\_TKIP:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02857}02857                         cipher = \mbox{\hyperlink{if__rsureg_8h_a2d4a1d98f66dae45814dfb407ef2785e}{R92S\_TXDW1\_CIPHER\_TKIP}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02858}02858                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02859}02859                 \textcolor{keywordflow}{case} IEEE80211\_CIPHER\_AES\_CCM:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02860}02860                         cipher = \mbox{\hyperlink{if__rsureg_8h_a6eecb10301f11f9ba667cdf08bbd2042}{R92S\_TXDW1\_CIPHER\_AES}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02861}02861                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02862}02862                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02863}02863                         cipher = \mbox{\hyperlink{if__rsureg_8h_af277ce4a571f19eb7bd3e83bbd8415ed}{R92S\_TXDW1\_CIPHER\_NONE}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02864}02864                 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02865}02865                 txd-\/>\mbox{\hyperlink{structr92s__tx__desc_a33ac74af0e83c6fb068c26681bf97cea}{txdw1}} |= htole32(}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02866}02866                     \mbox{\hyperlink{if__rsureg_8h_a14155179e01608510206b9cdf4790068}{SM}}(R92S\_TXDW1\_CIPHER, cipher) |}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02867}02867                     \mbox{\hyperlink{if__rsureg_8h_a14155179e01608510206b9cdf4790068}{SM}}(R92S\_TXDW1\_KEYIDX, \mbox{\hyperlink{if__run_8c_aae04ad987a21b789518aaae9825b668c}{k}}-\/>wk\_keyix));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02868}02868         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02869}02869         \textcolor{comment}{/* XXX todo: set AGGEN bit if appropriate? */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02870}02870         txd-\/>\mbox{\hyperlink{structr92s__tx__desc_a2dd2bdb0b646c1692f5b417593d2be5a}{txdw2}} |= htole32(\mbox{\hyperlink{if__rsureg_8h_ad08b54da74818860e30b7bf288c49678}{R92S\_TXDW2\_BK}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02871}02871         \textcolor{keywordflow}{if} (ismcast)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02872}02872                 txd-\/>\mbox{\hyperlink{structr92s__tx__desc_a2dd2bdb0b646c1692f5b417593d2be5a}{txdw2}} |= htole32(\mbox{\hyperlink{if__rsureg_8h_ae6474c771453c1dd6f4513e47fadb4f9}{R92S\_TXDW2\_BMCAST}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02873}02873 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02874}02874         \textcolor{keywordflow}{if} (!ismcast \&\& (!qos || (qos \& IEEE80211\_QOS\_ACKPOLICY) !=}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02875}02875             IEEE80211\_QOS\_ACKPOLICY\_NOACK)) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02876}02876                 txd-\/>\mbox{\hyperlink{structr92s__tx__desc_a2dd2bdb0b646c1692f5b417593d2be5a}{txdw2}} |= htole32(\mbox{\hyperlink{if__rsureg_8h_a44fb09d591cb5a59f78cfa6ffed07d31}{R92S\_TXDW2\_RTY\_LMT\_ENA}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02877}02877                 txd-\/>\mbox{\hyperlink{structr92s__tx__desc_a2dd2bdb0b646c1692f5b417593d2be5a}{txdw2}} |= htole32(\mbox{\hyperlink{if__rsureg_8h_a14155179e01608510206b9cdf4790068}{SM}}(R92S\_TXDW2\_RTY\_LMT, tp-\/>maxretry));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02878}02878         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02879}02879 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02880}02880         \textcolor{comment}{/* Force mgmt / mcast / ucast rate if needed. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02881}02881         \textcolor{keywordflow}{if} (rate != 0) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02882}02882                 \textcolor{comment}{/* Data rate fallback limit (max). */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02883}02883                 txd-\/>\mbox{\hyperlink{structr92s__tx__desc_ae70315e660809098a6b88448f265a489}{txdw5}} |= htole32(\mbox{\hyperlink{if__rsureg_8h_a14155179e01608510206b9cdf4790068}{SM}}(R92S\_TXDW5\_DATARATE\_FB\_LMT, 0x1f));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02884}02884                 txd-\/>\mbox{\hyperlink{structr92s__tx__desc_ae70315e660809098a6b88448f265a489}{txdw5}} |= htole32(\mbox{\hyperlink{if__rsureg_8h_a14155179e01608510206b9cdf4790068}{SM}}(R92S\_TXDW5\_DATARATE, ridx));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02885}02885                 txd-\/>\mbox{\hyperlink{structr92s__tx__desc_a847bfb8dfe71c0f7aab86b5cd7dfe1ea}{txdw4}} |= htole32(\mbox{\hyperlink{if__rsureg_8h_a8b44cceda794cb6b61afd1dfa10b2631}{R92S\_TXDW4\_DRVRATE}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02886}02886         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02887}02887 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02888}02888         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02889}02889 \textcolor{comment}{         * Firmware will use and increment the sequence number for the}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02890}02890 \textcolor{comment}{         * specified priority.}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02891}02891 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02892}02892         txd-\/>\mbox{\hyperlink{structr92s__tx__desc_a9955a3a77ba952b9532f871bb5839132}{txdw3}} |= htole32(\mbox{\hyperlink{if__rsureg_8h_a14155179e01608510206b9cdf4790068}{SM}}(R92S\_TXDW3\_SEQ, prio));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02893}02893 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02894}02894         \textcolor{keywordflow}{if} (ieee80211\_radiotap\_active\_vap(vap)) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02895}02895                 \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__tx__radiotap__header}{rsu\_tx\_radiotap\_header}} *tap = \&sc-\/>sc\_txtap;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02896}02896 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02897}02897                 tap-\/>\mbox{\hyperlink{structrsu__tx__radiotap__header_a73aba5c8930ab86099da707eee277333}{wt\_flags}} = 0;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02898}02898                 ieee80211\_radiotap\_tx(vap, m0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02899}02899         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02900}02900 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02901}02901         xferlen = \textcolor{keyword}{sizeof}(*txd) + m0-\/>m\_pkthdr.len;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02902}02902         KASSERT(xferlen <= \mbox{\hyperlink{if__rsureg_8h_a0a7a7faec12b268dfb06d8da0db55000}{RSU\_TXBUFSZ}}, (\textcolor{stringliteral}{"{}\%s: invalid length"{}}, \_\_func\_\_));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02903}02903         m\_copydata(m0, 0, m0-\/>m\_pkthdr.len, (caddr\_t)\&txd[1]);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02904}02904 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02905}02905         data-\/>buflen = xferlen;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02906}02906         data-\/>ni = ni;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02907}02907         data-\/>m = m0;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02908}02908         STAILQ\_INSERT\_TAIL(\&sc-\/>sc\_tx\_pending[which], data, \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02909}02909 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02910}02910         \textcolor{comment}{/* start transfer, if any */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02911}02911         \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structrsu__softc_abbd456b3b6c1981a4daf906bb5f1299f}{sc\_xfer}}[which]);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02912}02912         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02913}02913 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02914}02914 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02915}02915 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02916}\mbox{\hyperlink{if__rsu_8c_ac28409af787dc2e5bc9d6de7d060041b}{02916}} \mbox{\hyperlink{if__rsu_8c_ac28409af787dc2e5bc9d6de7d060041b}{rsu\_transmit}}(\textcolor{keyword}{struct} ieee80211com *ic, \textcolor{keyword}{struct} mbuf *m)   }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02917}02917 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02918}02918         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02919}02919         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02920}02920 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02921}02921         \mbox{\hyperlink{if__rsureg_8h_a48532232b39d8fa728a8a10df1d3f4b7}{RSU\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02922}02922         \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structrsu__softc_acc01333e62919e38b1a73ac8c96b1f3f}{sc\_running}}) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02923}02923                 \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02924}02924                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02925}02925         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02926}02926 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02927}02927         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02928}02928 \textcolor{comment}{         * XXX TODO: ensure that we treat 'm' as a list of frames}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02929}02929 \textcolor{comment}{         * to transmit!}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02930}02930 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02931}02931         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = mbufq\_enqueue(\&sc-\/>\mbox{\hyperlink{structrsu__softc_a44f3bb6915f5db2ac3d4ce949856f38e}{sc\_snd}}, m);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02932}02932         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02933}02933                 \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a038e3dcd0fb5266c1184770947cceaab}{RSU\_DEBUG\_TX}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02934}02934                     \textcolor{stringliteral}{"{}\%s: mbufq\_enable: failed (\%d)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02935}02935                     \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02936}02936                     \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02937}02937                 \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02938}02938                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02939}02939         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02940}02940         \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02941}02941 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02942}02942         \textcolor{comment}{/* This kicks the TX taskqueue */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02943}02943         \mbox{\hyperlink{if__rsu_8c_aac8bbb20bfa4ca3f9f774a3b0f41048f}{rsu\_start}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02944}02944 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02945}02945         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02946}02946 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02947}02947 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02948}02948 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02949}\mbox{\hyperlink{if__rsu_8c_aedb648c120c64a1aa04b3efc4e7863b7}{02949}} \mbox{\hyperlink{if__rsu_8c_aedb648c120c64a1aa04b3efc4e7863b7}{rsu\_drain\_mbufq}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02950}02950 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02951}02951         \textcolor{keyword}{struct }mbuf *m;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02952}02952         \textcolor{keyword}{struct }ieee80211\_node *ni;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02953}02953 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02954}02954         \mbox{\hyperlink{if__rsureg_8h_aced96ac92d4bb829407616864037ea8d}{RSU\_ASSERT\_LOCKED}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02955}02955         \textcolor{keywordflow}{while} ((m = mbufq\_dequeue(\&sc-\/>\mbox{\hyperlink{structrsu__softc_a44f3bb6915f5db2ac3d4ce949856f38e}{sc\_snd}})) != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02956}02956                 ni = (\textcolor{keyword}{struct }ieee80211\_node *)m-\/>m\_pkthdr.rcvif;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02957}02957                 m-\/>m\_pkthdr.rcvif = NULL;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02958}02958                 ieee80211\_free\_node(ni);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02959}02959                 m\_freem(m);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02960}02960         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02961}02961 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02962}02962 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02963}02963 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02964}\mbox{\hyperlink{if__rsu_8c_a548502146c12f7f9cce851fcc034a028}{02964}} \mbox{\hyperlink{if__rsu_8c_a548502146c12f7f9cce851fcc034a028}{\_rsu\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02965}02965 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02966}02966         \textcolor{keyword}{struct }ieee80211\_node *ni;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02967}02967         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__data}{rsu\_data}} *bf;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02968}02968         \textcolor{keyword}{struct }mbuf *m;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02969}02969 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02970}02970         \mbox{\hyperlink{if__rsureg_8h_aced96ac92d4bb829407616864037ea8d}{RSU\_ASSERT\_LOCKED}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02971}02971 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02972}02972         \textcolor{keywordflow}{while} ((m = mbufq\_dequeue(\&sc-\/>\mbox{\hyperlink{structrsu__softc_a44f3bb6915f5db2ac3d4ce949856f38e}{sc\_snd}})) != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02973}02973                 bf = \mbox{\hyperlink{if__rsu_8c_a13eb301a8bdf61624acff9e3b4e4c1c4}{rsu\_getbuf}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02974}02974                 \textcolor{keywordflow}{if} (bf == NULL) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02975}02975                         \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a038e3dcd0fb5266c1184770947cceaab}{RSU\_DEBUG\_TX}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02976}02976                             \textcolor{stringliteral}{"{}\%s: failed to get buffer\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02977}02977                         mbufq\_prepend(\&sc-\/>\mbox{\hyperlink{structrsu__softc_a44f3bb6915f5db2ac3d4ce949856f38e}{sc\_snd}}, m);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02978}02978                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02979}02979                 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02980}02980 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02981}02981                 ni = (\textcolor{keyword}{struct }ieee80211\_node *)m-\/>m\_pkthdr.rcvif;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02982}02982                 m-\/>m\_pkthdr.rcvif = NULL;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02983}02983 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02984}02984                 if (\mbox{\hyperlink{if__rsu_8c_ae979138a473dcb59902b06b5c05d27b1}{rsu\_tx\_start}}(sc, ni, m, bf) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02985}02985                         \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a038e3dcd0fb5266c1184770947cceaab}{RSU\_DEBUG\_TX}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02986}02986                             \textcolor{stringliteral}{"{}\%s: failed to transmit\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02987}02987                         if\_inc\_counter(ni-\/>ni\_vap-\/>iv\_ifp,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02988}02988                             IFCOUNTER\_OERRORS, 1);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02989}02989                         \mbox{\hyperlink{if__rsu_8c_a74136760c03cfc36cda9847b7e8dde65}{rsu\_freebuf}}(sc, bf);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02990}02990                         ieee80211\_free\_node(ni);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02991}02991                         m\_freem(m);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02992}02992                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02993}02993                 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02994}02994         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02995}02995 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02996}02996 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02997}02997 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02998}\mbox{\hyperlink{if__rsu_8c_aac8bbb20bfa4ca3f9f774a3b0f41048f}{02998}} \mbox{\hyperlink{if__rsu_8c_aac8bbb20bfa4ca3f9f774a3b0f41048f}{rsu\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l02999}02999 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03000}03000 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03001}03001         taskqueue\_enqueue(taskqueue\_thread, \&sc-\/>\mbox{\hyperlink{structrsu__softc_a7b88c0223e24c181020c79ce0cf54248}{tx\_task}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03002}03002 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03003}03003 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03004}03004 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03005}\mbox{\hyperlink{if__rsu_8c_a046a645893d15b1e79c1e21a8391d39d}{03005}} \mbox{\hyperlink{if__rsu_8c_a046a645893d15b1e79c1e21a8391d39d}{rsu\_ioctl\_net}}(\textcolor{keyword}{struct} ieee80211com *ic, u\_long cmd, \textcolor{keywordtype}{void} *data)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03006}03006 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03007}03007         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03008}03008         \textcolor{keyword}{struct }ifreq *ifr = (\textcolor{keyword}{struct }ifreq *)data;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03009}03009         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03010}03010 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03011}03011         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = 0;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03012}03012         \textcolor{keywordflow}{switch} (cmd) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03013}03013         \textcolor{keywordflow}{case} SIOCSIFCAP:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03014}03014         \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03015}03015                 \textcolor{keyword}{struct }ieee80211vap *vap;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03016}03016                 \textcolor{keywordtype}{int} rxmask;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03017}03017 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03018}03018                 rxmask = ifr-\/>ifr\_reqcap \& (IFCAP\_RXCSUM | IFCAP\_RXCSUM\_IPV6);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03019}03019 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03020}03020                 \mbox{\hyperlink{if__rsureg_8h_a48532232b39d8fa728a8a10df1d3f4b7}{RSU\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03021}03021                 \textcolor{comment}{/* Both RXCSUM bits must be set (or unset). */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03022}03022                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrsu__softc_a705cf55f151f9f1f313d586f44f2102c}{sc\_rx\_checksum\_enable}} \&\&}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03023}03023                     rxmask != (IFCAP\_RXCSUM | IFCAP\_RXCSUM\_IPV6)) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03024}03024                         rxmask = 0;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03025}03025                         sc-\/>\mbox{\hyperlink{structrsu__softc_a705cf55f151f9f1f313d586f44f2102c}{sc\_rx\_checksum\_enable}} = 0;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03026}03026                         \mbox{\hyperlink{if__rsu_8c_a66f3ada15e742a73ccd37c2aa36b6f12}{rsu\_rxfilter\_set}}(sc, \mbox{\hyperlink{if__rsureg_8h_a9c56589f349f800fc19894c849883b2f}{R92S\_RCR\_TCP\_OFFLD\_EN}}, 0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03027}03027                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structrsu__softc_a705cf55f151f9f1f313d586f44f2102c}{sc\_rx\_checksum\_enable}} \&\& rxmask != 0) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03028}03028                         rxmask = IFCAP\_RXCSUM | IFCAP\_RXCSUM\_IPV6;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03029}03029                         sc-\/>\mbox{\hyperlink{structrsu__softc_a705cf55f151f9f1f313d586f44f2102c}{sc\_rx\_checksum\_enable}} = 1;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03030}03030                         \mbox{\hyperlink{if__rsu_8c_a66f3ada15e742a73ccd37c2aa36b6f12}{rsu\_rxfilter\_set}}(sc, 0, \mbox{\hyperlink{if__rsureg_8h_a9c56589f349f800fc19894c849883b2f}{R92S\_RCR\_TCP\_OFFLD\_EN}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03031}03031                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03032}03032                         \textcolor{comment}{/* Nothing to do. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03033}03033                         \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03034}03034                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03035}03035                 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03036}03036                 \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03037}03037 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03038}03038                 IEEE80211\_LOCK(ic);     \textcolor{comment}{/* XXX */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03039}03039                 TAILQ\_FOREACH(vap, \&ic-\/>ic\_vaps, iv\_next) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03040}03040                         \textcolor{keyword}{struct }ifnet *ifp = vap-\/>iv\_ifp;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03041}03041 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03042}03042                         ifp-\/>if\_capenable \&=}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03043}03043                             \string~(IFCAP\_RXCSUM | IFCAP\_RXCSUM\_IPV6);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03044}03044                         ifp-\/>if\_capenable |= rxmask;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03045}03045                 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03046}03046                 IEEE80211\_UNLOCK(ic);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03047}03047                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03048}03048         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03049}03049         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03050}03050                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = ENOTTY;            \textcolor{comment}{/* for net80211 */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03051}03051                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03052}03052         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03053}03053 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03054}03054         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03055}03055 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03056}03056 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03057}03057 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03058}\mbox{\hyperlink{if__rsu_8c_a6e29510ee7bbeaadcc10d44136fa9e3b}{03058}} \mbox{\hyperlink{if__rsu_8c_a6e29510ee7bbeaadcc10d44136fa9e3b}{rsu\_parent}}(\textcolor{keyword}{struct} ieee80211com *ic)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03059}03059 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03060}03060         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03061}03061 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03062}03062         \textcolor{keywordflow}{if} (ic-\/>ic\_nrunning > 0) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03063}03063                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__rsu_8c_a944f30e40fb2481d7b7a0cbd53c33648}{rsu\_init}}(sc) == 0)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03064}03064                         ieee80211\_start\_all(ic);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03065}03065                 \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03066}03066                         \textcolor{keyword}{struct }ieee80211vap *vap = TAILQ\_FIRST(\&ic-\/>ic\_vaps);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03067}03067                         \textcolor{keywordflow}{if} (vap != NULL)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03068}03068                                 ieee80211\_stop(vap);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03069}03069                 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03070}03070         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03071}03071                 \mbox{\hyperlink{if__rsu_8c_a6ce5725f25752c6c05ce4459a640b08a}{rsu\_stop}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03072}03072 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03073}03073 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03074}03074 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03075}03075 \textcolor{comment}{ * Power on sequence for A-\/cut adapters.}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03076}03076 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03077}03077 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03078}\mbox{\hyperlink{if__rsu_8c_ac3ff7c07385d5399abef9640c17d5de3}{03078}} \mbox{\hyperlink{if__rsu_8c_ac3ff7c07385d5399abef9640c17d5de3}{rsu\_power\_on\_acut}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03079}03079 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03080}03080         uint32\_t \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03081}03081 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03082}03082         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_aa29d63defee1562d4d763e33d88a9d75}{R92S\_SPS0\_CTRL}} + 1, 0x53);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03083}03083         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_aa29d63defee1562d4d763e33d88a9d75}{R92S\_SPS0\_CTRL}} + 0, 0x57);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03084}03084 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03085}03085         \textcolor{comment}{/* Enable AFE macro block's bandgap and Mbias. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03086}03086         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_ac0dc2f8f63e70c9f2cf7eec83715c33c}{R92S\_AFE\_MISC}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03087}03087             \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_ac0dc2f8f63e70c9f2cf7eec83715c33c}{R92S\_AFE\_MISC}}) |}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03088}03088             \mbox{\hyperlink{if__rsureg_8h_a65c860dcc63030a3854eb67c6fc88c15}{R92S\_AFE\_MISC\_BGEN}} | \mbox{\hyperlink{if__rsureg_8h_a9471465f634c4eea0ae3f45ae4040e34}{R92S\_AFE\_MISC\_MBEN}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03089}03089         \textcolor{comment}{/* Enable LDOA15 block. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03090}03090         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a4e30e903b010e4f891228481098a0ed2}{R92S\_LDOA15\_CTRL}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03091}03091             \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a4e30e903b010e4f891228481098a0ed2}{R92S\_LDOA15\_CTRL}}) | \mbox{\hyperlink{if__rsureg_8h_a86ae9f676da8e57dca2570265a394bef}{R92S\_LDA15\_EN}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03092}03092 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03093}03093         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a9615c17f001df30d7bde6e16786db62d}{R92S\_SPS1\_CTRL}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03094}03094             \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a9615c17f001df30d7bde6e16786db62d}{R92S\_SPS1\_CTRL}}) | \mbox{\hyperlink{if__rsureg_8h_a45f7f8c3dfdc0bdd8c3f76b7bfe8d143}{R92S\_SPS1\_LDEN}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03095}03095         \mbox{\hyperlink{if__rsu_8c_aa090b4eb974d6bb02fde866094f25bd0}{rsu\_ms\_delay}}(sc, 2000);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03096}03096         \textcolor{comment}{/* Enable switch regulator block. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03097}03097         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a9615c17f001df30d7bde6e16786db62d}{R92S\_SPS1\_CTRL}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03098}03098             \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a9615c17f001df30d7bde6e16786db62d}{R92S\_SPS1\_CTRL}}) | \mbox{\hyperlink{if__rsureg_8h_a680cd6c90002f91a16905aacc7cf4189}{R92S\_SPS1\_SWEN}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03099}03099 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03100}03100         \mbox{\hyperlink{if__rsu_8c_abf65ff90f534d06c7131e43ace2e7d5e}{rsu\_write\_4}}(sc, \mbox{\hyperlink{if__rsureg_8h_a9615c17f001df30d7bde6e16786db62d}{R92S\_SPS1\_CTRL}}, 0x00a7b267);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03101}03101 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03102}03102         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_ae765231f4a6d61ec161fd0183b4b715d}{R92S\_SYS\_ISO\_CTRL}} + 1,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03103}03103             \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_ae765231f4a6d61ec161fd0183b4b715d}{R92S\_SYS\_ISO\_CTRL}} + 1) | 0x08);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03104}03104 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03105}03105         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a597ac85465186f6dcb2dadf03ee6d0f5}{R92S\_SYS\_FUNC\_EN}} + 1,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03106}03106             \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a597ac85465186f6dcb2dadf03ee6d0f5}{R92S\_SYS\_FUNC\_EN}} + 1) | 0x20);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03107}03107 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03108}03108         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_ae765231f4a6d61ec161fd0183b4b715d}{R92S\_SYS\_ISO\_CTRL}} + 1,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03109}03109             \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_ae765231f4a6d61ec161fd0183b4b715d}{R92S\_SYS\_ISO\_CTRL}} + 1) \& \string~0x90);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03110}03110 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03111}03111         \textcolor{comment}{/* Enable AFE clock. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03112}03112         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a5bd973740e7f2469d917edc8716d3f62}{R92S\_AFE\_XTAL\_CTRL}} + 1,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03113}03113             \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a5bd973740e7f2469d917edc8716d3f62}{R92S\_AFE\_XTAL\_CTRL}} + 1) \& \string~0x04);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03114}03114         \textcolor{comment}{/* Enable AFE PLL macro block. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03115}03115         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_ac4699e03ef4931e6bc79fe946ba4c775}{R92S\_AFE\_PLL\_CTRL}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03116}03116             \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_ac4699e03ef4931e6bc79fe946ba4c775}{R92S\_AFE\_PLL\_CTRL}}) | 0x11);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03117}03117         \textcolor{comment}{/* Attach AFE PLL to MACTOP/BB. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03118}03118         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_ae765231f4a6d61ec161fd0183b4b715d}{R92S\_SYS\_ISO\_CTRL}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03119}03119             \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_ae765231f4a6d61ec161fd0183b4b715d}{R92S\_SYS\_ISO\_CTRL}}) \& \string~0x11);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03120}03120 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03121}03121         \textcolor{comment}{/* Switch to 40MHz clock instead of 80MHz. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03122}03122         \mbox{\hyperlink{if__rsu_8c_adfff5565daadbabd674ba3dd1e7a48bc}{rsu\_write\_2}}(sc, \mbox{\hyperlink{if__rsureg_8h_a58d76dc6b2f8e3ede9d40b80ced5e299}{R92S\_SYS\_CLKR}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03123}03123             \mbox{\hyperlink{if__rsu_8c_ae642a30fa954c7978f0ff24859d7a7a9}{rsu\_read\_2}}(sc, \mbox{\hyperlink{if__rsureg_8h_a58d76dc6b2f8e3ede9d40b80ced5e299}{R92S\_SYS\_CLKR}}) \& \string~\mbox{\hyperlink{if__rsureg_8h_a7f13376614ca050208fcc8fb68fffc75}{R92S\_SYS\_CLKSEL}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03124}03124 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03125}03125         \textcolor{comment}{/* Enable MAC clock. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03126}03126         \mbox{\hyperlink{if__rsu_8c_adfff5565daadbabd674ba3dd1e7a48bc}{rsu\_write\_2}}(sc, \mbox{\hyperlink{if__rsureg_8h_a58d76dc6b2f8e3ede9d40b80ced5e299}{R92S\_SYS\_CLKR}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03127}03127             \mbox{\hyperlink{if__rsu_8c_ae642a30fa954c7978f0ff24859d7a7a9}{rsu\_read\_2}}(sc, \mbox{\hyperlink{if__rsureg_8h_a58d76dc6b2f8e3ede9d40b80ced5e299}{R92S\_SYS\_CLKR}}) |}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03128}03128             \mbox{\hyperlink{if__rsureg_8h_ad8334e5e1d56c87535cf953f4758ead4}{R92S\_MAC\_CLK\_EN}} | \mbox{\hyperlink{if__rsureg_8h_a62ad6c2ac0acf1860cc8c001a6a09dda}{R92S\_SYS\_CLK\_EN}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03129}03129 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03130}03130         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a2ff933284b7b44baa7cfc6364f5805c2}{R92S\_PMC\_FSM}}, 0x02);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03131}03131 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03132}03132         \textcolor{comment}{/* Enable digital core and IOREG R/W. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03133}03133         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a597ac85465186f6dcb2dadf03ee6d0f5}{R92S\_SYS\_FUNC\_EN}} + 1,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03134}03134             \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a597ac85465186f6dcb2dadf03ee6d0f5}{R92S\_SYS\_FUNC\_EN}} + 1) | 0x08);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03135}03135 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03136}03136         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a597ac85465186f6dcb2dadf03ee6d0f5}{R92S\_SYS\_FUNC\_EN}} + 1,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03137}03137             \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a597ac85465186f6dcb2dadf03ee6d0f5}{R92S\_SYS\_FUNC\_EN}} + 1) | 0x80);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03138}03138 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03139}03139         \textcolor{comment}{/* Switch the control path to firmware. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03140}03140         \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} = \mbox{\hyperlink{if__rsu_8c_ae642a30fa954c7978f0ff24859d7a7a9}{rsu\_read\_2}}(sc, \mbox{\hyperlink{if__rsureg_8h_a58d76dc6b2f8e3ede9d40b80ced5e299}{R92S\_SYS\_CLKR}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03141}03141         \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} = (\mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} \& \string~R92S\_SWHW\_SEL) | \mbox{\hyperlink{if__rsureg_8h_a64ec11d095e51b2d1cb57ec7ce9ab45f}{R92S\_FWHW\_SEL}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03142}03142         \mbox{\hyperlink{if__rsu_8c_adfff5565daadbabd674ba3dd1e7a48bc}{rsu\_write\_2}}(sc, \mbox{\hyperlink{if__rsureg_8h_a58d76dc6b2f8e3ede9d40b80ced5e299}{R92S\_SYS\_CLKR}}, \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03143}03143 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03144}03144         \mbox{\hyperlink{if__rsu_8c_adfff5565daadbabd674ba3dd1e7a48bc}{rsu\_write\_2}}(sc, \mbox{\hyperlink{if__rsureg_8h_a1f5b1389307fdf9fac28da2faf41fe58}{R92S\_CR}}, 0x37fc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03145}03145 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03146}03146         \textcolor{comment}{/* Fix USB RX FIFO issue. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03147}03147         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, 0xfe5c,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03148}03148             \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, 0xfe5c) | 0x80);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03149}03149         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, 0x00ab,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03150}03150             \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, 0x00ab) | 0xc0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03151}03151 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03152}03152         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a58d76dc6b2f8e3ede9d40b80ced5e299}{R92S\_SYS\_CLKR}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03153}03153             \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a58d76dc6b2f8e3ede9d40b80ced5e299}{R92S\_SYS\_CLKR}}) \& \string~\mbox{\hyperlink{if__rsureg_8h_a79b371a0a6c69b8a540ecf8a4623b246}{R92S\_SYS\_CPU\_CLKSEL}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03154}03154 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03155}03155 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03156}03156 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03157}03157 \textcolor{comment}{ * Power on sequence for B-\/cut and C-\/cut adapters.}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03158}03158 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03159}03159 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03160}\mbox{\hyperlink{if__rsu_8c_aea38aa95de49291b237ff757bd89b68a}{03160}} \mbox{\hyperlink{if__rsu_8c_aea38aa95de49291b237ff757bd89b68a}{rsu\_power\_on\_bcut}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03161}03161 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03162}03162         uint32\_t \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03163}03163         \textcolor{keywordtype}{int} ntries;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03164}03164 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03165}03165         \textcolor{comment}{/* Prevent eFuse leakage. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03166}03166         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, 0x37, 0xb0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03167}03167         \mbox{\hyperlink{if__rsu_8c_aa090b4eb974d6bb02fde866094f25bd0}{rsu\_ms\_delay}}(sc, 10);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03168}03168         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, 0x37, 0x30);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03169}03169 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03170}03170         \textcolor{comment}{/* Switch the control path to hardware. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03171}03171         \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} = \mbox{\hyperlink{if__rsu_8c_ae642a30fa954c7978f0ff24859d7a7a9}{rsu\_read\_2}}(sc, \mbox{\hyperlink{if__rsureg_8h_a58d76dc6b2f8e3ede9d40b80ced5e299}{R92S\_SYS\_CLKR}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03172}03172         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} \& \mbox{\hyperlink{if__rsureg_8h_a64ec11d095e51b2d1cb57ec7ce9ab45f}{R92S\_FWHW\_SEL}}) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03173}03173                 \mbox{\hyperlink{if__rsu_8c_adfff5565daadbabd674ba3dd1e7a48bc}{rsu\_write\_2}}(sc, \mbox{\hyperlink{if__rsureg_8h_a58d76dc6b2f8e3ede9d40b80ced5e299}{R92S\_SYS\_CLKR}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03174}03174                     \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} \& \string~(\mbox{\hyperlink{if__rsureg_8h_a3233721be4660c4a60dda26cd2844a24}{R92S\_SWHW\_SEL}} | \mbox{\hyperlink{if__rsureg_8h_a64ec11d095e51b2d1cb57ec7ce9ab45f}{R92S\_FWHW\_SEL}}));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03175}03175         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03176}03176         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a597ac85465186f6dcb2dadf03ee6d0f5}{R92S\_SYS\_FUNC\_EN}} + 1,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03177}03177             \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a597ac85465186f6dcb2dadf03ee6d0f5}{R92S\_SYS\_FUNC\_EN}} + 1) \& \string~0x8c);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03178}03178         \mbox{\hyperlink{if__rsu_8c_aa090b4eb974d6bb02fde866094f25bd0}{rsu\_ms\_delay}}(sc, 1);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03179}03179 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03180}03180         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_aa29d63defee1562d4d763e33d88a9d75}{R92S\_SPS0\_CTRL}} + 1, 0x53);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03181}03181         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_aa29d63defee1562d4d763e33d88a9d75}{R92S\_SPS0\_CTRL}} + 0, 0x57);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03182}03182 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03183}03183         \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} = \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_ac0dc2f8f63e70c9f2cf7eec83715c33c}{R92S\_AFE\_MISC}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03184}03184         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_ac0dc2f8f63e70c9f2cf7eec83715c33c}{R92S\_AFE\_MISC}}, \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} | \mbox{\hyperlink{if__rsureg_8h_a65c860dcc63030a3854eb67c6fc88c15}{R92S\_AFE\_MISC\_BGEN}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03185}03185         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_ac0dc2f8f63e70c9f2cf7eec83715c33c}{R92S\_AFE\_MISC}}, \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} | \mbox{\hyperlink{if__rsureg_8h_a65c860dcc63030a3854eb67c6fc88c15}{R92S\_AFE\_MISC\_BGEN}} |}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03186}03186             \mbox{\hyperlink{if__rsureg_8h_a9471465f634c4eea0ae3f45ae4040e34}{R92S\_AFE\_MISC\_MBEN}} | \mbox{\hyperlink{if__rsureg_8h_a852c877ada8ccb7f36f57794947f309b}{R92S\_AFE\_MISC\_I32\_EN}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03187}03187 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03188}03188         \textcolor{comment}{/* Enable PLL. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03189}03189         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a4e30e903b010e4f891228481098a0ed2}{R92S\_LDOA15\_CTRL}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03190}03190             \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a4e30e903b010e4f891228481098a0ed2}{R92S\_LDOA15\_CTRL}}) | \mbox{\hyperlink{if__rsureg_8h_a86ae9f676da8e57dca2570265a394bef}{R92S\_LDA15\_EN}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03191}03191 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03192}03192         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_ac53765832a02c0fb3f79c24708549689}{R92S\_LDOV12D\_CTRL}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03193}03193             \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_ac53765832a02c0fb3f79c24708549689}{R92S\_LDOV12D\_CTRL}}) | \mbox{\hyperlink{if__rsureg_8h_a9af1a48af6ff59240ea318c6d1fbff28}{R92S\_LDV12\_EN}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03194}03194 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03195}03195         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_ae765231f4a6d61ec161fd0183b4b715d}{R92S\_SYS\_ISO\_CTRL}} + 1,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03196}03196             \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_ae765231f4a6d61ec161fd0183b4b715d}{R92S\_SYS\_ISO\_CTRL}} + 1) | 0x08);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03197}03197 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03198}03198         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a597ac85465186f6dcb2dadf03ee6d0f5}{R92S\_SYS\_FUNC\_EN}} + 1,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03199}03199             \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a597ac85465186f6dcb2dadf03ee6d0f5}{R92S\_SYS\_FUNC\_EN}} + 1) | 0x20);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03200}03200 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03201}03201         \textcolor{comment}{/* Support 64KB IMEM. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03202}03202         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_ae765231f4a6d61ec161fd0183b4b715d}{R92S\_SYS\_ISO\_CTRL}} + 1,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03203}03203             \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_ae765231f4a6d61ec161fd0183b4b715d}{R92S\_SYS\_ISO\_CTRL}} + 1) \& \string~0x97);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03204}03204 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03205}03205         \textcolor{comment}{/* Enable AFE clock. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03206}03206         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a5bd973740e7f2469d917edc8716d3f62}{R92S\_AFE\_XTAL\_CTRL}} + 1,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03207}03207             \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a5bd973740e7f2469d917edc8716d3f62}{R92S\_AFE\_XTAL\_CTRL}} + 1) \& \string~0x04);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03208}03208         \textcolor{comment}{/* Enable AFE PLL macro block. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03209}03209         \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} = \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_ac4699e03ef4931e6bc79fe946ba4c775}{R92S\_AFE\_PLL\_CTRL}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03210}03210         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_ac4699e03ef4931e6bc79fe946ba4c775}{R92S\_AFE\_PLL\_CTRL}}, \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} | 0x11);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03211}03211         \mbox{\hyperlink{if__rsu_8c_aa090b4eb974d6bb02fde866094f25bd0}{rsu\_ms\_delay}}(sc, 1);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03212}03212         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_ac4699e03ef4931e6bc79fe946ba4c775}{R92S\_AFE\_PLL\_CTRL}}, \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} | 0x51);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03213}03213         \mbox{\hyperlink{if__rsu_8c_aa090b4eb974d6bb02fde866094f25bd0}{rsu\_ms\_delay}}(sc, 1);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03214}03214         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_ac4699e03ef4931e6bc79fe946ba4c775}{R92S\_AFE\_PLL\_CTRL}}, \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} | 0x11);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03215}03215         \mbox{\hyperlink{if__rsu_8c_aa090b4eb974d6bb02fde866094f25bd0}{rsu\_ms\_delay}}(sc, 1);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03216}03216 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03217}03217         \textcolor{comment}{/* Attach AFE PLL to MACTOP/BB. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03218}03218         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_ae765231f4a6d61ec161fd0183b4b715d}{R92S\_SYS\_ISO\_CTRL}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03219}03219             \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_ae765231f4a6d61ec161fd0183b4b715d}{R92S\_SYS\_ISO\_CTRL}}) \& \string~0x11);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03220}03220 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03221}03221         \textcolor{comment}{/* Switch to 40MHz clock. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03222}03222         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a58d76dc6b2f8e3ede9d40b80ced5e299}{R92S\_SYS\_CLKR}}, 0x00);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03223}03223         \textcolor{comment}{/* Disable CPU clock and 80MHz SSC. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03224}03224         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a58d76dc6b2f8e3ede9d40b80ced5e299}{R92S\_SYS\_CLKR}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03225}03225             \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a58d76dc6b2f8e3ede9d40b80ced5e299}{R92S\_SYS\_CLKR}}) | 0xa0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03226}03226         \textcolor{comment}{/* Enable MAC clock. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03227}03227         \mbox{\hyperlink{if__rsu_8c_adfff5565daadbabd674ba3dd1e7a48bc}{rsu\_write\_2}}(sc, \mbox{\hyperlink{if__rsureg_8h_a58d76dc6b2f8e3ede9d40b80ced5e299}{R92S\_SYS\_CLKR}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03228}03228             \mbox{\hyperlink{if__rsu_8c_ae642a30fa954c7978f0ff24859d7a7a9}{rsu\_read\_2}}(sc, \mbox{\hyperlink{if__rsureg_8h_a58d76dc6b2f8e3ede9d40b80ced5e299}{R92S\_SYS\_CLKR}}) |}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03229}03229             \mbox{\hyperlink{if__rsureg_8h_ad8334e5e1d56c87535cf953f4758ead4}{R92S\_MAC\_CLK\_EN}} | \mbox{\hyperlink{if__rsureg_8h_a62ad6c2ac0acf1860cc8c001a6a09dda}{R92S\_SYS\_CLK\_EN}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03230}03230 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03231}03231         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a2ff933284b7b44baa7cfc6364f5805c2}{R92S\_PMC\_FSM}}, 0x02);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03232}03232 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03233}03233         \textcolor{comment}{/* Enable digital core and IOREG R/W. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03234}03234         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a597ac85465186f6dcb2dadf03ee6d0f5}{R92S\_SYS\_FUNC\_EN}} + 1,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03235}03235             \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a597ac85465186f6dcb2dadf03ee6d0f5}{R92S\_SYS\_FUNC\_EN}} + 1) | 0x08);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03236}03236 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03237}03237         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a597ac85465186f6dcb2dadf03ee6d0f5}{R92S\_SYS\_FUNC\_EN}} + 1,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03238}03238             \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a597ac85465186f6dcb2dadf03ee6d0f5}{R92S\_SYS\_FUNC\_EN}} + 1) | 0x80);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03239}03239 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03240}03240         \textcolor{comment}{/* Switch the control path to firmware. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03241}03241         \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} = \mbox{\hyperlink{if__rsu_8c_ae642a30fa954c7978f0ff24859d7a7a9}{rsu\_read\_2}}(sc, \mbox{\hyperlink{if__rsureg_8h_a58d76dc6b2f8e3ede9d40b80ced5e299}{R92S\_SYS\_CLKR}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03242}03242         \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} = (\mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} \& \string~R92S\_SWHW\_SEL) | \mbox{\hyperlink{if__rsureg_8h_a64ec11d095e51b2d1cb57ec7ce9ab45f}{R92S\_FWHW\_SEL}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03243}03243         \mbox{\hyperlink{if__rsu_8c_adfff5565daadbabd674ba3dd1e7a48bc}{rsu\_write\_2}}(sc, \mbox{\hyperlink{if__rsureg_8h_a58d76dc6b2f8e3ede9d40b80ced5e299}{R92S\_SYS\_CLKR}}, \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03244}03244 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03245}03245         \mbox{\hyperlink{if__rsu_8c_adfff5565daadbabd674ba3dd1e7a48bc}{rsu\_write\_2}}(sc, \mbox{\hyperlink{if__rsureg_8h_a1f5b1389307fdf9fac28da2faf41fe58}{R92S\_CR}}, 0x37fc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03246}03246 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03247}03247         \textcolor{comment}{/* Fix USB RX FIFO issue. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03248}03248         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, 0xfe5c,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03249}03249             \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, 0xfe5c) | 0x80);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03250}03250 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03251}03251         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a58d76dc6b2f8e3ede9d40b80ced5e299}{R92S\_SYS\_CLKR}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03252}03252             \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a58d76dc6b2f8e3ede9d40b80ced5e299}{R92S\_SYS\_CLKR}}) \& \string~\mbox{\hyperlink{if__rsureg_8h_a79b371a0a6c69b8a540ecf8a4623b246}{R92S\_SYS\_CPU\_CLKSEL}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03253}03253 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03254}03254         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, 0xfe1c, 0x80);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03255}03255 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03256}03256         \textcolor{comment}{/* Make sure TxDMA is ready to download firmware. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03257}03257         \textcolor{keywordflow}{for} (ntries = 0; ntries < 20; ntries++) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03258}03258                 \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} = \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a030b6fcb9462afa3ec87f594715f94c6}{R92S\_TCR}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03259}03259                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} \& (\mbox{\hyperlink{if__rsureg_8h_a74b8f47086ec421a74ea19c03bb208e2}{R92S\_TCR\_IMEM\_CHK\_RPT}} | \mbox{\hyperlink{if__rsureg_8h_a4a6b1d5d4e33dd4fb48296f6bc45e058}{R92S\_TCR\_EMEM\_CHK\_RPT}})) ==}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03260}03260                     (\mbox{\hyperlink{if__rsureg_8h_a74b8f47086ec421a74ea19c03bb208e2}{R92S\_TCR\_IMEM\_CHK\_RPT}} | \mbox{\hyperlink{if__rsureg_8h_a4a6b1d5d4e33dd4fb48296f6bc45e058}{R92S\_TCR\_EMEM\_CHK\_RPT}}))}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03261}03261                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03262}03262                 \mbox{\hyperlink{if__rsu_8c_aa090b4eb974d6bb02fde866094f25bd0}{rsu\_ms\_delay}}(sc, 1);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03263}03263         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03264}03264         \textcolor{keywordflow}{if} (ntries == 20) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03265}03265                 \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a09a67fdd4c21366cb6b0691e667fdce6}{RSU\_DEBUG\_RESET}} | \mbox{\hyperlink{if__rsu_8c_a038e3dcd0fb5266c1184770947cceaab}{RSU\_DEBUG\_TX}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03266}03266                     \textcolor{stringliteral}{"{}\%s: TxDMA is not ready\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03267}03267                     \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03268}03268                 \textcolor{comment}{/* Reset TxDMA. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03269}03269                 \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} = \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a1f5b1389307fdf9fac28da2faf41fe58}{R92S\_CR}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03270}03270                 \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a1f5b1389307fdf9fac28da2faf41fe58}{R92S\_CR}}, \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} \& \string~\mbox{\hyperlink{if__rsureg_8h_aeaf78c982e818e2f15926344537fb75b}{R92S\_CR\_TXDMA\_EN}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03271}03271                 \mbox{\hyperlink{if__rsu_8c_aa090b4eb974d6bb02fde866094f25bd0}{rsu\_ms\_delay}}(sc, 1);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03272}03272                 \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a1f5b1389307fdf9fac28da2faf41fe58}{R92S\_CR}}, \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} | \mbox{\hyperlink{if__rsureg_8h_aeaf78c982e818e2f15926344537fb75b}{R92S\_CR\_TXDMA\_EN}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03273}03273         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03274}03274 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03275}03275 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03276}03276 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03277}\mbox{\hyperlink{if__rsu_8c_a212f3ba335057c86bc2b9bd837bacfba}{03277}} \mbox{\hyperlink{if__rsu_8c_a212f3ba335057c86bc2b9bd837bacfba}{rsu\_power\_off}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03278}03278 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03279}03279         \textcolor{comment}{/* Turn RF off. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03280}03280         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_ac328529edb3e1f495bddfadcc3bc640f}{R92S\_RF\_CTRL}}, 0x00);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03281}03281         \mbox{\hyperlink{if__rsu_8c_aa090b4eb974d6bb02fde866094f25bd0}{rsu\_ms\_delay}}(sc, 5);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03282}03282 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03283}03283         \textcolor{comment}{/* Turn MAC off. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03284}03284         \textcolor{comment}{/* Switch control path. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03285}03285         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a58d76dc6b2f8e3ede9d40b80ced5e299}{R92S\_SYS\_CLKR}} + 1, 0x38);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03286}03286         \textcolor{comment}{/* Reset MACTOP. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03287}03287         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a597ac85465186f6dcb2dadf03ee6d0f5}{R92S\_SYS\_FUNC\_EN}} + 1, 0x70);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03288}03288         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a2ff933284b7b44baa7cfc6364f5805c2}{R92S\_PMC\_FSM}}, 0x06);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03289}03289         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_ae765231f4a6d61ec161fd0183b4b715d}{R92S\_SYS\_ISO\_CTRL}} + 0, 0xf9);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03290}03290         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_ae765231f4a6d61ec161fd0183b4b715d}{R92S\_SYS\_ISO\_CTRL}} + 1, 0xe8);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03291}03291 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03292}03292         \textcolor{comment}{/* Disable AFE PLL. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03293}03293         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_ac4699e03ef4931e6bc79fe946ba4c775}{R92S\_AFE\_PLL\_CTRL}}, 0x00);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03294}03294         \textcolor{comment}{/* Disable A15V. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03295}03295         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a4e30e903b010e4f891228481098a0ed2}{R92S\_LDOA15\_CTRL}}, 0x54);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03296}03296         \textcolor{comment}{/* Disable eFuse 1.2V. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03297}03297         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a597ac85465186f6dcb2dadf03ee6d0f5}{R92S\_SYS\_FUNC\_EN}} + 1, 0x50);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03298}03298         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_ac53765832a02c0fb3f79c24708549689}{R92S\_LDOV12D\_CTRL}}, 0x24);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03299}03299         \textcolor{comment}{/* Enable AFE macro block's bandgap and Mbias. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03300}03300         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_ac0dc2f8f63e70c9f2cf7eec83715c33c}{R92S\_AFE\_MISC}}, 0x30);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03301}03301         \textcolor{comment}{/* Disable 1.6V LDO. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03302}03302         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_aa29d63defee1562d4d763e33d88a9d75}{R92S\_SPS0\_CTRL}} + 0, 0x56);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03303}03303         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_aa29d63defee1562d4d763e33d88a9d75}{R92S\_SPS0\_CTRL}} + 1, 0x43);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03304}03304 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03305}03305         \textcolor{comment}{/* Firmware -\/ tell it to switch things off */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03306}03306         (void) \mbox{\hyperlink{if__rsu_8c_a2a4cc7791c269a4b05febcd3cd67668a}{rsu\_set\_fw\_power\_state}}(sc, \mbox{\hyperlink{if__rsu_8c_a817aa852c99312fa2eea0a8cb34fd676}{RSU\_PWR\_OFF}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03307}03307 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03308}03308 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03309}03309 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03310}\mbox{\hyperlink{if__rsu_8c_ab16fd84d8c0da354a6ee1b7ad9ca361e}{03310}} \mbox{\hyperlink{if__rsu_8c_ab16fd84d8c0da354a6ee1b7ad9ca361e}{rsu\_fw\_loadsection}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc, \textcolor{keyword}{const} uint8\_t *buf, \textcolor{keywordtype}{int} \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03311}03311 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03312}03312         \textcolor{keyword}{const} uint8\_t which = \mbox{\hyperlink{if__rsu_8c_a9deb6bab961ef3989d3713bebcfc8510}{rsu\_wme\_ac\_xfer\_map}}[WME\_AC\_VO];}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03313}03313         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__data}{rsu\_data}} *data;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03314}03314         \textcolor{keyword}{struct }\mbox{\hyperlink{structr92s__tx__desc}{r92s\_tx\_desc}} *txd;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03315}03315         \textcolor{keywordtype}{int} mlen;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03316}03316 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03317}03317         \textcolor{keywordflow}{while} (\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} > 0) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03318}03318                 data = \mbox{\hyperlink{if__rsu_8c_a13eb301a8bdf61624acff9e3b4e4c1c4}{rsu\_getbuf}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03319}03319                 \textcolor{keywordflow}{if} (data == NULL)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03320}03320                         \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03321}03321                 txd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structr92s__tx__desc}{r92s\_tx\_desc}} *)data-\/>buf;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03322}03322                 memset(txd, 0, \textcolor{keyword}{sizeof}(*txd));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03323}03323                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} <= \mbox{\hyperlink{if__rsureg_8h_a0a7a7faec12b268dfb06d8da0db55000}{RSU\_TXBUFSZ}} -\/ \textcolor{keyword}{sizeof}(*txd)) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03324}03324                         \textcolor{comment}{/* Last chunk. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03325}03325                         txd-\/>\mbox{\hyperlink{structr92s__tx__desc_a77a2623c71315351ddf435ba3063af01}{txdw0}} |= htole32(\mbox{\hyperlink{if__rsureg_8h_acc3e1936f30d1d8b1f521126fd14331c}{R92S\_TXDW0\_LINIP}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03326}03326                         mlen = \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03327}03327                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03328}03328                         mlen = \mbox{\hyperlink{if__rsureg_8h_a0a7a7faec12b268dfb06d8da0db55000}{RSU\_TXBUFSZ}} -\/ \textcolor{keyword}{sizeof}(*txd);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03329}03329                 txd-\/>txdw0 |= htole32(\mbox{\hyperlink{if__rsureg_8h_a14155179e01608510206b9cdf4790068}{SM}}(R92S\_TXDW0\_PKTLEN, mlen));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03330}03330                 memcpy(\&txd[1], buf, mlen);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03331}03331                 data-\/>buflen = \textcolor{keyword}{sizeof}(*txd) + mlen;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03332}03332                 \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a038e3dcd0fb5266c1184770947cceaab}{RSU\_DEBUG\_TX}} | \mbox{\hyperlink{if__rsu_8c_a0d95e435d48d69eb1acb08278b237da9}{RSU\_DEBUG\_FW}} | \mbox{\hyperlink{if__rsu_8c_a09a67fdd4c21366cb6b0691e667fdce6}{RSU\_DEBUG\_RESET}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03333}03333                     \textcolor{stringliteral}{"{}\%s: starting transfer \%p\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03334}03334                     \_\_func\_\_, data);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03335}03335                 STAILQ\_INSERT\_TAIL(\&sc-\/>sc\_tx\_pending[which], data, \mbox{\hyperlink{ehci_8h_a37d1073c5e1d321bdce7cddeaf65a02f}{next}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03336}03336                 buf += mlen;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03337}03337                 \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} -\/= mlen;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03338}03338         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03339}03339         \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structrsu__softc_abbd456b3b6c1981a4daf906bb5f1299f}{sc\_xfer}}[which]);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03340}03340         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03341}03341 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03342}03342 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03343}\mbox{\hyperlink{if__rsu_8c_a80ab7a5b3fa1ae6e96d0e0b355eaca3a}{03343}} \mbox{\hyperlink{if__rsu_8c_a6d18a212a24a2041be89fc4079f13d53}{CTASSERT}}(\textcolor{keyword}{sizeof}(\textcolor{keywordtype}{size\_t}) >= \textcolor{keyword}{sizeof}(uint32\_t));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03344}03344 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03345}03345 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03346}\mbox{\hyperlink{if__rsu_8c_afa272cfbcdfc26213d494510c7f13cee}{03346}} \mbox{\hyperlink{if__rsu_8c_afa272cfbcdfc26213d494510c7f13cee}{rsu\_load\_firmware}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03347}03347 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03348}03348         \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structr92s__fw__hdr}{r92s\_fw\_hdr}} *hdr;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03349}03349         \textcolor{keyword}{struct }\mbox{\hyperlink{structr92s__fw__priv}{r92s\_fw\_priv}} dmem;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03350}03350         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structrsu__softc_a67bd1a5c6762d8cd8c5b7e7b5bdfddd6}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03351}03351         \textcolor{keyword}{const} uint8\_t *imem, *emem;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03352}03352         uint32\_t imemsz, ememsz;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03353}03353         \textcolor{keyword}{const} \textcolor{keyword}{struct }firmware *fw;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03354}03354         \textcolor{keywordtype}{size\_t} \mbox{\hyperlink{if__axge_8c_ae5dc6ffcd9b7605c7787791e40cc6bb0}{size}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03355}03355         uint32\_t \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03356}03356         \textcolor{keywordtype}{int} ntries, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03357}03357 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03358}03358         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a030b6fcb9462afa3ec87f594715f94c6}{R92S\_TCR}}) \& \mbox{\hyperlink{if__rsureg_8h_a191c47d531c0ea1dd0977a3f1c61a037}{R92S\_TCR\_FWRDY}}) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03359}03359                 \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_ac1122c0f4f785bdbad53926f38201847}{RSU\_DEBUG\_ANY}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03360}03360                     \textcolor{stringliteral}{"{}\%s: Firmware already loaded\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03361}03361                     \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03362}03362                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03363}03363         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03364}03364 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03365}03365         \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03366}03366         \textcolor{comment}{/* Read firmware image from the filesystem. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03367}03367         \textcolor{keywordflow}{if} ((fw = firmware\_get(\textcolor{stringliteral}{"{}rsu-\/rtl8712fw"{}})) == NULL) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03368}03368                 device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}}, }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03369}03369                     \textcolor{stringliteral}{"{}\%s: failed load firmware of file rsu-\/rtl8712fw\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03370}03370                     \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03371}03371                 \mbox{\hyperlink{if__rsureg_8h_a48532232b39d8fa728a8a10df1d3f4b7}{RSU\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03372}03372                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03373}03373         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03374}03374         \mbox{\hyperlink{if__rsureg_8h_a48532232b39d8fa728a8a10df1d3f4b7}{RSU\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03375}03375         \mbox{\hyperlink{if__axge_8c_ae5dc6ffcd9b7605c7787791e40cc6bb0}{size}} = fw-\/>datasize;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03376}03376         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__axge_8c_ae5dc6ffcd9b7605c7787791e40cc6bb0}{size}} < \textcolor{keyword}{sizeof}(*hdr)) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03377}03377                 device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}}, \textcolor{stringliteral}{"{}firmware too short\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03378}03378                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = EINVAL;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03379}03379                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03380}03380         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03381}03381         hdr = (\textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structr92s__fw__hdr}{r92s\_fw\_hdr}} *)fw-\/>data;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03382}03382         if (hdr-\/>\mbox{\hyperlink{structr92s__fw__hdr_a7a82873043cdbfbb16239a40027ccb1c}{signature}} != htole16(0x8712) \&\&}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03383}03383             hdr-\/>\mbox{\hyperlink{structr92s__fw__hdr_a7a82873043cdbfbb16239a40027ccb1c}{signature}} != htole16(0x8192)) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03384}03384                 device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03385}03385                     \textcolor{stringliteral}{"{}invalid firmware signature 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03386}03386                     le16toh(hdr-\/>\mbox{\hyperlink{structr92s__fw__hdr_a7a82873043cdbfbb16239a40027ccb1c}{signature}}));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03387}03387                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = EINVAL;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03388}03388                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03389}03389         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03390}03390         \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a0d95e435d48d69eb1acb08278b237da9}{RSU\_DEBUG\_FW}}, \textcolor{stringliteral}{"{}FW V\%d \%02x-\/\%02x \%02x:\%02x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03391}03391             le16toh(hdr-\/>\mbox{\hyperlink{structr92s__fw__hdr_a2fc11ce943b4c7b22513208099ef6b40}{version}}), hdr-\/>\mbox{\hyperlink{structr92s__fw__hdr_a6181f13818796ff4b0317dc90d184d8d}{month}}, hdr-\/>\mbox{\hyperlink{structr92s__fw__hdr_a45b6f7a6e50cf1d3b6cc70d42e5a327d}{day}}, hdr-\/>\mbox{\hyperlink{structr92s__fw__hdr_a4d91d15a839658fbae148fdf903b75db}{hour}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03392}03392             hdr-\/>\mbox{\hyperlink{structr92s__fw__hdr_a372e71de55eb08ad8ffb54d342283764}{minute}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03393}03393 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03394}03394         \textcolor{comment}{/* Make sure that driver and firmware are in sync. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03395}03395         \textcolor{keywordflow}{if} (hdr-\/>\mbox{\hyperlink{structr92s__fw__hdr_a201ccfbd4298a6bca055f654856292a4}{privsz}} != htole32(\textcolor{keyword}{sizeof}(dmem))) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03396}03396                 device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}}, \textcolor{stringliteral}{"{}unsupported firmware image\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03397}03397                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = EINVAL;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03398}03398                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03399}03399         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03400}03400         \textcolor{comment}{/* Get FW sections sizes. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03401}03401         \mbox{\hyperlink{structr92s__fw__hdr_a44a14880e226705815a26f9b4a5501a1}{imemsz}} = le32toh(hdr-\/>\mbox{\hyperlink{structr92s__fw__hdr_a44a14880e226705815a26f9b4a5501a1}{imemsz}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03402}03402         ememsz = le32toh(hdr-\/>\mbox{\hyperlink{structr92s__fw__hdr_ab4f60fa5c05e37df37a8d42618b8d1ae}{sramsz}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03403}03403         \textcolor{comment}{/* Check that all FW sections fit in image. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03404}03404         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structr92s__fw__hdr_a44a14880e226705815a26f9b4a5501a1}{imemsz}} > (\textcolor{keywordtype}{size\_t})(\mbox{\hyperlink{if__axge_8c_ae5dc6ffcd9b7605c7787791e40cc6bb0}{size}} -\/ \textcolor{keyword}{sizeof}(*hdr)) ||}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03405}03405             ememsz > (\textcolor{keywordtype}{size\_t})(\mbox{\hyperlink{if__axge_8c_ae5dc6ffcd9b7605c7787791e40cc6bb0}{size}} -\/ \textcolor{keyword}{sizeof}(*hdr) -\/ \mbox{\hyperlink{structr92s__fw__hdr_a44a14880e226705815a26f9b4a5501a1}{imemsz}})) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03406}03406                 device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}}, \textcolor{stringliteral}{"{}firmware too short\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03407}03407                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = EINVAL;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03408}03408                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03409}03409         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03410}03410         imem = (\textcolor{keyword}{const} uint8\_t *)\&hdr[1];}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03411}03411         emem = imem + \mbox{\hyperlink{structr92s__fw__hdr_a44a14880e226705815a26f9b4a5501a1}{imemsz}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03412}03412 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03413}03413         \textcolor{comment}{/* Load IMEM section. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03414}03414         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__rsu_8c_ab16fd84d8c0da354a6ee1b7ad9ca361e}{rsu\_fw\_loadsection}}(sc, imem, \mbox{\hyperlink{structr92s__fw__hdr_a44a14880e226705815a26f9b4a5501a1}{imemsz}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03415}03415         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != 0) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03416}03416                 device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03417}03417                     \textcolor{stringliteral}{"{}could not load firmware section \%s\(\backslash\)n"{}}, \textcolor{stringliteral}{"{}IMEM"{}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03418}03418                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03419}03419         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03420}03420         \textcolor{comment}{/* Wait for load to complete. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03421}03421         \textcolor{keywordflow}{for} (ntries = 0; ntries != 50; ntries++) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03422}03422                 \mbox{\hyperlink{if__rsu_8c_aa090b4eb974d6bb02fde866094f25bd0}{rsu\_ms\_delay}}(sc, 10);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03423}03423                 \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} = \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a030b6fcb9462afa3ec87f594715f94c6}{R92S\_TCR}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03424}03424                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} \& \mbox{\hyperlink{if__rsureg_8h_a5f8e5e299bf7ceb281c79c1447ea0578}{R92S\_TCR\_IMEM\_CODE\_DONE}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03425}03425                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03426}03426         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03427}03427         \textcolor{keywordflow}{if} (ntries == 50) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03428}03428                 device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}}, \textcolor{stringliteral}{"{}timeout waiting for IMEM transfer\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03429}03429                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = ETIMEDOUT;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03430}03430                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03431}03431         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03432}03432         \textcolor{comment}{/* Load EMEM section. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03433}03433         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__rsu_8c_ab16fd84d8c0da354a6ee1b7ad9ca361e}{rsu\_fw\_loadsection}}(sc, emem, ememsz);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03434}03434         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != 0) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03435}03435                 device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03436}03436                     \textcolor{stringliteral}{"{}could not load firmware section \%s\(\backslash\)n"{}}, \textcolor{stringliteral}{"{}EMEM"{}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03437}03437                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03438}03438         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03439}03439         \textcolor{comment}{/* Wait for load to complete. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03440}03440         \textcolor{keywordflow}{for} (ntries = 0; ntries != 50; ntries++) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03441}03441                 \mbox{\hyperlink{if__rsu_8c_aa090b4eb974d6bb02fde866094f25bd0}{rsu\_ms\_delay}}(sc, 10);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03442}03442                 \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} = \mbox{\hyperlink{if__rsu_8c_ae642a30fa954c7978f0ff24859d7a7a9}{rsu\_read\_2}}(sc, \mbox{\hyperlink{if__rsureg_8h_a030b6fcb9462afa3ec87f594715f94c6}{R92S\_TCR}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03443}03443                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} \& \mbox{\hyperlink{if__rsureg_8h_a4fb78115a8335105799ac48a702dad77}{R92S\_TCR\_EMEM\_CODE\_DONE}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03444}03444                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03445}03445         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03446}03446         \textcolor{keywordflow}{if} (ntries == 50) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03447}03447                 device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}}, \textcolor{stringliteral}{"{}timeout waiting for EMEM transfer\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03448}03448                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = ETIMEDOUT;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03449}03449                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03450}03450         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03451}03451         \textcolor{comment}{/* Enable CPU. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03452}03452         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a58d76dc6b2f8e3ede9d40b80ced5e299}{R92S\_SYS\_CLKR}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03453}03453             \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a58d76dc6b2f8e3ede9d40b80ced5e299}{R92S\_SYS\_CLKR}}) | \mbox{\hyperlink{if__rsureg_8h_a79b371a0a6c69b8a540ecf8a4623b246}{R92S\_SYS\_CPU\_CLKSEL}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03454}03454         \textcolor{keywordflow}{if} (!(\mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a58d76dc6b2f8e3ede9d40b80ced5e299}{R92S\_SYS\_CLKR}}) \& \mbox{\hyperlink{if__rsureg_8h_a79b371a0a6c69b8a540ecf8a4623b246}{R92S\_SYS\_CPU\_CLKSEL}})) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03455}03455                 device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}}, \textcolor{stringliteral}{"{}could not enable system clock\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03456}03456                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = EIO;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03457}03457                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03458}03458         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03459}03459         \mbox{\hyperlink{if__rsu_8c_adfff5565daadbabd674ba3dd1e7a48bc}{rsu\_write\_2}}(sc, \mbox{\hyperlink{if__rsureg_8h_a597ac85465186f6dcb2dadf03ee6d0f5}{R92S\_SYS\_FUNC\_EN}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03460}03460             \mbox{\hyperlink{if__rsu_8c_ae642a30fa954c7978f0ff24859d7a7a9}{rsu\_read\_2}}(sc, \mbox{\hyperlink{if__rsureg_8h_a597ac85465186f6dcb2dadf03ee6d0f5}{R92S\_SYS\_FUNC\_EN}}) | \mbox{\hyperlink{if__rsureg_8h_abe63f5fa5ce60f9c81c27bdaf69c53da}{R92S\_FEN\_CPUEN}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03461}03461         \textcolor{keywordflow}{if} (!(\mbox{\hyperlink{if__rsu_8c_ae642a30fa954c7978f0ff24859d7a7a9}{rsu\_read\_2}}(sc, \mbox{\hyperlink{if__rsureg_8h_a597ac85465186f6dcb2dadf03ee6d0f5}{R92S\_SYS\_FUNC\_EN}}) \& \mbox{\hyperlink{if__rsureg_8h_abe63f5fa5ce60f9c81c27bdaf69c53da}{R92S\_FEN\_CPUEN}})) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03462}03462                 device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}}, }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03463}03463                     \textcolor{stringliteral}{"{}could not enable microcontroller\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03464}03464                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = EIO;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03465}03465                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03466}03466         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03467}03467         \textcolor{comment}{/* Wait for CPU to initialize. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03468}03468         \textcolor{keywordflow}{for} (ntries = 0; ntries < 100; ntries++) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03469}03469                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a030b6fcb9462afa3ec87f594715f94c6}{R92S\_TCR}}) \& \mbox{\hyperlink{if__rsureg_8h_a5db996781e9e3a93da1c7b4f1e491806}{R92S\_TCR\_IMEM\_RDY}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03470}03470                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03471}03471                 \mbox{\hyperlink{if__rsu_8c_aa090b4eb974d6bb02fde866094f25bd0}{rsu\_ms\_delay}}(sc, 1);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03472}03472         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03473}03473         \textcolor{keywordflow}{if} (ntries == 100) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03474}03474                 device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03475}03475                     \textcolor{stringliteral}{"{}timeout waiting for microcontroller\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03476}03476                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = ETIMEDOUT;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03477}03477                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03478}03478         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03479}03479 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03480}03480         \textcolor{comment}{/* Update DMEM section before loading. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03481}03481         memset(\&dmem, 0, \textcolor{keyword}{sizeof}(dmem));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03482}03482         dmem.\mbox{\hyperlink{structr92s__fw__priv_a0fd0c1962cccd546d84d0c95ee665b8f}{hci\_sel}} = \mbox{\hyperlink{if__rsureg_8h_ad3c09da7973e6de5072dcc09d87b494d}{R92S\_HCI\_SEL\_USB}} | \mbox{\hyperlink{if__rsureg_8h_a32a9e1473ba43e57e6bb7d4bf5b6f9a0}{R92S\_HCI\_SEL\_8172}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03483}03483         dmem.\mbox{\hyperlink{structr92s__fw__priv_abd5507a307d9e2fd2eff909d7e8967a6}{nendpoints}} = sc-\/>\mbox{\hyperlink{structrsu__softc_aeb6b6402333a29aed72b9a47578cc353}{sc\_nendpoints}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03484}03484         dmem.\mbox{\hyperlink{structr92s__fw__priv_a46bba8d524832e326823d7f85e142995}{chip\_version}} = sc-\/>\mbox{\hyperlink{structrsu__softc_a46fd0bb3463eca5432ecda267c45f114}{cut}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03485}03485         dmem.\mbox{\hyperlink{structr92s__fw__priv_a0126b74621801e84322f361aa3eb7dc0}{rf\_config}} = sc-\/>\mbox{\hyperlink{structrsu__softc_ae27cdc914356cf0e5553d1bf9d465d11}{sc\_rftype}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03486}03486         dmem.\mbox{\hyperlink{structr92s__fw__priv_a039a7b38ccac684dbd087ac0822a0d4d}{vcs\_type}} = \mbox{\hyperlink{if__rsureg_8h_a308e38825b59ce782d2bf47e9bc85243}{R92S\_VCS\_TYPE\_AUTO}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03487}03487         dmem.\mbox{\hyperlink{structr92s__fw__priv_a97a9803adb6b826af84f54069bbd6a71}{vcs\_mode}} = \mbox{\hyperlink{if__rsureg_8h_a65ee9e2f2c158dd948648b1cdbc5246b}{R92S\_VCS\_MODE\_RTS\_CTS}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03488}03488         dmem.\mbox{\hyperlink{structr92s__fw__priv_a0b6b8fe667ff3474d313700a01556c0a}{turbo\_mode}} = 0;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03489}03489         dmem.\mbox{\hyperlink{structr92s__fw__priv_aa1047a04a1147d3278558b5c1113f4cb}{bw40\_en}} = !! (ic-\/>ic\_htcaps \& IEEE80211\_HTCAP\_CHWIDTH40);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03490}03490         dmem.\mbox{\hyperlink{structr92s__fw__priv_a7ebd0ae08ff2e2f2e6fe8ad6e5b71341}{amsdu2ampdu\_en}} = !! (sc-\/>\mbox{\hyperlink{structrsu__softc_adeb512b5ce2a80d816b6879fbb0a1ae7}{sc\_ht}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03491}03491         dmem.\mbox{\hyperlink{structr92s__fw__priv_a3ffc35a1e36abce0c631d843fd80b72a}{ampdu\_en}} = !! (sc-\/>\mbox{\hyperlink{structrsu__softc_adeb512b5ce2a80d816b6879fbb0a1ae7}{sc\_ht}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03492}03492         dmem.\mbox{\hyperlink{structr92s__fw__priv_aeb1806f9d9650c7d16ec3ddc722f3f7f}{agg\_offload}} = !! (sc-\/>\mbox{\hyperlink{structrsu__softc_adeb512b5ce2a80d816b6879fbb0a1ae7}{sc\_ht}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03493}03493         dmem.\mbox{\hyperlink{structr92s__fw__priv_a976a1db994e31441ac07708fe00e9186}{qos\_en}} = 1;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03494}03494         dmem.\mbox{\hyperlink{structr92s__fw__priv_a783d2ae4d60bbd98878b6246a3c5b5c2}{ps\_offload}} = 1;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03495}03495         dmem.\mbox{\hyperlink{structr92s__fw__priv_a672acd098bd00f753bc62c06c2b672dd}{lowpower\_mode}} = 1;    \textcolor{comment}{/* XXX TODO: configurable? */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03496}03496         \textcolor{comment}{/* Load DMEM section. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03497}03497         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__rsu_8c_ab16fd84d8c0da354a6ee1b7ad9ca361e}{rsu\_fw\_loadsection}}(sc, (uint8\_t *)\&dmem, \textcolor{keyword}{sizeof}(dmem));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03498}03498         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != 0) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03499}03499                 device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03500}03500                     \textcolor{stringliteral}{"{}could not load firmware section \%s\(\backslash\)n"{}}, \textcolor{stringliteral}{"{}DMEM"{}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03501}03501                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03502}03502         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03503}03503         \textcolor{comment}{/* Wait for load to complete. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03504}03504         \textcolor{keywordflow}{for} (ntries = 0; ntries < 100; ntries++) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03505}03505                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a030b6fcb9462afa3ec87f594715f94c6}{R92S\_TCR}}) \& \mbox{\hyperlink{if__rsureg_8h_a12bad14fc71ee2e934c616649a2ebef1}{R92S\_TCR\_DMEM\_CODE\_DONE}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03506}03506                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03507}03507                 \mbox{\hyperlink{if__rsu_8c_aa090b4eb974d6bb02fde866094f25bd0}{rsu\_ms\_delay}}(sc, 1);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03508}03508         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03509}03509         \textcolor{keywordflow}{if} (ntries == 100) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03510}03510                 device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}}, \textcolor{stringliteral}{"{}timeout waiting for \%s transfer\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03511}03511                     \textcolor{stringliteral}{"{}DMEM"{}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03512}03512                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = ETIMEDOUT;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03513}03513                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03514}03514         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03515}03515         \textcolor{comment}{/* Wait for firmware readiness. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03516}03516         \textcolor{keywordflow}{for} (ntries = 0; ntries < 60; ntries++) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03517}03517                 \textcolor{keywordflow}{if} (!(\mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a030b6fcb9462afa3ec87f594715f94c6}{R92S\_TCR}}) \& \mbox{\hyperlink{if__rsureg_8h_a191c47d531c0ea1dd0977a3f1c61a037}{R92S\_TCR\_FWRDY}}))}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03518}03518                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03519}03519                 \mbox{\hyperlink{if__rsu_8c_aa090b4eb974d6bb02fde866094f25bd0}{rsu\_ms\_delay}}(sc, 1);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03520}03520         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03521}03521         \textcolor{keywordflow}{if} (ntries == 60) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03522}03522                 device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}}, }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03523}03523                     \textcolor{stringliteral}{"{}timeout waiting for firmware readiness\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03524}03524                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = ETIMEDOUT;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03525}03525                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03526}03526         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03527}03527  \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}}:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03528}03528         firmware\_put(fw, FIRMWARE\_UNLOAD);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03529}03529         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03530}03530 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03531}03531 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03532}03532 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03533}\mbox{\hyperlink{if__rsu_8c_a72e18450413b0ba0481f6e880c4d8120}{03533}} \mbox{\hyperlink{if__rsu_8c_a72e18450413b0ba0481f6e880c4d8120}{rsu\_raw\_xmit}}(\textcolor{keyword}{struct} ieee80211\_node *ni, \textcolor{keyword}{struct} mbuf *m, }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03534}03534     \textcolor{keyword}{const} \textcolor{keyword}{struct} ieee80211\_bpf\_params *params)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03535}03535 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03536}03536         \textcolor{keyword}{struct }ieee80211com *ic = ni-\/>ni\_ic;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03537}03537         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03538}03538         \textcolor{keyword}{struct }\mbox{\hyperlink{structrsu__data}{rsu\_data}} *bf;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03539}03539 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03540}03540         \textcolor{comment}{/* prevent management frames from being sent if we're not ready */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03541}03541         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>\mbox{\hyperlink{structrsu__softc_acc01333e62919e38b1a73ac8c96b1f3f}{sc\_running}}) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03542}03542                 m\_freem(\mbox{\hyperlink{structrsu__data_aa3e17352ec826033534a59855aa2b846}{m}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03543}03543                 \textcolor{keywordflow}{return} (ENETDOWN);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03544}03544         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03545}03545         \mbox{\hyperlink{if__rsureg_8h_a48532232b39d8fa728a8a10df1d3f4b7}{RSU\_LOCK}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03546}03546         bf = \mbox{\hyperlink{if__rsu_8c_a13eb301a8bdf61624acff9e3b4e4c1c4}{rsu\_getbuf}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03547}03547         \textcolor{keywordflow}{if} (bf == NULL) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03548}03548                 m\_freem(\mbox{\hyperlink{structrsu__data_aa3e17352ec826033534a59855aa2b846}{m}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03549}03549                 \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03550}03550                 \textcolor{keywordflow}{return} (ENOBUFS);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03551}03551         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03552}03552         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__rsu_8c_ae979138a473dcb59902b06b5c05d27b1}{rsu\_tx\_start}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, \mbox{\hyperlink{structrsu__data_a3df504f5581b55d2215359aaabfc049e}{ni}}, \mbox{\hyperlink{structrsu__data_aa3e17352ec826033534a59855aa2b846}{m}}, bf) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03553}03553                 m\_freem(\mbox{\hyperlink{structrsu__data_aa3e17352ec826033534a59855aa2b846}{m}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03554}03554                 \mbox{\hyperlink{if__rsu_8c_a74136760c03cfc36cda9847b7e8dde65}{rsu\_freebuf}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, bf);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03555}03555                 \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03556}03556                 \textcolor{keywordflow}{return} (EIO);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03557}03557         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03558}03558         \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03559}03559 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03560}03560         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03561}03561 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03562}03562 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03563}03563 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03564}\mbox{\hyperlink{if__rsu_8c_a7188069abd08b4369b09832181ea6646}{03564}} \mbox{\hyperlink{if__rsu_8c_a7188069abd08b4369b09832181ea6646}{rsu\_rxfilter\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03565}03565 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03566}03566         uint32\_t \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03567}03567 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03568}03568         \mbox{\hyperlink{if__rsureg_8h_aced96ac92d4bb829407616864037ea8d}{RSU\_ASSERT\_LOCKED}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03569}03569 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03570}03570         \textcolor{comment}{/* Setup multicast filter. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03571}03571         \mbox{\hyperlink{if__rsu_8c_ae2ba5c5cc9b037a2b4f1b75f47b0d95e}{rsu\_set\_multi}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03572}03572 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03573}03573         \textcolor{comment}{/* Adjust Rx filter. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03574}03574         \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} = \mbox{\hyperlink{if__rsu_8c_a1741f47255e3a970e39706ca00fa428b}{rsu\_read\_4}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, \mbox{\hyperlink{if__rsureg_8h_aaac74ceb56c127adf30c7ea756a888dc}{R92S\_RCR}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03575}03575         \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} \&= \string~R92S\_RCR\_AICV;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03576}03576         \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} |= \mbox{\hyperlink{if__rsureg_8h_a9c78ec742df78446a1cd4b849442e1c7}{R92S\_RCR\_APP\_PHYSTS}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03577}03577         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}-\/>\mbox{\hyperlink{structrsu__softc_a705cf55f151f9f1f313d586f44f2102c}{sc\_rx\_checksum\_enable}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03578}03578                 \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} |= \mbox{\hyperlink{if__rsureg_8h_a9c56589f349f800fc19894c849883b2f}{R92S\_RCR\_TCP\_OFFLD\_EN}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03579}03579         \mbox{\hyperlink{if__rsu_8c_abf65ff90f534d06c7131e43ace2e7d5e}{rsu\_write\_4}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, \mbox{\hyperlink{if__rsureg_8h_aaac74ceb56c127adf30c7ea756a888dc}{R92S\_RCR}}, \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03580}03580 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03581}03581         \textcolor{comment}{/* Update dynamic Rx filter parts. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03582}03582         \mbox{\hyperlink{if__rsu_8c_a65b8dc2360a4af15d1124903842049d5}{rsu\_rxfilter\_refresh}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03583}03583 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03584}03584 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03585}03585 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03586}\mbox{\hyperlink{if__rsu_8c_a66f3ada15e742a73ccd37c2aa36b6f12}{03586}} \mbox{\hyperlink{if__rsu_8c_a66f3ada15e742a73ccd37c2aa36b6f12}{rsu\_rxfilter\_set}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, uint32\_t clear, uint32\_t set)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03587}03587 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03588}03588         \textcolor{comment}{/* NB: firmware can touch this register too. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03589}03589         \mbox{\hyperlink{if__rsu_8c_abf65ff90f534d06c7131e43ace2e7d5e}{rsu\_write\_4}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, \mbox{\hyperlink{if__rsureg_8h_aaac74ceb56c127adf30c7ea756a888dc}{R92S\_RCR}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03590}03590            (\mbox{\hyperlink{if__rsu_8c_a1741f47255e3a970e39706ca00fa428b}{rsu\_read\_4}}(\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}}, \mbox{\hyperlink{if__rsureg_8h_aaac74ceb56c127adf30c7ea756a888dc}{R92S\_RCR}}) \& \string~clear) | set);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03591}03591 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03592}03592 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03593}03593 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03594}\mbox{\hyperlink{if__rsu_8c_a65b8dc2360a4af15d1124903842049d5}{03594}} \mbox{\hyperlink{if__rsu_8c_a65b8dc2360a4af15d1124903842049d5}{rsu\_rxfilter\_refresh}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *\mbox{\hyperlink{structrsu__data_a3adf627c1832c2ceac9baf9cab84870d}{sc}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03595}03595 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03596}03596         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structrsu__softc_a67bd1a5c6762d8cd8c5b7e7b5bdfddd6}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03597}03597         uint32\_t mask\_all, mask\_min;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03598}03598 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03599}03599         \mbox{\hyperlink{if__rsureg_8h_aced96ac92d4bb829407616864037ea8d}{RSU\_ASSERT\_LOCKED}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03600}03600 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03601}03601         \textcolor{comment}{/* NB: RCR\_AMF / RXFLTMAP\_MGT are used by firmware. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03602}03602         mask\_all = \mbox{\hyperlink{if__rsureg_8h_a6604115fae7d54ff7c7137e3f224d97d}{R92S\_RCR\_ACF}} | \mbox{\hyperlink{if__rsureg_8h_a4aba01df92e1873ff46bfa29a28e1663}{R92S\_RCR\_AAP}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03603}03603         mask\_min = \mbox{\hyperlink{if__rsureg_8h_a56a92f27da0254fc20b4eca60f10a7f5}{R92S\_RCR\_APM}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03604}03604         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrsu__softc_a843fbf0b92e8ba1878bb8e9cd84fd05f}{sc\_vap\_is\_running}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03605}03605                 mask\_min |= \mbox{\hyperlink{if__rsureg_8h_a853cb7a84e1d686815302a505d44bb93}{R92S\_RCR\_CBSSID}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03606}03606         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03607}03607                 mask\_all |= \mbox{\hyperlink{if__rsureg_8h_a615b77f73a9e561ae5b75858c4c28aff}{R92S\_RCR\_ADF}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03608}03608 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03609}03609         \textcolor{keywordflow}{if} (ic-\/>ic\_opmode == IEEE80211\_M\_MONITOR) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03610}03610                 uint16\_t rxfltmap;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03611}03611                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrsu__softc_a843fbf0b92e8ba1878bb8e9cd84fd05f}{sc\_vap\_is\_running}})}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03612}03612                         rxfltmap = 0;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03613}03613                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03614}03614                         rxfltmap = \mbox{\hyperlink{if__rsureg_8h_ac538cc4bc0d92b32d62e1ecc5adb9f18}{R92S\_RXFLTMAP\_MGT\_DEF}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03615}03615                 \mbox{\hyperlink{if__rsu_8c_adfff5565daadbabd674ba3dd1e7a48bc}{rsu\_write\_2}}(sc, \mbox{\hyperlink{if__rsureg_8h_ae5d4614c186d18ce25a4d72414b261a3}{R92S\_RXFLTMAP\_MGT}}, rxfltmap);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03616}03616         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03617}03617 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03618}03618         \textcolor{keywordflow}{if} (ic-\/>ic\_promisc == 0 \&\& ic-\/>ic\_opmode != IEEE80211\_M\_MONITOR)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03619}03619                 \mbox{\hyperlink{if__rsu_8c_a66f3ada15e742a73ccd37c2aa36b6f12}{rsu\_rxfilter\_set}}(sc, mask\_all, mask\_min);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03620}03620         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03621}03621                 \mbox{\hyperlink{if__rsu_8c_a66f3ada15e742a73ccd37c2aa36b6f12}{rsu\_rxfilter\_set}}(sc, mask\_min, mask\_all);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03622}03622 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03623}03623 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03624}03624 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03625}\mbox{\hyperlink{if__rsu_8c_a944f30e40fb2481d7b7a0cbd53c33648}{03625}} \mbox{\hyperlink{if__rsu_8c_a944f30e40fb2481d7b7a0cbd53c33648}{rsu\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03626}03626 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03627}03627         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structrsu__softc_a67bd1a5c6762d8cd8c5b7e7b5bdfddd6}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03628}03628         \textcolor{keyword}{struct }ieee80211vap *vap = TAILQ\_FIRST(\&ic-\/>ic\_vaps);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03629}03629         uint8\_t macaddr[IEEE80211\_ADDR\_LEN];}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03630}03630         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03631}03631         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03632}03632 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03633}03633         \mbox{\hyperlink{if__rsureg_8h_a48532232b39d8fa728a8a10df1d3f4b7}{RSU\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03634}03634 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03635}03635         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrsu__softc_acc01333e62919e38b1a73ac8c96b1f3f}{sc\_running}}) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03636}03636                 \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03637}03637                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03638}03638         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03639}03639 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03640}03640         \textcolor{comment}{/* Ensure the mbuf queue is drained */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03641}03641         \mbox{\hyperlink{if__rsu_8c_aedb648c120c64a1aa04b3efc4e7863b7}{rsu\_drain\_mbufq}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03642}03642 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03643}03643         \textcolor{comment}{/* Reset power management state. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03644}03644         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_ae3e18d0ae2bc58622c2e36a12a17d370}{R92S\_USB\_HRPWM}}, 0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03645}03645 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03646}03646         \textcolor{comment}{/* Power on adapter. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03647}03647         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrsu__softc_a46fd0bb3463eca5432ecda267c45f114}{cut}} == 1)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03648}03648                 \mbox{\hyperlink{if__rsu_8c_ac3ff7c07385d5399abef9640c17d5de3}{rsu\_power\_on\_acut}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03649}03649         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03650}03650                 \mbox{\hyperlink{if__rsu_8c_aea38aa95de49291b237ff757bd89b68a}{rsu\_power\_on\_bcut}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03651}03651 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03652}03652         \textcolor{comment}{/* Load firmware. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03653}03653         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__rsu_8c_afa272cfbcdfc26213d494510c7f13cee}{rsu\_load\_firmware}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03654}03654         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != 0)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03655}03655                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03656}03656 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03657}03657         \mbox{\hyperlink{if__rsu_8c_abf65ff90f534d06c7131e43ace2e7d5e}{rsu\_write\_4}}(sc, \mbox{\hyperlink{if__rsureg_8h_a1f5b1389307fdf9fac28da2faf41fe58}{R92S\_CR}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03658}03658             \mbox{\hyperlink{if__rsu_8c_a1741f47255e3a970e39706ca00fa428b}{rsu\_read\_4}}(sc, \mbox{\hyperlink{if__rsureg_8h_a1f5b1389307fdf9fac28da2faf41fe58}{R92S\_CR}}) \& \string~0xff000000);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03659}03659 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03660}03660         \textcolor{comment}{/* Use 128 bytes pages. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03661}03661         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, 0x00b5,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03662}03662             \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, 0x00b5) | 0x01);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03663}03663         \textcolor{comment}{/* Enable USB Rx aggregation. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03664}03664         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, 0x00bd,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03665}03665             \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, 0x00bd) | 0x80);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03666}03666         \textcolor{comment}{/* Set USB Rx aggregation threshold. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03667}03667         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, 0x00d9, 0x01);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03668}03668         \textcolor{comment}{/* Set USB Rx aggregation timeout (1.7ms/4). */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03669}03669         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, 0xfe5b, 0x04);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03670}03670         \textcolor{comment}{/* Fix USB Rx FIFO issue. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03671}03671         \mbox{\hyperlink{if__rsu_8c_a2bdea37275029d587f74e6f1910bcc72}{rsu\_write\_1}}(sc, 0xfe5c,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03672}03672             \mbox{\hyperlink{if__rsu_8c_ad936f046368e1c8433d83fc497659a86}{rsu\_read\_1}}(sc, 0xfe5c) | 0x80);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03673}03673 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03674}03674         \textcolor{comment}{/* Set MAC address. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03675}03675         IEEE80211\_ADDR\_COPY(macaddr, vap ? vap-\/>iv\_myaddr : ic-\/>ic\_macaddr);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03676}03676         \mbox{\hyperlink{if__rsu_8c_a023000c2a50143efcf337d36caee9245}{rsu\_write\_region\_1}}(sc, \mbox{\hyperlink{if__rsureg_8h_a6e8b47678ceae0ceff08b73f16005568}{R92S\_MACID}}, macaddr, IEEE80211\_ADDR\_LEN);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03677}03677 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03678}03678         \textcolor{comment}{/* It really takes 1.5 seconds for the firmware to boot: */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03679}03679         \mbox{\hyperlink{usb__util_8c_a7ad9fc3660f5ecf96d72e499cdfeb963}{usb\_pause\_mtx}}(\&sc-\/>\mbox{\hyperlink{structrsu__softc_a9e08138256e5159028935ade723bcf50}{sc\_mtx}}, \mbox{\hyperlink{usbdi_8h_a9715d25e0db2e92bd86423a9283893b7}{USB\_MS\_TO\_TICKS}}(2000));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03680}03680 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03681}03681         \mbox{\hyperlink{if__rsu_8c_a2994993df41f3d867c671649fc21c4e4}{RSU\_DPRINTF}}(sc, \mbox{\hyperlink{if__rsu_8c_a09a67fdd4c21366cb6b0691e667fdce6}{RSU\_DEBUG\_RESET}}, \textcolor{stringliteral}{"{}\%s: setting MAC address to \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03682}03682             \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03683}03683             ether\_sprintf(macaddr));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03684}03684         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__rsu_8c_a4ec7d2ccf04c77a70f082a7905f2fca3}{rsu\_fw\_cmd}}(sc, \mbox{\hyperlink{if__rsureg_8h_a3ba4be4e136f8673082e651e7c585962}{R92S\_CMD\_SET\_MAC\_ADDRESS}}, macaddr,}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03685}03685             IEEE80211\_ADDR\_LEN);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03686}03686         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != 0) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03687}03687                 device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}}, \textcolor{stringliteral}{"{}could not set MAC address\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03688}03688                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03689}03689         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03690}03690 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03691}03691         \textcolor{comment}{/* Initialize Rx filter. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03692}03692         \mbox{\hyperlink{if__rsu_8c_a7188069abd08b4369b09832181ea6646}{rsu\_rxfilter\_init}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03693}03693 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03694}03694         \textcolor{comment}{/* Set PS mode fully active */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03695}03695         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__rsu_8c_a2a4cc7791c269a4b05febcd3cd67668a}{rsu\_set\_fw\_power\_state}}(sc, \mbox{\hyperlink{if__rsu_8c_a0e7a4e52f74d34a282135ac947f4090b}{RSU\_PWR\_ACTIVE}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03696}03696         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != 0) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03697}03697                 device\_printf(sc-\/>\mbox{\hyperlink{structrsu__softc_a276fde08cb8796d6442f207ef28034dd}{sc\_dev}}, \textcolor{stringliteral}{"{}could not set PS mode\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03698}03698                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03699}03699         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03700}03700 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03701}03701         \textcolor{comment}{/* Install static keys (if any). */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03702}03702         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__rsu_8c_a323ce6c1d3dcd88e42c09dd8a8cb5dbd}{rsu\_reinit\_static\_keys}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03703}03703         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != 0)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03704}03704                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03705}03705 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03706}03706         sc-\/>\mbox{\hyperlink{structrsu__softc_a8617f7abbb42b202a3fdbcf5e599e3dc}{sc\_extra\_scan}} = 0;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03707}03707         \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structrsu__softc_abbd456b3b6c1981a4daf906bb5f1299f}{sc\_xfer}}[\mbox{\hyperlink{if__rsureg_8h_aea33efd5e2c69d615faad5c5965510aaa27135cb61a1d5a8fbaed8cda314248a7}{RSU\_BULK\_RX}}]);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03708}03708 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03709}03709         \textcolor{comment}{/* We're ready to go. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03710}03710         sc-\/>\mbox{\hyperlink{structrsu__softc_acc01333e62919e38b1a73ac8c96b1f3f}{sc\_running}} = 1;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03711}03711         \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03712}03712 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03713}03713         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03714}03714 \mbox{\hyperlink{if__runreg_8h_a041c8b8d78f50876bc74559cb40f00f4}{fail}}:}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03715}03715         \textcolor{comment}{/* Need to stop all failed transfers, if any */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03716}03716         \textcolor{keywordflow}{for} (i = 0; i != \mbox{\hyperlink{if__rsureg_8h_aea33efd5e2c69d615faad5c5965510aaacbc9816d2e5ae5145d511ee76a7c9f9d}{RSU\_N\_TRANSFER}}; i++)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03717}03717                 \mbox{\hyperlink{usb__transfer_8c_abe245d973df0cfd6fb96b884d33ebce3}{usbd\_transfer\_stop}}(sc-\/>\mbox{\hyperlink{structrsu__softc_abbd456b3b6c1981a4daf906bb5f1299f}{sc\_xfer}}[i]);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03718}03718         \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03719}03719 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03720}03720         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03721}03721 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03722}03722 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03723}03723 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03724}\mbox{\hyperlink{if__rsu_8c_a6ce5725f25752c6c05ce4459a640b08a}{03724}} \mbox{\hyperlink{if__rsu_8c_a6ce5725f25752c6c05ce4459a640b08a}{rsu\_stop}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03725}03725 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03726}03726         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03727}03727 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03728}03728         \mbox{\hyperlink{if__rsureg_8h_a48532232b39d8fa728a8a10df1d3f4b7}{RSU\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03729}03729         \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structrsu__softc_acc01333e62919e38b1a73ac8c96b1f3f}{sc\_running}}) \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03730}03730                 \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03731}03731                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03732}03732         \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03733}03733 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03734}03734         sc-\/>\mbox{\hyperlink{structrsu__softc_acc01333e62919e38b1a73ac8c96b1f3f}{sc\_running}} = 0;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03735}03735         sc-\/>\mbox{\hyperlink{structrsu__softc_a843fbf0b92e8ba1878bb8e9cd84fd05f}{sc\_vap\_is\_running}} = 0;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03736}03736         sc-\/>\mbox{\hyperlink{structrsu__softc_ad692f1cf99fa20f23d8cec471f2b7985}{sc\_calibrating}} = 0;}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03737}03737         taskqueue\_cancel\_timeout(taskqueue\_thread, \&sc-\/>\mbox{\hyperlink{structrsu__softc_a58bb50377ccc3066c3291d5b2bc404c8}{calib\_task}}, NULL);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03738}03738         taskqueue\_cancel(taskqueue\_thread, \&sc-\/>\mbox{\hyperlink{structrsu__softc_a7b88c0223e24c181020c79ce0cf54248}{tx\_task}}, NULL);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03739}03739 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03740}03740         \textcolor{comment}{/* Power off adapter. */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03741}03741         \mbox{\hyperlink{if__rsu_8c_a212f3ba335057c86bc2b9bd837bacfba}{rsu\_power\_off}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03742}03742 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03743}03743         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03744}03744 \textcolor{comment}{         * CAM is not accessible after shutdown;}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03745}03745 \textcolor{comment}{         * all entries are marked (by firmware?) as invalid.}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03746}03746 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03747}03747         memset(sc-\/>\mbox{\hyperlink{structrsu__softc_ad9fef301e5167d0d613a30e86ea6688f}{free\_keys\_bmap}}, 0, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structrsu__softc_ad9fef301e5167d0d613a30e86ea6688f}{free\_keys\_bmap}}));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03748}03748         memset(sc-\/>\mbox{\hyperlink{structrsu__softc_ab402f2a48c2ab749ccf123edde1d39f4}{keys\_bmap}}, 0, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structrsu__softc_ab402f2a48c2ab749ccf123edde1d39f4}{keys\_bmap}}));}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03749}03749 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03750}03750         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{if__rsureg_8h_aea33efd5e2c69d615faad5c5965510aaacbc9816d2e5ae5145d511ee76a7c9f9d}{RSU\_N\_TRANSFER}}; i++)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03751}03751                 \mbox{\hyperlink{usb__transfer_8c_abe245d973df0cfd6fb96b884d33ebce3}{usbd\_transfer\_stop}}(sc-\/>\mbox{\hyperlink{structrsu__softc_abbd456b3b6c1981a4daf906bb5f1299f}{sc\_xfer}}[i]);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03752}03752 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03753}03753         \textcolor{comment}{/* Ensure the mbuf queue is drained */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03754}03754         \mbox{\hyperlink{if__rsu_8c_aedb648c120c64a1aa04b3efc4e7863b7}{rsu\_drain\_mbufq}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03755}03755         \mbox{\hyperlink{if__rsureg_8h_ac70b0cee2df3707a60f7568353a4b9cb}{RSU\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03756}03756 \}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03757}03757 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03758}03758 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03759}03759 \textcolor{comment}{ * Note: usb\_pause\_mtx() actually releases the mutex before calling pause(),}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03760}03760 \textcolor{comment}{ * which breaks any kind of driver serialisation.}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03761}03761 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03762}03762 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03763}\mbox{\hyperlink{if__rsu_8c_aa090b4eb974d6bb02fde866094f25bd0}{03763}} \mbox{\hyperlink{if__rsu_8c_aa090b4eb974d6bb02fde866094f25bd0}{rsu\_ms\_delay}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrsu__softc}{rsu\_softc}} *sc, \textcolor{keywordtype}{int} ms)}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03764}03764 \{}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03765}03765 }
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03766}03766         \textcolor{comment}{//usb\_pause\_mtx(\&sc-\/>sc\_mtx, hz / 1000);}}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03767}03767         DELAY(ms * 1000);}
\DoxyCodeLine{\Hypertarget{if__rsu_8c_source_l03768}03768 \}}

\end{DoxyCode}
