\hypertarget{if__rtwn__beacon_8c_source}{}\doxysection{if\+\_\+rtwn\+\_\+beacon.\+c}
\label{if__rtwn__beacon_8c_source}\index{dev/rtwn/if\_rtwn\_beacon.c@{dev/rtwn/if\_rtwn\_beacon.c}}
\mbox{\hyperlink{if__rtwn__beacon_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00002}00002 \textcolor{comment}{ * Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00003}00003 \textcolor{comment}{ * Copyright (c) 2014 Kevin Lo <kevlo@FreeBSD.org>}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2015-\/2016 Andriy Voskoboinyk <avos@FreeBSD.org>}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00005}00005 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00006}00006 \textcolor{comment}{ * Permission to use, copy, modify, and distribute this software for any}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00007}00007 \textcolor{comment}{ * purpose with or without fee is hereby granted, provided that the above}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00008}00008 \textcolor{comment}{ * copyright notice and this permission notice appear in all copies.}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00009}00009 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00010}00010 \textcolor{comment}{ * THE SOFTWARE IS PROVIDED "{}AS IS"{} AND THE AUTHOR DISCLAIMS ALL WARRANTIES}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00011}00011 \textcolor{comment}{ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00012}00012 \textcolor{comment}{ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00013}00013 \textcolor{comment}{ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00014}00014 \textcolor{comment}{ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00015}00015 \textcolor{comment}{ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00016}00016 \textcolor{comment}{ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00017}00017 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00018}00018 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00019}00019 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00020}\mbox{\hyperlink{if__rtwn__beacon_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00020}} \mbox{\hyperlink{if__rtwn__beacon_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00021}00021 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00022}00022 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00023}00023 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00024}00024 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00025}00025 \textcolor{preprocessor}{\#include <sys/mbuf.h>}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00026}00026 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00027}00027 \textcolor{preprocessor}{\#include <sys/socket.h>}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00028}00028 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00029}00029 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00030}00030 \textcolor{preprocessor}{\#include <sys/queue.h>}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00031}00031 \textcolor{preprocessor}{\#include <sys/taskqueue.h>}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00032}00032 \textcolor{preprocessor}{\#include <sys/bus.h>}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00033}00033 \textcolor{preprocessor}{\#include <sys/endian.h>}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00034}00034 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00035}00035 \textcolor{preprocessor}{\#include <net/if.h>}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00036}00036 \textcolor{preprocessor}{\#include <net/ethernet.h>}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00037}00037 \textcolor{preprocessor}{\#include <net/if\_media.h>}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00038}00038 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00039}00039 \textcolor{preprocessor}{\#include <net80211/ieee80211\_var.h>}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00040}00040 \textcolor{preprocessor}{\#include <net80211/ieee80211\_radiotap.h>}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00041}00041 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00042}00042 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{if__rtwnvar_8h}{dev/rtwn/if\_rtwnvar.h}}>}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00043}00043 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00044}00044 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{if__rtwn__beacon_8h}{dev/rtwn/if\_rtwn\_beacon.h}}>}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00045}00045 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{if__rtwn__debug_8h}{dev/rtwn/if\_rtwn\_debug.h}}>}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00046}00046 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{if__rtwn__tx_8h}{dev/rtwn/if\_rtwn\_tx.h}}>}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00047}00047 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00048}00048 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{r92c__reg_8h}{dev/rtwn/rtl8192c/r92c\_reg.h}}>}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00049}00049 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00050}00050 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00051}\mbox{\hyperlink{if__rtwn__beacon_8c_a4ab252db97365e01b66bdfc4ad6643e2}{00051}} \mbox{\hyperlink{if__rtwn__beacon_8c_a4ab252db97365e01b66bdfc4ad6643e2}{rtwn\_reset\_beacon\_valid}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrtwn__softc}{rtwn\_softc}} *sc, \textcolor{keywordtype}{int} \textcolor{keywordtype}{id})}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00052}00052 \{}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00053}00053 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00054}00054         KASSERT (\textcolor{keywordtype}{id} == 0 || \textcolor{keywordtype}{id} == 1, (\textcolor{stringliteral}{"{}wrong port id \%d\(\backslash\)n"{}}, \textcolor{keywordtype}{id}));}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00055}00055 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00056}00056         \textcolor{comment}{/* XXX cannot be cleared on RTL8188CE */}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00057}00057         \mbox{\hyperlink{if__rtwnvar_8h_a0b4a07b836b7fb793728d6961caa8bc7}{rtwn\_setbits\_1\_shift}}(sc, sc-\/>\mbox{\hyperlink{structrtwn__softc_a5f1cb52c3b9545e854f5d97d109d633c}{bcn\_status\_reg}}[\textcolor{keywordtype}{id}],}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00058}00058             \mbox{\hyperlink{r92c__reg_8h_a9573e4e2b83c5e04749b197711a311ee}{R92C\_TDECTRL\_BCN\_VALID}}, 0, 2);}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00059}00059 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00060}00060         \mbox{\hyperlink{if__rtwn__debug_8h_a6ca1eeaaeb8a9a7f515dd33e65e9c591}{RTWN\_DPRINTF}}(sc, RTWN\_DEBUG\_BEACON,}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00061}00061             \textcolor{stringliteral}{"{}\%s: 'beacon valid' bit for vap \%d was unset\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00062}00062             \_\_func\_\_, \textcolor{keywordtype}{id});}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00063}00063 \}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00064}00064 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00065}00065 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00066}\mbox{\hyperlink{if__rtwn__beacon_8c_a4cbb56c7e8b931677426617d073e1466}{00066}} \mbox{\hyperlink{if__rtwn__beacon_8c_a4cbb56c7e8b931677426617d073e1466}{rtwn\_check\_beacon\_valid}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrtwn__softc}{rtwn\_softc}} *sc, \textcolor{keywordtype}{int} \textcolor{keywordtype}{id})}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00067}00067 \{}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00068}00068         uint16\_t reg;}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00069}00069         \textcolor{keywordtype}{int} ntries;}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00070}00070 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00071}00071         \textcolor{keywordflow}{if} (\textcolor{keywordtype}{id} == \mbox{\hyperlink{if__rtwnvar_8h_a4f1433bc408a629f0b2d172b236801da}{RTWN\_VAP\_ID\_INVALID}})}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00072}00072                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00073}00073 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00074}00074         reg = sc-\/>\mbox{\hyperlink{structrtwn__softc_a5f1cb52c3b9545e854f5d97d109d633c}{bcn\_status\_reg}}[\mbox{\hyperlink{r88e__fw__cmd_8h_a1e6927fa1486224044e568f9c370519b}{id}}];}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00075}00075         \textcolor{keywordflow}{for} (ntries = 0; ntries < 10; ntries++) \{}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00076}00076                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__rtwnvar_8h_a4ae5fb745e3dc54fb5469820e706d25d}{rtwn\_read\_4}}(sc, reg) \& \mbox{\hyperlink{r92c__reg_8h_a9573e4e2b83c5e04749b197711a311ee}{R92C\_TDECTRL\_BCN\_VALID}}) \{}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00077}00077                         \mbox{\hyperlink{if__rtwn__debug_8h_a6ca1eeaaeb8a9a7f515dd33e65e9c591}{RTWN\_DPRINTF}}(sc, RTWN\_DEBUG\_BEACON,}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00078}00078                             \textcolor{stringliteral}{"{}\%s: beacon for vap \%d was recognized\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00079}00079                             \_\_func\_\_, \textcolor{keywordtype}{id});}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00080}00080                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00081}00081                 \}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00082}00082                 \mbox{\hyperlink{if__rtwnvar_8h_a3fe76ab201bc261d0950f661104812e2}{rtwn\_delay}}(sc, sc-\/>\mbox{\hyperlink{structrtwn__softc_a849f45d85130126dae54262e09bb8c78}{bcn\_check\_interval}});}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00083}00083         \}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00084}00084         \textcolor{keywordflow}{if} (ntries == 10)}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00085}00085                 \textcolor{keywordflow}{return} (ETIMEDOUT);}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00086}00086 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00087}00087         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00088}00088 \}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00089}00089 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00090}00090 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00091}\mbox{\hyperlink{if__rtwn__beacon_8c_ae751e22f41e11ad842b646e04e25ee22}{00091}} \mbox{\hyperlink{if__rtwn__beacon_8c_ae751e22f41e11ad842b646e04e25ee22}{rtwn\_switch\_bcnq}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrtwn__softc}{rtwn\_softc}} *sc, \textcolor{keywordtype}{int} \textcolor{keywordtype}{id})}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00092}00092 \{}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00093}00093 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00094}00094         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structrtwn__softc_ada3596d84ccd14079a5149dbea90a253}{cur\_bcnq\_id}} != \textcolor{keywordtype}{id}) \{}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00095}00095                 \textcolor{comment}{/* Wait until any previous transmit completes. */}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00096}00096                 (void) \mbox{\hyperlink{if__rtwn__beacon_8c_a4cbb56c7e8b931677426617d073e1466}{rtwn\_check\_beacon\_valid}}(sc, sc-\/>\mbox{\hyperlink{structrtwn__softc_ada3596d84ccd14079a5149dbea90a253}{cur\_bcnq\_id}});}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00097}00097 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00098}00098                 \textcolor{comment}{/* Change current port. */}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00099}00099                 \mbox{\hyperlink{if__rtwnvar_8h_a70a8c9eb6acc5c5a593a1805f4e34e2b}{rtwn\_beacon\_select}}(sc, \textcolor{keywordtype}{id});}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00100}00100                 sc-\/>\mbox{\hyperlink{structrtwn__softc_ada3596d84ccd14079a5149dbea90a253}{cur\_bcnq\_id}} = \mbox{\hyperlink{r88e__fw__cmd_8h_a1e6927fa1486224044e568f9c370519b}{id}};}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00101}00101         \}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00102}00102 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00103}00103         \textcolor{comment}{/* Reset 'beacon valid' bit. */}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00104}00104         \mbox{\hyperlink{if__rtwn__beacon_8c_a4ab252db97365e01b66bdfc4ad6643e2}{rtwn\_reset\_beacon\_valid}}(sc, \textcolor{keywordtype}{id});}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00105}00105 \}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00106}00106 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00107}00107 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00108}\mbox{\hyperlink{if__rtwn__beacon_8c_ab4614f3ac0d60618c95882cd3efb4a0b}{00108}} \mbox{\hyperlink{if__rtwn__beacon_8c_ab4614f3ac0d60618c95882cd3efb4a0b}{rtwn\_setup\_beacon}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrtwn__softc}{rtwn\_softc}} *sc, \textcolor{keyword}{struct} ieee80211\_node *ni)}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00109}00109 \{}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00110}00110         \textcolor{keyword}{struct }ieee80211vap *vap = ni-\/>ni\_vap;}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00111}00111         \textcolor{keyword}{struct }\mbox{\hyperlink{structrtwn__vap}{rtwn\_vap}} *uvp = \mbox{\hyperlink{if__rtwnvar_8h_a810b532061f3d4141ff660e15451a39e}{RTWN\_VAP}}(\mbox{\hyperlink{structrtwn__vap_a5e6d82b4fbdf185444d5170c7e2a2de7}{vap}});}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00112}00112         \textcolor{keyword}{struct }mbuf *m;}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00113}00113 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00114}00114         \mbox{\hyperlink{if__rtwnvar_8h_a11ab9aa31fac571d738d1df1dcabf4a0}{RTWN\_ASSERT\_LOCKED}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00115}00115 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00116}00116         \textcolor{keywordflow}{if} (ni-\/>ni\_chan == IEEE80211\_CHAN\_ANYC)}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00117}00117                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00118}00118 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00119}00119         m = ieee80211\_beacon\_alloc(ni);}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00120}00120         \textcolor{keywordflow}{if} (m == NULL) \{}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00121}00121                 device\_printf(sc-\/>\mbox{\hyperlink{structrtwn__softc_a299d18a16d08213b975a1585651583f9}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00122}00122                     \textcolor{stringliteral}{"{}\%s: could not allocate beacon frame\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00123}00123                 \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00124}00124         \}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00125}00125 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00126}00126         \textcolor{keywordflow}{if} (uvp-\/>\mbox{\hyperlink{structrtwn__vap_a63f50fcf3d9fd35e5509be2ce368b445}{bcn\_mbuf}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00127}00127                 \mbox{\hyperlink{if__rtwnvar_8h_a0782be21792521ee818b4d7f1bf4e6fc}{rtwn\_beacon\_unload}}(sc, uvp-\/>\mbox{\hyperlink{structrtwn__vap_ae32a62614d60f1f8471d4a5e89b34230}{id}});}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00128}00128                 m\_freem(uvp-\/>\mbox{\hyperlink{structrtwn__vap_a63f50fcf3d9fd35e5509be2ce368b445}{bcn\_mbuf}});}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00129}00129         \}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00130}00130 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00131}00131         uvp-\/>\mbox{\hyperlink{structrtwn__vap_a63f50fcf3d9fd35e5509be2ce368b445}{bcn\_mbuf}} = m;}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00132}00132 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00133}00133         \mbox{\hyperlink{if__rtwnvar_8h_a3f834aa23ecaf7aa57ab5445a8e3f9e4}{rtwn\_beacon\_set\_rate}}(sc, \&uvp-\/>\mbox{\hyperlink{structrtwn__vap_a185ce4e718bce5e0b858ce058e890f6f}{bcn\_desc}}.\mbox{\hyperlink{structrtwn__tx__buf_a296e6f041eb0e1510a850f9317e651cc}{txd}}[0],}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00134}00134             IEEE80211\_IS\_CHAN\_5GHZ(ni-\/>ni\_chan));}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00135}00135 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00136}00136         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__rtwn__beacon_8c_a116902f4e1138735314378bc7ff26e8a}{rtwn\_tx\_beacon\_check}}(sc, uvp));}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00137}00137 \}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00138}00138 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00139}00139 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00140}00140 \textcolor{comment}{ * Push a beacon frame into the chip. Beacon will}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00141}00141 \textcolor{comment}{ * be repeated by the chip every R92C\_BCN\_INTERVAL.}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00142}00142 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00143}00143 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00144}\mbox{\hyperlink{if__rtwn__beacon_8c_a848acfb915efd064d6b2a09962b591fe}{00144}} \mbox{\hyperlink{if__rtwn__beacon_8c_a848acfb915efd064d6b2a09962b591fe}{rtwn\_tx\_beacon}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrtwn__softc}{rtwn\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structrtwn__vap}{rtwn\_vap}} *uvp)}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00145}00145 \{}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00146}00146         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00147}00147 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00148}00148         \mbox{\hyperlink{if__rtwnvar_8h_a11ab9aa31fac571d738d1df1dcabf4a0}{RTWN\_ASSERT\_LOCKED}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00149}00149 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00150}00150         \mbox{\hyperlink{if__rtwn__debug_8h_a6ca1eeaaeb8a9a7f515dd33e65e9c591}{RTWN\_DPRINTF}}(sc, RTWN\_DEBUG\_BEACON,}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00151}00151             \textcolor{stringliteral}{"{}\%s: sending beacon for vap \%d\(\backslash\)n"{}}, \_\_func\_\_, uvp-\/>\mbox{\hyperlink{structrtwn__vap_ae32a62614d60f1f8471d4a5e89b34230}{id}});}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00152}00152 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00153}00153         error = \mbox{\hyperlink{if__rtwnvar_8h_a18f287f51e06e948045ac7a5cf76fefa}{rtwn\_tx\_start}}(sc, NULL, uvp-\/>\mbox{\hyperlink{structrtwn__vap_a63f50fcf3d9fd35e5509be2ce368b445}{bcn\_mbuf}}, \&uvp-\/>\mbox{\hyperlink{structrtwn__vap_a185ce4e718bce5e0b858ce058e890f6f}{bcn\_desc}}.\mbox{\hyperlink{structrtwn__tx__buf_a296e6f041eb0e1510a850f9317e651cc}{txd}}[0],}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00154}00154             IEEE80211\_FC0\_TYPE\_MGT, uvp-\/>\mbox{\hyperlink{structrtwn__vap_ae32a62614d60f1f8471d4a5e89b34230}{id}});}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00155}00155 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00156}00156         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00157}00157 \}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00158}00158 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00159}00159 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00160}\mbox{\hyperlink{if__rtwn__beacon_8c_a54e8a5afd5565da94e1520c3e8c33cf9}{00160}} \mbox{\hyperlink{if__rtwn__beacon_8c_a54e8a5afd5565da94e1520c3e8c33cf9}{rtwn\_update\_beacon}}(\textcolor{keyword}{struct} ieee80211vap *vap, \textcolor{keywordtype}{int} item)}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00161}00161 \{}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00162}00162         \textcolor{keyword}{struct }ieee80211com *ic = vap-\/>iv\_ic;}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00163}00163         \textcolor{keyword}{struct }\mbox{\hyperlink{structrtwn__softc}{rtwn\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00164}00164         \textcolor{keyword}{struct }\mbox{\hyperlink{structrtwn__vap}{rtwn\_vap}} *uvp = \mbox{\hyperlink{if__rtwnvar_8h_a810b532061f3d4141ff660e15451a39e}{RTWN\_VAP}}(\mbox{\hyperlink{structrtwn__vap_a5e6d82b4fbdf185444d5170c7e2a2de7}{vap}});}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00165}00165         \textcolor{keyword}{struct }ieee80211\_beacon\_offsets *bo = \&vap-\/>iv\_bcn\_off;}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00166}00166         \textcolor{keyword}{struct }ieee80211\_node *ni = vap-\/>iv\_bss;}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00167}00167         \textcolor{keywordtype}{int} mcast = 0;}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00168}00168 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00169}00169         \mbox{\hyperlink{if__rtwnvar_8h_a225a1776288a71cc42e11049f9633d5a}{RTWN\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00170}00170         \textcolor{keywordflow}{if} (uvp-\/>\mbox{\hyperlink{structrtwn__vap_a63f50fcf3d9fd35e5509be2ce368b445}{bcn\_mbuf}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00171}00171                 uvp-\/>\mbox{\hyperlink{structrtwn__vap_a63f50fcf3d9fd35e5509be2ce368b445}{bcn\_mbuf}} = ieee80211\_beacon\_alloc(ni);}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00172}00172                 \textcolor{keywordflow}{if} (uvp-\/>\mbox{\hyperlink{structrtwn__vap_a63f50fcf3d9fd35e5509be2ce368b445}{bcn\_mbuf}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00173}00173                         device\_printf(sc-\/>\mbox{\hyperlink{structrtwn__softc_a299d18a16d08213b975a1585651583f9}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00174}00174                             \textcolor{stringliteral}{"{}\%s: could not allocate beacon frame\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00175}00175                         \mbox{\hyperlink{if__rtwnvar_8h_a8c20a024317a3f45243ebf9146c4fbab}{RTWN\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00176}00176                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00177}00177                 \}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00178}00178         \}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00179}00179 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00180}00180         \mbox{\hyperlink{if__rtwn__debug_8h_a6ca1eeaaeb8a9a7f515dd33e65e9c591}{RTWN\_DPRINTF}}(sc, RTWN\_DEBUG\_BEACON,}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00181}00181             \textcolor{stringliteral}{"{}\%s: vap id \%d, iv\_csa\_count \%d, ic\_csa\_count \%d, item \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00182}00182             \_\_func\_\_, uvp-\/>\mbox{\hyperlink{structrtwn__vap_ae32a62614d60f1f8471d4a5e89b34230}{id}}, vap-\/>iv\_csa\_count, ic-\/>ic\_csa\_count, item);}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00183}00183 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00184}00184         \textcolor{keywordflow}{switch} (item) \{}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00185}00185         \textcolor{keywordflow}{case} IEEE80211\_BEACON\_CSA:}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00186}00186                 \textcolor{keywordflow}{if} (vap-\/>iv\_csa\_count != ic-\/>ic\_csa\_count) \{}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00187}00187                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00188}00188 \textcolor{comment}{                         * XXX two APs with different beacon intervals}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00189}00189 \textcolor{comment}{                         * are not handled properly.}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00190}00190 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00191}00191                         \textcolor{comment}{/* XXX check TBTT? */}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00192}00192                         taskqueue\_enqueue\_timeout(taskqueue\_thread,}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00193}00193                             \&uvp-\/>\mbox{\hyperlink{structrtwn__vap_aedce35c0b6ded745aada0fdd28674d6c}{tx\_beacon\_csa}},}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00194}00194                             msecs\_to\_ticks(ni-\/>ni\_intval));}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00195}00195                 \}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00196}00196                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00197}00197         \textcolor{keywordflow}{case} IEEE80211\_BEACON\_TIM:}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00198}00198                 mcast = 1;      \textcolor{comment}{/* XXX */}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00199}00199                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00200}00200         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00201}00201                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00202}00202         \}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00203}00203 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00204}00204         setbit(bo-\/>bo\_flags, item);}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00205}00205 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00206}00206         \mbox{\hyperlink{if__rtwnvar_8h_ae9128645f68cc505dbc811acb360cd0e}{rtwn\_beacon\_update\_begin}}(sc, vap);}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00207}00207         \mbox{\hyperlink{if__rtwnvar_8h_a8c20a024317a3f45243ebf9146c4fbab}{RTWN\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00208}00208 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00209}00209         ieee80211\_beacon\_update(ni, uvp-\/>\mbox{\hyperlink{structrtwn__vap_a63f50fcf3d9fd35e5509be2ce368b445}{bcn\_mbuf}}, mcast);}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00210}00210 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00211}00211         \textcolor{comment}{/* XXX clear manually */}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00212}00212         clrbit(bo-\/>bo\_flags, IEEE80211\_BEACON\_CSA);}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00213}00213 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00214}00214         \mbox{\hyperlink{if__rtwnvar_8h_a225a1776288a71cc42e11049f9633d5a}{RTWN\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00215}00215         \mbox{\hyperlink{if__rtwn__beacon_8c_a848acfb915efd064d6b2a09962b591fe}{rtwn\_tx\_beacon}}(sc, uvp);}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00216}00216         \mbox{\hyperlink{if__rtwnvar_8h_af1829c89d1674c262bd30e20d19461e2}{rtwn\_beacon\_update\_end}}(sc, vap);}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00217}00217         \mbox{\hyperlink{if__rtwnvar_8h_a8c20a024317a3f45243ebf9146c4fbab}{RTWN\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00218}00218 \}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00219}00219 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00220}00220 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00221}\mbox{\hyperlink{if__rtwn__beacon_8c_a3edbda2f2ba909988bad43f0ecda16ba}{00221}} \mbox{\hyperlink{if__rtwn__beacon_8c_a3edbda2f2ba909988bad43f0ecda16ba}{rtwn\_tx\_beacon\_csa}}(\textcolor{keywordtype}{void} *arg, \textcolor{keywordtype}{int} npending \_\_unused)}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00222}00222 \{}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00223}00223         \textcolor{keyword}{struct }ieee80211vap *vap = arg;}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00224}00224         \textcolor{keyword}{struct }ieee80211com *ic = vap-\/>iv\_ic;}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00225}00225         \textcolor{keyword}{struct }\mbox{\hyperlink{structrtwn__softc}{rtwn\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00226}00226         \textcolor{keyword}{struct }\mbox{\hyperlink{structrtwn__vap}{rtwn\_vap}} *rvp = \mbox{\hyperlink{if__rtwnvar_8h_a810b532061f3d4141ff660e15451a39e}{RTWN\_VAP}}(\mbox{\hyperlink{structrtwn__vap_a5e6d82b4fbdf185444d5170c7e2a2de7}{vap}});}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00227}00227 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00228}00228         KASSERT (rvp-\/>\mbox{\hyperlink{structrtwn__vap_ae32a62614d60f1f8471d4a5e89b34230}{id}} == 0 || rvp-\/>\mbox{\hyperlink{structrtwn__vap_ae32a62614d60f1f8471d4a5e89b34230}{id}} == 1,}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00229}00229             (\textcolor{stringliteral}{"{}wrong port id \%d\(\backslash\)n"{}}, rvp-\/>\mbox{\hyperlink{structrtwn__vap_ae32a62614d60f1f8471d4a5e89b34230}{id}}));}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00230}00230 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00231}00231         IEEE80211\_LOCK(ic);}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00232}00232         \textcolor{keywordflow}{if} (ic-\/>ic\_flags \& IEEE80211\_F\_CSAPENDING) \{}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00233}00233                 \mbox{\hyperlink{if__rtwn__debug_8h_a6ca1eeaaeb8a9a7f515dd33e65e9c591}{RTWN\_DPRINTF}}(sc, RTWN\_DEBUG\_BEACON,}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00234}00234                     \textcolor{stringliteral}{"{}\%s: vap id \%d, iv\_csa\_count \%d, ic\_csa\_count \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00235}00235                     \_\_func\_\_, rvp-\/>\mbox{\hyperlink{structrtwn__vap_ae32a62614d60f1f8471d4a5e89b34230}{id}}, \mbox{\hyperlink{structrtwn__vap_a5e6d82b4fbdf185444d5170c7e2a2de7}{vap}}-\/>iv\_csa\_count, ic-\/>ic\_csa\_count);}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00236}00236 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00237}00237                 \mbox{\hyperlink{if__rtwn__beacon_8c_a54e8a5afd5565da94e1520c3e8c33cf9}{rtwn\_update\_beacon}}(\mbox{\hyperlink{structrtwn__vap_a5e6d82b4fbdf185444d5170c7e2a2de7}{vap}}, IEEE80211\_BEACON\_CSA);}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00238}00238         \}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00239}00239         IEEE80211\_UNLOCK(ic);}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00240}00240 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00241}00241         (void) rvp;}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00242}00242 \}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00243}00243 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00244}00244 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00245}\mbox{\hyperlink{if__rtwn__beacon_8c_a116902f4e1138735314378bc7ff26e8a}{00245}} \mbox{\hyperlink{if__rtwn__beacon_8c_a116902f4e1138735314378bc7ff26e8a}{rtwn\_tx\_beacon\_check}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structrtwn__softc}{rtwn\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structrtwn__vap}{rtwn\_vap}} *uvp)}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00246}00246 \{}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00247}00247         \textcolor{keywordtype}{int} ntries, error;}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00248}00248 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00249}00249         \textcolor{keywordflow}{for} (ntries = 0; ntries < 5; ntries++) \{}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00250}00250                 \mbox{\hyperlink{if__rtwn__beacon_8c_a4ab252db97365e01b66bdfc4ad6643e2}{rtwn\_reset\_beacon\_valid}}(sc, uvp-\/>\mbox{\hyperlink{structrtwn__vap_ae32a62614d60f1f8471d4a5e89b34230}{id}});}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00251}00251 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00252}00252                 error = \mbox{\hyperlink{if__rtwn__beacon_8c_a848acfb915efd064d6b2a09962b591fe}{rtwn\_tx\_beacon}}(sc, uvp);}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00253}00253                 \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00254}00254                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00255}00255 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00256}00256                 error = \mbox{\hyperlink{if__rtwn__beacon_8c_a4cbb56c7e8b931677426617d073e1466}{rtwn\_check\_beacon\_valid}}(sc, uvp-\/>\mbox{\hyperlink{structrtwn__vap_ae32a62614d60f1f8471d4a5e89b34230}{id}});}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00257}00257                 \textcolor{keywordflow}{if} (error == 0)}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00258}00258                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00259}00259         \}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00260}00260         \textcolor{keywordflow}{if} (ntries == 5) \{}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00261}00261                 device\_printf(sc-\/>\mbox{\hyperlink{structrtwn__softc_a299d18a16d08213b975a1585651583f9}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00262}00262                     \textcolor{stringliteral}{"{}\%s: cannot push beacon into chip, error \%d!\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00263}00263                     \_\_func\_\_, error);}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00264}00264                 \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00265}00265         \}}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00266}00266 }
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00267}00267         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__rtwn__beacon_8c_source_l00268}00268 \}}

\end{DoxyCode}
