\hypertarget{if__iwm_8c_source}{}\doxysection{if\+\_\+iwm.\+c}
\label{if__iwm_8c_source}\index{dev/iwm/if\_iwm.c@{dev/iwm/if\_iwm.c}}
\mbox{\hyperlink{if__iwm_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00001}00001 \textcolor{comment}{/*      \$OpenBSD: if\_iwm.c,v 1.167 2017/04/04 00:40:52 claudio Exp \$    */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00002}00002 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00003}00003 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2014 genua mbh <info@genua.de>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00005}00005 \textcolor{comment}{ * Copyright (c) 2014 Fixup Software Ltd.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00007}00007 \textcolor{comment}{ * Permission to use, copy, modify, and distribute this software for any}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00008}00008 \textcolor{comment}{ * purpose with or without fee is hereby granted, provided that the above}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00009}00009 \textcolor{comment}{ * copyright notice and this permission notice appear in all copies.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00010}00010 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00011}00011 \textcolor{comment}{ * THE SOFTWARE IS PROVIDED "{}AS IS"{} AND THE AUTHOR DISCLAIMS ALL WARRANTIES}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00012}00012 \textcolor{comment}{ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00013}00013 \textcolor{comment}{ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00014}00014 \textcolor{comment}{ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00015}00015 \textcolor{comment}{ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00016}00016 \textcolor{comment}{ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00017}00017 \textcolor{comment}{ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00018}00018 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00019}00019 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00020}00020 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00021}00021 \textcolor{comment}{ * Based on BSD-\/licensed source modules in the Linux iwlwifi driver,}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00022}00022 \textcolor{comment}{ * which were used as the reference documentation for this implementation.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00023}00023 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00024}00024 \textcolor{comment}{ * Driver version we are currently based off of is}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00025}00025 \textcolor{comment}{ * Linux 3.14.3 (tag id a2df521e42b1d9a23f620ac79dbfe8655a8391dd)}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00026}00026 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00027}00027 \textcolor{comment}{ ***********************************************************************}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00028}00028 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00029}00029 \textcolor{comment}{ * This file is provided under a dual BSD/GPLv2 license.  When using or}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00030}00030 \textcolor{comment}{ * redistributing this file, you may do so under either license.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00031}00031 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00032}00032 \textcolor{comment}{ * GPL LICENSE SUMMARY}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00033}00033 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00034}00034 \textcolor{comment}{ * Copyright(c) 2007 -\/ 2013 Intel Corporation. All rights reserved.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00035}00035 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00036}00036 \textcolor{comment}{ * This program is free software; you can redistribute it and/or modify}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00037}00037 \textcolor{comment}{ * it under the terms of version 2 of the GNU General Public License as}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00038}00038 \textcolor{comment}{ * published by the Free Software Foundation.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00039}00039 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00040}00040 \textcolor{comment}{ * This program is distributed in the hope that it will be useful, but}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00041}00041 \textcolor{comment}{ * WITHOUT ANY WARRANTY; without even the implied warranty of}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00042}00042 \textcolor{comment}{ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00043}00043 \textcolor{comment}{ * General Public License for more details.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00044}00044 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00045}00045 \textcolor{comment}{ * You should have received a copy of the GNU General Public License}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00046}00046 \textcolor{comment}{ * along with this program; if not, write to the Free Software}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00047}00047 \textcolor{comment}{ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00048}00048 \textcolor{comment}{ * USA}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00049}00049 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00050}00050 \textcolor{comment}{ * The full GNU General Public License is included in this distribution}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00051}00051 \textcolor{comment}{ * in the file called COPYING.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00052}00052 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00053}00053 \textcolor{comment}{ * Contact Information:}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00054}00054 \textcolor{comment}{ *  Intel Linux Wireless <ilw@linux.intel.com>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00055}00055 \textcolor{comment}{ * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-\/6497}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00056}00056 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00057}00057 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00058}00058 \textcolor{comment}{ * BSD LICENSE}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00059}00059 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00060}00060 \textcolor{comment}{ * Copyright(c) 2005 -\/ 2013 Intel Corporation. All rights reserved.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00061}00061 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00062}00062 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00063}00063 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00064}00064 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00065}00065 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00066}00066 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00067}00067 \textcolor{comment}{ *  * Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00068}00068 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00069}00069 \textcolor{comment}{ *  * Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00070}00070 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00071}00071 \textcolor{comment}{ *    the documentation and/or other materials provided with the}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00072}00072 \textcolor{comment}{ *    distribution.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00073}00073 \textcolor{comment}{ *  * Neither the name Intel Corporation nor the names of its}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00074}00074 \textcolor{comment}{ *    contributors may be used to endorse or promote products derived}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00075}00075 \textcolor{comment}{ *    from this software without specific prior written permission.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00076}00076 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00077}00077 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00078}00078 \textcolor{comment}{ * "{}AS IS"{} AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00079}00079 \textcolor{comment}{ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00080}00080 \textcolor{comment}{ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00081}00081 \textcolor{comment}{ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00082}00082 \textcolor{comment}{ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00083}00083 \textcolor{comment}{ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00084}00084 \textcolor{comment}{ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00085}00085 \textcolor{comment}{ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00086}00086 \textcolor{comment}{ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00087}00087 \textcolor{comment}{ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00088}00088 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00089}00089 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00090}00090 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00091}00091 \textcolor{comment}{ * Copyright (c) 2007-\/2010 Damien Bergamini <damien.bergamini@free.fr>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00092}00092 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00093}00093 \textcolor{comment}{ * Permission to use, copy, modify, and distribute this software for any}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00094}00094 \textcolor{comment}{ * purpose with or without fee is hereby granted, provided that the above}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00095}00095 \textcolor{comment}{ * copyright notice and this permission notice appear in all copies.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00096}00096 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00097}00097 \textcolor{comment}{ * THE SOFTWARE IS PROVIDED "{}AS IS"{} AND THE AUTHOR DISCLAIMS ALL WARRANTIES}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00098}00098 \textcolor{comment}{ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00099}00099 \textcolor{comment}{ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00100}00100 \textcolor{comment}{ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00101}00101 \textcolor{comment}{ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00102}00102 \textcolor{comment}{ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00103}00103 \textcolor{comment}{ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00104}00104 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00105}00105 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00106}\mbox{\hyperlink{if__iwm_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00106}} \mbox{\hyperlink{if__iwm_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00107}00107 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00108}00108 \textcolor{preprocessor}{\#include "{}opt\_wlan.h"{}}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00109}00109 \textcolor{preprocessor}{\#include "{}opt\_iwm.h"{}}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00110}00110 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00111}00111 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00112}00112 \textcolor{preprocessor}{\#include <sys/bus.h>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00113}00113 \textcolor{preprocessor}{\#include <sys/conf.h>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00114}00114 \textcolor{preprocessor}{\#include <sys/endian.h>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00115}00115 \textcolor{preprocessor}{\#include <sys/firmware.h>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00116}00116 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00117}00117 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00118}00118 \textcolor{preprocessor}{\#include <sys/mbuf.h>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00119}00119 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00120}00120 \textcolor{preprocessor}{\#include <sys/module.h>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00121}00121 \textcolor{preprocessor}{\#include <sys/proc.h>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00122}00122 \textcolor{preprocessor}{\#include <sys/rman.h>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00123}00123 \textcolor{preprocessor}{\#include <sys/socket.h>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00124}00124 \textcolor{preprocessor}{\#include <sys/sockio.h>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00125}00125 \textcolor{preprocessor}{\#include <sys/sysctl.h>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00126}00126 \textcolor{preprocessor}{\#include <sys/linker.h>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00127}00127 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00128}00128 \textcolor{preprocessor}{\#include <machine/bus.h>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00129}00129 \textcolor{preprocessor}{\#include <machine/endian.h>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00130}00130 \textcolor{preprocessor}{\#include <machine/resource.h>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00131}00131 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00132}00132 \textcolor{preprocessor}{\#include <dev/pci/pcivar.h>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00133}00133 \textcolor{preprocessor}{\#include <dev/pci/pcireg.h>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00134}00134 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00135}00135 \textcolor{preprocessor}{\#include <net/bpf.h>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00136}00136 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00137}00137 \textcolor{preprocessor}{\#include <net/if.h>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00138}00138 \textcolor{preprocessor}{\#include <net/if\_var.h>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00139}00139 \textcolor{preprocessor}{\#include <net/if\_arp.h>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00140}00140 \textcolor{preprocessor}{\#include <net/if\_dl.h>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00141}00141 \textcolor{preprocessor}{\#include <net/if\_media.h>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00142}00142 \textcolor{preprocessor}{\#include <net/if\_types.h>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00143}00143 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00144}00144 \textcolor{preprocessor}{\#include <netinet/in.h>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00145}00145 \textcolor{preprocessor}{\#include <netinet/in\_systm.h>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00146}00146 \textcolor{preprocessor}{\#include <netinet/if\_ether.h>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00147}00147 \textcolor{preprocessor}{\#include <netinet/ip.h>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00148}00148 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00149}00149 \textcolor{preprocessor}{\#include <net80211/ieee80211\_var.h>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00150}00150 \textcolor{preprocessor}{\#include <net80211/ieee80211\_regdomain.h>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00151}00151 \textcolor{preprocessor}{\#include <net80211/ieee80211\_ratectl.h>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00152}00152 \textcolor{preprocessor}{\#include <net80211/ieee80211\_radiotap.h>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00153}00153 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00154}00154 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{if__iwmreg_8h}{dev/iwm/if\_iwmreg.h}}>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00155}00155 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{if__iwmvar_8h}{dev/iwm/if\_iwmvar.h}}>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00156}00156 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{if__iwm__config_8h}{dev/iwm/if\_iwm\_config.h}}>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00157}00157 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{if__iwm__debug_8h}{dev/iwm/if\_iwm\_debug.h}}>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00158}00158 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{if__iwm__notif__wait_8h}{dev/iwm/if\_iwm\_notif\_wait.h}}>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00159}00159 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{if__iwm__util_8h}{dev/iwm/if\_iwm\_util.h}}>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00160}00160 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{if__iwm__binding_8h}{dev/iwm/if\_iwm\_binding.h}}>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00161}00161 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{if__iwm__phy__db_8h}{dev/iwm/if\_iwm\_phy\_db.h}}>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00162}00162 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{if__iwm__mac__ctxt_8h}{dev/iwm/if\_iwm\_mac\_ctxt.h}}>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00163}00163 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{if__iwm__phy__ctxt_8h}{dev/iwm/if\_iwm\_phy\_ctxt.h}}>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00164}00164 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{if__iwm__time__event_8h}{dev/iwm/if\_iwm\_time\_event.h}}>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00165}00165 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{if__iwm__power_8h}{dev/iwm/if\_iwm\_power.h}}>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00166}00166 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{if__iwm__scan_8h}{dev/iwm/if\_iwm\_scan.h}}>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00167}00167 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{if__iwm__sf_8h}{dev/iwm/if\_iwm\_sf.h}}>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00168}00168 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{if__iwm__sta_8h}{dev/iwm/if\_iwm\_sta.h}}>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00169}00169 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00170}00170 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{if__iwm__pcie__trans_8h}{dev/iwm/if\_iwm\_pcie\_trans.h}}>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00171}00171 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{if__iwm__led_8h}{dev/iwm/if\_iwm\_led.h}}>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00172}00172 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{if__iwm__fw_8h}{dev/iwm/if\_iwm\_fw.h}}>}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00173}00173 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00174}00174 \textcolor{comment}{/* From DragonflyBSD */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00175}\mbox{\hyperlink{if__iwm_8c_a56917e17716be87862db2a902b12430e}{00175}} \textcolor{preprocessor}{\#define mtodoff(m, t, off)      ((t)((m)-\/>m\_data + (off)))}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00176}00176 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00177}\mbox{\hyperlink{if__iwm_8c_ab5e34d8aa381234340c802954b0f3e5c}{00177}} \textcolor{keyword}{const} uint8\_t \mbox{\hyperlink{if__iwm_8c_ab5e34d8aa381234340c802954b0f3e5c}{iwm\_nvm\_channels}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00178}00178         \textcolor{comment}{/* 2.4 GHz */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00179}00179         1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00180}00180         \textcolor{comment}{/* 5 GHz */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00181}00181         36, 40, 44, 48, 52, 56, 60, 64,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00182}00182         100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 144,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00183}00183         149, 153, 157, 161, 165}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00184}00184 \};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00185}\mbox{\hyperlink{if__iwm_8c_a415a9572f9c3e04d16ff6ac08bdaf8c8}{00185}} \mbox{\hyperlink{if__iwm_8c_a415a9572f9c3e04d16ff6ac08bdaf8c8}{\_Static\_assert}}(nitems(\mbox{\hyperlink{if__iwm_8c_ab5e34d8aa381234340c802954b0f3e5c}{iwm\_nvm\_channels}}) <= \mbox{\hyperlink{if__iwmvar_8h_a940aad61c7e01c7c86c12da807f7423b}{IWM\_NUM\_CHANNELS}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00186}00186     \textcolor{stringliteral}{"{}IWM\_NUM\_CHANNELS is too small"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00187}00187 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00188}\mbox{\hyperlink{if__iwm_8c_a6816d65ce89508883c00a89c08f79cc9}{00188}} \textcolor{keyword}{const} uint8\_t \mbox{\hyperlink{if__iwm_8c_a6816d65ce89508883c00a89c08f79cc9}{iwm\_nvm\_channels\_8000}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00189}00189         \textcolor{comment}{/* 2.4 GHz */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00190}00190         1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00191}00191         \textcolor{comment}{/* 5 GHz */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00192}00192         36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 84, 88, 92,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00193}00193         96, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 144,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00194}00194         149, 153, 157, 161, 165, 169, 173, 177, 181}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00195}00195 \};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00196}\mbox{\hyperlink{if__iwm_8c_a71b3cb193b8feb2ebbe8cb7dd60f5dfc}{00196}} \mbox{\hyperlink{if__iwm_8c_a415a9572f9c3e04d16ff6ac08bdaf8c8}{\_Static\_assert}}(nitems(\mbox{\hyperlink{if__iwm_8c_a6816d65ce89508883c00a89c08f79cc9}{iwm\_nvm\_channels\_8000}}) <= \mbox{\hyperlink{if__iwmvar_8h_ac1b88599c587e7384cccc32eacc8fd56}{IWM\_NUM\_CHANNELS\_8000}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00197}00197     \textcolor{stringliteral}{"{}IWM\_NUM\_CHANNELS\_8000 is too small"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00198}00198 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00199}\mbox{\hyperlink{if__iwm_8c_a30c6eb35fa910ea7094d439c824f2564}{00199}} \textcolor{preprocessor}{\#define IWM\_NUM\_2GHZ\_CHANNELS   14}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00200}\mbox{\hyperlink{if__iwm_8c_ad198936b2f83aaa68e557ab8f4f1d1b9}{00200}} \textcolor{preprocessor}{\#define IWM\_N\_HW\_ADDR\_MASK      0xF}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00201}00201 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00202}00202 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00203}00203 \textcolor{comment}{ * XXX For now, there's simply a fixed set of rate table entries}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00204}00204 \textcolor{comment}{ * that are populated.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00205}00205 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00206}\mbox{\hyperlink{structiwm__rate}{00206}} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__rate}{iwm\_rate}} \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00207}\mbox{\hyperlink{structiwm__rate_aa16a3fc2d9313e70ebdcf29be6595006}{00207}}         uint8\_t \mbox{\hyperlink{structiwm__rate_aa16a3fc2d9313e70ebdcf29be6595006}{rate}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00208}\mbox{\hyperlink{structiwm__rate_ae4883c6ee5d2c0f3b49dc2d7082e9c6a}{00208}}         uint8\_t \mbox{\hyperlink{structiwm__rate_ae4883c6ee5d2c0f3b49dc2d7082e9c6a}{plcp}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00209}00209 \} \mbox{\hyperlink{if__iwm_8c_a08ef9e6176f57d36238a07cdc3dc336c}{iwm\_rates}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00210}00210         \{   2,  \mbox{\hyperlink{if__iwmreg_8h_adab7b8d5b2ff31cbb50d05f84fbb54fb}{IWM\_RATE\_1M\_PLCP}}  \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00211}00211         \{   4,  \mbox{\hyperlink{if__iwmreg_8h_a7c59d91aaccd36c33ea407befd79b5d9}{IWM\_RATE\_2M\_PLCP}}  \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00212}00212         \{  11,  \mbox{\hyperlink{if__iwmreg_8h_aa6c5e74cadebeb33710b2a90b9d7431c}{IWM\_RATE\_5M\_PLCP}}  \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00213}00213         \{  22,  \mbox{\hyperlink{if__iwmreg_8h_a7e181aba7965c9446c28306ec4ab9c21}{IWM\_RATE\_11M\_PLCP}} \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00214}00214         \{  12,  \mbox{\hyperlink{if__iwmreg_8h_a7bb0eb5886629374ffe67cd903c37946}{IWM\_RATE\_6M\_PLCP}}  \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00215}00215         \{  18,  \mbox{\hyperlink{if__iwmreg_8h_a6de698b8b68006a68a3f0bc2b0dbc0f6}{IWM\_RATE\_9M\_PLCP}}  \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00216}00216         \{  24,  \mbox{\hyperlink{if__iwmreg_8h_af317380edb871e4829d285cf3e06226d}{IWM\_RATE\_12M\_PLCP}} \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00217}00217         \{  36,  \mbox{\hyperlink{if__iwmreg_8h_adb7028a5ab11134ef54b1bbc75b2b7d9}{IWM\_RATE\_18M\_PLCP}} \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00218}00218         \{  48,  \mbox{\hyperlink{if__iwmreg_8h_acfa4b1fa0a8260ed948a6a946b2e4bef}{IWM\_RATE\_24M\_PLCP}} \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00219}00219         \{  72,  \mbox{\hyperlink{if__iwmreg_8h_a59a97067cf77007da795790f01fde1ef}{IWM\_RATE\_36M\_PLCP}} \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00220}00220         \{  96,  \mbox{\hyperlink{if__iwmreg_8h_afaf6f9a5044b881ebfaf7c323e0055eb}{IWM\_RATE\_48M\_PLCP}} \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00221}00221         \{ 108,  \mbox{\hyperlink{if__iwmreg_8h_a46c32388fa8199f9e1e191ac47f3f2d0}{IWM\_RATE\_54M\_PLCP}} \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00222}\mbox{\hyperlink{if__iwm_8c_a08ef9e6176f57d36238a07cdc3dc336c}{00222}} \};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00223}\mbox{\hyperlink{if__iwm_8c_a5ad5754fe807b538c7f5d6800cf96b14}{00223}} \textcolor{preprocessor}{\#define IWM\_RIDX\_CCK    0}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00224}\mbox{\hyperlink{if__iwm_8c_a7d3d125c607aff2c2fb7d5e8fff1a40c}{00224}} \textcolor{preprocessor}{\#define IWM\_RIDX\_OFDM   4}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00225}\mbox{\hyperlink{if__iwm_8c_a1cc60dd9c8869cbcab518b6033692b50}{00225}} \textcolor{preprocessor}{\#define IWM\_RIDX\_MAX    (nitems(iwm\_rates)-\/1)}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00226}\mbox{\hyperlink{if__iwm_8c_a0d2a2f868dde98abcf20edb8b64579cd}{00226}} \textcolor{preprocessor}{\#define IWM\_RIDX\_IS\_CCK(\_i\_) ((\_i\_) < IWM\_RIDX\_OFDM)}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00227}\mbox{\hyperlink{if__iwm_8c_a764c7e5ee6ee1f6c8774dbad2e02d293}{00227}} \textcolor{preprocessor}{\#define IWM\_RIDX\_IS\_OFDM(\_i\_) ((\_i\_) >= IWM\_RIDX\_OFDM)}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00228}00228 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00229}\mbox{\hyperlink{structiwm__nvm__section}{00229}} \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__nvm__section}{iwm\_nvm\_section}} \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00230}\mbox{\hyperlink{structiwm__nvm__section_a9bba20790ac3aa46c97afd84c548ec4e}{00230}}         uint16\_t \mbox{\hyperlink{structiwm__nvm__section_a9bba20790ac3aa46c97afd84c548ec4e}{length}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00231}\mbox{\hyperlink{structiwm__nvm__section_a0b299372143855d22600f8e27d7a8484}{00231}}         uint8\_t *\mbox{\hyperlink{structiwm__nvm__section_a0b299372143855d22600f8e27d7a8484}{data}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00232}00232 \};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00233}00233 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00234}\mbox{\hyperlink{if__iwm_8c_a0615f2121bb7f78983739d9ca9f3eb82}{00234}} \textcolor{preprocessor}{\#define IWM\_UCODE\_ALIVE\_TIMEOUT hz}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00235}\mbox{\hyperlink{if__iwm_8c_a925f308c65ddcd0bb40183d9e7a172fc}{00235}} \textcolor{preprocessor}{\#define IWM\_UCODE\_CALIB\_TIMEOUT (2*hz)}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00236}00236 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00237}\mbox{\hyperlink{structiwm__alive__data}{00237}} \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__alive__data}{iwm\_alive\_data}} \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00238}\mbox{\hyperlink{structiwm__alive__data_a895f9181134420b0d078e42e87a9e8a5}{00238}}         \textcolor{keywordtype}{int} \mbox{\hyperlink{structiwm__alive__data_a895f9181134420b0d078e42e87a9e8a5}{valid}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00239}\mbox{\hyperlink{structiwm__alive__data_a3061db68ed81a199a4461108d2f997ef}{00239}}         uint32\_t \mbox{\hyperlink{structiwm__alive__data_a3061db68ed81a199a4461108d2f997ef}{scd\_base\_addr}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00240}00240 \};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00241}00241 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00242}00242 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_a20932a89f82730d59f86d630993b4c95}{iwm\_store\_cscheme}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *, \textcolor{keyword}{const} uint8\_t *, \textcolor{keywordtype}{size\_t});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00243}00243 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_a12dccea60cb55453b1c6596861518b5e}{iwm\_firmware\_store\_section}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00244}00244                                            \textcolor{keyword}{enum} \mbox{\hyperlink{if__iwmvar_8h_a680b88b47a331f93dcdf230bf57590ac}{iwm\_ucode\_type}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00245}00245                                            \textcolor{keyword}{const} uint8\_t *, \textcolor{keywordtype}{size\_t});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00246}00246 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_a223722e1d847e8afbf8625de95ea2689}{iwm\_set\_default\_calib}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *, \textcolor{keyword}{const} \textcolor{keywordtype}{void} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00247}00247 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_aeb37ae4f615a7120e6e2ccde82cf03c5}{iwm\_fw\_info\_free}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__fw__info}{iwm\_fw\_info}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00248}00248 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_ab18fcb1d8efa47c66392572d3aa6ccba}{iwm\_read\_firmware}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00249}00249 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_abc6a2ead1ec4392eb977fc0527508c61}{iwm\_alloc\_fwmem}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00250}00250 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_addf1dfe4ed569a7f6e99875488de7f59}{iwm\_alloc\_sched}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00251}00251 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_a66531537a35a621f7fe512cba4fe8745}{iwm\_alloc\_kw}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00252}00252 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_aadde24498e3d6555932cffc675f77dea}{iwm\_alloc\_ict}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00253}00253 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_a02cd867ea7efb2fbf81da7dd3dbe7b05}{iwm\_alloc\_rx\_ring}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__rx__ring}{iwm\_rx\_ring}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00254}00254 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_a958d1470f4098506e8868a5eee05c788}{iwm\_reset\_rx\_ring}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__rx__ring}{iwm\_rx\_ring}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00255}00255 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_a7d14cc5376b851393a6a02fe72a4242f}{iwm\_free\_rx\_ring}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__rx__ring}{iwm\_rx\_ring}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00256}00256 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_abaa72bdf83eb87f2a8bdecbc75936584}{iwm\_alloc\_tx\_ring}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__tx__ring}{iwm\_tx\_ring}} *,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00257}00257                                   \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00258}00258 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_aed9171af6accaaf9f581d1f0f8137944}{iwm\_reset\_tx\_ring}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__tx__ring}{iwm\_tx\_ring}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00259}00259 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_a87305f86cad7c54e7d6d7fe33e5343eb}{iwm\_free\_tx\_ring}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__tx__ring}{iwm\_tx\_ring}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00260}00260 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_afe3d7f1983238caff5e40b889728fbe0}{iwm\_enable\_interrupts}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00261}00261 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_ae798b664f07f4912afe3cc0b52aa2f42}{iwm\_restore\_interrupts}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00262}00262 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_a3e88bcc98e703758e6b69e766618d598}{iwm\_disable\_interrupts}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00263}00263 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_aefaedf70abb2236df0cac56295bf78e2}{iwm\_ict\_reset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00264}00264 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_ae61233c5b54e71cd531791f7beecf8cc}{iwm\_allow\_mcast}}(\textcolor{keyword}{struct} ieee80211vap *, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00265}00265 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_a0aac1aec10b3f7f3fdbec8d4252038c1}{iwm\_stop\_device}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00266}00266 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_a7b95a8bbadb1fc6ca84b7f42a9560f6b}{iwm\_nic\_config}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00267}00267 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_ad158104530b57f95c38ef361e3a2b19c}{iwm\_nic\_rx\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00268}00268 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_ac678b5ea29d6766fa28dee9e01c57f82}{iwm\_nic\_tx\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00269}00269 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_abcd09a4732b913d48203edae16ce7ff0}{iwm\_nic\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00270}00270 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_a2e8fc4a0db01fe65cf3fa630e5be6414}{iwm\_trans\_pcie\_fw\_alive}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *, uint32\_t);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00271}00271 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_ae4a3c515811e06c89164b1958ab77279}{iwm\_nvm\_read\_chunk}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *, uint16\_t, uint16\_t,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00272}00272                                    uint16\_t, uint8\_t *, uint16\_t *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00273}00273 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_a3dc02cf22c442cc7e7a62947ffd77f90}{iwm\_nvm\_read\_section}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *, uint16\_t, uint8\_t *,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00274}00274                                      uint16\_t *, uint32\_t);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00275}00275 \textcolor{keyword}{static} uint32\_t \mbox{\hyperlink{if__iwm_8c_acebc9cc101bdcb9cd4e7877ed662ab82}{iwm\_eeprom\_channel\_flags}}(uint16\_t);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00276}00276 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_a61c5bef0417dfdb03b66bf98554742b9}{iwm\_add\_channel\_band}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00277}00277                     \textcolor{keyword}{struct} ieee80211\_channel[], \textcolor{keywordtype}{int}, \textcolor{keywordtype}{int} *, \textcolor{keywordtype}{int}, \textcolor{keywordtype}{size\_t},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00278}00278                     \textcolor{keyword}{const} uint8\_t[]);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00279}00279 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_adb1f59351443b35ffa01f4338a19f0e9}{iwm\_init\_channel\_map}}(\textcolor{keyword}{struct} ieee80211com *, \textcolor{keywordtype}{int}, \textcolor{keywordtype}{int} *,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00280}00280                     \textcolor{keyword}{struct} ieee80211\_channel[]);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00281}00281 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__nvm__data}{iwm\_nvm\_data}} *}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00282}00282         \mbox{\hyperlink{if__iwm_8c_a1fb452939f6d6611b988986520104330}{iwm\_parse\_nvm\_data}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *, \textcolor{keyword}{const} uint16\_t *,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00283}00283                            \textcolor{keyword}{const} uint16\_t *, \textcolor{keyword}{const} uint16\_t *,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00284}00284                            \textcolor{keyword}{const} uint16\_t *, \textcolor{keyword}{const} uint16\_t *,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00285}00285                            \textcolor{keyword}{const} uint16\_t *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00286}00286 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_a17cd82bde37907ca80043250f10ce685}{iwm\_free\_nvm\_data}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__nvm__data}{iwm\_nvm\_data}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00287}00287 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_aadd6beca0e2545f91efdea91d02a0146}{iwm\_set\_hw\_address\_family\_8000}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00288}00288                                                \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__nvm__data}{iwm\_nvm\_data}} *,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00289}00289                                                \textcolor{keyword}{const} uint16\_t *,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00290}00290                                                \textcolor{keyword}{const} uint16\_t *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00291}00291 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_a9e33b16b4920b42b715190cd21d4b807}{iwm\_get\_sku}}(\textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *, \textcolor{keyword}{const} uint16\_t *,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00292}00292                             \textcolor{keyword}{const} uint16\_t *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00293}00293 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_a65949cc9575d51ea89193281d02bc20a}{iwm\_get\_nvm\_version}}(\textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *, \textcolor{keyword}{const} uint16\_t *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00294}00294 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_a616f6388427af0fe20f5de0f2dc8ae13}{iwm\_get\_radio\_cfg}}(\textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *, \textcolor{keyword}{const} uint16\_t *,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00295}00295                                   \textcolor{keyword}{const} uint16\_t *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00296}00296 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_a524e5416cf88ebe8f643e6c8021edf47}{iwm\_get\_n\_hw\_addrs}}(\textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00297}00297                                    \textcolor{keyword}{const} uint16\_t *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00298}00298 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_aa623cd1db2dde7c9efb8bf7fe125d3f8}{iwm\_set\_radio\_cfg}}(\textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00299}00299                                   \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__nvm__data}{iwm\_nvm\_data}} *, uint32\_t);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00300}00300 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__nvm__data}{iwm\_nvm\_data}} *}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00301}00301         \mbox{\hyperlink{if__iwm_8c_a9d580665467e0ce76ac94c6f8d62f332}{iwm\_parse\_nvm\_sections}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__nvm__section}{iwm\_nvm\_section}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00302}00302 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_a8022b1259eb9d94e86264a6f06bb23af}{iwm\_nvm\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00303}00303 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_a48609f858a0fcf23ff12f77e7f938ee8}{iwm\_pcie\_load\_section}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *, uint8\_t,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00304}00304                                       \textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__fw__desc}{iwm\_fw\_desc}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00305}00305 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_a1c0447531c69b575b5e81bed2741f6ce}{iwm\_pcie\_load\_firmware\_chunk}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *, uint32\_t,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00306}00306                                              bus\_addr\_t, uint32\_t);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00307}00307 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_a4b4f4f8e99910dc8da61afa5509e9f0d}{iwm\_pcie\_load\_cpu\_sections\_8000}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00308}00308                                                 \textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__fw__img}{iwm\_fw\_img}} *,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00309}00309                                                 \textcolor{keywordtype}{int}, \textcolor{keywordtype}{int} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00310}00310 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_adee412e2840c87f7ba1c1d1745a959f4}{iwm\_pcie\_load\_cpu\_sections}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00311}00311                                            \textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__fw__img}{iwm\_fw\_img}} *,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00312}00312                                            \textcolor{keywordtype}{int}, \textcolor{keywordtype}{int} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00313}00313 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_a87b5db7470855f03edc90f9c34873b7f}{iwm\_pcie\_load\_given\_ucode\_8000}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00314}00314                                                \textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__fw__img}{iwm\_fw\_img}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00315}00315 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_a0cea67712845d3b16f2b8a17133b70a9}{iwm\_pcie\_load\_given\_ucode}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00316}00316                                           \textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__fw__img}{iwm\_fw\_img}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00317}00317 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_a2855baaac2ebd905359a2475128a1103}{iwm\_start\_fw}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *, \textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__fw__img}{iwm\_fw\_img}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00318}00318 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_adcaf15bb311c4eb0dc4ca98374b371b3}{iwm\_send\_tx\_ant\_cfg}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *, uint8\_t);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00319}00319 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_a8006bb57d2eac8cf8b28d750cf3b82b7}{iwm\_send\_phy\_cfg\_cmd}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00320}00320 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_af53df91d7015b4925b5c2938068b6856}{iwm\_load\_ucode\_wait\_alive}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00321}00321                                               \textcolor{keyword}{enum} \mbox{\hyperlink{if__iwmvar_8h_a680b88b47a331f93dcdf230bf57590ac}{iwm\_ucode\_type}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00322}00322 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_a11aec544b58ddec5ef1ca3278061f9c7}{iwm\_run\_init\_ucode}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00323}00323 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_a0dcd79bb68188bdefcdc0b7fe0eee45a}{iwm\_config\_ltr}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00324}00324 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_aa1b2823899c8eee4079786fce140df73}{iwm\_rx\_addbuf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *, \textcolor{keywordtype}{int}, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00325}00325 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_aa2b8ed080d154cd2bff59b15c657d59f}{iwm\_rx\_rx\_phy\_cmd}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00326}00326                                       \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__rx__packet}{iwm\_rx\_packet}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00327}00327 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_a2d5381cbd9b781c2b1e2eb95174791d2}{iwm\_get\_noise}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00328}00328                     \textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__statistics__rx__non__phy}{iwm\_statistics\_rx\_non\_phy}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00329}00329 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_a5f5ea0d62c3a15bb6bde9da74a60c89a}{iwm\_handle\_rx\_statistics}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00330}00330                     \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__rx__packet}{iwm\_rx\_packet}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00331}00331 \textcolor{keyword}{static} \textcolor{keywordtype}{bool}     \mbox{\hyperlink{if__iwm_8c_a3a60596a2f04542b737f981208a97d58}{iwm\_rx\_mpdu}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *, \textcolor{keyword}{struct} mbuf *,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00332}00332                     uint32\_t, \textcolor{keywordtype}{bool});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00333}00333 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_aa097595d77774ba5730e4a57ac86932e}{iwm\_rx\_tx\_cmd\_single}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00334}00334                                          \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__rx__packet}{iwm\_rx\_packet}} *,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00335}00335                                          \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__node}{iwm\_node}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00336}00336 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_a4110e078ef1f59f656cffbe3a4d8cee2}{iwm\_rx\_tx\_cmd}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__rx__packet}{iwm\_rx\_packet}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00337}00337 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_a00d2c8a71fbdf5f5645e8b44135cf2ae}{iwm\_cmd\_done}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__rx__packet}{iwm\_rx\_packet}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00338}00338 \textcolor{preprocessor}{\#if 0}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00339}00339 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     iwm\_update\_sched(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *, \textcolor{keywordtype}{int}, \textcolor{keywordtype}{int}, uint8\_t,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00340}00340                                  uint16\_t);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00341}00341 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00342}00342 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__rate}{iwm\_rate}} *}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00343}00343         \mbox{\hyperlink{if__iwm_8c_a178a81815c44051bdf6555ae9caca65b}{iwm\_tx\_fill\_cmd}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__node}{iwm\_node}} *,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00344}00344                         \textcolor{keyword}{struct} mbuf *, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__tx__cmd}{iwm\_tx\_cmd}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00345}00345 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_a376e1489b8d710c2b759c2b74ad84808}{iwm\_tx}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *, \textcolor{keyword}{struct} mbuf *,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00346}00346                        \textcolor{keyword}{struct} ieee80211\_node *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00347}00347 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_a0e58378103e84487e7ee8b5bc7f42f38}{iwm\_raw\_xmit}}(\textcolor{keyword}{struct} ieee80211\_node *, \textcolor{keyword}{struct} mbuf *,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00348}00348                              \textcolor{keyword}{const} \textcolor{keyword}{struct} ieee80211\_bpf\_params *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00349}00349 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_a0314d524d42c8172bfac5233b4502ad8}{iwm\_update\_quotas}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__vap}{iwm\_vap}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00350}00350 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_abb26bc3b3bc33889d06d11c89d5bac56}{iwm\_auth}}(\textcolor{keyword}{struct} ieee80211vap *, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00351}00351 \textcolor{keyword}{static} \textcolor{keyword}{struct }ieee80211\_node *}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00352}00352                 \mbox{\hyperlink{if__iwm_8c_a28d3e75328a677098089201db9922cd6}{iwm\_node\_alloc}}(\textcolor{keyword}{struct} ieee80211vap *,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00353}00353                                \textcolor{keyword}{const} uint8\_t[IEEE80211\_ADDR\_LEN]);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00354}00354 \textcolor{keyword}{static} uint8\_t  \mbox{\hyperlink{if__iwm_8c_a9edea4b80e47984bd4b4e6a5929625f6}{iwm\_rate\_from\_ucode\_rate}}(uint32\_t);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00355}00355 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_a27fa2e4e7df3a8837691fb2d965e3335}{iwm\_rate2ridx}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *, uint8\_t);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00356}00356 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_a8340199cf0662991ff3258c7236a6660}{iwm\_setrates}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__node}{iwm\_node}} *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00357}00357 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_a2206679645aba97dcc6b5e5cec53c8b8}{iwm\_newstate}}(\textcolor{keyword}{struct} ieee80211vap *, \textcolor{keyword}{enum} ieee80211\_state, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00358}00358 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_aaa155c13ec0523930d0be8f3cba9a9da}{iwm\_endscan\_cb}}(\textcolor{keywordtype}{void} *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00359}00359 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_ab1eec3afbd901b2e2b683fb563472dd8}{iwm\_send\_bt\_init\_conf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00360}00360 \textcolor{keyword}{static} boolean\_t \mbox{\hyperlink{if__iwm_8c_ae55a8114a6b5bc01c29e1c353edccd6e}{iwm\_is\_lar\_supported}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00361}00361 \textcolor{keyword}{static} boolean\_t \mbox{\hyperlink{if__iwm_8c_ac010032a58072d78c6c91e29152d5b39}{iwm\_is\_wifi\_mcc\_supported}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00362}00362 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_ae632bbe9af83a24021523ef7b9494167}{iwm\_send\_update\_mcc\_cmd}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00363}00363 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_ad4d6b0516f9e0dfac348e5373313cacb}{iwm\_tt\_tx\_backoff}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *, uint32\_t);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00364}00364 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_a5a2a206119954b9f2d00d4d4c2d3cdbc}{iwm\_init\_hw}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00365}00365 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_a2f1740409045c3379d208637e549985c}{iwm\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00366}00366 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_a48e9d98a5d061d2b24bd4bfbd4f798da}{iwm\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00367}00367 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_a0825fe7959f3d4f96a3435079bd1b37d}{iwm\_stop}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00368}00368 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_a14ef35a8916993cdb67f1dd50737957f}{iwm\_watchdog}}(\textcolor{keywordtype}{void} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00369}00369 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_a72f5d3a3ce113c5610b38c9aa09232c9}{iwm\_parent}}(\textcolor{keyword}{struct} ieee80211com *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00370}00370 \textcolor{preprocessor}{\#ifdef IWM\_DEBUG}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00371}00371 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00372}00372                 iwm\_desc\_lookup(uint32\_t);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00373}00373 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     iwm\_nic\_error(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00374}00374 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     iwm\_nic\_umac\_error(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00375}00375 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00376}00376 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_aecba9ae5d85dfb270cf2e369496c4386}{iwm\_handle\_rxb}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *, \textcolor{keyword}{struct} mbuf *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00377}00377 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_a6cde834579010be718e17ab03ca9cf2e}{iwm\_notif\_intr}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00378}00378 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_a4d392305ad6239312228b80f25991af1}{iwm\_intr}}(\textcolor{keywordtype}{void} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00379}00379 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_a040a4326fcc1962a394f98c81b4030bc}{iwm\_attach}}(device\_t);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00380}00380 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_a94d559e1f6be77b9e5ff735e59ec57e3}{iwm\_is\_valid\_ether\_addr}}(uint8\_t *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00381}00381 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_ac3132cd5accd4c10b6f250884b8495dd}{iwm\_preinit}}(\textcolor{keywordtype}{void} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00382}00382 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_a7adce334c7f29c6e2de85ba57d1c804b}{iwm\_detach\_local}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00383}00383 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_a944d38d5270267ff969a621263677959}{iwm\_init\_task}}(\textcolor{keywordtype}{void} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00384}00384 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_a7e13bcc1e97179f2592af29536f6cccb}{iwm\_radiotap\_attach}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00385}00385 \textcolor{keyword}{static} \textcolor{keyword}{struct }ieee80211vap *}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00386}00386                 \mbox{\hyperlink{if__iwm_8c_abddc45cd91f738a92881c4653a237837}{iwm\_vap\_create}}(\textcolor{keyword}{struct} ieee80211com *,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00387}00387                                \textcolor{keyword}{const} \textcolor{keywordtype}{char} [IFNAMSIZ], \textcolor{keywordtype}{int},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00388}00388                                \textcolor{keyword}{enum} ieee80211\_opmode, \textcolor{keywordtype}{int},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00389}00389                                \textcolor{keyword}{const} uint8\_t [IEEE80211\_ADDR\_LEN],}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00390}00390                                \textcolor{keyword}{const} uint8\_t [IEEE80211\_ADDR\_LEN]);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00391}00391 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_a4de7dd4772edc03a630a592f2ae7faa6}{iwm\_vap\_delete}}(\textcolor{keyword}{struct} ieee80211vap *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00392}00392 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_a7bae0f1004518a3ebc5c68b50a2e02b8}{iwm\_xmit\_queue\_drain}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00393}00393 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_a0717f67f8a510634dd723d9156e5c764}{iwm\_scan\_start}}(\textcolor{keyword}{struct} ieee80211com *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00394}00394 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_af93408767f794b4588c224c0cb086410}{iwm\_scan\_end}}(\textcolor{keyword}{struct} ieee80211com *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00395}00395 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_ae40840b32f56ef4f02e75847f53f0052}{iwm\_update\_mcast}}(\textcolor{keyword}{struct} ieee80211com *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00396}00396 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_ab3478e87ee460e350079b9aab948f128}{iwm\_set\_channel}}(\textcolor{keyword}{struct} ieee80211com *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00397}00397 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_a86f8ce5d67db48377a1afcbebbeba8ce}{iwm\_scan\_curchan}}(\textcolor{keyword}{struct} ieee80211\_scan\_state *, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00398}00398 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__iwm_8c_a8684f7f9c2203601d0ce25c45ce61301}{iwm\_scan\_mindwell}}(\textcolor{keyword}{struct} ieee80211\_scan\_state *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00399}00399 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_aa0ae987f67c7fddd1a419280b70a5599}{iwm\_detach}}(device\_t);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00400}00400 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00401}\mbox{\hyperlink{if__iwm_8c_a67c60bb19e042898b3d2a95d8f668aa9}{00401}} \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__iwm_8c_a67c60bb19e042898b3d2a95d8f668aa9}{iwm\_lar\_disable}} = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00402}\mbox{\hyperlink{if__iwm_8c_a2274320fbf6c6af1f94e71c9f53126fb}{00402}} \mbox{\hyperlink{if__iwm_8c_a2274320fbf6c6af1f94e71c9f53126fb}{TUNABLE\_INT}}(\textcolor{stringliteral}{"{}hw.iwm.lar.disable"{}}, \&\mbox{\hyperlink{if__iwm_8c_a67c60bb19e042898b3d2a95d8f668aa9}{iwm\_lar\_disable}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00403}00403 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00404}00404 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00405}00405 \textcolor{comment}{ * Firmware parser.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00406}00406 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00407}00407 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00408}00408 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00409}\mbox{\hyperlink{if__iwm_8c_a20932a89f82730d59f86d630993b4c95}{00409}} \mbox{\hyperlink{if__iwm_8c_a20932a89f82730d59f86d630993b4c95}{iwm\_store\_cscheme}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keyword}{const} uint8\_t *data, \textcolor{keywordtype}{size\_t} dlen)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00410}00410 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00411}00411         \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__fw__cscheme__list}{iwm\_fw\_cscheme\_list}} *l = (\textcolor{keyword}{const} \textcolor{keywordtype}{void} *)data;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00412}00412 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00413}00413         \textcolor{keywordflow}{if} (dlen < \textcolor{keyword}{sizeof}(*l) ||}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00414}00414             dlen < \textcolor{keyword}{sizeof}(l-\/>\mbox{\hyperlink{structiwm__fw__cscheme__list_aead9f22bd1837b36c374eaa4c96686be}{size}}) + l-\/>\mbox{\hyperlink{structiwm__fw__cscheme__list_aead9f22bd1837b36c374eaa4c96686be}{size}} * \textcolor{keyword}{sizeof}(*l-\/>\mbox{\hyperlink{structiwm__fw__cscheme__list_a7f7ca511e7df3c2c005ce388a8811fa7}{cs}}))}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00415}00415                 \textcolor{keywordflow}{return} EINVAL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00416}00416 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00417}00417         \textcolor{comment}{/* we don't actually store anything for now, always use s/w crypto */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00418}00418 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00419}00419         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00420}00420 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00421}00421 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00422}00422 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00423}\mbox{\hyperlink{if__iwm_8c_a12dccea60cb55453b1c6596861518b5e}{00423}} \mbox{\hyperlink{if__iwm_8c_a12dccea60cb55453b1c6596861518b5e}{iwm\_firmware\_store\_section}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00424}00424     \textcolor{keyword}{enum} \mbox{\hyperlink{if__iwmvar_8h_a680b88b47a331f93dcdf230bf57590ac}{iwm\_ucode\_type}} type, \textcolor{keyword}{const} uint8\_t *data, \textcolor{keywordtype}{size\_t} dlen)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00425}00425 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00426}00426         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__fw__img}{iwm\_fw\_img}} *fws;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00427}00427         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__fw__desc}{iwm\_fw\_desc}} *fwone;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00428}00428 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00429}00429         \textcolor{keywordflow}{if} (type >= \mbox{\hyperlink{if__iwmvar_8h_a680b88b47a331f93dcdf230bf57590aca74da95fe11430b4edd8a09decf5638de}{IWM\_UCODE\_TYPE\_MAX}})}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00430}00430                 \textcolor{keywordflow}{return} EINVAL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00431}00431         \textcolor{keywordflow}{if} (dlen < \textcolor{keyword}{sizeof}(uint32\_t))}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00432}00432                 \textcolor{keywordflow}{return} EINVAL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00433}00433 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00434}00434         fws = \&sc-\/>\mbox{\hyperlink{structiwm__softc_a1028ec58bea1aeb56974087433df5092}{sc\_fw}}.\mbox{\hyperlink{structiwm__fw__info_a8421a11dce66fb699b5390ba54cf29bd}{img}}[type];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00435}00435         \textcolor{keywordflow}{if} (fws-\/>\mbox{\hyperlink{structiwm__fw__img_a99f2dad3b2cbbd20275908bb3813f02d}{fw\_count}} >= \mbox{\hyperlink{if__iwmvar_8h_affa5de77078bd6ab5d6fdadbcfd3405a}{IWM\_UCODE\_SECTION\_MAX}})}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00436}00436                 \textcolor{keywordflow}{return} EINVAL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00437}00437 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00438}00438         fwone = \&fws-\/>\mbox{\hyperlink{structiwm__fw__img_a89a37a9492675a952812c64720e551cd}{sec}}[fws-\/>\mbox{\hyperlink{structiwm__fw__img_a99f2dad3b2cbbd20275908bb3813f02d}{fw\_count}}];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00439}00439 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00440}00440         \textcolor{comment}{/* first 32bit are device load offset */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00441}00441         memcpy(\&fwone-\/>\mbox{\hyperlink{structiwm__fw__desc_a46ae9c925ad999cef73b990ddd2e338c}{offset}}, \mbox{\hyperlink{structiwm__fw__desc_a54ef268b1050c35b257fe5276cf72aba}{data}}, \textcolor{keyword}{sizeof}(uint32\_t));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00442}00442 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00443}00443         \textcolor{comment}{/* rest is data */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00444}00444         fwone-\/>\mbox{\hyperlink{structiwm__fw__desc_a54ef268b1050c35b257fe5276cf72aba}{data}} = \mbox{\hyperlink{structiwm__fw__desc_a54ef268b1050c35b257fe5276cf72aba}{data}} + \textcolor{keyword}{sizeof}(uint32\_t);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00445}00445         fwone-\/>\mbox{\hyperlink{structiwm__fw__desc_a920bcd5979054dbe5f6ab635e8d5d9c4}{len}} = dlen -\/ \textcolor{keyword}{sizeof}(uint32\_t);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00446}00446 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00447}00447         fws-\/>\mbox{\hyperlink{structiwm__fw__img_a99f2dad3b2cbbd20275908bb3813f02d}{fw\_count}}++;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00448}00448 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00449}00449         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00450}00450 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00451}00451 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00452}\mbox{\hyperlink{if__iwm_8c_a24923b5bd03f08aa70df37a3ba3f4d77}{00452}} \textcolor{preprocessor}{\#define IWM\_DEFAULT\_SCAN\_CHANNELS 40}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00453}00453 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00454}00454 \textcolor{comment}{/* iwlwifi: iwl-\/drv.c */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00455}\mbox{\hyperlink{structiwm__tlv__calib__data}{00455}} \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__tlv__calib__data}{iwm\_tlv\_calib\_data}} \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00456}\mbox{\hyperlink{structiwm__tlv__calib__data_abcae2a33281fe63c9f6fe59fe3925195}{00456}}         uint32\_t \mbox{\hyperlink{structiwm__tlv__calib__data_abcae2a33281fe63c9f6fe59fe3925195}{ucode\_type}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00457}\mbox{\hyperlink{structiwm__tlv__calib__data_a1a74a8d778257b07b95aee8ee48f48c9}{00457}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__tlv__calib__ctrl}{iwm\_tlv\_calib\_ctrl}} \mbox{\hyperlink{structiwm__tlv__calib__data_a1a74a8d778257b07b95aee8ee48f48c9}{calib}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00458}\mbox{\hyperlink{if__iwm_8c_ac68066da98bc2d0edc402fac7467cd6b}{00458}} \} \mbox{\hyperlink{if__iwm_8c_ac68066da98bc2d0edc402fac7467cd6b}{\_\_packed}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00459}00459 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00460}00460 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00461}\mbox{\hyperlink{if__iwm_8c_a223722e1d847e8afbf8625de95ea2689}{00461}} \mbox{\hyperlink{if__iwm_8c_a223722e1d847e8afbf8625de95ea2689}{iwm\_set\_default\_calib}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keyword}{const} \textcolor{keywordtype}{void} *data)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00462}00462 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00463}00463         \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__tlv__calib__data}{iwm\_tlv\_calib\_data}} *def\_calib = data;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00464}00464         uint32\_t \mbox{\hyperlink{structiwm__tlv__calib__data_abcae2a33281fe63c9f6fe59fe3925195}{ucode\_type}} = le32toh(def\_calib-\/>\mbox{\hyperlink{structiwm__tlv__calib__data_abcae2a33281fe63c9f6fe59fe3925195}{ucode\_type}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00465}00465 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00466}00466         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structiwm__tlv__calib__data_abcae2a33281fe63c9f6fe59fe3925195}{ucode\_type}} >= \mbox{\hyperlink{if__iwmvar_8h_a680b88b47a331f93dcdf230bf57590aca74da95fe11430b4edd8a09decf5638de}{IWM\_UCODE\_TYPE\_MAX}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00467}00467                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00468}00468                     \textcolor{stringliteral}{"{}Wrong ucode\_type \%u for default "{}}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00469}00469                     \textcolor{stringliteral}{"{}calibration.\(\backslash\)n"{}}, \mbox{\hyperlink{structiwm__tlv__calib__data_abcae2a33281fe63c9f6fe59fe3925195}{ucode\_type}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00470}00470                 \textcolor{keywordflow}{return} EINVAL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00471}00471         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00472}00472 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00473}00473         sc-\/>\mbox{\hyperlink{structiwm__softc_a06b8ab35a975ccdb9bf5e6ef70a7dd5d}{sc\_default\_calib}}[\mbox{\hyperlink{structiwm__tlv__calib__data_abcae2a33281fe63c9f6fe59fe3925195}{ucode\_type}}].\mbox{\hyperlink{structiwm__tlv__calib__ctrl_a59445fcb70b590061b7cf43feff56fc8}{flow\_trigger}} =}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00474}00474             def\_calib-\/>\mbox{\hyperlink{structiwm__tlv__calib__data_a1a74a8d778257b07b95aee8ee48f48c9}{calib}}.\mbox{\hyperlink{structiwm__tlv__calib__ctrl_a59445fcb70b590061b7cf43feff56fc8}{flow\_trigger}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00475}00475         sc-\/>\mbox{\hyperlink{structiwm__softc_a06b8ab35a975ccdb9bf5e6ef70a7dd5d}{sc\_default\_calib}}[\mbox{\hyperlink{structiwm__tlv__calib__data_abcae2a33281fe63c9f6fe59fe3925195}{ucode\_type}}].\mbox{\hyperlink{structiwm__tlv__calib__ctrl_a4f58df9dd5ff8a41b6b0ebd37e07a764}{event\_trigger}} =}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00476}00476             def\_calib-\/>\mbox{\hyperlink{structiwm__tlv__calib__data_a1a74a8d778257b07b95aee8ee48f48c9}{calib}}.\mbox{\hyperlink{structiwm__tlv__calib__ctrl_a4f58df9dd5ff8a41b6b0ebd37e07a764}{event\_trigger}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00477}00477 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00478}00478         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00479}00479 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00480}00480 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00481}00481 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00482}\mbox{\hyperlink{if__iwm_8c_a1c256d77ca584f7fcdb6fff6827c3cc7}{00482}} \mbox{\hyperlink{if__iwm_8c_a1c256d77ca584f7fcdb6fff6827c3cc7}{iwm\_set\_ucode\_api\_flags}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keyword}{const} uint8\_t *data,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00483}00483                         \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__ucode__capabilities}{iwm\_ucode\_capabilities}} *capa)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00484}00484 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00485}00485         \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__ucode__api}{iwm\_ucode\_api}} *ucode\_api = (\textcolor{keyword}{const} \textcolor{keywordtype}{void} *)data;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00486}00486         uint32\_t \mbox{\hyperlink{structiwm__ucode__api_aebc16acb32aaf67482530dd0b961845c}{api\_index}} = le32toh(ucode\_api-\/>\mbox{\hyperlink{structiwm__ucode__api_aebc16acb32aaf67482530dd0b961845c}{api\_index}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00487}00487         uint32\_t \mbox{\hyperlink{structiwm__ucode__api_a55c105fb155a557031b2bb5babefdeb1}{api\_flags}} = le32toh(ucode\_api-\/>\mbox{\hyperlink{structiwm__ucode__api_a55c105fb155a557031b2bb5babefdeb1}{api\_flags}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00488}00488         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00489}00489 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00490}00490         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structiwm__ucode__api_aebc16acb32aaf67482530dd0b961845c}{api\_index}} >= howmany(\mbox{\hyperlink{if__iwmreg_8h_a6cfef23e8706770aaad49aa972eab171}{IWM\_NUM\_UCODE\_TLV\_API}}, 32)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00491}00491                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00492}00492                     \textcolor{stringliteral}{"{}api flags index \%d larger than supported by driver\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00493}00493                     \mbox{\hyperlink{structiwm__ucode__api_aebc16acb32aaf67482530dd0b961845c}{api\_index}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00494}00494                 \textcolor{comment}{/* don't return an error so we can load FW that has more bits */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00495}00495                 \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00496}00496         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00497}00497 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00498}00498         \textcolor{keywordflow}{for} (i = 0; i < 32; i++) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00499}00499                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structiwm__ucode__api_a55c105fb155a557031b2bb5babefdeb1}{api\_flags}} \& (1U << i))}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00500}00500                         setbit(capa-\/>\mbox{\hyperlink{structiwm__ucode__capabilities_a3ec324e2932abe78ec7eae9ed6ab1312}{enabled\_api}}, i + 32 * \mbox{\hyperlink{structiwm__ucode__api_aebc16acb32aaf67482530dd0b961845c}{api\_index}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00501}00501         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00502}00502 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00503}00503         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00504}00504 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00505}00505 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00506}00506 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00507}\mbox{\hyperlink{if__iwm_8c_a023048a6b390ccec85b282c642886b16}{00507}} \mbox{\hyperlink{if__iwm_8c_a023048a6b390ccec85b282c642886b16}{iwm\_set\_ucode\_capabilities}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keyword}{const} uint8\_t *data,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00508}00508                            \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__ucode__capabilities}{iwm\_ucode\_capabilities}} *capa)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00509}00509 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00510}00510         \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__ucode__capa}{iwm\_ucode\_capa}} *ucode\_capa = (\textcolor{keyword}{const} \textcolor{keywordtype}{void} *)data;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00511}00511         uint32\_t \mbox{\hyperlink{structiwm__ucode__capa_ad506a07064755133176823898e8c0bb9}{api\_index}} = le32toh(ucode\_capa-\/>\mbox{\hyperlink{structiwm__ucode__capa_ad506a07064755133176823898e8c0bb9}{api\_index}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00512}00512         uint32\_t api\_flags = le32toh(ucode\_capa-\/>\mbox{\hyperlink{structiwm__ucode__capa_a581ca6e44fa64dcdb067041d12c72d38}{api\_capa}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00513}00513         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00514}00514 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00515}00515         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structiwm__ucode__capa_ad506a07064755133176823898e8c0bb9}{api\_index}} >= howmany(\mbox{\hyperlink{if__iwmreg_8h_ace6f87256f586cf7a649b4ad17e76014}{IWM\_NUM\_UCODE\_TLV\_CAPA}}, 32)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00516}00516                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00517}00517                     \textcolor{stringliteral}{"{}capa flags index \%d larger than supported by driver\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00518}00518                     \mbox{\hyperlink{structiwm__ucode__capa_ad506a07064755133176823898e8c0bb9}{api\_index}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00519}00519                 \textcolor{comment}{/* don't return an error so we can load FW that has more bits */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00520}00520                 \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00521}00521         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00522}00522 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00523}00523         \textcolor{keywordflow}{for} (i = 0; i < 32; i++) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00524}00524                 \textcolor{keywordflow}{if} (api\_flags \& (1U << i))}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00525}00525                         setbit(capa-\/>\mbox{\hyperlink{structiwm__ucode__capabilities_a37a08397500f58d9b36dbfcaa6bee769}{enabled\_capa}}, i + 32 * \mbox{\hyperlink{structiwm__ucode__capa_ad506a07064755133176823898e8c0bb9}{api\_index}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00526}00526         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00527}00527 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00528}00528         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00529}00529 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00530}00530 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00531}00531 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00532}\mbox{\hyperlink{if__iwm_8c_aeb37ae4f615a7120e6e2ccde82cf03c5}{00532}} \mbox{\hyperlink{if__iwm_8c_aeb37ae4f615a7120e6e2ccde82cf03c5}{iwm\_fw\_info\_free}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__fw__info}{iwm\_fw\_info}} *fw)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00533}00533 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00534}00534         firmware\_put(fw-\/>\mbox{\hyperlink{structiwm__fw__info_a6e60199c0b9af7740442593ad3357e27}{fw\_fp}}, FIRMWARE\_UNLOAD);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00535}00535         fw-\/>\mbox{\hyperlink{structiwm__fw__info_a6e60199c0b9af7740442593ad3357e27}{fw\_fp}} = NULL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00536}00536         memset(fw-\/>\mbox{\hyperlink{structiwm__fw__info_a8421a11dce66fb699b5390ba54cf29bd}{img}}, 0, \textcolor{keyword}{sizeof}(fw-\/>\mbox{\hyperlink{structiwm__fw__info_a8421a11dce66fb699b5390ba54cf29bd}{img}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00537}00537 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00538}00538 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00539}00539 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00540}\mbox{\hyperlink{if__iwm_8c_ab18fcb1d8efa47c66392572d3aa6ccba}{00540}} \mbox{\hyperlink{if__iwm_8c_ab18fcb1d8efa47c66392572d3aa6ccba}{iwm\_read\_firmware}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00541}00541 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00542}00542         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__fw__info}{iwm\_fw\_info}} *fw = \&sc-\/>\mbox{\hyperlink{structiwm__softc_a1028ec58bea1aeb56974087433df5092}{sc\_fw}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00543}00543         \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__tlv__ucode__header}{iwm\_tlv\_ucode\_header}} *uhdr;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00544}00544         \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__ucode__tlv}{iwm\_ucode\_tlv}} *tlv;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00545}00545         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__ucode__capabilities}{iwm\_ucode\_capabilities}} *capa = \&sc-\/>\mbox{\hyperlink{structiwm__softc_a1028ec58bea1aeb56974087433df5092}{sc\_fw}}.\mbox{\hyperlink{structiwm__fw__info_a25f2d7eba69a1f9ff4b9b5fd7649d329}{ucode\_capa}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00546}00546         \textcolor{keyword}{enum} \mbox{\hyperlink{if__iwmreg_8h_a98300831189dd68baa46dac9a308c91d}{iwm\_ucode\_tlv\_type}} tlv\_type;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00547}00547         \textcolor{keyword}{const} \textcolor{keyword}{struct }firmware *fwp;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00548}00548         \textcolor{keyword}{const} uint8\_t *data;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00549}00549         uint32\_t tlv\_len;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00550}00550         uint32\_t usniffer\_img;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00551}00551         \textcolor{keyword}{const} uint8\_t *tlv\_data;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00552}00552         uint32\_t paging\_mem\_size;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00553}00553         \textcolor{keywordtype}{int} num\_of\_cpus;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00554}00554         \textcolor{keywordtype}{int} error = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00555}00555         \textcolor{keywordtype}{size\_t} len;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00556}00556 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00557}00557         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00558}00558 \textcolor{comment}{         * Load firmware into driver memory.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00559}00559 \textcolor{comment}{         * fw\_fp will be set.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00560}00560 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00561}00561         fwp = firmware\_get(sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_af3c3b18652372efe786c80a545551dc2}{fw\_name}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00562}00562         \textcolor{keywordflow}{if} (fwp == NULL) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00563}00563                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00564}00564                     \textcolor{stringliteral}{"{}could not read firmware \%s (error \%d)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00565}00565                     sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_af3c3b18652372efe786c80a545551dc2}{fw\_name}}, error);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00566}00566                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00567}00567         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00568}00568         fw-\/>\mbox{\hyperlink{structiwm__fw__info_a6e60199c0b9af7740442593ad3357e27}{fw\_fp}} = fwp;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00569}00569 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00570}00570         \textcolor{comment}{/* (Re-\/)Initialize default values. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00571}00571         capa-\/>\mbox{\hyperlink{structiwm__ucode__capabilities_a9c71e6074bd0f72537e41a4aeb536f82}{flags}} = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00572}00572         capa-\/>\mbox{\hyperlink{structiwm__ucode__capabilities_a104ee4efda20392820cfbd77504c02fc}{max\_probe\_length}} = \mbox{\hyperlink{if__iwmreg_8h_a0fb2c8785cf25c6d31246a731ee954fd}{IWM\_DEFAULT\_MAX\_PROBE\_LENGTH}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00573}00573         capa-\/>\mbox{\hyperlink{structiwm__ucode__capabilities_aafeb905ccbc340807d8eb90ab180662c}{n\_scan\_channels}} = \mbox{\hyperlink{if__iwm_8c_a24923b5bd03f08aa70df37a3ba3f4d77}{IWM\_DEFAULT\_SCAN\_CHANNELS}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00574}00574         memset(capa-\/>\mbox{\hyperlink{structiwm__ucode__capabilities_a37a08397500f58d9b36dbfcaa6bee769}{enabled\_capa}}, 0, \textcolor{keyword}{sizeof}(capa-\/>\mbox{\hyperlink{structiwm__ucode__capabilities_a37a08397500f58d9b36dbfcaa6bee769}{enabled\_capa}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00575}00575         memset(capa-\/>\mbox{\hyperlink{structiwm__ucode__capabilities_a3ec324e2932abe78ec7eae9ed6ab1312}{enabled\_api}}, 0, \textcolor{keyword}{sizeof}(capa-\/>\mbox{\hyperlink{structiwm__ucode__capabilities_a3ec324e2932abe78ec7eae9ed6ab1312}{enabled\_api}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00576}00576         memset(sc-\/>\mbox{\hyperlink{structiwm__softc_a9fac93466c413035ac40b2122fa66934}{sc\_fw\_mcc}}, 0, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structiwm__softc_a9fac93466c413035ac40b2122fa66934}{sc\_fw\_mcc}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00577}00577 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00578}00578         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00579}00579 \textcolor{comment}{         * Parse firmware contents}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00580}00580 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00581}00581 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00582}00582         uhdr = (\textcolor{keyword}{const} \textcolor{keywordtype}{void} *)fw-\/>\mbox{\hyperlink{structiwm__fw__info_a6e60199c0b9af7740442593ad3357e27}{fw\_fp}}-\/>data;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00583}00583         if (*(\textcolor{keyword}{const} uint32\_t *)fw-\/>\mbox{\hyperlink{structiwm__fw__info_a6e60199c0b9af7740442593ad3357e27}{fw\_fp}}-\/>data != 0}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00584}00584             || le32toh(uhdr-\/>\mbox{\hyperlink{structiwm__tlv__ucode__header_ae0d6ce7eeb922064af526ac11220c342}{magic}}) != \mbox{\hyperlink{if__iwmreg_8h_ad998c0e9ff91d550b25690738ed820be}{IWM\_TLV\_UCODE\_MAGIC}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00585}00585                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}invalid firmware \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00586}00586                     sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_af3c3b18652372efe786c80a545551dc2}{fw\_name}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00587}00587                 error = EINVAL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00588}00588                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00589}00589         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00590}00590 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00591}00591         snprintf(sc-\/>\mbox{\hyperlink{structiwm__softc_ac8f38643711c947e4ceeef62da6f8f63}{sc\_fwver}}, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structiwm__softc_ac8f38643711c947e4ceeef62da6f8f63}{sc\_fwver}}), \textcolor{stringliteral}{"{}\%u.\%u (API ver \%u)"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00592}00592             \mbox{\hyperlink{if__iwmreg_8h_ae0857d9dfeabb678b55c1a85386c8fc9}{IWM\_UCODE\_MAJOR}}(le32toh(uhdr-\/>\mbox{\hyperlink{structiwm__tlv__ucode__header_aeadbc7c46d8beea9743f121e4954daa0}{ver}})),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00593}00593             \mbox{\hyperlink{if__iwmreg_8h_a55322ddad0d182619dd0dc09b99ea98c}{IWM\_UCODE\_MINOR}}(le32toh(uhdr-\/>\mbox{\hyperlink{structiwm__tlv__ucode__header_aeadbc7c46d8beea9743f121e4954daa0}{ver}})),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00594}00594             \mbox{\hyperlink{if__iwmreg_8h_adc65468feed144d7a43414ae2016fffc}{IWM\_UCODE\_API}}(le32toh(uhdr-\/>\mbox{\hyperlink{structiwm__tlv__ucode__header_aeadbc7c46d8beea9743f121e4954daa0}{ver}})));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00595}00595         data = uhdr-\/>\mbox{\hyperlink{structiwm__tlv__ucode__header_a761646e10cec99e1b964980970d81270}{data}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00596}00596         len = fw-\/>\mbox{\hyperlink{structiwm__fw__info_a6e60199c0b9af7740442593ad3357e27}{fw\_fp}}-\/>datasize -\/ \textcolor{keyword}{sizeof}(*uhdr);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00597}00597 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00598}00598         \textcolor{keywordflow}{while} (len >= \textcolor{keyword}{sizeof}(*tlv)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00599}00599                 len -\/= \textcolor{keyword}{sizeof}(*tlv);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00600}00600                 tlv = (\textcolor{keyword}{const} \textcolor{keywordtype}{void} *)data;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00601}00601 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00602}00602                 tlv\_len = le32toh(tlv-\/>\mbox{\hyperlink{structiwm__ucode__tlv_ae4ae72c16bb869e915be3c426fbc01cd}{length}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00603}00603                 tlv\_type = le32toh(tlv-\/>\mbox{\hyperlink{structiwm__ucode__tlv_af392f7548069e0c1588f8b332b419c0a}{type}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00604}00604                 tlv\_data = tlv-\/>\mbox{\hyperlink{structiwm__ucode__tlv_a9ad6b3ffc24170e1f0761dd7833da8ae}{data}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00605}00605 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00606}00606                 \textcolor{keywordflow}{if} (len < tlv\_len) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00607}00607                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00608}00608                             \textcolor{stringliteral}{"{}firmware too short: \%zu bytes\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00609}00609                             len);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00610}00610                         error = EINVAL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00611}00611                         \textcolor{keywordflow}{goto} parse\_out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00612}00612                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00613}00613                 len -\/= roundup2(tlv\_len, 4);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00614}00614                 data += \textcolor{keyword}{sizeof}(*tlv) + roundup2(tlv\_len, 4);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00615}00615 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00616}00616                 \textcolor{keywordflow}{switch} ((\textcolor{keywordtype}{int})tlv\_type) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00617}00617                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a98300831189dd68baa46dac9a308c91da6aa6f0892854160ca90e3a6270f73dc4}{IWM\_UCODE\_TLV\_PROBE\_MAX\_LEN}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00618}00618                         \textcolor{keywordflow}{if} (tlv\_len != \textcolor{keyword}{sizeof}(uint32\_t)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00619}00619                                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00620}00620                                     \textcolor{stringliteral}{"{}\%s: PROBE\_MAX\_LEN (\%u) != sizeof(uint32\_t)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00621}00621                                     \_\_func\_\_, tlv\_len);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00622}00622                                 error = EINVAL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00623}00623                                 \textcolor{keywordflow}{goto} parse\_out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00624}00624                         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00625}00625                         capa-\/>\mbox{\hyperlink{structiwm__ucode__capabilities_a104ee4efda20392820cfbd77504c02fc}{max\_probe\_length}} =}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00626}00626                             \mbox{\hyperlink{if__iwmreg_8h_af8369a1a868cd8f5f09a626daa727345}{le32\_to\_cpup}}((\textcolor{keyword}{const} uint32\_t *)tlv\_data);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00627}00627                         \textcolor{comment}{/* limit it to something sensible */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00628}00628                         \textcolor{keywordflow}{if} (capa-\/>\mbox{\hyperlink{structiwm__ucode__capabilities_a104ee4efda20392820cfbd77504c02fc}{max\_probe\_length}} >}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00629}00629                             \mbox{\hyperlink{if__iwmreg_8h_aa65eba8b60d1d50806d30f7f4d83080c}{IWM\_SCAN\_OFFLOAD\_PROBE\_REQ\_SIZE}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00630}00630                                 \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_FIRMWARE\_TLV,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00631}00631                                     \textcolor{stringliteral}{"{}\%s: IWM\_UCODE\_TLV\_PROBE\_MAX\_LEN "{}}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00632}00632                                     \textcolor{stringliteral}{"{}ridiculous\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00633}00633                                 error = EINVAL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00634}00634                                 \textcolor{keywordflow}{goto} parse\_out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00635}00635                         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00636}00636                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00637}00637                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a98300831189dd68baa46dac9a308c91da8611c97986f124a3e60d7948027f49ee}{IWM\_UCODE\_TLV\_PAN}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00638}00638                         \textcolor{keywordflow}{if} (tlv\_len) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00639}00639                                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00640}00640                                     \textcolor{stringliteral}{"{}\%s: IWM\_UCODE\_TLV\_PAN: tlv\_len (\%u) > 0\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00641}00641                                     \_\_func\_\_, tlv\_len);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00642}00642                                 error = EINVAL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00643}00643                                 \textcolor{keywordflow}{goto} parse\_out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00644}00644                         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00645}00645                         capa-\/>\mbox{\hyperlink{structiwm__ucode__capabilities_a9c71e6074bd0f72537e41a4aeb536f82}{flags}} |= \mbox{\hyperlink{if__iwmreg_8h_a3c3a06ff08539f59c619830f949ccee9}{IWM\_UCODE\_TLV\_FLAGS\_PAN}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00646}00646                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00647}00647                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a98300831189dd68baa46dac9a308c91daf30c4390416d04773d3e510b194ea821}{IWM\_UCODE\_TLV\_FLAGS}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00648}00648                         \textcolor{keywordflow}{if} (tlv\_len < \textcolor{keyword}{sizeof}(uint32\_t)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00649}00649                                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00650}00650                                     \textcolor{stringliteral}{"{}\%s: IWM\_UCODE\_TLV\_FLAGS: tlv\_len (\%u) < sizeof(uint32\_t)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00651}00651                                     \_\_func\_\_, tlv\_len);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00652}00652                                 error = EINVAL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00653}00653                                 \textcolor{keywordflow}{goto} parse\_out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00654}00654                         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00655}00655                         \textcolor{keywordflow}{if} (tlv\_len \% \textcolor{keyword}{sizeof}(uint32\_t)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00656}00656                                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00657}00657                                     \textcolor{stringliteral}{"{}\%s: IWM\_UCODE\_TLV\_FLAGS: tlv\_len (\%u) \%\% sizeof(uint32\_t)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00658}00658                                     \_\_func\_\_, tlv\_len);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00659}00659                                 error = EINVAL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00660}00660                                 \textcolor{keywordflow}{goto} parse\_out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00661}00661                         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00662}00662                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00663}00663 \textcolor{comment}{                         * Apparently there can be many flags, but Linux driver}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00664}00664 \textcolor{comment}{                         * parses only the first one, and so do we.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00665}00665 \textcolor{comment}{                         *}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00666}00666 \textcolor{comment}{                         * XXX: why does this override IWM\_UCODE\_TLV\_PAN?}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00667}00667 \textcolor{comment}{                         * Intentional or a bug?  Observations from}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00668}00668 \textcolor{comment}{                         * current firmware file:}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00669}00669 \textcolor{comment}{                         *  1) TLV\_PAN is parsed first}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00670}00670 \textcolor{comment}{                         *  2) TLV\_FLAGS contains TLV\_FLAGS\_PAN}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00671}00671 \textcolor{comment}{                         * ==> this resets TLV\_PAN to itself... hnnnk}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00672}00672 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00673}00673                         capa-\/>\mbox{\hyperlink{structiwm__ucode__capabilities_a9c71e6074bd0f72537e41a4aeb536f82}{flags}} = \mbox{\hyperlink{if__iwmreg_8h_af8369a1a868cd8f5f09a626daa727345}{le32\_to\_cpup}}((\textcolor{keyword}{const} uint32\_t *)tlv\_data);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00674}00674                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00675}00675                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a98300831189dd68baa46dac9a308c91dae93618d588cac8bf7805f6397237b194}{IWM\_UCODE\_TLV\_CSCHEME}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00676}00676                         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{if__iwm_8c_a20932a89f82730d59f86d630993b4c95}{iwm\_store\_cscheme}}(sc,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00677}00677                             tlv\_data, tlv\_len)) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00678}00678                                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00679}00679                                     \textcolor{stringliteral}{"{}\%s: iwm\_store\_cscheme(): returned \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00680}00680                                     \_\_func\_\_, error);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00681}00681                                 \textcolor{keywordflow}{goto} parse\_out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00682}00682                         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00683}00683                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00684}00684                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a98300831189dd68baa46dac9a308c91dac16249aba98ac07c531959e73ae50d8d}{IWM\_UCODE\_TLV\_NUM\_OF\_CPU}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00685}00685                         \textcolor{keywordflow}{if} (tlv\_len != \textcolor{keyword}{sizeof}(uint32\_t)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00686}00686                                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00687}00687                                     \textcolor{stringliteral}{"{}\%s: IWM\_UCODE\_TLV\_NUM\_OF\_CPU: tlv\_len (\%u) != sizeof(uint32\_t)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00688}00688                                     \_\_func\_\_, tlv\_len);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00689}00689                                 error = EINVAL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00690}00690                                 \textcolor{keywordflow}{goto} parse\_out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00691}00691                         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00692}00692                         num\_of\_cpus = \mbox{\hyperlink{if__iwmreg_8h_af8369a1a868cd8f5f09a626daa727345}{le32\_to\_cpup}}((\textcolor{keyword}{const} uint32\_t *)tlv\_data);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00693}00693                         \textcolor{keywordflow}{if} (num\_of\_cpus == 2) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00694}00694                                 fw-\/>\mbox{\hyperlink{structiwm__fw__info_a8421a11dce66fb699b5390ba54cf29bd}{img}}[\mbox{\hyperlink{if__iwmvar_8h_a680b88b47a331f93dcdf230bf57590aca05bb856b78181c5cb35e62368d763488}{IWM\_UCODE\_REGULAR}}].\mbox{\hyperlink{structiwm__fw__img_ad9d65c60ba7244348386063c051117d0}{is\_dual\_cpus}} =}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00695}00695                                         TRUE;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00696}00696                                 fw-\/>\mbox{\hyperlink{structiwm__fw__info_a8421a11dce66fb699b5390ba54cf29bd}{img}}[\mbox{\hyperlink{if__iwmvar_8h_a680b88b47a331f93dcdf230bf57590acae55f1de574733d730a25619c4a16578f}{IWM\_UCODE\_INIT}}].\mbox{\hyperlink{structiwm__fw__img_ad9d65c60ba7244348386063c051117d0}{is\_dual\_cpus}} =}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00697}00697                                         TRUE;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00698}00698                                 fw-\/>\mbox{\hyperlink{structiwm__fw__info_a8421a11dce66fb699b5390ba54cf29bd}{img}}[\mbox{\hyperlink{if__iwmvar_8h_a680b88b47a331f93dcdf230bf57590aca55bdf2f37ccbda8b9e8a7ba17dd0b0a4}{IWM\_UCODE\_WOWLAN}}].\mbox{\hyperlink{structiwm__fw__img_ad9d65c60ba7244348386063c051117d0}{is\_dual\_cpus}} =}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00699}00699                                         TRUE;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00700}00700                         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((num\_of\_cpus > 2) || (num\_of\_cpus < 1)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00701}00701                                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00702}00702                                     \textcolor{stringliteral}{"{}\%s: Driver supports only 1 or 2 CPUs\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00703}00703                                     \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00704}00704                                 error = EINVAL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00705}00705                                 \textcolor{keywordflow}{goto} parse\_out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00706}00706                         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00707}00707                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00708}00708                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a98300831189dd68baa46dac9a308c91da82deaa25c4a359464473fd625fa1581a}{IWM\_UCODE\_TLV\_SEC\_RT}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00709}00709                         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{if__iwm_8c_a12dccea60cb55453b1c6596861518b5e}{iwm\_firmware\_store\_section}}(sc,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00710}00710                             \mbox{\hyperlink{if__iwmvar_8h_a680b88b47a331f93dcdf230bf57590aca05bb856b78181c5cb35e62368d763488}{IWM\_UCODE\_REGULAR}}, tlv\_data, tlv\_len)) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00711}00711                                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00712}00712                                     \textcolor{stringliteral}{"{}\%s: IWM\_UCODE\_REGULAR: iwm\_firmware\_store\_section() failed; \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00713}00713                                     \_\_func\_\_, error);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00714}00714                                 \textcolor{keywordflow}{goto} parse\_out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00715}00715                         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00716}00716                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00717}00717                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a98300831189dd68baa46dac9a308c91da2e416fcc0a192dc746e2576604543734}{IWM\_UCODE\_TLV\_SEC\_INIT}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00718}00718                         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{if__iwm_8c_a12dccea60cb55453b1c6596861518b5e}{iwm\_firmware\_store\_section}}(sc,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00719}00719                             \mbox{\hyperlink{if__iwmvar_8h_a680b88b47a331f93dcdf230bf57590acae55f1de574733d730a25619c4a16578f}{IWM\_UCODE\_INIT}}, tlv\_data, tlv\_len)) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00720}00720                                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00721}00721                                     \textcolor{stringliteral}{"{}\%s: IWM\_UCODE\_INIT: iwm\_firmware\_store\_section() failed; \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00722}00722                                     \_\_func\_\_, error);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00723}00723                                 \textcolor{keywordflow}{goto} parse\_out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00724}00724                         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00725}00725                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00726}00726                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a98300831189dd68baa46dac9a308c91da151c7b75825ae958911effd09c7b5dfd}{IWM\_UCODE\_TLV\_SEC\_WOWLAN}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00727}00727                         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{if__iwm_8c_a12dccea60cb55453b1c6596861518b5e}{iwm\_firmware\_store\_section}}(sc,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00728}00728                             \mbox{\hyperlink{if__iwmvar_8h_a680b88b47a331f93dcdf230bf57590aca55bdf2f37ccbda8b9e8a7ba17dd0b0a4}{IWM\_UCODE\_WOWLAN}}, tlv\_data, tlv\_len)) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00729}00729                                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00730}00730                                     \textcolor{stringliteral}{"{}\%s: IWM\_UCODE\_WOWLAN: iwm\_firmware\_store\_section() failed; \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00731}00731                                     \_\_func\_\_, error);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00732}00732                                 \textcolor{keywordflow}{goto} parse\_out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00733}00733                         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00734}00734                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00735}00735                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a98300831189dd68baa46dac9a308c91da4659a39cff08ce801d7d598a334196d9}{IWM\_UCODE\_TLV\_DEF\_CALIB}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00736}00736                         \textcolor{keywordflow}{if} (tlv\_len != \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__tlv__calib__data}{iwm\_tlv\_calib\_data}})) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00737}00737                                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00738}00738                                     \textcolor{stringliteral}{"{}\%s: IWM\_UCODE\_TLV\_DEV\_CALIB: tlv\_len (\%u) < sizeof(iwm\_tlv\_calib\_data) (\%zu)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00739}00739                                     \_\_func\_\_, tlv\_len,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00740}00740                                     \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__tlv__calib__data}{iwm\_tlv\_calib\_data}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00741}00741                                 error = EINVAL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00742}00742                                 \textcolor{keywordflow}{goto} parse\_out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00743}00743                         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00744}00744                         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{if__iwm_8c_a223722e1d847e8afbf8625de95ea2689}{iwm\_set\_default\_calib}}(sc, tlv\_data)) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00745}00745                                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00746}00746                                     \textcolor{stringliteral}{"{}\%s: iwm\_set\_default\_calib() failed: \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00747}00747                                     \_\_func\_\_, error);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00748}00748                                 \textcolor{keywordflow}{goto} parse\_out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00749}00749                         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00750}00750                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00751}00751                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a98300831189dd68baa46dac9a308c91da6e43c36c46e37f4543a12c5bc8f6f655}{IWM\_UCODE\_TLV\_PHY\_SKU}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00752}00752                         \textcolor{keywordflow}{if} (tlv\_len != \textcolor{keyword}{sizeof}(uint32\_t)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00753}00753                                 error = EINVAL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00754}00754                                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00755}00755                                     \textcolor{stringliteral}{"{}\%s: IWM\_UCODE\_TLV\_PHY\_SKU: tlv\_len (\%u) < sizeof(uint32\_t)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00756}00756                                     \_\_func\_\_, tlv\_len);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00757}00757                                 \textcolor{keywordflow}{goto} parse\_out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00758}00758                         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00759}00759                         sc-\/>\mbox{\hyperlink{structiwm__softc_a1028ec58bea1aeb56974087433df5092}{sc\_fw}}.\mbox{\hyperlink{structiwm__fw__info_a522353a8cd4ee57fe1bd20fb9b82ec6f}{phy\_config}} =}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00760}00760                             \mbox{\hyperlink{if__iwmreg_8h_af8369a1a868cd8f5f09a626daa727345}{le32\_to\_cpup}}((\textcolor{keyword}{const} uint32\_t *)tlv\_data);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00761}00761                         sc-\/>\mbox{\hyperlink{structiwm__softc_a1028ec58bea1aeb56974087433df5092}{sc\_fw}}.\mbox{\hyperlink{structiwm__fw__info_adbd8d90945c91b67c14236a63a0def71}{valid\_tx\_ant}} = (sc-\/>\mbox{\hyperlink{structiwm__softc_a1028ec58bea1aeb56974087433df5092}{sc\_fw}}.\mbox{\hyperlink{structiwm__fw__info_a522353a8cd4ee57fe1bd20fb9b82ec6f}{phy\_config}} \&}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00762}00762                                                   \mbox{\hyperlink{if__iwmreg_8h_a3ac6250b9c20ed9f85e86189f73a5ae4}{IWM\_FW\_PHY\_CFG\_TX\_CHAIN}}) >>}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00763}00763                                                   \mbox{\hyperlink{if__iwmreg_8h_a76d37b1673bbca69717118cb34dfc5f1}{IWM\_FW\_PHY\_CFG\_TX\_CHAIN\_POS}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00764}00764                         sc-\/>\mbox{\hyperlink{structiwm__softc_a1028ec58bea1aeb56974087433df5092}{sc\_fw}}.\mbox{\hyperlink{structiwm__fw__info_a7a9c231f1b2c5052c013ae502305598c}{valid\_rx\_ant}} = (sc-\/>\mbox{\hyperlink{structiwm__softc_a1028ec58bea1aeb56974087433df5092}{sc\_fw}}.\mbox{\hyperlink{structiwm__fw__info_a522353a8cd4ee57fe1bd20fb9b82ec6f}{phy\_config}} \&}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00765}00765                                                   \mbox{\hyperlink{if__iwmreg_8h_ad1b89de7d18411f7569063fcaa21eaea}{IWM\_FW\_PHY\_CFG\_RX\_CHAIN}}) >>}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00766}00766                                                   \mbox{\hyperlink{if__iwmreg_8h_af7c44709adcb4dbd22e7ee17a044c101}{IWM\_FW\_PHY\_CFG\_RX\_CHAIN\_POS}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00767}00767                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00768}00768 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00769}00769                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a98300831189dd68baa46dac9a308c91dad7b08b6a7f8a8e09d4893d5c9fddbe20}{IWM\_UCODE\_TLV\_API\_CHANGES\_SET}}: \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00770}00770                         \textcolor{keywordflow}{if} (tlv\_len != \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__ucode__api}{iwm\_ucode\_api}})) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00771}00771                                 error = EINVAL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00772}00772                                 \textcolor{keywordflow}{goto} parse\_out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00773}00773                         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00774}00774                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__iwm_8c_a1c256d77ca584f7fcdb6fff6827c3cc7}{iwm\_set\_ucode\_api\_flags}}(sc, tlv\_data, capa)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00775}00775                                 error = EINVAL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00776}00776                                 \textcolor{keywordflow}{goto} parse\_out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00777}00777                         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00778}00778                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00779}00779                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00780}00780 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00781}00781                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a98300831189dd68baa46dac9a308c91dac7db10dd57ad2cd4479e8d766e2743a9}{IWM\_UCODE\_TLV\_ENABLED\_CAPABILITIES}}: \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00782}00782                         \textcolor{keywordflow}{if} (tlv\_len != \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__ucode__capa}{iwm\_ucode\_capa}})) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00783}00783                                 error = EINVAL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00784}00784                                 \textcolor{keywordflow}{goto} parse\_out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00785}00785                         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00786}00786                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__iwm_8c_a023048a6b390ccec85b282c642886b16}{iwm\_set\_ucode\_capabilities}}(sc, tlv\_data, capa)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00787}00787                                 error = EINVAL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00788}00788                                 \textcolor{keywordflow}{goto} parse\_out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00789}00789                         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00790}00790                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00791}00791                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00792}00792 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00793}00793                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a98300831189dd68baa46dac9a308c91da987f0abea92bf7948bfd416f1a9b8492}{IWM\_UCODE\_TLV\_CMD\_VERSIONS}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00794}00794                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a98300831189dd68baa46dac9a308c91da7b9b1b1bda56558c899786b30cbea60a}{IWM\_UCODE\_TLV\_SDIO\_ADMA\_ADDR}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00795}00795                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a98300831189dd68baa46dac9a308c91dac192aed1bb2d4f7067e10974d841e060}{IWM\_UCODE\_TLV\_FW\_GSCAN\_CAPA}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00796}00796                         \textcolor{comment}{/* ignore, not used by current driver */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00797}00797                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00798}00798 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00799}00799                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a98300831189dd68baa46dac9a308c91dafd333cb0361a0d47ff45b4a654b40fb2}{IWM\_UCODE\_TLV\_SEC\_RT\_USNIFFER}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00800}00800                         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{if__iwm_8c_a12dccea60cb55453b1c6596861518b5e}{iwm\_firmware\_store\_section}}(sc,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00801}00801                             \mbox{\hyperlink{if__iwmvar_8h_a680b88b47a331f93dcdf230bf57590acaae2df8114581e06cdf2e869767eaf1f5}{IWM\_UCODE\_REGULAR\_USNIFFER}}, tlv\_data,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00802}00802                             tlv\_len)) != 0)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00803}00803                                 \textcolor{keywordflow}{goto} parse\_out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00804}00804                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00805}00805 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00806}00806                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a98300831189dd68baa46dac9a308c91da4768f49f2f04dacda43e6e268ee82409}{IWM\_UCODE\_TLV\_PAGING}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00807}00807                         \textcolor{keywordflow}{if} (tlv\_len != \textcolor{keyword}{sizeof}(uint32\_t)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00808}00808                                 error = EINVAL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00809}00809                                 \textcolor{keywordflow}{goto} parse\_out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00810}00810                         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00811}00811                         paging\_mem\_size = \mbox{\hyperlink{if__iwmreg_8h_af8369a1a868cd8f5f09a626daa727345}{le32\_to\_cpup}}((\textcolor{keyword}{const} uint32\_t *)tlv\_data);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00812}00812 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00813}00813                         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_FIRMWARE\_TLV,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00814}00814                             \textcolor{stringliteral}{"{}\%s: Paging: paging enabled (size = \%u bytes)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00815}00815                             \_\_func\_\_, paging\_mem\_size);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00816}00816                         \textcolor{keywordflow}{if} (paging\_mem\_size > \mbox{\hyperlink{if__iwm__fw_8h_acd9e6f753f1a0e23070302f33c152347}{IWM\_MAX\_PAGING\_IMAGE\_SIZE}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00817}00817                                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00818}00818                                         \textcolor{stringliteral}{"{}\%s: Paging: driver supports up to \%u bytes for paging image\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00819}00819                                         \_\_func\_\_, \mbox{\hyperlink{if__iwm__fw_8h_acd9e6f753f1a0e23070302f33c152347}{IWM\_MAX\_PAGING\_IMAGE\_SIZE}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00820}00820                                 error = EINVAL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00821}00821                                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00822}00822                         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00823}00823                         \textcolor{keywordflow}{if} (paging\_mem\_size \& (\mbox{\hyperlink{if__iwm__fw_8h_a538f70cc33d6919be7ef1346d6cd73e4}{IWM\_FW\_PAGING\_SIZE}} -\/ 1)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00824}00824                                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00825}00825                                     \textcolor{stringliteral}{"{}\%s: Paging: image isn't multiple \%u\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00826}00826                                     \_\_func\_\_, \mbox{\hyperlink{if__iwm__fw_8h_a538f70cc33d6919be7ef1346d6cd73e4}{IWM\_FW\_PAGING\_SIZE}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00827}00827                                 error = EINVAL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00828}00828                                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00829}00829                         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00830}00830 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00831}00831                         sc-\/>\mbox{\hyperlink{structiwm__softc_a1028ec58bea1aeb56974087433df5092}{sc\_fw}}.\mbox{\hyperlink{structiwm__fw__info_a8421a11dce66fb699b5390ba54cf29bd}{img}}[\mbox{\hyperlink{if__iwmvar_8h_a680b88b47a331f93dcdf230bf57590aca05bb856b78181c5cb35e62368d763488}{IWM\_UCODE\_REGULAR}}].\mbox{\hyperlink{structiwm__fw__img_aa7df3b46dd1292701b10cbb2e4154ce9}{paging\_mem\_size}} =}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00832}00832                             paging\_mem\_size;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00833}00833                         usniffer\_img = \mbox{\hyperlink{if__iwmvar_8h_a680b88b47a331f93dcdf230bf57590acaae2df8114581e06cdf2e869767eaf1f5}{IWM\_UCODE\_REGULAR\_USNIFFER}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00834}00834                         sc-\/>\mbox{\hyperlink{structiwm__softc_a1028ec58bea1aeb56974087433df5092}{sc\_fw}}.\mbox{\hyperlink{structiwm__fw__info_a8421a11dce66fb699b5390ba54cf29bd}{img}}[usniffer\_img].\mbox{\hyperlink{structiwm__fw__img_aa7df3b46dd1292701b10cbb2e4154ce9}{paging\_mem\_size}} =}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00835}00835                             paging\_mem\_size;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00836}00836                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00837}00837 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00838}00838                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a98300831189dd68baa46dac9a308c91dab2b0ace97e0197e2bb6da4c7797930b3}{IWM\_UCODE\_TLV\_N\_SCAN\_CHANNELS}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00839}00839                         \textcolor{keywordflow}{if} (tlv\_len != \textcolor{keyword}{sizeof}(uint32\_t)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00840}00840                                 error = EINVAL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00841}00841                                 \textcolor{keywordflow}{goto} parse\_out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00842}00842                         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00843}00843                         capa-\/>\mbox{\hyperlink{structiwm__ucode__capabilities_aafeb905ccbc340807d8eb90ab180662c}{n\_scan\_channels}} =}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00844}00844                             \mbox{\hyperlink{if__iwmreg_8h_af8369a1a868cd8f5f09a626daa727345}{le32\_to\_cpup}}((\textcolor{keyword}{const} uint32\_t *)tlv\_data);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00845}00845                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00846}00846 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00847}00847                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a98300831189dd68baa46dac9a308c91da1fe7581c64bfe1f8e5cb94391fe1bbce}{IWM\_UCODE\_TLV\_FW\_VERSION}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00848}00848                         \textcolor{keywordflow}{if} (tlv\_len != \textcolor{keyword}{sizeof}(uint32\_t) * 3) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00849}00849                                 error = EINVAL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00850}00850                                 \textcolor{keywordflow}{goto} parse\_out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00851}00851                         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00852}00852                         snprintf(sc-\/>\mbox{\hyperlink{structiwm__softc_ac8f38643711c947e4ceeef62da6f8f63}{sc\_fwver}}, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structiwm__softc_ac8f38643711c947e4ceeef62da6f8f63}{sc\_fwver}}),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00853}00853                             \textcolor{stringliteral}{"{}\%u.\%u.\%u"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00854}00854                             le32toh(((\textcolor{keyword}{const} uint32\_t *)tlv\_data)[0]),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00855}00855                             le32toh(((\textcolor{keyword}{const} uint32\_t *)tlv\_data)[1]),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00856}00856                             le32toh(((\textcolor{keyword}{const} uint32\_t *)tlv\_data)[2]));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00857}00857                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00858}00858 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00859}00859                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a98300831189dd68baa46dac9a308c91dab86040b3233098c29cb7d721c1568841}{IWM\_UCODE\_TLV\_FW\_MEM\_SEG}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00860}00860                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00861}00861 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00862}00862                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00863}00863                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00864}00864                             \textcolor{stringliteral}{"{}\%s: unknown firmware section \%d, abort\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00865}00865                             \_\_func\_\_, tlv\_type);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00866}00866                         error = EINVAL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00867}00867                         \textcolor{keywordflow}{goto} parse\_out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00868}00868                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00869}00869         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00870}00870 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00871}00871         KASSERT(error == 0, (\textcolor{stringliteral}{"{}unhandled error"{}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00872}00872 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00873}00873  parse\_out:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00874}00874         \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00875}00875                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}firmware parse error \%d, "{}}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00876}00876                     \textcolor{stringliteral}{"{}section type \%d\(\backslash\)n"{}}, error, tlv\_type);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00877}00877         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00878}00878 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00879}00879  out:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00880}00880         \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00881}00881                 \textcolor{keywordflow}{if} (fw-\/>\mbox{\hyperlink{structiwm__fw__info_a6e60199c0b9af7740442593ad3357e27}{fw\_fp}} != NULL)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00882}00882                         \mbox{\hyperlink{if__iwm_8c_aeb37ae4f615a7120e6e2ccde82cf03c5}{iwm\_fw\_info\_free}}(fw);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00883}00883         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00884}00884 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00885}00885         \textcolor{keywordflow}{return} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00886}00886 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00887}00887 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00888}00888 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00889}00889 \textcolor{comment}{ * DMA resource routines}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00890}00890 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00891}00891 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00892}00892 \textcolor{comment}{/* fwmem is used to load firmware onto the card */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00893}00893 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00894}\mbox{\hyperlink{if__iwm_8c_abc6a2ead1ec4392eb977fc0527508c61}{00894}} \mbox{\hyperlink{if__iwm_8c_abc6a2ead1ec4392eb977fc0527508c61}{iwm\_alloc\_fwmem}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00895}00895 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00896}00896         \textcolor{comment}{/* Must be aligned on a 16-\/byte boundary. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00897}00897         \textcolor{keywordflow}{return} \mbox{\hyperlink{if__iwm__util_8c_ae855250e43cb9dbef739f64c2ad73b07}{iwm\_dma\_contig\_alloc}}(sc-\/>\mbox{\hyperlink{structiwm__softc_aae5e9b5552d1489062816eb7d7fb13f9}{sc\_dmat}}, \&sc-\/>\mbox{\hyperlink{structiwm__softc_abbfdd700f811040eb61ebaa9ef29d54d}{fw\_dma}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00898}00898             \mbox{\hyperlink{if__iwmreg_8h_a8b06e85e47c790360bea18a9392c7101}{IWM\_FH\_MEM\_TB\_MAX\_LENGTH}}, 16);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00899}00899 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00900}00900 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00901}00901 \textcolor{comment}{/* tx scheduler rings.  not used? */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00902}00902 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00903}\mbox{\hyperlink{if__iwm_8c_addf1dfe4ed569a7f6e99875488de7f59}{00903}} \mbox{\hyperlink{if__iwm_8c_addf1dfe4ed569a7f6e99875488de7f59}{iwm\_alloc\_sched}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00904}00904 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00905}00905         \textcolor{comment}{/* TX scheduler rings must be aligned on a 1KB boundary. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00906}00906         \textcolor{keywordflow}{return} \mbox{\hyperlink{if__iwm__util_8c_ae855250e43cb9dbef739f64c2ad73b07}{iwm\_dma\_contig\_alloc}}(sc-\/>\mbox{\hyperlink{structiwm__softc_aae5e9b5552d1489062816eb7d7fb13f9}{sc\_dmat}}, \&sc-\/>\mbox{\hyperlink{structiwm__softc_ab3ce0638afeea2b71cc357b0c968f4dd}{sched\_dma}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00907}00907             nitems(sc-\/>\mbox{\hyperlink{structiwm__softc_a9580b1b4fe19ddaa7f8e8b987dc92f8b}{txq}}) * \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__agn__scd__bc__tbl}{iwm\_agn\_scd\_bc\_tbl}}), 1024);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00908}00908 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00909}00909 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00910}00910 \textcolor{comment}{/* keep-\/warm page is used internally by the card.  see iwl-\/fh.h for more info */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00911}00911 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00912}\mbox{\hyperlink{if__iwm_8c_a66531537a35a621f7fe512cba4fe8745}{00912}} \mbox{\hyperlink{if__iwm_8c_a66531537a35a621f7fe512cba4fe8745}{iwm\_alloc\_kw}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00913}00913 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00914}00914         \textcolor{keywordflow}{return} \mbox{\hyperlink{if__iwm__util_8c_ae855250e43cb9dbef739f64c2ad73b07}{iwm\_dma\_contig\_alloc}}(sc-\/>\mbox{\hyperlink{structiwm__softc_aae5e9b5552d1489062816eb7d7fb13f9}{sc\_dmat}}, \&sc-\/>\mbox{\hyperlink{structiwm__softc_a6e03941dd4273f72ef91bbb054f284c9}{kw\_dma}}, 4096, 4096);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00915}00915 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00916}00916 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00917}00917 \textcolor{comment}{/* interrupt cause table */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00918}00918 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00919}\mbox{\hyperlink{if__iwm_8c_aadde24498e3d6555932cffc675f77dea}{00919}} \mbox{\hyperlink{if__iwm_8c_aadde24498e3d6555932cffc675f77dea}{iwm\_alloc\_ict}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00920}00920 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00921}00921         \textcolor{keywordflow}{return} \mbox{\hyperlink{if__iwm__util_8c_ae855250e43cb9dbef739f64c2ad73b07}{iwm\_dma\_contig\_alloc}}(sc-\/>\mbox{\hyperlink{structiwm__softc_aae5e9b5552d1489062816eb7d7fb13f9}{sc\_dmat}}, \&sc-\/>\mbox{\hyperlink{structiwm__softc_aa0e657a2c5629c84832ec6e88ffcaeea}{ict\_dma}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00922}00922             \mbox{\hyperlink{if__iwmvar_8h_a7c598763cdc56b713141a0ee6a0463e4}{IWM\_ICT\_SIZE}}, 1<<\mbox{\hyperlink{if__iwmvar_8h_afcaad7311dfab24442b56f2d59085387}{IWM\_ICT\_PADDR\_SHIFT}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00923}00923 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00924}00924 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00925}00925 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00926}\mbox{\hyperlink{if__iwm_8c_a02cd867ea7efb2fbf81da7dd3dbe7b05}{00926}} \mbox{\hyperlink{if__iwm_8c_a02cd867ea7efb2fbf81da7dd3dbe7b05}{iwm\_alloc\_rx\_ring}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__rx__ring}{iwm\_rx\_ring}} *ring)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00927}00927 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00928}00928         bus\_size\_t size;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00929}00929         \textcolor{keywordtype}{size\_t} descsz;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00930}00930         \textcolor{keywordtype}{int} count, i, error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00931}00931 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00932}00932         ring-\/>\mbox{\hyperlink{structiwm__rx__ring_addf1b35103b2f1b5cdafa91729a85f45}{cur}} = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00933}00933         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_a4ace3f4eab56011b2fbbb76b5ad1dc67}{mqrx\_supported}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00934}00934                 count = \mbox{\hyperlink{if__iwmvar_8h_a459cd70f324ec10d397ce73265b8da1c}{IWM\_RX\_MQ\_RING\_COUNT}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00935}00935                 descsz = \textcolor{keyword}{sizeof}(uint64\_t);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00936}00936         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00937}00937                 count = \mbox{\hyperlink{if__iwmvar_8h_a06f1db00fa76847c38d0ac365d5db818}{IWM\_RX\_LEGACY\_RING\_COUNT}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00938}00938                 descsz = \textcolor{keyword}{sizeof}(uint32\_t);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00939}00939         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00940}00940 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00941}00941         \textcolor{comment}{/* Allocate RX descriptors (256-\/byte aligned). */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00942}00942         size = count * descsz;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00943}00943         error = \mbox{\hyperlink{if__iwm__util_8c_ae855250e43cb9dbef739f64c2ad73b07}{iwm\_dma\_contig\_alloc}}(sc-\/>\mbox{\hyperlink{structiwm__softc_aae5e9b5552d1489062816eb7d7fb13f9}{sc\_dmat}}, \&ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a212749f0d88d1ca6fd8e8fdb37442ea1}{free\_desc\_dma}}, size,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00944}00944             256);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00945}00945         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00946}00946                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00947}00947                     \textcolor{stringliteral}{"{}could not allocate RX ring DMA memory\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00948}00948                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00949}00949         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00950}00950         ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a82b9e8547e50b153950d0a48e5c8b4c6}{desc}} = ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a212749f0d88d1ca6fd8e8fdb37442ea1}{free\_desc\_dma}}.\mbox{\hyperlink{structiwm__dma__info_a8b1776dfbd12b920fe7ec6fba682178d}{vaddr}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00951}00951 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00952}00952         \textcolor{comment}{/* Allocate RX status area (16-\/byte aligned). */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00953}00953         error = \mbox{\hyperlink{if__iwm__util_8c_ae855250e43cb9dbef739f64c2ad73b07}{iwm\_dma\_contig\_alloc}}(sc-\/>\mbox{\hyperlink{structiwm__softc_aae5e9b5552d1489062816eb7d7fb13f9}{sc\_dmat}}, \&ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a7ecf69ca61669767934f89491a1d5582}{stat\_dma}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00954}00954             \textcolor{keyword}{sizeof}(*ring-\/>\mbox{\hyperlink{structiwm__rx__ring_ab61228bdfeafeddb39d4a3580a1e86f5}{stat}}), 16);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00955}00955         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00956}00956                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00957}00957                     \textcolor{stringliteral}{"{}could not allocate RX status DMA memory\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00958}00958                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00959}00959         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00960}00960         ring-\/>\mbox{\hyperlink{structiwm__rx__ring_ab61228bdfeafeddb39d4a3580a1e86f5}{stat}} = ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a7ecf69ca61669767934f89491a1d5582}{stat\_dma}}.\mbox{\hyperlink{structiwm__dma__info_a8b1776dfbd12b920fe7ec6fba682178d}{vaddr}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00961}00961 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00962}00962         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_a4ace3f4eab56011b2fbbb76b5ad1dc67}{mqrx\_supported}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00963}00963                 size = count * \textcolor{keyword}{sizeof}(uint32\_t);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00964}00964                 error = \mbox{\hyperlink{if__iwm__util_8c_ae855250e43cb9dbef739f64c2ad73b07}{iwm\_dma\_contig\_alloc}}(sc-\/>\mbox{\hyperlink{structiwm__softc_aae5e9b5552d1489062816eb7d7fb13f9}{sc\_dmat}}, \&ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a4004809a196483f02d23596af444e64f}{used\_desc\_dma}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00965}00965                     size, 256);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00966}00966                 \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00967}00967                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00968}00968                             \textcolor{stringliteral}{"{}could not allocate RX ring DMA memory\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00969}00969                         \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00970}00970                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00971}00971         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00972}00972 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00973}00973         \textcolor{comment}{/* Create RX buffer DMA tag. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00974}00974         error = bus\_dma\_tag\_create(sc-\/>\mbox{\hyperlink{structiwm__softc_aae5e9b5552d1489062816eb7d7fb13f9}{sc\_dmat}}, 1, 0,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00975}00975             BUS\_SPACE\_MAXADDR\_32BIT, BUS\_SPACE\_MAXADDR, NULL, NULL,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00976}00976             \mbox{\hyperlink{if__iwmvar_8h_a48ddf3e302d40d2169aeef4ea3610e4b}{IWM\_RBUF\_SIZE}}, 1, \mbox{\hyperlink{if__iwmvar_8h_a48ddf3e302d40d2169aeef4ea3610e4b}{IWM\_RBUF\_SIZE}}, 0, NULL, NULL, \&ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a426927488ffe545180c75e567c0e5fcc}{data\_dmat}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00977}00977         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00978}00978                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00979}00979                     \textcolor{stringliteral}{"{}\%s: could not create RX buf DMA tag, error \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00980}00980                     \_\_func\_\_, error);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00981}00981                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00982}00982         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00983}00983 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00984}00984         \textcolor{comment}{/* Allocate spare bus\_dmamap\_t for iwm\_rx\_addbuf() */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00985}00985         error = bus\_dmamap\_create(ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a426927488ffe545180c75e567c0e5fcc}{data\_dmat}}, 0, \&ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a45571e942af27341cd5f9a64e047838d}{spare\_map}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00986}00986         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00987}00987                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00988}00988                     \textcolor{stringliteral}{"{}\%s: could not create RX buf DMA map, error \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00989}00989                     \_\_func\_\_, error);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00990}00990                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00991}00991         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00992}00992 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00993}00993         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00994}00994 \textcolor{comment}{         * Allocate and map RX buffers.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00995}00995 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00996}00996         \textcolor{keywordflow}{for} (i = 0; i < count; i++) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00997}00997                 \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__rx__data}{iwm\_rx\_data}} *data = \&ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a8b1de774963c1bc508647770ddb45ece}{data}}[i];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00998}00998                 error = bus\_dmamap\_create(ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a426927488ffe545180c75e567c0e5fcc}{data\_dmat}}, 0, \&data-\/>\mbox{\hyperlink{structiwm__rx__data_a0ca075d6bb3aa6dd619b469fb454f582}{map}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l00999}00999                 \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01000}01000                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01001}01001                             \textcolor{stringliteral}{"{}\%s: could not create RX buf DMA map, error \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01002}01002                             \_\_func\_\_, error);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01003}01003                         \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01004}01004                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01005}01005                 data-\/>\mbox{\hyperlink{structiwm__rx__data_a229bc638540eb8ac7f033e428ba54f50}{m}} = NULL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01006}01006 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01007}01007                 \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{if__iwm_8c_aa1b2823899c8eee4079786fce140df73}{iwm\_rx\_addbuf}}(sc, \mbox{\hyperlink{if__iwmvar_8h_a48ddf3e302d40d2169aeef4ea3610e4b}{IWM\_RBUF\_SIZE}}, i)) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01008}01008                         \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01009}01009                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01010}01010         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01011}01011         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01012}01012 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01013}01013 fail:   \mbox{\hyperlink{if__iwm_8c_a7d14cc5376b851393a6a02fe72a4242f}{iwm\_free\_rx\_ring}}(sc, ring);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01014}01014         \textcolor{keywordflow}{return} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01015}01015 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01016}01016 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01017}01017 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01018}\mbox{\hyperlink{if__iwm_8c_a958d1470f4098506e8868a5eee05c788}{01018}} \mbox{\hyperlink{if__iwm_8c_a958d1470f4098506e8868a5eee05c788}{iwm\_reset\_rx\_ring}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__rx__ring}{iwm\_rx\_ring}} *ring)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01019}01019 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01020}01020         \textcolor{comment}{/* Reset the ring state */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01021}01021         ring-\/>\mbox{\hyperlink{structiwm__rx__ring_addf1b35103b2f1b5cdafa91729a85f45}{cur}} = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01022}01022 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01023}01023         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01024}01024 \textcolor{comment}{         * The hw rx ring index in shared memory must also be cleared,}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01025}01025 \textcolor{comment}{         * otherwise the discrepancy can cause reprocessing chaos.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01026}01026 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01027}01027         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_a57cdc0da9cdb3a68e4f55cc47c3a3aed}{rxq}}.\mbox{\hyperlink{structiwm__rx__ring_ab61228bdfeafeddb39d4a3580a1e86f5}{stat}})}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01028}01028                 memset(sc-\/>\mbox{\hyperlink{structiwm__softc_a57cdc0da9cdb3a68e4f55cc47c3a3aed}{rxq}}.\mbox{\hyperlink{structiwm__rx__ring_ab61228bdfeafeddb39d4a3580a1e86f5}{stat}}, 0, \textcolor{keyword}{sizeof}(*sc-\/>\mbox{\hyperlink{structiwm__softc_a57cdc0da9cdb3a68e4f55cc47c3a3aed}{rxq}}.\mbox{\hyperlink{structiwm__rx__ring_ab61228bdfeafeddb39d4a3580a1e86f5}{stat}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01029}01029 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01030}01030 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01031}01031 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01032}\mbox{\hyperlink{if__iwm_8c_a7d14cc5376b851393a6a02fe72a4242f}{01032}} \mbox{\hyperlink{if__iwm_8c_a7d14cc5376b851393a6a02fe72a4242f}{iwm\_free\_rx\_ring}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__rx__ring}{iwm\_rx\_ring}} *ring)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01033}01033 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01034}01034         \textcolor{keywordtype}{int} count, i;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01035}01035 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01036}01036         \mbox{\hyperlink{if__iwm__util_8c_a628e0b20edea1c70fc1ff4c3730761aa}{iwm\_dma\_contig\_free}}(\&ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a212749f0d88d1ca6fd8e8fdb37442ea1}{free\_desc\_dma}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01037}01037         \mbox{\hyperlink{if__iwm__util_8c_a628e0b20edea1c70fc1ff4c3730761aa}{iwm\_dma\_contig\_free}}(\&ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a7ecf69ca61669767934f89491a1d5582}{stat\_dma}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01038}01038         \mbox{\hyperlink{if__iwm__util_8c_a628e0b20edea1c70fc1ff4c3730761aa}{iwm\_dma\_contig\_free}}(\&ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a4004809a196483f02d23596af444e64f}{used\_desc\_dma}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01039}01039 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01040}01040         count = sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_a4ace3f4eab56011b2fbbb76b5ad1dc67}{mqrx\_supported}} ? \mbox{\hyperlink{if__iwmvar_8h_a459cd70f324ec10d397ce73265b8da1c}{IWM\_RX\_MQ\_RING\_COUNT}} :}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01041}01041             \mbox{\hyperlink{if__iwmvar_8h_a06f1db00fa76847c38d0ac365d5db818}{IWM\_RX\_LEGACY\_RING\_COUNT}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01042}01042 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01043}01043         \textcolor{keywordflow}{for} (i = 0; i < count; i++) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01044}01044                 \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__rx__data}{iwm\_rx\_data}} *data = \&ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a8b1de774963c1bc508647770ddb45ece}{data}}[i];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01045}01045 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01046}01046                 \textcolor{keywordflow}{if} (data-\/>\mbox{\hyperlink{structiwm__rx__data_a229bc638540eb8ac7f033e428ba54f50}{m}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01047}01047                         bus\_dmamap\_sync(ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a426927488ffe545180c75e567c0e5fcc}{data\_dmat}}, data-\/>\mbox{\hyperlink{structiwm__rx__data_a0ca075d6bb3aa6dd619b469fb454f582}{map}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01048}01048                             BUS\_DMASYNC\_POSTREAD);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01049}01049                         bus\_dmamap\_unload(ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a426927488ffe545180c75e567c0e5fcc}{data\_dmat}}, data-\/>\mbox{\hyperlink{structiwm__rx__data_a0ca075d6bb3aa6dd619b469fb454f582}{map}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01050}01050                         m\_freem(data-\/>\mbox{\hyperlink{structiwm__rx__data_a229bc638540eb8ac7f033e428ba54f50}{m}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01051}01051                         data-\/>\mbox{\hyperlink{structiwm__rx__data_a229bc638540eb8ac7f033e428ba54f50}{m}} = NULL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01052}01052                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01053}01053                 \textcolor{keywordflow}{if} (data-\/>\mbox{\hyperlink{structiwm__rx__data_a0ca075d6bb3aa6dd619b469fb454f582}{map}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01054}01054                         bus\_dmamap\_destroy(ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a426927488ffe545180c75e567c0e5fcc}{data\_dmat}}, data-\/>\mbox{\hyperlink{structiwm__rx__data_a0ca075d6bb3aa6dd619b469fb454f582}{map}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01055}01055                         data-\/>\mbox{\hyperlink{structiwm__rx__data_a0ca075d6bb3aa6dd619b469fb454f582}{map}} = NULL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01056}01056                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01057}01057         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01058}01058         \textcolor{keywordflow}{if} (ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a45571e942af27341cd5f9a64e047838d}{spare\_map}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01059}01059                 bus\_dmamap\_destroy(ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a426927488ffe545180c75e567c0e5fcc}{data\_dmat}}, ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a45571e942af27341cd5f9a64e047838d}{spare\_map}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01060}01060                 ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a45571e942af27341cd5f9a64e047838d}{spare\_map}} = NULL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01061}01061         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01062}01062         \textcolor{keywordflow}{if} (ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a426927488ffe545180c75e567c0e5fcc}{data\_dmat}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01063}01063                 bus\_dma\_tag\_destroy(ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a426927488ffe545180c75e567c0e5fcc}{data\_dmat}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01064}01064                 ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a426927488ffe545180c75e567c0e5fcc}{data\_dmat}} = NULL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01065}01065         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01066}01066 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01067}01067 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01068}01068 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01069}\mbox{\hyperlink{if__iwm_8c_abaa72bdf83eb87f2a8bdecbc75936584}{01069}} \mbox{\hyperlink{if__iwm_8c_abaa72bdf83eb87f2a8bdecbc75936584}{iwm\_alloc\_tx\_ring}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__tx__ring}{iwm\_tx\_ring}} *ring, \textcolor{keywordtype}{int} qid)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01070}01070 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01071}01071         bus\_addr\_t paddr;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01072}01072         bus\_size\_t size;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01073}01073         \textcolor{keywordtype}{size\_t} maxsize;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01074}01074         \textcolor{keywordtype}{int} nsegments;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01075}01075         \textcolor{keywordtype}{int} i, error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01076}01076 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01077}01077         ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a985ab594338fd5c2df0efdd225636f8a}{qid}} = qid;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01078}01078         ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a6762a1b02dd4f4caf5370fbf3b3db768}{queued}} = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01079}01079         ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a0d0525e4e6e9ccaa6336bf14d8dce312}{cur}} = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01080}01080 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01081}01081         \textcolor{comment}{/* Allocate TX descriptors (256-\/byte aligned). */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01082}01082         size = \mbox{\hyperlink{if__iwmvar_8h_a20e51e5cdc7d74b0625e0cdeefd8df14}{IWM\_TX\_RING\_COUNT}} * \textcolor{keyword}{sizeof} (\textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__tfd}{iwm\_tfd}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01083}01083         error = \mbox{\hyperlink{if__iwm__util_8c_ae855250e43cb9dbef739f64c2ad73b07}{iwm\_dma\_contig\_alloc}}(sc-\/>\mbox{\hyperlink{structiwm__softc_aae5e9b5552d1489062816eb7d7fb13f9}{sc\_dmat}}, \&ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a06c9b0667b51f00845f9decf8849cd0e}{desc\_dma}}, size, 256);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01084}01084         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01085}01085                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01086}01086                     \textcolor{stringliteral}{"{}could not allocate TX ring DMA memory\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01087}01087                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01088}01088         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01089}01089         ring-\/>\mbox{\hyperlink{structiwm__tx__ring_ab58d91977455bdf898526616a7ab2fb2}{desc}} = ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a06c9b0667b51f00845f9decf8849cd0e}{desc\_dma}}.\mbox{\hyperlink{structiwm__dma__info_a8b1776dfbd12b920fe7ec6fba682178d}{vaddr}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01090}01090 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01091}01091         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01092}01092 \textcolor{comment}{         * We only use rings 0 through 9 (4 EDCA + cmd) so there is no need}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01093}01093 \textcolor{comment}{         * to allocate commands space for other rings.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01094}01094 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01095}01095         \textcolor{keywordflow}{if} (qid > \mbox{\hyperlink{if__iwmreg_8h_afbe5feb99076494815e86de80d0ca658}{IWM\_CMD\_QUEUE}})}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01096}01096                 \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01097}01097 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01098}01098         size = \mbox{\hyperlink{if__iwmvar_8h_a20e51e5cdc7d74b0625e0cdeefd8df14}{IWM\_TX\_RING\_COUNT}} * \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__device__cmd}{iwm\_device\_cmd}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01099}01099         error = \mbox{\hyperlink{if__iwm__util_8c_ae855250e43cb9dbef739f64c2ad73b07}{iwm\_dma\_contig\_alloc}}(sc-\/>\mbox{\hyperlink{structiwm__softc_aae5e9b5552d1489062816eb7d7fb13f9}{sc\_dmat}}, \&ring-\/>\mbox{\hyperlink{structiwm__tx__ring_adbab9691a34e7f1e1ed21cabb52e1023}{cmd\_dma}}, size, 4);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01100}01100         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01101}01101                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01102}01102                     \textcolor{stringliteral}{"{}could not allocate TX cmd DMA memory\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01103}01103                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01104}01104         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01105}01105         ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a992f51a65dcec815f15f12a0f53dd6ef}{cmd}} = ring-\/>\mbox{\hyperlink{structiwm__tx__ring_adbab9691a34e7f1e1ed21cabb52e1023}{cmd\_dma}}.\mbox{\hyperlink{structiwm__dma__info_a8b1776dfbd12b920fe7ec6fba682178d}{vaddr}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01106}01106 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01107}01107         \textcolor{comment}{/* FW commands may require more mapped space than packets. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01108}01108         \textcolor{keywordflow}{if} (qid == \mbox{\hyperlink{if__iwmreg_8h_afbe5feb99076494815e86de80d0ca658}{IWM\_CMD\_QUEUE}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01109}01109                 maxsize = \mbox{\hyperlink{if__iwmvar_8h_a48ddf3e302d40d2169aeef4ea3610e4b}{IWM\_RBUF\_SIZE}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01110}01110                 nsegments = 1;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01111}01111         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01112}01112                 maxsize = MCLBYTES;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01113}01113                 nsegments = \mbox{\hyperlink{if__iwmvar_8h_a7f03ff078faff501559eac28020bbfdb}{IWM\_MAX\_SCATTER}} -\/ 2;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01114}01114         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01115}01115 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01116}01116         error = bus\_dma\_tag\_create(sc-\/>\mbox{\hyperlink{structiwm__softc_aae5e9b5552d1489062816eb7d7fb13f9}{sc\_dmat}}, 1, 0,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01117}01117             BUS\_SPACE\_MAXADDR\_32BIT, BUS\_SPACE\_MAXADDR, NULL, NULL, maxsize,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01118}01118             nsegments, maxsize, 0, NULL, NULL, \&ring-\/>\mbox{\hyperlink{structiwm__tx__ring_aca7fb956f70df0acc0787fc191872fb3}{data\_dmat}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01119}01119         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01120}01120                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}could not create TX buf DMA tag\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01121}01121                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01122}01122         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01123}01123 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01124}01124         paddr = ring-\/>\mbox{\hyperlink{structiwm__tx__ring_adbab9691a34e7f1e1ed21cabb52e1023}{cmd\_dma}}.\mbox{\hyperlink{structiwm__dma__info_addd7774a4b8cc6802bbcc8b31452794c}{paddr}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01125}01125         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{if__iwmvar_8h_a20e51e5cdc7d74b0625e0cdeefd8df14}{IWM\_TX\_RING\_COUNT}}; i++) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01126}01126                 \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__tx__data}{iwm\_tx\_data}} *data = \&ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a283b917a5d00de60d0932208c9b88557}{data}}[i];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01127}01127 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01128}01128                 data-\/>\mbox{\hyperlink{structiwm__tx__data_a0a5514d80fb252c55ee351c69178167e}{cmd\_paddr}} = paddr;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01129}01129                 data-\/>\mbox{\hyperlink{structiwm__tx__data_a499449df34d80fe5397688a0ecc381f0}{scratch\_paddr}} = paddr + \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__cmd__header}{iwm\_cmd\_header}})}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01130}01130                     + offsetof(struct \mbox{\hyperlink{structiwm__tx__cmd}{iwm\_tx\_cmd}}, scratch);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01131}01131                 paddr += \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__device__cmd}{iwm\_device\_cmd}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01132}01132 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01133}01133                 error = bus\_dmamap\_create(ring-\/>\mbox{\hyperlink{structiwm__tx__ring_aca7fb956f70df0acc0787fc191872fb3}{data\_dmat}}, 0, \&\mbox{\hyperlink{structiwm__device__cmd_a1afe895aef4c11550b4ef79c3f6cb785}{data}}-\/>map);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01134}01134                 \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01135}01135                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01136}01136                             \textcolor{stringliteral}{"{}could not create TX buf DMA map\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01137}01137                         \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01138}01138                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01139}01139         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01140}01140         KASSERT(paddr == ring-\/>\mbox{\hyperlink{structiwm__tx__ring_adbab9691a34e7f1e1ed21cabb52e1023}{cmd\_dma}}.\mbox{\hyperlink{structiwm__dma__info_addd7774a4b8cc6802bbcc8b31452794c}{paddr}} + size,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01141}01141             (\textcolor{stringliteral}{"{}invalid physical address"{}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01142}01142         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01143}01143 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01144}01144 fail:   \mbox{\hyperlink{if__iwm_8c_a87305f86cad7c54e7d6d7fe33e5343eb}{iwm\_free\_tx\_ring}}(sc, ring);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01145}01145         \textcolor{keywordflow}{return} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01146}01146 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01147}01147 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01148}01148 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01149}\mbox{\hyperlink{if__iwm_8c_aed9171af6accaaf9f581d1f0f8137944}{01149}} \mbox{\hyperlink{if__iwm_8c_aed9171af6accaaf9f581d1f0f8137944}{iwm\_reset\_tx\_ring}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__tx__ring}{iwm\_tx\_ring}} *ring)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01150}01150 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01151}01151         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01152}01152 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01153}01153         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{if__iwmvar_8h_a20e51e5cdc7d74b0625e0cdeefd8df14}{IWM\_TX\_RING\_COUNT}}; i++) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01154}01154                 \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__tx__data}{iwm\_tx\_data}} *data = \&ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a283b917a5d00de60d0932208c9b88557}{data}}[i];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01155}01155 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01156}01156                 \textcolor{keywordflow}{if} (data-\/>\mbox{\hyperlink{structiwm__tx__data_ab4827b5c8b3d54f814e0ba0bb9444b7a}{m}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01157}01157                         bus\_dmamap\_sync(ring-\/>\mbox{\hyperlink{structiwm__tx__ring_aca7fb956f70df0acc0787fc191872fb3}{data\_dmat}}, data-\/>\mbox{\hyperlink{structiwm__tx__data_a56a04caca9190302823ff8aa91363d1f}{map}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01158}01158                             BUS\_DMASYNC\_POSTWRITE);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01159}01159                         bus\_dmamap\_unload(ring-\/>\mbox{\hyperlink{structiwm__tx__ring_aca7fb956f70df0acc0787fc191872fb3}{data\_dmat}}, data-\/>\mbox{\hyperlink{structiwm__tx__data_a56a04caca9190302823ff8aa91363d1f}{map}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01160}01160                         m\_freem(data-\/>\mbox{\hyperlink{structiwm__tx__data_ab4827b5c8b3d54f814e0ba0bb9444b7a}{m}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01161}01161                         data-\/>\mbox{\hyperlink{structiwm__tx__data_ab4827b5c8b3d54f814e0ba0bb9444b7a}{m}} = NULL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01162}01162                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01163}01163         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01164}01164         \textcolor{comment}{/* Clear TX descriptors. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01165}01165         memset(ring-\/>\mbox{\hyperlink{structiwm__tx__ring_ab58d91977455bdf898526616a7ab2fb2}{desc}}, 0, ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a06c9b0667b51f00845f9decf8849cd0e}{desc\_dma}}.\mbox{\hyperlink{structiwm__dma__info_a90a2724b6caf1643f14be09d8a72d63a}{size}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01166}01166         bus\_dmamap\_sync(ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a06c9b0667b51f00845f9decf8849cd0e}{desc\_dma}}.\mbox{\hyperlink{structiwm__dma__info_a58938bb9054e381f73f7897fd7ae6ff1}{tag}}, ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a06c9b0667b51f00845f9decf8849cd0e}{desc\_dma}}.\mbox{\hyperlink{structiwm__dma__info_a9088f1c56d08041ac6e9f2439dd9b3dd}{map}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01167}01167             BUS\_DMASYNC\_PREWRITE);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01168}01168         sc-\/>\mbox{\hyperlink{structiwm__softc_aa06fec14bd51ea7a0ef7b4b549c59c03}{qfullmsk}} \&= \string~(1 << ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a985ab594338fd5c2df0efdd225636f8a}{qid}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01169}01169         ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a6762a1b02dd4f4caf5370fbf3b3db768}{queued}} = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01170}01170         ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a0d0525e4e6e9ccaa6336bf14d8dce312}{cur}} = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01171}01171 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01172}01172         \textcolor{keywordflow}{if} (ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a985ab594338fd5c2df0efdd225636f8a}{qid}} == \mbox{\hyperlink{if__iwmreg_8h_afbe5feb99076494815e86de80d0ca658}{IWM\_CMD\_QUEUE}} \&\& sc-\/>\mbox{\hyperlink{structiwm__softc_a5045e1f296088c47b449afc03077dc9c}{cmd\_hold\_nic\_awake}})}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01173}01173                 \mbox{\hyperlink{if__iwm__pcie__trans_8c_a681a51185c01cc92dd72468be6a901c3}{iwm\_pcie\_clear\_cmd\_in\_flight}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01174}01174 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01175}01175 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01176}01176 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01177}\mbox{\hyperlink{if__iwm_8c_a87305f86cad7c54e7d6d7fe33e5343eb}{01177}} \mbox{\hyperlink{if__iwm_8c_a87305f86cad7c54e7d6d7fe33e5343eb}{iwm\_free\_tx\_ring}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__tx__ring}{iwm\_tx\_ring}} *ring)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01178}01178 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01179}01179         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01180}01180 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01181}01181         \mbox{\hyperlink{if__iwm__util_8c_a628e0b20edea1c70fc1ff4c3730761aa}{iwm\_dma\_contig\_free}}(\&ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a06c9b0667b51f00845f9decf8849cd0e}{desc\_dma}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01182}01182         \mbox{\hyperlink{if__iwm__util_8c_a628e0b20edea1c70fc1ff4c3730761aa}{iwm\_dma\_contig\_free}}(\&ring-\/>\mbox{\hyperlink{structiwm__tx__ring_adbab9691a34e7f1e1ed21cabb52e1023}{cmd\_dma}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01183}01183 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01184}01184         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{if__iwmvar_8h_a20e51e5cdc7d74b0625e0cdeefd8df14}{IWM\_TX\_RING\_COUNT}}; i++) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01185}01185                 \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__tx__data}{iwm\_tx\_data}} *data = \&ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a283b917a5d00de60d0932208c9b88557}{data}}[i];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01186}01186 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01187}01187                 \textcolor{keywordflow}{if} (data-\/>\mbox{\hyperlink{structiwm__tx__data_ab4827b5c8b3d54f814e0ba0bb9444b7a}{m}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01188}01188                         bus\_dmamap\_sync(ring-\/>\mbox{\hyperlink{structiwm__tx__ring_aca7fb956f70df0acc0787fc191872fb3}{data\_dmat}}, data-\/>\mbox{\hyperlink{structiwm__tx__data_a56a04caca9190302823ff8aa91363d1f}{map}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01189}01189                             BUS\_DMASYNC\_POSTWRITE);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01190}01190                         bus\_dmamap\_unload(ring-\/>\mbox{\hyperlink{structiwm__tx__ring_aca7fb956f70df0acc0787fc191872fb3}{data\_dmat}}, data-\/>\mbox{\hyperlink{structiwm__tx__data_a56a04caca9190302823ff8aa91363d1f}{map}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01191}01191                         m\_freem(data-\/>\mbox{\hyperlink{structiwm__tx__data_ab4827b5c8b3d54f814e0ba0bb9444b7a}{m}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01192}01192                         data-\/>\mbox{\hyperlink{structiwm__tx__data_ab4827b5c8b3d54f814e0ba0bb9444b7a}{m}} = NULL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01193}01193                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01194}01194                 \textcolor{keywordflow}{if} (data-\/>\mbox{\hyperlink{structiwm__tx__data_a56a04caca9190302823ff8aa91363d1f}{map}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01195}01195                         bus\_dmamap\_destroy(ring-\/>\mbox{\hyperlink{structiwm__tx__ring_aca7fb956f70df0acc0787fc191872fb3}{data\_dmat}}, data-\/>\mbox{\hyperlink{structiwm__tx__data_a56a04caca9190302823ff8aa91363d1f}{map}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01196}01196                         data-\/>\mbox{\hyperlink{structiwm__tx__data_a56a04caca9190302823ff8aa91363d1f}{map}} = NULL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01197}01197                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01198}01198         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01199}01199         \textcolor{keywordflow}{if} (ring-\/>\mbox{\hyperlink{structiwm__tx__ring_aca7fb956f70df0acc0787fc191872fb3}{data\_dmat}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01200}01200                 bus\_dma\_tag\_destroy(ring-\/>\mbox{\hyperlink{structiwm__tx__ring_aca7fb956f70df0acc0787fc191872fb3}{data\_dmat}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01201}01201                 ring-\/>\mbox{\hyperlink{structiwm__tx__ring_aca7fb956f70df0acc0787fc191872fb3}{data\_dmat}} = NULL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01202}01202         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01203}01203 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01204}01204 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01205}01205 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01206}01206 \textcolor{comment}{ * High-\/level hardware frobbing routines}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01207}01207 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01208}01208 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01209}01209 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01210}\mbox{\hyperlink{if__iwm_8c_afe3d7f1983238caff5e40b889728fbe0}{01210}} \mbox{\hyperlink{if__iwm_8c_afe3d7f1983238caff5e40b889728fbe0}{iwm\_enable\_interrupts}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01211}01211 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01212}01212         sc-\/>\mbox{\hyperlink{structiwm__softc_af86bfc45da4bee42deba332d1c4bc4c5}{sc\_intmask}} = \mbox{\hyperlink{if__iwmreg_8h_abaa12d2d2050641c06665ee6d57e3967}{IWM\_CSR\_INI\_SET\_MASK}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01213}01213         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a5e8968161116664e181090be66b176b6}{IWM\_CSR\_INT\_MASK}}, sc-\/>\mbox{\hyperlink{structiwm__softc_af86bfc45da4bee42deba332d1c4bc4c5}{sc\_intmask}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01214}01214 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01215}01215 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01216}01216 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01217}\mbox{\hyperlink{if__iwm_8c_ae798b664f07f4912afe3cc0b52aa2f42}{01217}} \mbox{\hyperlink{if__iwm_8c_ae798b664f07f4912afe3cc0b52aa2f42}{iwm\_restore\_interrupts}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01218}01218 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01219}01219         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a5e8968161116664e181090be66b176b6}{IWM\_CSR\_INT\_MASK}}, sc-\/>\mbox{\hyperlink{structiwm__softc_af86bfc45da4bee42deba332d1c4bc4c5}{sc\_intmask}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01220}01220 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01221}01221 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01222}01222 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01223}\mbox{\hyperlink{if__iwm_8c_a3e88bcc98e703758e6b69e766618d598}{01223}} \mbox{\hyperlink{if__iwm_8c_a3e88bcc98e703758e6b69e766618d598}{iwm\_disable\_interrupts}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01224}01224 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01225}01225         \textcolor{comment}{/* disable interrupts */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01226}01226         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a5e8968161116664e181090be66b176b6}{IWM\_CSR\_INT\_MASK}}, 0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01227}01227 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01228}01228         \textcolor{comment}{/* acknowledge all interrupts */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01229}01229         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a12fe1fe92a4c101c7911cff12a0c08c6}{IWM\_CSR\_INT}}, \string~0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01230}01230         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a00578eaa8ca21f8d8e62ee790995d68b}{IWM\_CSR\_FH\_INT\_STATUS}}, \string~0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01231}01231 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01232}01232 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01233}01233 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01234}\mbox{\hyperlink{if__iwm_8c_aefaedf70abb2236df0cac56295bf78e2}{01234}} \mbox{\hyperlink{if__iwm_8c_aefaedf70abb2236df0cac56295bf78e2}{iwm\_ict\_reset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01235}01235 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01236}01236         \mbox{\hyperlink{if__iwm_8c_a3e88bcc98e703758e6b69e766618d598}{iwm\_disable\_interrupts}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01237}01237 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01238}01238         \textcolor{comment}{/* Reset ICT table. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01239}01239         memset(sc-\/>\mbox{\hyperlink{structiwm__softc_aa0e657a2c5629c84832ec6e88ffcaeea}{ict\_dma}}.\mbox{\hyperlink{structiwm__dma__info_a8b1776dfbd12b920fe7ec6fba682178d}{vaddr}}, 0, \mbox{\hyperlink{if__iwmvar_8h_a7c598763cdc56b713141a0ee6a0463e4}{IWM\_ICT\_SIZE}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01240}01240         sc-\/>\mbox{\hyperlink{structiwm__softc_a4c1ed3bd45821f39e55a371e9ae04575}{ict\_cur}} = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01241}01241 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01242}01242         \textcolor{comment}{/* Set physical address of ICT table (4KB aligned). */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01243}01243         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a4a17d709e68058a6f4fcee1779633ea5}{IWM\_CSR\_DRAM\_INT\_TBL\_REG}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01244}01244             \mbox{\hyperlink{if__iwmreg_8h_a36376cfbacdc04dd895e9c752eead03c}{IWM\_CSR\_DRAM\_INT\_TBL\_ENABLE}}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01245}01245             | \mbox{\hyperlink{if__iwmreg_8h_a21dbf640d364730575186eaf4f9c8d1d}{IWM\_CSR\_DRAM\_INIT\_TBL\_WRITE\_POINTER}}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01246}01246             | \mbox{\hyperlink{if__iwmreg_8h_a49ee32dd387a9be1aa25f28bc696579e}{IWM\_CSR\_DRAM\_INIT\_TBL\_WRAP\_CHECK}}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01247}01247             | sc-\/>\mbox{\hyperlink{structiwm__softc_aa0e657a2c5629c84832ec6e88ffcaeea}{ict\_dma}}.\mbox{\hyperlink{structiwm__dma__info_addd7774a4b8cc6802bbcc8b31452794c}{paddr}} >> \mbox{\hyperlink{if__iwmvar_8h_afcaad7311dfab24442b56f2d59085387}{IWM\_ICT\_PADDR\_SHIFT}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01248}01248 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01249}01249         \textcolor{comment}{/* Switch to ICT interrupt mode in driver. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01250}01250         sc-\/>\mbox{\hyperlink{structiwm__softc_a67d7ea2a1eef39c9ca65e86178e54766}{sc\_flags}} |= \mbox{\hyperlink{if__iwmvar_8h_aeb3043c3b0d302e795bf902c96ad68e9}{IWM\_FLAG\_USE\_ICT}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01251}01251 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01252}01252         \textcolor{comment}{/* Re-\/enable interrupts. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01253}01253         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a12fe1fe92a4c101c7911cff12a0c08c6}{IWM\_CSR\_INT}}, \string~0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01254}01254         \mbox{\hyperlink{if__iwm_8c_afe3d7f1983238caff5e40b889728fbe0}{iwm\_enable\_interrupts}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01255}01255 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01256}01256 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01257}01257 \textcolor{comment}{/* iwlwifi pcie/trans.c */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01258}01258 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01259}01259 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01260}01260 \textcolor{comment}{ * Since this .. hard-\/resets things, it's time to actually}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01261}01261 \textcolor{comment}{ * mark the first vap (if any) as having no mac context.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01262}01262 \textcolor{comment}{ * It's annoying, but since the driver is potentially being}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01263}01263 \textcolor{comment}{ * stop/start'ed whilst active (thanks openbsd port!) we}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01264}01264 \textcolor{comment}{ * have to correctly track this.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01265}01265 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01266}01266 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01267}\mbox{\hyperlink{if__iwm_8c_a0aac1aec10b3f7f3fdbec8d4252038c1}{01267}} \mbox{\hyperlink{if__iwm_8c_a0aac1aec10b3f7f3fdbec8d4252038c1}{iwm\_stop\_device}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01268}01268 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01269}01269         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structiwm__softc_ada8054beb1d93be79364f98ff3bfbaf2}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01270}01270         \textcolor{keyword}{struct }ieee80211vap *vap = TAILQ\_FIRST(\&ic-\/>ic\_vaps);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01271}01271         \textcolor{keywordtype}{int} chnl, qid;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01272}01272         uint32\_t mask = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01273}01273 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01274}01274         \textcolor{comment}{/* tell the device to stop sending interrupts */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01275}01275         \mbox{\hyperlink{if__iwm_8c_a3e88bcc98e703758e6b69e766618d598}{iwm\_disable\_interrupts}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01276}01276 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01277}01277         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01278}01278 \textcolor{comment}{         * FreeBSD-\/local: mark the first vap as not-\/uploaded,}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01279}01279 \textcolor{comment}{         * so the next transition through auth/assoc}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01280}01280 \textcolor{comment}{         * will correctly populate the MAC context.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01281}01281 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01282}01282         \textcolor{keywordflow}{if} (vap) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01283}01283                 \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__vap}{iwm\_vap}} *iv = \mbox{\hyperlink{if__iwmvar_8h_a411a4f289df166d363076401a075b455}{IWM\_VAP}}(vap);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01284}01284                 iv-\/>\mbox{\hyperlink{structiwm__vap_a448a47a542ee0070949b36d0b86c83ad}{phy\_ctxt}} = NULL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01285}01285                 iv-\/>\mbox{\hyperlink{structiwm__vap_acedd1a3b1b86b73619826502c2be182c}{is\_uploaded}} = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01286}01286         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01287}01287         sc-\/>\mbox{\hyperlink{structiwm__softc_a064fd76be7f7ab79f6da894c344419e0}{sc\_firmware\_state}} = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01288}01288         sc-\/>\mbox{\hyperlink{structiwm__softc_a67d7ea2a1eef39c9ca65e86178e54766}{sc\_flags}} \&= \string~IWM\_FLAG\_TE\_ACTIVE;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01289}01289 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01290}01290         \textcolor{comment}{/* device going down, Stop using ICT table */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01291}01291         sc-\/>\mbox{\hyperlink{structiwm__softc_a67d7ea2a1eef39c9ca65e86178e54766}{sc\_flags}} \&= \string~IWM\_FLAG\_USE\_ICT;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01292}01292 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01293}01293         \textcolor{comment}{/* stop tx and rx.  tx and rx bits, as usual, are from if\_iwn */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01294}01294 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01295}01295         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__iwm__pcie__trans_8c_a895bbe6909b405cde9df9bd57ec51fdb}{iwm\_nic\_lock}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01296}01296                 \mbox{\hyperlink{if__iwm__pcie__trans_8c_ae575f08e5baf2f0f63c629f690b03704}{iwm\_write\_prph}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a4045fbc354f48678c8dd0c9b76dd9b46}{IWM\_SCD\_TXFACT}}, 0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01297}01297 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01298}01298                 \textcolor{comment}{/* Stop each Tx DMA channel */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01299}01299                 \textcolor{keywordflow}{for} (chnl = 0; chnl < \mbox{\hyperlink{if__iwmreg_8h_a9f368a5166d881741c706385c720ba08}{IWM\_FH\_TCSR\_CHNL\_NUM}}; chnl++) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01300}01300                         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01301}01301                             \mbox{\hyperlink{if__iwmreg_8h_abc6b4e8d6ac554aa8d55384e4c5e7451}{IWM\_FH\_TCSR\_CHNL\_TX\_CONFIG\_REG}}(chnl), 0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01302}01302                         mask |= \mbox{\hyperlink{if__iwmreg_8h_aa17b51652de835049ae066dac561f757}{IWM\_FH\_TSSR\_TX\_STATUS\_REG\_MSK\_CHNL\_IDLE}}(chnl);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01303}01303                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01304}01304 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01305}01305                 \textcolor{comment}{/* Wait for DMA channels to be idle */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01306}01306                 \textcolor{keywordflow}{if} (!\mbox{\hyperlink{if__iwm__pcie__trans_8c_ac603e187bd63c2957365392b9bb30f34}{iwm\_poll\_bit}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a10dd52f0efc5fe3af23b88906ee4a81d}{IWM\_FH\_TSSR\_TX\_STATUS\_REG}}, mask, mask,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01307}01307                     5000)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01308}01308                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01309}01309                             \textcolor{stringliteral}{"{}Failing on timeout while stopping DMA channel: [0x\%08x]\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01310}01310                             \mbox{\hyperlink{if__iwmreg_8h_a13e3589622c101bf4b40c82beccd732a}{IWM\_READ}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a10dd52f0efc5fe3af23b88906ee4a81d}{IWM\_FH\_TSSR\_TX\_STATUS\_REG}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01311}01311                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01312}01312                 \mbox{\hyperlink{if__iwm__pcie__trans_8c_a957b9219e85be1d4043332426844cb2f}{iwm\_nic\_unlock}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01313}01313         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01314}01314         \mbox{\hyperlink{if__iwm__pcie__trans_8c_a57f0aa76c3bb9d85484851c93f739735}{iwm\_pcie\_rx\_stop}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01315}01315 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01316}01316         \textcolor{comment}{/* Stop RX ring. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01317}01317         \mbox{\hyperlink{if__iwm_8c_a958d1470f4098506e8868a5eee05c788}{iwm\_reset\_rx\_ring}}(sc, \&sc-\/>\mbox{\hyperlink{structiwm__softc_a57cdc0da9cdb3a68e4f55cc47c3a3aed}{rxq}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01318}01318 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01319}01319         \textcolor{comment}{/* Reset all TX rings. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01320}01320         \textcolor{keywordflow}{for} (qid = 0; qid < nitems(sc-\/>\mbox{\hyperlink{structiwm__softc_a9580b1b4fe19ddaa7f8e8b987dc92f8b}{txq}}); qid++)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01321}01321                 \mbox{\hyperlink{if__iwm_8c_aed9171af6accaaf9f581d1f0f8137944}{iwm\_reset\_tx\_ring}}(sc, \&sc-\/>\mbox{\hyperlink{structiwm__softc_a9580b1b4fe19ddaa7f8e8b987dc92f8b}{txq}}[qid]);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01322}01322 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01323}01323         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_a9b399704eeb3c9299fe79ff7ebf0b3c3}{device\_family}} == \mbox{\hyperlink{if__iwm__config_8h_a134dc690a22b13281e655ce3d4944141a8cb6f131b7633326d14c4046c4bbf0f5}{IWM\_DEVICE\_FAMILY\_7000}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01324}01324                 \textcolor{comment}{/* Power-\/down device's busmaster DMA clocks */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01325}01325                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__iwm__pcie__trans_8c_a895bbe6909b405cde9df9bd57ec51fdb}{iwm\_nic\_lock}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01326}01326                         \mbox{\hyperlink{if__iwm__pcie__trans_8c_ae575f08e5baf2f0f63c629f690b03704}{iwm\_write\_prph}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a762b1a5a44e546a669da630d8b96fed6}{IWM\_APMG\_CLK\_DIS\_REG}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01327}01327                             \mbox{\hyperlink{if__iwmreg_8h_a91ed3ebfdc3ca131928596f80ed17eef}{IWM\_APMG\_CLK\_VAL\_DMA\_CLK\_RQT}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01328}01328                         \mbox{\hyperlink{if__iwm__pcie__trans_8c_a957b9219e85be1d4043332426844cb2f}{iwm\_nic\_unlock}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01329}01329                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01330}01330                 DELAY(5);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01331}01331         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01332}01332 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01333}01333         \textcolor{comment}{/* Make sure (redundant) we've released our request to stay awake */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01334}01334         \mbox{\hyperlink{if__iwmreg_8h_a5517d4a073eee3308e7726061986a57c}{IWM\_CLRBITS}}(sc, \mbox{\hyperlink{if__iwmreg_8h_aa913001b33fb91b79d483dc53c1e3622}{IWM\_CSR\_GP\_CNTRL}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01335}01335             \mbox{\hyperlink{if__iwmreg_8h_af07df6891594c3de093e34ccad74af93}{IWM\_CSR\_GP\_CNTRL\_REG\_FLAG\_MAC\_ACCESS\_REQ}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01336}01336 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01337}01337         \textcolor{comment}{/* Stop the device, and put it in low power state */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01338}01338         \mbox{\hyperlink{if__iwm__pcie__trans_8c_afa3a77e5bdc546d04ab311d5761dc570}{iwm\_apm\_stop}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01339}01339 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01340}01340         \textcolor{comment}{/* stop and reset the on-\/board processor */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01341}01341         \mbox{\hyperlink{if__iwmreg_8h_a269244e193104ab3ba0e8de508ebfc8f}{IWM\_SETBITS}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a880a3010d91cb40bf361f33412f9a1ff}{IWM\_CSR\_RESET}}, \mbox{\hyperlink{if__iwmreg_8h_a2ca0bf5b4ac86c2fabe13f59f751b092}{IWM\_CSR\_RESET\_REG\_FLAG\_SW\_RESET}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01342}01342         DELAY(5000);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01343}01343 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01344}01344         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01345}01345 \textcolor{comment}{         * Upon stop, the APM issues an interrupt if HW RF kill is set.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01346}01346 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01347}01347         \mbox{\hyperlink{if__iwm_8c_a3e88bcc98e703758e6b69e766618d598}{iwm\_disable\_interrupts}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01348}01348 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01349}01349         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01350}01350 \textcolor{comment}{         * Even if we stop the HW, we still want the RF kill}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01351}01351 \textcolor{comment}{         * interrupt}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01352}01352 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01353}01353         \mbox{\hyperlink{if__iwm__pcie__trans_8c_a464ff7e08340f30f97ff47e3633a7f39}{iwm\_enable\_rfkill\_int}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01354}01354         \mbox{\hyperlink{if__iwm__pcie__trans_8c_a8270049723375524645a285e9313a966}{iwm\_check\_rfkill}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01355}01355 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01356}01356         \mbox{\hyperlink{if__iwm__pcie__trans_8c_a8bc352da3a8f4e59a937ffedc4c9e447}{iwm\_prepare\_card\_hw}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01357}01357 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01358}01358 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01359}01359 \textcolor{comment}{/* iwlwifi: mvm/ops.c */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01360}01360 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01361}\mbox{\hyperlink{if__iwm_8c_a7b95a8bbadb1fc6ca84b7f42a9560f6b}{01361}} \mbox{\hyperlink{if__iwm_8c_a7b95a8bbadb1fc6ca84b7f42a9560f6b}{iwm\_nic\_config}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01362}01362 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01363}01363         uint8\_t radio\_cfg\_type, radio\_cfg\_step, radio\_cfg\_dash;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01364}01364         uint32\_t reg\_val = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01365}01365         uint32\_t phy\_config = \mbox{\hyperlink{if__iwm__util_8h_acaffd89b744689e5cf8d6e2a62d4030c}{iwm\_get\_phy\_config}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01366}01366 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01367}01367         radio\_cfg\_type = (phy\_config \& \mbox{\hyperlink{if__iwmreg_8h_a607b5e76c79c7dd67dc30912131aa743}{IWM\_FW\_PHY\_CFG\_RADIO\_TYPE}}) >>}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01368}01368             \mbox{\hyperlink{if__iwmreg_8h_a8c9c747924ffa19185651bf16053ea7b}{IWM\_FW\_PHY\_CFG\_RADIO\_TYPE\_POS}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01369}01369         radio\_cfg\_step = (phy\_config \& \mbox{\hyperlink{if__iwmreg_8h_a41fdf9c05e0cc8f82d87379249ec2181}{IWM\_FW\_PHY\_CFG\_RADIO\_STEP}}) >>}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01370}01370             \mbox{\hyperlink{if__iwmreg_8h_a6c85479e8f24d3caeff4469596c0cb05}{IWM\_FW\_PHY\_CFG\_RADIO\_STEP\_POS}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01371}01371         radio\_cfg\_dash = (phy\_config \& \mbox{\hyperlink{if__iwmreg_8h_a9b2a664ee8848124b4538f41b87fc7cd}{IWM\_FW\_PHY\_CFG\_RADIO\_DASH}}) >>}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01372}01372             \mbox{\hyperlink{if__iwmreg_8h_aeeb44fe13d640ab9aa61b1952c8f32e2}{IWM\_FW\_PHY\_CFG\_RADIO\_DASH\_POS}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01373}01373 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01374}01374         \textcolor{comment}{/* SKU control */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01375}01375         reg\_val |= \mbox{\hyperlink{if__iwmreg_8h_a2e2af463b48ba306a871ae832069379c}{IWM\_CSR\_HW\_REV\_STEP}}(sc-\/>\mbox{\hyperlink{structiwm__softc_a3295cd838b011f3f4c2d3a202a822c2f}{sc\_hw\_rev}}) <<}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01376}01376             \mbox{\hyperlink{if__iwmreg_8h_ac06ff1d50ca67387ffe9f0036dce0121}{IWM\_CSR\_HW\_IF\_CONFIG\_REG\_POS\_MAC\_STEP}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01377}01377         reg\_val |= \mbox{\hyperlink{if__iwmreg_8h_a1521bb70b235efc98f0dadae6e29418b}{IWM\_CSR\_HW\_REV\_DASH}}(sc-\/>\mbox{\hyperlink{structiwm__softc_a3295cd838b011f3f4c2d3a202a822c2f}{sc\_hw\_rev}}) <<}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01378}01378             \mbox{\hyperlink{if__iwmreg_8h_a157ef2c62dc628523048044e0f9b0a7e}{IWM\_CSR\_HW\_IF\_CONFIG\_REG\_POS\_MAC\_DASH}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01379}01379 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01380}01380         \textcolor{comment}{/* radio configuration */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01381}01381         reg\_val |= radio\_cfg\_type << \mbox{\hyperlink{if__iwmreg_8h_a715180c9ab16be1f2b95dbfdf4fa8c39}{IWM\_CSR\_HW\_IF\_CONFIG\_REG\_POS\_PHY\_TYPE}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01382}01382         reg\_val |= radio\_cfg\_step << \mbox{\hyperlink{if__iwmreg_8h_a5dee23383767d7d147f19078d3c30724}{IWM\_CSR\_HW\_IF\_CONFIG\_REG\_POS\_PHY\_STEP}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01383}01383         reg\_val |= radio\_cfg\_dash << \mbox{\hyperlink{if__iwmreg_8h_a4bd877dc647582d3daf152fd519b899f}{IWM\_CSR\_HW\_IF\_CONFIG\_REG\_POS\_PHY\_DASH}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01384}01384 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01385}01385         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_aca5d2b48882fba6324e7bbc54bf50296}{IWM\_CSR\_HW\_IF\_CONFIG\_REG}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01386}01386             \mbox{\hyperlink{if__iwmreg_8h_a7cec5e7894c8bd79a8b79324de867324}{IWM\_CSR\_HW\_IF\_CONFIG\_REG\_MSK\_MAC\_DASH}} |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01387}01387             \mbox{\hyperlink{if__iwmreg_8h_a4cc13cb5d2718e7673363bc58fca6b9c}{IWM\_CSR\_HW\_IF\_CONFIG\_REG\_MSK\_MAC\_STEP}} |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01388}01388             \mbox{\hyperlink{if__iwmreg_8h_a5c948399a91ec93797b16a83a909ada3}{IWM\_CSR\_HW\_IF\_CONFIG\_REG\_MSK\_PHY\_STEP}} |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01389}01389             \mbox{\hyperlink{if__iwmreg_8h_ad06b6945964306a39719b8cb1a148b6b}{IWM\_CSR\_HW\_IF\_CONFIG\_REG\_MSK\_PHY\_DASH}} |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01390}01390             \mbox{\hyperlink{if__iwmreg_8h_aefce384d1da700268935110e2d645a0b}{IWM\_CSR\_HW\_IF\_CONFIG\_REG\_MSK\_PHY\_TYPE}} |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01391}01391             \mbox{\hyperlink{if__iwmreg_8h_a4f6159066dc3285db32e608d4f64aa86}{IWM\_CSR\_HW\_IF\_CONFIG\_REG\_BIT\_RADIO\_SI}} |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01392}01392             \mbox{\hyperlink{if__iwmreg_8h_adfc09d32d0051c6a3cfcf475e0d90f91}{IWM\_CSR\_HW\_IF\_CONFIG\_REG\_BIT\_MAC\_SI}} |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01393}01393             reg\_val);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01394}01394 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01395}01395         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_RESET,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01396}01396             \textcolor{stringliteral}{"{}Radio type=0x\%x-\/0x\%x-\/0x\%x\(\backslash\)n"{}}, radio\_cfg\_type,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01397}01397             radio\_cfg\_step, radio\_cfg\_dash);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01398}01398 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01399}01399         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01400}01400 \textcolor{comment}{         * W/A : NIC is stuck in a reset state after Early PCIe power off}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01401}01401 \textcolor{comment}{         * (PCIe power is lost before PERST\# is asserted), causing ME FW}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01402}01402 \textcolor{comment}{         * to lose ownership and not being able to obtain it back.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01403}01403 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01404}01404         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_a9b399704eeb3c9299fe79ff7ebf0b3c3}{device\_family}} == \mbox{\hyperlink{if__iwm__config_8h_a134dc690a22b13281e655ce3d4944141a8cb6f131b7633326d14c4046c4bbf0f5}{IWM\_DEVICE\_FAMILY\_7000}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01405}01405                 \mbox{\hyperlink{if__iwm__pcie__trans_8c_a4826d1e4b909f1051ac0a669bbde1261}{iwm\_set\_bits\_mask\_prph}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a2fb380046c4ecd0c766637dbeaa725e3}{IWM\_APMG\_PS\_CTRL\_REG}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01406}01406                     \mbox{\hyperlink{if__iwmreg_8h_ae4a4a7b2af9457d25f245dba4992a599}{IWM\_APMG\_PS\_CTRL\_EARLY\_PWR\_OFF\_RESET\_DIS}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01407}01407                     \string~\mbox{\hyperlink{if__iwmreg_8h_ae4a4a7b2af9457d25f245dba4992a599}{IWM\_APMG\_PS\_CTRL\_EARLY\_PWR\_OFF\_RESET\_DIS}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01408}01408         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01409}01409 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01410}01410 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01411}01411 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01412}\mbox{\hyperlink{if__iwm_8c_a50fca726ea707f8551392c5985cd240a}{01412}} \mbox{\hyperlink{if__iwm_8c_a50fca726ea707f8551392c5985cd240a}{iwm\_nic\_rx\_mq\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01413}01413 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01414}01414         \textcolor{keywordtype}{int} enabled;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01415}01415 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01416}01416         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{if__iwm__pcie__trans_8c_a895bbe6909b405cde9df9bd57ec51fdb}{iwm\_nic\_lock}}(sc))}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01417}01417                 \textcolor{keywordflow}{return} EBUSY;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01418}01418 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01419}01419         \textcolor{comment}{/* Stop RX DMA. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01420}01420         \mbox{\hyperlink{if__iwm__pcie__trans_8c_ae575f08e5baf2f0f63c629f690b03704}{iwm\_write\_prph}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a964772311503598cd9d8b6089183b2f5}{IWM\_RFH\_RXF\_DMA\_CFG}}, 0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01421}01421         \textcolor{comment}{/* Disable RX used and free queue operation. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01422}01422         \mbox{\hyperlink{if__iwm__pcie__trans_8c_ae575f08e5baf2f0f63c629f690b03704}{iwm\_write\_prph}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a7a79dc99cb90327d1f07243a501a0b10}{IWM\_RFH\_RXF\_RXQ\_ACTIVE}}, 0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01423}01423 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01424}01424         \mbox{\hyperlink{if__iwm__pcie__trans_8c_a1c56b3eaa55066b130fcf2e35b2d6b57}{iwm\_write\_prph64}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a88e6a12c5924ff7868c3302624b9920b}{IWM\_RFH\_Q0\_FRBDCB\_BA\_LSB}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01425}01425             sc-\/>\mbox{\hyperlink{structiwm__softc_a57cdc0da9cdb3a68e4f55cc47c3a3aed}{rxq}}.\mbox{\hyperlink{structiwm__rx__ring_a212749f0d88d1ca6fd8e8fdb37442ea1}{free\_desc\_dma}}.\mbox{\hyperlink{structiwm__dma__info_addd7774a4b8cc6802bbcc8b31452794c}{paddr}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01426}01426         \mbox{\hyperlink{if__iwm__pcie__trans_8c_a1c56b3eaa55066b130fcf2e35b2d6b57}{iwm\_write\_prph64}}(sc, \mbox{\hyperlink{if__iwmreg_8h_ac01c09c07e02a48747d9f98ccc91bd26}{IWM\_RFH\_Q0\_URBDCB\_BA\_LSB}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01427}01427             sc-\/>\mbox{\hyperlink{structiwm__softc_a57cdc0da9cdb3a68e4f55cc47c3a3aed}{rxq}}.\mbox{\hyperlink{structiwm__rx__ring_a4004809a196483f02d23596af444e64f}{used\_desc\_dma}}.\mbox{\hyperlink{structiwm__dma__info_addd7774a4b8cc6802bbcc8b31452794c}{paddr}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01428}01428         \mbox{\hyperlink{if__iwm__pcie__trans_8c_a1c56b3eaa55066b130fcf2e35b2d6b57}{iwm\_write\_prph64}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a6510a9a8c8a4394d9b099d0985c45075}{IWM\_RFH\_Q0\_URBD\_STTS\_WPTR\_LSB}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01429}01429             sc-\/>\mbox{\hyperlink{structiwm__softc_a57cdc0da9cdb3a68e4f55cc47c3a3aed}{rxq}}.\mbox{\hyperlink{structiwm__rx__ring_a7ecf69ca61669767934f89491a1d5582}{stat\_dma}}.\mbox{\hyperlink{structiwm__dma__info_addd7774a4b8cc6802bbcc8b31452794c}{paddr}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01430}01430         \mbox{\hyperlink{if__iwm__pcie__trans_8c_ae575f08e5baf2f0f63c629f690b03704}{iwm\_write\_prph}}(sc, \mbox{\hyperlink{if__iwmreg_8h_abe7407d0018efa5594c333a948bc5d5e}{IWM\_RFH\_Q0\_FRBDCB\_WIDX}}, 0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01431}01431         \mbox{\hyperlink{if__iwm__pcie__trans_8c_ae575f08e5baf2f0f63c629f690b03704}{iwm\_write\_prph}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a1f853ddcefd549e87edd8b2c43223cba}{IWM\_RFH\_Q0\_FRBDCB\_RIDX}}, 0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01432}01432         \mbox{\hyperlink{if__iwm__pcie__trans_8c_ae575f08e5baf2f0f63c629f690b03704}{iwm\_write\_prph}}(sc, \mbox{\hyperlink{if__iwmreg_8h_af01f4d086c240fea7b2bf25efa588434}{IWM\_RFH\_Q0\_URBDCB\_WIDX}}, 0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01433}01433 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01434}01434         \textcolor{comment}{/* We configure only queue 0 for now. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01435}01435         enabled = ((1 << 0) << 16) | (1 << 0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01436}01436 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01437}01437         \textcolor{comment}{/* Enable RX DMA, 4KB buffer size. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01438}01438         \mbox{\hyperlink{if__iwm__pcie__trans_8c_ae575f08e5baf2f0f63c629f690b03704}{iwm\_write\_prph}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a964772311503598cd9d8b6089183b2f5}{IWM\_RFH\_RXF\_DMA\_CFG}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01439}01439             \mbox{\hyperlink{if__iwmreg_8h_a7d70de8978b85e3111a22449280ccbb4}{IWM\_RFH\_DMA\_EN\_ENABLE\_VAL}} |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01440}01440             \mbox{\hyperlink{if__iwmreg_8h_a8268418ccdd5e8aaa3b424976cc3a46e}{IWM\_RFH\_RXF\_DMA\_RB\_SIZE\_4K}} |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01441}01441             \mbox{\hyperlink{if__iwmreg_8h_ad4abbdd98163de64059760bf11236391}{IWM\_RFH\_RXF\_DMA\_MIN\_RB\_4\_8}} |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01442}01442             \mbox{\hyperlink{if__iwmreg_8h_ab95fe4fac1754df1cf233b0504f5018c}{IWM\_RFH\_RXF\_DMA\_DROP\_TOO\_LARGE\_MASK}} |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01443}01443             \mbox{\hyperlink{if__iwmreg_8h_a520491af06f5c91b98f4fe6cb90172b3}{IWM\_RFH\_RXF\_DMA\_RBDCB\_SIZE\_512}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01444}01444 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01445}01445         \textcolor{comment}{/* Enable RX DMA snooping. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01446}01446         \mbox{\hyperlink{if__iwm__pcie__trans_8c_ae575f08e5baf2f0f63c629f690b03704}{iwm\_write\_prph}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a18a671cc7642dddb45348f6cc101e1a7}{IWM\_RFH\_GEN\_CFG}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01447}01447             \mbox{\hyperlink{if__iwmreg_8h_ac2e9ae038566563786aa341b5d5e9782}{IWM\_RFH\_GEN\_CFG\_RFH\_DMA\_SNOOP}} |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01448}01448             \mbox{\hyperlink{if__iwmreg_8h_a036ca616be7abe0f12ff45d89d33c404}{IWM\_RFH\_GEN\_CFG\_SERVICE\_DMA\_SNOOP}} |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01449}01449             (sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_aec964c536d284927841a620ea83d1aa2}{integrated}} ? \mbox{\hyperlink{if__iwmreg_8h_addb786f884346280d937f11d894dad25}{IWM\_RFH\_GEN\_CFG\_RB\_CHUNK\_SIZE\_64}} :}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01450}01450             \mbox{\hyperlink{if__iwmreg_8h_a69a3059856e7fc6a78606f052683d501}{IWM\_RFH\_GEN\_CFG\_RB\_CHUNK\_SIZE\_128}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01451}01451 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01452}01452         \textcolor{comment}{/* Enable the configured queue(s). */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01453}01453         \mbox{\hyperlink{if__iwm__pcie__trans_8c_ae575f08e5baf2f0f63c629f690b03704}{iwm\_write\_prph}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a7a79dc99cb90327d1f07243a501a0b10}{IWM\_RFH\_RXF\_RXQ\_ACTIVE}}, enabled);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01454}01454 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01455}01455         \mbox{\hyperlink{if__iwm__pcie__trans_8c_a957b9219e85be1d4043332426844cb2f}{iwm\_nic\_unlock}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01456}01456 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01457}01457         \mbox{\hyperlink{if__iwmreg_8h_ab88896bdd5b2361a366533fc825f22ae}{IWM\_WRITE\_1}}(sc, \mbox{\hyperlink{if__iwmreg_8h_acd54d88b5f626ae8c1d652f4238b02be}{IWM\_CSR\_INT\_COALESCING}}, \mbox{\hyperlink{if__iwmreg_8h_acb1dac87a720dbe49330dde4f50467be}{IWM\_HOST\_INT\_TIMEOUT\_DEF}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01458}01458 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01459}01459         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_ae0b9e130906b373daaa1887078e3df23}{IWM\_RFH\_Q0\_FRBDCB\_WIDX\_TRG}}, 8);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01460}01460 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01461}01461         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01462}01462 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01463}01463 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01464}01464 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01465}\mbox{\hyperlink{if__iwm_8c_a39fe8420f5bb58476a8c890b6a231e1c}{01465}} \mbox{\hyperlink{if__iwm_8c_a39fe8420f5bb58476a8c890b6a231e1c}{iwm\_nic\_rx\_legacy\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01466}01466 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01467}01467 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01468}01468         \textcolor{comment}{/* Stop Rx DMA */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01469}01469         \mbox{\hyperlink{if__iwm__pcie__trans_8c_a57f0aa76c3bb9d85484851c93f739735}{iwm\_pcie\_rx\_stop}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01470}01470 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01471}01471         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{if__iwm__pcie__trans_8c_a895bbe6909b405cde9df9bd57ec51fdb}{iwm\_nic\_lock}}(sc))}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01472}01472                 \textcolor{keywordflow}{return} EBUSY;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01473}01473 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01474}01474         \textcolor{comment}{/* reset and flush pointers */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01475}01475         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_aceebcfe0b33d955c37ae36111cdf2bbe}{IWM\_FH\_MEM\_RCSR\_CHNL0\_RBDCB\_WPTR}}, 0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01476}01476         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_aaea94e6b190fb4a9d089c37d44d826f3}{IWM\_FH\_MEM\_RCSR\_CHNL0\_FLUSH\_RB\_REQ}}, 0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01477}01477         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_afef913493ad49d0de76a40b6366bb9f2}{IWM\_FH\_RSCSR\_CHNL0\_RDPTR}}, 0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01478}01478         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a2798abef5cb20030e357418190a3bd60}{IWM\_FH\_RSCSR\_CHNL0\_RBDCB\_WPTR\_REG}}, 0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01479}01479 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01480}01480         \textcolor{comment}{/* Set physical address of RX ring (256-\/byte aligned). */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01481}01481         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01482}01482             \mbox{\hyperlink{if__iwmreg_8h_ad5be0efe44cdaf4dedac4bb2a877dbe8}{IWM\_FH\_RSCSR\_CHNL0\_RBDCB\_BASE\_REG}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01483}01483             sc-\/>\mbox{\hyperlink{structiwm__softc_a57cdc0da9cdb3a68e4f55cc47c3a3aed}{rxq}}.\mbox{\hyperlink{structiwm__rx__ring_a212749f0d88d1ca6fd8e8fdb37442ea1}{free\_desc\_dma}}.\mbox{\hyperlink{structiwm__dma__info_addd7774a4b8cc6802bbcc8b31452794c}{paddr}} >> 8);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01484}01484 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01485}01485         \textcolor{comment}{/* Set physical address of RX status (16-\/byte aligned). */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01486}01486         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01487}01487             \mbox{\hyperlink{if__iwmreg_8h_afd9804f9841196110c524f3f0620cd0c}{IWM\_FH\_RSCSR\_CHNL0\_STTS\_WPTR\_REG}}, sc-\/>\mbox{\hyperlink{structiwm__softc_a57cdc0da9cdb3a68e4f55cc47c3a3aed}{rxq}}.\mbox{\hyperlink{structiwm__rx__ring_a7ecf69ca61669767934f89491a1d5582}{stat\_dma}}.\mbox{\hyperlink{structiwm__dma__info_addd7774a4b8cc6802bbcc8b31452794c}{paddr}} >> 4);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01488}01488 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01489}01489         \textcolor{comment}{/* Enable Rx DMA}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01490}01490 \textcolor{comment}{         * XXX 5000 HW isn't supported by the iwm(4) driver.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01491}01491 \textcolor{comment}{         * IWM\_FH\_RCSR\_CHNL0\_RX\_IGNORE\_RXF\_EMPTY is set because of HW bug in}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01492}01492 \textcolor{comment}{         *      the credit mechanism in 5000 HW RX FIFO}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01493}01493 \textcolor{comment}{         * Direct rx interrupts to hosts}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01494}01494 \textcolor{comment}{         * Rx buffer size 4 or 8k or 12k}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01495}01495 \textcolor{comment}{         * RB timeout 0x10}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01496}01496 \textcolor{comment}{         * 256 RBDs}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01497}01497 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01498}01498         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a180f36ed629349151a2e4aa1fe7feab4}{IWM\_FH\_MEM\_RCSR\_CHNL0\_CONFIG\_REG}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01499}01499             \mbox{\hyperlink{if__iwmreg_8h_a8c0f6f5e1b149bf978deac536533593b}{IWM\_FH\_RCSR\_RX\_CONFIG\_CHNL\_EN\_ENABLE\_VAL}}            |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01500}01500             \mbox{\hyperlink{if__iwmreg_8h_a69eb1a1b04bdeb36b3b3e9eabd415d8d}{IWM\_FH\_RCSR\_CHNL0\_RX\_IGNORE\_RXF\_EMPTY}}          |  \textcolor{comment}{/* HW bug */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01501}01501             \mbox{\hyperlink{if__iwmreg_8h_a33deef33622ec855e533652df85439a8}{IWM\_FH\_RCSR\_CHNL0\_RX\_CONFIG\_IRQ\_DEST\_INT\_HOST\_VAL}}  |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01502}01502             \mbox{\hyperlink{if__iwmreg_8h_a8b3aaa06a2dbe402c1c656b0c8b20271}{IWM\_FH\_RCSR\_RX\_CONFIG\_REG\_VAL\_RB\_SIZE\_4K}}            |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01503}01503             (\mbox{\hyperlink{if__iwmreg_8h_a8e18a97a0d1a98de5a219ce53c824246}{IWM\_RX\_RB\_TIMEOUT}} << \mbox{\hyperlink{if__iwmreg_8h_a0095600f5ab6cced862b81f1f4aca8ee}{IWM\_FH\_RCSR\_RX\_CONFIG\_REG\_IRQ\_RBTH\_POS}}) |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01504}01504             \mbox{\hyperlink{if__iwmreg_8h_ad727705b4163519c89b2e1df538896fa}{IWM\_RX\_QUEUE\_SIZE\_LOG}} << \mbox{\hyperlink{if__iwmreg_8h_a1d05204cc2ff1004ac149dab80a032b8}{IWM\_FH\_RCSR\_RX\_CONFIG\_RBDCB\_SIZE\_POS}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01505}01505 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01506}01506         \mbox{\hyperlink{if__iwmreg_8h_ab88896bdd5b2361a366533fc825f22ae}{IWM\_WRITE\_1}}(sc, \mbox{\hyperlink{if__iwmreg_8h_acd54d88b5f626ae8c1d652f4238b02be}{IWM\_CSR\_INT\_COALESCING}}, \mbox{\hyperlink{if__iwmreg_8h_acb1dac87a720dbe49330dde4f50467be}{IWM\_HOST\_INT\_TIMEOUT\_DEF}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01507}01507 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01508}01508         \textcolor{comment}{/* W/A for interrupt coalescing bug in 7260 and 3160 */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01509}01509         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_aa57f75163576472b533457512cc31f82}{host\_interrupt\_operation\_mode}})}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01510}01510                 \mbox{\hyperlink{if__iwmreg_8h_a269244e193104ab3ba0e8de508ebfc8f}{IWM\_SETBITS}}(sc, \mbox{\hyperlink{if__iwmreg_8h_acd54d88b5f626ae8c1d652f4238b02be}{IWM\_CSR\_INT\_COALESCING}}, \mbox{\hyperlink{if__iwmreg_8h_a745f281072f8396cee6fe924b1c04da8}{IWM\_HOST\_INT\_OPER\_MODE}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01511}01511 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01512}01512         \mbox{\hyperlink{if__iwm__pcie__trans_8c_a957b9219e85be1d4043332426844cb2f}{iwm\_nic\_unlock}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01513}01513 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01514}01514         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a119757724961d7e406e04bed0adbef7a}{IWM\_FH\_RSCSR\_CHNL0\_WPTR}}, 8);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01515}01515 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01516}01516         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01517}01517 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01518}01518 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01519}01519 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01520}\mbox{\hyperlink{if__iwm_8c_ad158104530b57f95c38ef361e3a2b19c}{01520}} \mbox{\hyperlink{if__iwm_8c_ad158104530b57f95c38ef361e3a2b19c}{iwm\_nic\_rx\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01521}01521 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01522}01522         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_a4ace3f4eab56011b2fbbb76b5ad1dc67}{mqrx\_supported}})}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01523}01523                 \textcolor{keywordflow}{return} \mbox{\hyperlink{if__iwm_8c_a50fca726ea707f8551392c5985cd240a}{iwm\_nic\_rx\_mq\_init}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01524}01524         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01525}01525                 \textcolor{keywordflow}{return} \mbox{\hyperlink{if__iwm_8c_a39fe8420f5bb58476a8c890b6a231e1c}{iwm\_nic\_rx\_legacy\_init}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01526}01526 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01527}01527 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01528}01528 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01529}\mbox{\hyperlink{if__iwm_8c_ac678b5ea29d6766fa28dee9e01c57f82}{01529}} \mbox{\hyperlink{if__iwm_8c_ac678b5ea29d6766fa28dee9e01c57f82}{iwm\_nic\_tx\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01530}01530 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01531}01531         \textcolor{keywordtype}{int} qid;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01532}01532 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01533}01533         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{if__iwm__pcie__trans_8c_a895bbe6909b405cde9df9bd57ec51fdb}{iwm\_nic\_lock}}(sc))}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01534}01534                 \textcolor{keywordflow}{return} EBUSY;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01535}01535 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01536}01536         \textcolor{comment}{/* Deactivate TX scheduler. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01537}01537         \mbox{\hyperlink{if__iwm__pcie__trans_8c_ae575f08e5baf2f0f63c629f690b03704}{iwm\_write\_prph}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a4045fbc354f48678c8dd0c9b76dd9b46}{IWM\_SCD\_TXFACT}}, 0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01538}01538 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01539}01539         \textcolor{comment}{/* Set physical address of "{}keep warm"{} page (16-\/byte aligned). */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01540}01540         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a0b686f8f5f314d08a77556cb82aadb07}{IWM\_FH\_KW\_MEM\_ADDR\_REG}}, sc-\/>\mbox{\hyperlink{structiwm__softc_a6e03941dd4273f72ef91bbb054f284c9}{kw\_dma}}.\mbox{\hyperlink{structiwm__dma__info_addd7774a4b8cc6802bbcc8b31452794c}{paddr}} >> 4);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01541}01541 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01542}01542         \textcolor{comment}{/* Initialize TX rings. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01543}01543         \textcolor{keywordflow}{for} (qid = 0; qid < nitems(sc-\/>\mbox{\hyperlink{structiwm__softc_a9580b1b4fe19ddaa7f8e8b987dc92f8b}{txq}}); qid++) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01544}01544                 \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__tx__ring}{iwm\_tx\_ring}} *txq = \&sc-\/>\mbox{\hyperlink{structiwm__softc_a9580b1b4fe19ddaa7f8e8b987dc92f8b}{txq}}[\mbox{\hyperlink{structiwm__tx__ring_a985ab594338fd5c2df0efdd225636f8a}{qid}}];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01545}01545 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01546}01546                 \textcolor{comment}{/* Set physical address of TX ring (256-\/byte aligned). */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01547}01547                 \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a0b3d3e5c424bb22348ceb962deb7d1bf}{IWM\_FH\_MEM\_CBBC\_QUEUE}}(\mbox{\hyperlink{structiwm__tx__ring_a985ab594338fd5c2df0efdd225636f8a}{qid}}),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01548}01548                     txq-\/>\mbox{\hyperlink{structiwm__tx__ring_a06c9b0667b51f00845f9decf8849cd0e}{desc\_dma}}.\mbox{\hyperlink{structiwm__dma__info_addd7774a4b8cc6802bbcc8b31452794c}{paddr}} >> 8);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01549}01549                 \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_XMIT,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01550}01550                     \textcolor{stringliteral}{"{}\%s: loading ring \%d descriptors (\%p) at \%lx\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01551}01551                     \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01552}01552                     \mbox{\hyperlink{structiwm__tx__ring_a985ab594338fd5c2df0efdd225636f8a}{qid}}, txq-\/>\mbox{\hyperlink{structiwm__tx__ring_ab58d91977455bdf898526616a7ab2fb2}{desc}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01553}01553                     (\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long}) (txq-\/>\mbox{\hyperlink{structiwm__tx__ring_a06c9b0667b51f00845f9decf8849cd0e}{desc\_dma}}.\mbox{\hyperlink{structiwm__dma__info_addd7774a4b8cc6802bbcc8b31452794c}{paddr}} >> 8));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01554}01554         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01555}01555 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01556}01556         \mbox{\hyperlink{if__iwm__pcie__trans_8c_a3bb7f8bf927e32aa62b6e70c4570e8b2}{iwm\_set\_bits\_prph}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a4ddb50b0418e2fd808ab2a8f2f9c1736}{IWM\_SCD\_GP\_CTRL}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01557}01557             \mbox{\hyperlink{if__iwmreg_8h_acda521917d65d85f6696d4c25c4f009b}{IWM\_SCD\_GP\_CTRL\_AUTO\_ACTIVE\_MODE}} |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01558}01558             \mbox{\hyperlink{if__iwmreg_8h_a8f0d0d045a10dd0719213c310d7204ce}{IWM\_SCD\_GP\_CTRL\_ENABLE\_31\_QUEUES}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01559}01559 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01560}01560         \mbox{\hyperlink{if__iwm__pcie__trans_8c_a957b9219e85be1d4043332426844cb2f}{iwm\_nic\_unlock}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01561}01561 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01562}01562         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01563}01563 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01564}01564 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01565}01565 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01566}\mbox{\hyperlink{if__iwm_8c_abcd09a4732b913d48203edae16ce7ff0}{01566}} \mbox{\hyperlink{if__iwm_8c_abcd09a4732b913d48203edae16ce7ff0}{iwm\_nic\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01567}01567 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01568}01568         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01569}01569 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01570}01570         \mbox{\hyperlink{if__iwm__pcie__trans_8c_a7efc3f096342b4714f588db603db8ecd}{iwm\_apm\_init}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01571}01571         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_a9b399704eeb3c9299fe79ff7ebf0b3c3}{device\_family}} == \mbox{\hyperlink{if__iwm__config_8h_a134dc690a22b13281e655ce3d4944141a8cb6f131b7633326d14c4046c4bbf0f5}{IWM\_DEVICE\_FAMILY\_7000}})}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01572}01572                 \mbox{\hyperlink{if__iwm__pcie__trans_8c_a73f9b0878dcdbd74dfa03d6fb03429d0}{iwm\_set\_pwr}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01573}01573 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01574}01574         \mbox{\hyperlink{if__iwm_8c_a7b95a8bbadb1fc6ca84b7f42a9560f6b}{iwm\_nic\_config}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01575}01575 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01576}01576         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{if__iwm_8c_ad158104530b57f95c38ef361e3a2b19c}{iwm\_nic\_rx\_init}}(sc)) != 0)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01577}01577                 \textcolor{keywordflow}{return} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01578}01578 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01579}01579         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01580}01580 \textcolor{comment}{         * Ditto for TX, from iwn}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01581}01581 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01582}01582         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{if__iwm_8c_ac678b5ea29d6766fa28dee9e01c57f82}{iwm\_nic\_tx\_init}}(sc)) != 0)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01583}01583                 \textcolor{keywordflow}{return} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01584}01584 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01585}01585         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_RESET,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01586}01586             \textcolor{stringliteral}{"{}\%s: shadow registers enabled\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01587}01587         \mbox{\hyperlink{if__iwmreg_8h_a269244e193104ab3ba0e8de508ebfc8f}{IWM\_SETBITS}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a8e26d6aa2dab1000037409b5dac1ad2a}{IWM\_CSR\_MAC\_SHADOW\_REG\_CTRL}}, 0x800fffff);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01588}01588 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01589}01589         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01590}01590 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01591}01591 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01592}01592 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01593}\mbox{\hyperlink{if__iwm_8c_a0ee3a6fe5f92850b68a50b9350a42a8c}{01593}} \mbox{\hyperlink{if__iwm_8c_a0ee3a6fe5f92850b68a50b9350a42a8c}{iwm\_enable\_txq}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keywordtype}{int} sta\_id, \textcolor{keywordtype}{int} \mbox{\hyperlink{structiwm__tx__ring_a985ab594338fd5c2df0efdd225636f8a}{qid}}, \textcolor{keywordtype}{int} fifo)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01594}01594 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01595}01595         \textcolor{keywordtype}{int} qmsk;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01596}01596 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01597}01597         qmsk = 1 << \mbox{\hyperlink{structiwm__tx__ring_a985ab594338fd5c2df0efdd225636f8a}{qid}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01598}01598 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01599}01599         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{if__iwm__pcie__trans_8c_a895bbe6909b405cde9df9bd57ec51fdb}{iwm\_nic\_lock}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01600}01600                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%s: cannot enable txq \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01601}01601                     \_\_func\_\_, \mbox{\hyperlink{structiwm__tx__ring_a985ab594338fd5c2df0efdd225636f8a}{qid}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01602}01602                 \textcolor{keywordflow}{return} EBUSY;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01603}01603         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01604}01604 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01605}01605         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_aefbeb9e39bbdbf6e3f87fba49efd9ff7}{IWM\_HBUS\_TARG\_WRPTR}}, \mbox{\hyperlink{structiwm__tx__ring_a985ab594338fd5c2df0efdd225636f8a}{qid}} << 8 | 0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01606}01606 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01607}01607         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structiwm__tx__ring_a985ab594338fd5c2df0efdd225636f8a}{qid}} == \mbox{\hyperlink{if__iwmreg_8h_afbe5feb99076494815e86de80d0ca658}{IWM\_CMD\_QUEUE}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01608}01608                 \textcolor{comment}{/* Disable the scheduler. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01609}01609                 \mbox{\hyperlink{if__iwm__pcie__trans_8c_ae575f08e5baf2f0f63c629f690b03704}{iwm\_write\_prph}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a2a7b05b6eebcaf4f0db3bc465fb100c2}{IWM\_SCD\_EN\_CTRL}}, 0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01610}01610 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01611}01611                 \textcolor{comment}{/* Stop the TX queue prior to configuration. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01612}01612                 \mbox{\hyperlink{if__iwm__pcie__trans_8c_ae575f08e5baf2f0f63c629f690b03704}{iwm\_write\_prph}}(sc, \mbox{\hyperlink{if__iwmreg_8h_ac6d844166581ee39123c0e47907815a1}{IWM\_SCD\_QUEUE\_STATUS\_BITS}}(\mbox{\hyperlink{structiwm__tx__ring_a985ab594338fd5c2df0efdd225636f8a}{qid}}),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01613}01613                     (0 << \mbox{\hyperlink{if__iwmreg_8h_a692ec81b6f2ea931b2b86173dbf507fd}{IWM\_SCD\_QUEUE\_STTS\_REG\_POS\_ACTIVE}}) |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01614}01614                     (1 << \mbox{\hyperlink{if__iwmreg_8h_aaa40aa14a5d821fcbfb00df68627fe79}{IWM\_SCD\_QUEUE\_STTS\_REG\_POS\_SCD\_ACT\_EN}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01615}01615 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01616}01616                 \mbox{\hyperlink{if__iwm__pcie__trans_8c_a957b9219e85be1d4043332426844cb2f}{iwm\_nic\_unlock}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01617}01617 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01618}01618                 \textcolor{comment}{/* Disable aggregations for this queue. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01619}01619                 \mbox{\hyperlink{if__iwm__pcie__trans_8c_abc135e257998070a3efb9ddbcca16832}{iwm\_clear\_bits\_prph}}(sc, \mbox{\hyperlink{if__iwmreg_8h_adadab64f84a3b6dae4055754b9c87a53}{IWM\_SCD\_AGGR\_SEL}}, qmsk);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01620}01620 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01621}01621                 \textcolor{keywordflow}{if} (!\mbox{\hyperlink{if__iwm__pcie__trans_8c_a895bbe6909b405cde9df9bd57ec51fdb}{iwm\_nic\_lock}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01622}01622                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01623}01623                             \textcolor{stringliteral}{"{}\%s: cannot enable txq \%d\(\backslash\)n"{}}, \_\_func\_\_, \mbox{\hyperlink{structiwm__tx__ring_a985ab594338fd5c2df0efdd225636f8a}{qid}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01624}01624                         \textcolor{keywordflow}{return} EBUSY;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01625}01625                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01626}01626                 \mbox{\hyperlink{if__iwm__pcie__trans_8c_ae575f08e5baf2f0f63c629f690b03704}{iwm\_write\_prph}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a5422735024d65d7eac9b56aeaeeb57f7}{IWM\_SCD\_QUEUE\_RDPTR}}(\mbox{\hyperlink{structiwm__tx__ring_a985ab594338fd5c2df0efdd225636f8a}{qid}}), 0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01627}01627                 \mbox{\hyperlink{if__iwm__pcie__trans_8c_a957b9219e85be1d4043332426844cb2f}{iwm\_nic\_unlock}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01628}01628 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01629}01629                 \mbox{\hyperlink{if__iwm__pcie__trans_8c_ab79eee3351791d009689affd8d24fa28}{iwm\_write\_mem32}}(sc,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01630}01630                     sc-\/>\mbox{\hyperlink{structiwm__softc_a6f925daa5c35c8b81d4d8bd7e58da18d}{scd\_base\_addr}} + \mbox{\hyperlink{if__iwmreg_8h_a831e097674afce4fea6a896ea0ba3b43}{IWM\_SCD\_CONTEXT\_QUEUE\_OFFSET}}(\mbox{\hyperlink{structiwm__tx__ring_a985ab594338fd5c2df0efdd225636f8a}{qid}}), 0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01631}01631                 \textcolor{comment}{/* Set scheduler window size and frame limit. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01632}01632                 \mbox{\hyperlink{if__iwm__pcie__trans_8c_ab79eee3351791d009689affd8d24fa28}{iwm\_write\_mem32}}(sc,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01633}01633                     sc-\/>\mbox{\hyperlink{structiwm__softc_a6f925daa5c35c8b81d4d8bd7e58da18d}{scd\_base\_addr}} + \mbox{\hyperlink{if__iwmreg_8h_a831e097674afce4fea6a896ea0ba3b43}{IWM\_SCD\_CONTEXT\_QUEUE\_OFFSET}}(\mbox{\hyperlink{structiwm__tx__ring_a985ab594338fd5c2df0efdd225636f8a}{qid}}) +}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01634}01634                     \textcolor{keyword}{sizeof}(uint32\_t),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01635}01635                     ((\mbox{\hyperlink{if__iwmreg_8h_abb5de6089df49ca73c87ed6e9a5635ec}{IWM\_FRAME\_LIMIT}} << \mbox{\hyperlink{if__iwmreg_8h_a7ccb2d2df85d98a1345379a98d387066}{IWM\_SCD\_QUEUE\_CTX\_REG2\_WIN\_SIZE\_POS}}) \&}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01636}01636                     \mbox{\hyperlink{if__iwmreg_8h_a82a0fa2791de61b40961b8db3131560f}{IWM\_SCD\_QUEUE\_CTX\_REG2\_WIN\_SIZE\_MSK}}) |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01637}01637                     ((\mbox{\hyperlink{if__iwmreg_8h_abb5de6089df49ca73c87ed6e9a5635ec}{IWM\_FRAME\_LIMIT}} << \mbox{\hyperlink{if__iwmreg_8h_ae02d0d36cdd707e993f25b33e644b129}{IWM\_SCD\_QUEUE\_CTX\_REG2\_FRAME\_LIMIT\_POS}}) \&}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01638}01638                     \mbox{\hyperlink{if__iwmreg_8h_a6cc39566b632115aa9813149842bcd56}{IWM\_SCD\_QUEUE\_CTX\_REG2\_FRAME\_LIMIT\_MSK}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01639}01639 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01640}01640                 \textcolor{keywordflow}{if} (!\mbox{\hyperlink{if__iwm__pcie__trans_8c_a895bbe6909b405cde9df9bd57ec51fdb}{iwm\_nic\_lock}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01641}01641                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01642}01642                             \textcolor{stringliteral}{"{}\%s: cannot enable txq \%d\(\backslash\)n"{}}, \_\_func\_\_, \mbox{\hyperlink{structiwm__tx__ring_a985ab594338fd5c2df0efdd225636f8a}{qid}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01643}01643                         \textcolor{keywordflow}{return} EBUSY;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01644}01644                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01645}01645                 \mbox{\hyperlink{if__iwm__pcie__trans_8c_ae575f08e5baf2f0f63c629f690b03704}{iwm\_write\_prph}}(sc, \mbox{\hyperlink{if__iwmreg_8h_ac6d844166581ee39123c0e47907815a1}{IWM\_SCD\_QUEUE\_STATUS\_BITS}}(\mbox{\hyperlink{structiwm__tx__ring_a985ab594338fd5c2df0efdd225636f8a}{qid}}),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01646}01646                     (1 << \mbox{\hyperlink{if__iwmreg_8h_a692ec81b6f2ea931b2b86173dbf507fd}{IWM\_SCD\_QUEUE\_STTS\_REG\_POS\_ACTIVE}}) |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01647}01647                     (fifo << \mbox{\hyperlink{if__iwmreg_8h_a305a8bcd52a18eb4ab500d4202f213ad}{IWM\_SCD\_QUEUE\_STTS\_REG\_POS\_TXF}}) |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01648}01648                     (1 << \mbox{\hyperlink{if__iwmreg_8h_a81d70aab2d8765d35fcd4a91bfc880b2}{IWM\_SCD\_QUEUE\_STTS\_REG\_POS\_WSL}}) |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01649}01649                     \mbox{\hyperlink{if__iwmreg_8h_a3f953deec83f2021b1b0eefaf88950ab}{IWM\_SCD\_QUEUE\_STTS\_REG\_MSK}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01650}01650 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01651}01651                 \textcolor{comment}{/* Enable the scheduler for this queue. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01652}01652                 \mbox{\hyperlink{if__iwm__pcie__trans_8c_ae575f08e5baf2f0f63c629f690b03704}{iwm\_write\_prph}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a2a7b05b6eebcaf4f0db3bc465fb100c2}{IWM\_SCD\_EN\_CTRL}}, qmsk);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01653}01653         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01654}01654                 \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__scd__txq__cfg__cmd}{iwm\_scd\_txq\_cfg\_cmd}} cmd;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01655}01655                 \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01656}01656 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01657}01657                 \mbox{\hyperlink{if__iwm__pcie__trans_8c_a957b9219e85be1d4043332426844cb2f}{iwm\_nic\_unlock}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01658}01658 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01659}01659                 memset(\&cmd, 0, \textcolor{keyword}{sizeof}(cmd));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01660}01660                 cmd.\mbox{\hyperlink{structiwm__scd__txq__cfg__cmd_a4d57b61b1b86d461280d490386643be9}{scd\_queue}} = qid;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01661}01661                 cmd.\mbox{\hyperlink{structiwm__scd__txq__cfg__cmd_a2e3a21b655a4e84fd553239883963f2c}{enable}} = 1;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01662}01662                 cmd.\mbox{\hyperlink{structiwm__scd__txq__cfg__cmd_a1eaf5a57ea65a5d542e1c4f46662407d}{sta\_id}} = \mbox{\hyperlink{structiwm__scd__txq__cfg__cmd_a1eaf5a57ea65a5d542e1c4f46662407d}{sta\_id}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01663}01663                 cmd.\mbox{\hyperlink{structiwm__scd__txq__cfg__cmd_a806767859e77c1a350f74f139ad4d49e}{tx\_fifo}} = fifo;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01664}01664                 cmd.\mbox{\hyperlink{structiwm__scd__txq__cfg__cmd_ae1b663ecb0346952453e892178970eb7}{aggregate}} = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01665}01665                 cmd.\mbox{\hyperlink{structiwm__scd__txq__cfg__cmd_a448224f67bd98b6a517fdbea1ab5d6d1}{window}} = \mbox{\hyperlink{if__iwmreg_8h_abb5de6089df49ca73c87ed6e9a5635ec}{IWM\_FRAME\_LIMIT}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01666}01666 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01667}01667                 error = \mbox{\hyperlink{if__iwm__util_8c_ad7c0f40dbc21d1ec94f0c5f6194d1140}{iwm\_send\_cmd\_pdu}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a088a858a86912012549d05974e8e3e65}{IWM\_SCD\_QUEUE\_CFG}}, \mbox{\hyperlink{if__iwmvar_8h_a683e81a3f25e57c34df07e37e049bf07a1ed0b3a851376d8e5faa5be34d886df6}{IWM\_CMD\_SYNC}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01668}01668                     \textcolor{keyword}{sizeof}(cmd), \&cmd);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01669}01669                 \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01670}01670                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01671}01671                             \textcolor{stringliteral}{"{}cannot enable txq \%d\(\backslash\)n"{}}, qid);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01672}01672                         \textcolor{keywordflow}{return} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01673}01673                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01674}01674 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01675}01675                 \textcolor{keywordflow}{if} (!\mbox{\hyperlink{if__iwm__pcie__trans_8c_a895bbe6909b405cde9df9bd57ec51fdb}{iwm\_nic\_lock}}(sc))}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01676}01676                         \textcolor{keywordflow}{return} EBUSY;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01677}01677         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01678}01678 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01679}01679         \mbox{\hyperlink{if__iwm__pcie__trans_8c_a957b9219e85be1d4043332426844cb2f}{iwm\_nic\_unlock}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01680}01680 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01681}01681         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_XMIT, \textcolor{stringliteral}{"{}\%s: enabled txq \%d FIFO \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01682}01682             \_\_func\_\_, qid, fifo);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01683}01683 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01684}01684         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01685}01685 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01686}01686 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01687}01687 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01688}\mbox{\hyperlink{if__iwm_8c_a2e8fc4a0db01fe65cf3fa630e5be6414}{01688}} \mbox{\hyperlink{if__iwm_8c_a2e8fc4a0db01fe65cf3fa630e5be6414}{iwm\_trans\_pcie\_fw\_alive}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, uint32\_t scd\_base\_addr)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01689}01689 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01690}01690         \textcolor{keywordtype}{int} error, chnl;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01691}01691 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01692}01692         \textcolor{keywordtype}{int} clear\_dwords = (\mbox{\hyperlink{if__iwmreg_8h_ae02e6750c3b6fef42459cef08f17348e}{IWM\_SCD\_TRANS\_TBL\_MEM\_UPPER\_BOUND}} -\/}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01693}01693             \mbox{\hyperlink{if__iwmreg_8h_aa7e63a9a0f548c5abe6125dfecc551a6}{IWM\_SCD\_CONTEXT\_MEM\_LOWER\_BOUND}}) / \textcolor{keyword}{sizeof}(uint32\_t);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01694}01694 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01695}01695         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{if__iwm__pcie__trans_8c_a895bbe6909b405cde9df9bd57ec51fdb}{iwm\_nic\_lock}}(sc))}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01696}01696                 \textcolor{keywordflow}{return} EBUSY;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01697}01697 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01698}01698         \mbox{\hyperlink{if__iwm_8c_aefaedf70abb2236df0cac56295bf78e2}{iwm\_ict\_reset}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01699}01699 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01700}01700         sc-\/>\mbox{\hyperlink{structiwm__softc_a6f925daa5c35c8b81d4d8bd7e58da18d}{scd\_base\_addr}} = \mbox{\hyperlink{if__iwm__pcie__trans_8c_a635add69da3722c9c5c8c8e88a910214}{iwm\_read\_prph}}(sc, \mbox{\hyperlink{if__iwmreg_8h_ad4abd312d5636423cc076681c0b85da6}{IWM\_SCD\_SRAM\_BASE\_ADDR}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01701}01701         \textcolor{keywordflow}{if} (scd\_base\_addr != 0 \&\&}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01702}01702             scd\_base\_addr != sc-\/>\mbox{\hyperlink{structiwm__softc_a6f925daa5c35c8b81d4d8bd7e58da18d}{scd\_base\_addr}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01703}01703                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01704}01704                     \textcolor{stringliteral}{"{}\%s: sched addr mismatch: alive: 0x\%x prph: 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01705}01705                     \_\_func\_\_, sc-\/>\mbox{\hyperlink{structiwm__softc_a6f925daa5c35c8b81d4d8bd7e58da18d}{scd\_base\_addr}}, scd\_base\_addr);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01706}01706         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01707}01707 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01708}01708         \mbox{\hyperlink{if__iwm__pcie__trans_8c_a957b9219e85be1d4043332426844cb2f}{iwm\_nic\_unlock}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01709}01709 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01710}01710         \textcolor{comment}{/* reset context data, TX status and translation data */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01711}01711         error = \mbox{\hyperlink{if__iwm__pcie__trans_8c_ab953b9595648e83c644f752aeb3ac6c3}{iwm\_write\_mem}}(sc,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01712}01712             sc-\/>\mbox{\hyperlink{structiwm__softc_a6f925daa5c35c8b81d4d8bd7e58da18d}{scd\_base\_addr}} + \mbox{\hyperlink{if__iwmreg_8h_aa7e63a9a0f548c5abe6125dfecc551a6}{IWM\_SCD\_CONTEXT\_MEM\_LOWER\_BOUND}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01713}01713             NULL, clear\_dwords);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01714}01714         \textcolor{keywordflow}{if} (error)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01715}01715                 \textcolor{keywordflow}{return} EBUSY;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01716}01716 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01717}01717         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{if__iwm__pcie__trans_8c_a895bbe6909b405cde9df9bd57ec51fdb}{iwm\_nic\_lock}}(sc))}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01718}01718                 \textcolor{keywordflow}{return} EBUSY;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01719}01719 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01720}01720         \textcolor{comment}{/* Set physical address of TX scheduler rings (1KB aligned). */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01721}01721         \mbox{\hyperlink{if__iwm__pcie__trans_8c_ae575f08e5baf2f0f63c629f690b03704}{iwm\_write\_prph}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a0009a07921b196572455a53efc9911ef}{IWM\_SCD\_DRAM\_BASE\_ADDR}}, sc-\/>\mbox{\hyperlink{structiwm__softc_ab3ce0638afeea2b71cc357b0c968f4dd}{sched\_dma}}.\mbox{\hyperlink{structiwm__dma__info_addd7774a4b8cc6802bbcc8b31452794c}{paddr}} >> 10);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01722}01722 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01723}01723         \mbox{\hyperlink{if__iwm__pcie__trans_8c_ae575f08e5baf2f0f63c629f690b03704}{iwm\_write\_prph}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a988a605b329b2669022bf0bae26f25a3}{IWM\_SCD\_CHAINEXT\_EN}}, 0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01724}01724 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01725}01725         \mbox{\hyperlink{if__iwm__pcie__trans_8c_a957b9219e85be1d4043332426844cb2f}{iwm\_nic\_unlock}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01726}01726 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01727}01727         \textcolor{comment}{/* enable command channel */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01728}01728         error = \mbox{\hyperlink{if__iwm_8c_a0ee3a6fe5f92850b68a50b9350a42a8c}{iwm\_enable\_txq}}(sc, 0 \textcolor{comment}{/* unused */}, \mbox{\hyperlink{if__iwmreg_8h_afbe5feb99076494815e86de80d0ca658}{IWM\_CMD\_QUEUE}}, 7);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01729}01729         \textcolor{keywordflow}{if} (error)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01730}01730                 \textcolor{keywordflow}{return} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01731}01731 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01732}01732         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{if__iwm__pcie__trans_8c_a895bbe6909b405cde9df9bd57ec51fdb}{iwm\_nic\_lock}}(sc))}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01733}01733                 \textcolor{keywordflow}{return} EBUSY;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01734}01734 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01735}01735         \mbox{\hyperlink{if__iwm__pcie__trans_8c_ae575f08e5baf2f0f63c629f690b03704}{iwm\_write\_prph}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a4045fbc354f48678c8dd0c9b76dd9b46}{IWM\_SCD\_TXFACT}}, 0xff);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01736}01736 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01737}01737         \textcolor{comment}{/* Enable DMA channels. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01738}01738         \textcolor{keywordflow}{for} (chnl = 0; chnl < \mbox{\hyperlink{if__iwmreg_8h_a9f368a5166d881741c706385c720ba08}{IWM\_FH\_TCSR\_CHNL\_NUM}}; chnl++) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01739}01739                 \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_abc6b4e8d6ac554aa8d55384e4c5e7451}{IWM\_FH\_TCSR\_CHNL\_TX\_CONFIG\_REG}}(chnl),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01740}01740                     \mbox{\hyperlink{if__iwmreg_8h_a12265c37b30973baa62e7e51e813e41a}{IWM\_FH\_TCSR\_TX\_CONFIG\_REG\_VAL\_DMA\_CHNL\_ENABLE}} |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01741}01741                     \mbox{\hyperlink{if__iwmreg_8h_a19722df4d590ef94ea7273d10c40fe07}{IWM\_FH\_TCSR\_TX\_CONFIG\_REG\_VAL\_DMA\_CREDIT\_ENABLE}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01742}01742         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01743}01743 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01744}01744         \mbox{\hyperlink{if__iwmreg_8h_a269244e193104ab3ba0e8de508ebfc8f}{IWM\_SETBITS}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a0028184b3851f369d92fa94fa3a12b22}{IWM\_FH\_TX\_CHICKEN\_BITS\_REG}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01745}01745             \mbox{\hyperlink{if__iwmreg_8h_ab3a3db1ebed2c1f16cc38a1399e5bb54}{IWM\_FH\_TX\_CHICKEN\_BITS\_SCD\_AUTO\_RETRY\_EN}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01746}01746 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01747}01747         \mbox{\hyperlink{if__iwm__pcie__trans_8c_a957b9219e85be1d4043332426844cb2f}{iwm\_nic\_unlock}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01748}01748 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01749}01749         \textcolor{comment}{/* Enable L1-\/Active */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01750}01750         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_a9b399704eeb3c9299fe79ff7ebf0b3c3}{device\_family}} < \mbox{\hyperlink{if__iwm__config_8h_a134dc690a22b13281e655ce3d4944141aece09942e3ab8587f2bbd9f34f47af41}{IWM\_DEVICE\_FAMILY\_8000}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01751}01751                 \mbox{\hyperlink{if__iwm__pcie__trans_8c_abc135e257998070a3efb9ddbcca16832}{iwm\_clear\_bits\_prph}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a37c4c98c32fe2c9af7d71c6b60d416dc}{IWM\_APMG\_PCIDEV\_STT\_REG}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01752}01752                     \mbox{\hyperlink{if__iwmreg_8h_a46afeef1e512e076fb5ea01e52509b41}{IWM\_APMG\_PCIDEV\_STT\_VAL\_L1\_ACT\_DIS}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01753}01753         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01754}01754 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01755}01755         \textcolor{keywordflow}{return} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01756}01756 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01757}01757 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01758}01758 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01759}01759 \textcolor{comment}{ * NVM read access and content parsing.  We do not support}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01760}01760 \textcolor{comment}{ * external NVM or writing NVM.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01761}01761 \textcolor{comment}{ * iwlwifi/mvm/nvm.c}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01762}01762 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01763}01763 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01764}01764 \textcolor{comment}{/* Default NVM size to read */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01765}\mbox{\hyperlink{if__iwm_8c_a3516163621c43d25f28be2872710d451}{01765}} \textcolor{preprocessor}{\#define IWM\_NVM\_DEFAULT\_CHUNK\_SIZE      (2*1024)}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01766}01766 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01767}\mbox{\hyperlink{if__iwm_8c_a170298177c1d1f3bb226895779375cc2}{01767}} \textcolor{preprocessor}{\#define IWM\_NVM\_WRITE\_OPCODE 1}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01768}\mbox{\hyperlink{if__iwm_8c_aae5b1dd57627c306f89969a4b2de84d3}{01768}} \textcolor{preprocessor}{\#define IWM\_NVM\_READ\_OPCODE 0}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01769}01769 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01770}01770 \textcolor{comment}{/* load nvm chunk response */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01771}01771 \textcolor{keyword}{enum} \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01772}\mbox{\hyperlink{if__iwm_8c_a06fc87d81c62e9abb8790b6e5713c55ba796392ea9288c1e8ed2278daa135c6f4}{01772}}         \mbox{\hyperlink{if__iwm_8c_a06fc87d81c62e9abb8790b6e5713c55ba796392ea9288c1e8ed2278daa135c6f4}{IWM\_READ\_NVM\_CHUNK\_SUCCEED}} = 0,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01773}01773         \mbox{\hyperlink{if__iwm_8c_a06fc87d81c62e9abb8790b6e5713c55baf4c517d8cf71bc4444fcd12f43d8325f}{IWM\_READ\_NVM\_CHUNK\_NOT\_VALID\_ADDRESS}} = 1}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01774}\mbox{\hyperlink{if__iwm_8c_a06fc87d81c62e9abb8790b6e5713c55baf4c517d8cf71bc4444fcd12f43d8325f}{01774}} \};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01775}01775 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01776}01776 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01777}\mbox{\hyperlink{if__iwm_8c_ae4a3c515811e06c89164b1958ab77279}{01777}} \mbox{\hyperlink{if__iwm_8c_ae4a3c515811e06c89164b1958ab77279}{iwm\_nvm\_read\_chunk}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, uint16\_t section,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01778}01778         uint16\_t offset, uint16\_t length, uint8\_t *data, uint16\_t *len)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01779}01779 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01780}01780         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__nvm__access__cmd}{iwm\_nvm\_access\_cmd}} nvm\_access\_cmd = \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01781}01781                 .\mbox{\hyperlink{structiwm__nvm__access__cmd_af3e6ff43918c941c61ae327acfa6bde1}{offset}} = htole16(\mbox{\hyperlink{structiwm__nvm__access__cmd_af3e6ff43918c941c61ae327acfa6bde1}{offset}}),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01782}01782                 .length = htole16(\mbox{\hyperlink{structiwm__nvm__access__cmd_a2ead48b4b0c756645997c1811c1b9da0}{length}}),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01783}01783                 .type = htole16(section),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01784}01784                 .op\_code = \mbox{\hyperlink{if__iwm_8c_aae5b1dd57627c306f89969a4b2de84d3}{IWM\_NVM\_READ\_OPCODE}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01785}01785         \};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01786}01786         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__nvm__access__resp}{iwm\_nvm\_access\_resp}} *nvm\_resp;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01787}01787         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__rx__packet}{iwm\_rx\_packet}} *pkt;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01788}01788         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__host__cmd}{iwm\_host\_cmd}} cmd = \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01789}01789                 .\mbox{\hyperlink{structiwm__host__cmd_a44cf199ff72a040dd4d74c9082e448ab}{id}} = \mbox{\hyperlink{if__iwmreg_8h_a352d940fb0443bccd4a9e848c2a9eb25}{IWM\_NVM\_ACCESS\_CMD}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01790}01790                 .flags = \mbox{\hyperlink{if__iwmvar_8h_a683e81a3f25e57c34df07e37e049bf07a4bab9fa9b338e6e412256ea03704efe6}{IWM\_CMD\_WANT\_SKB}} | \mbox{\hyperlink{if__iwmvar_8h_a683e81a3f25e57c34df07e37e049bf07abc0fdb1962ddbe4862f29d8a88c63551}{IWM\_CMD\_SEND\_IN\_RFKILL}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01791}01791                 .data = \{ \&nvm\_access\_cmd, \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01792}01792         \};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01793}01793         \textcolor{keywordtype}{int} ret, bytes\_read, offset\_read;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01794}01794         uint8\_t *resp\_data;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01795}01795 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01796}01796         cmd.\mbox{\hyperlink{structiwm__host__cmd_a4cf9f45e18a86a3a2ea657decbb78e2c}{len}}[0] = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__nvm__access__cmd}{iwm\_nvm\_access\_cmd}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01797}01797 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01798}01798         ret = \mbox{\hyperlink{if__iwm__util_8c_ae8d91626a2554dec50cbf71952d35226}{iwm\_send\_cmd}}(sc, \&cmd);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01799}01799         \textcolor{keywordflow}{if} (ret) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01800}01800                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01801}01801                     \textcolor{stringliteral}{"{}Could not send NVM\_ACCESS command (error=\%d)\(\backslash\)n"{}}, ret);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01802}01802                 \textcolor{keywordflow}{return} ret;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01803}01803         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01804}01804 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01805}01805         pkt = cmd.\mbox{\hyperlink{structiwm__host__cmd_a46c98d2ab8ea9b6db85a6e1aa0aefb34}{resp\_pkt}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01806}01806 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01807}01807         \textcolor{comment}{/* Extract NVM response */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01808}01808         nvm\_resp = (\textcolor{keywordtype}{void} *)pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a77036fd43499c32e7ec28e2d47ed1c33}{data}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01809}01809         ret = le16toh(nvm\_resp-\/>\mbox{\hyperlink{structiwm__nvm__access__resp_af72f3edcb7d43faab57251cf964f959f}{status}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01810}01810         bytes\_read = le16toh(nvm\_resp-\/>\mbox{\hyperlink{structiwm__nvm__access__resp_ab53f9efe90f78a08ef0a43a29ce540b0}{length}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01811}01811         offset\_read = le16toh(nvm\_resp-\/>\mbox{\hyperlink{structiwm__nvm__access__resp_a4c00eaa7cc03443671f4d3027965364f}{offset}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01812}01812         resp\_data = nvm\_resp-\/>\mbox{\hyperlink{structiwm__nvm__access__resp_a468c3addeb64145dd785e4406e0710f4}{data}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01813}01813         \textcolor{keywordflow}{if} (ret) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01814}01814                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structiwm__nvm__access__cmd_af3e6ff43918c941c61ae327acfa6bde1}{offset}} != 0) \&\&}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01815}01815                     (ret == \mbox{\hyperlink{if__iwm_8c_a06fc87d81c62e9abb8790b6e5713c55baf4c517d8cf71bc4444fcd12f43d8325f}{IWM\_READ\_NVM\_CHUNK\_NOT\_VALID\_ADDRESS}})) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01816}01816                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01817}01817 \textcolor{comment}{                         * meaning of NOT\_VALID\_ADDRESS:}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01818}01818 \textcolor{comment}{                         * driver try to read chunk from address that is}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01819}01819 \textcolor{comment}{                         * multiple of 2K and got an error since addr is empty.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01820}01820 \textcolor{comment}{                         * meaning of (offset != 0): driver already}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01821}01821 \textcolor{comment}{                         * read valid data from another chunk so this case}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01822}01822 \textcolor{comment}{                         * is not an error.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01823}01823 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01824}01824                         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_EEPROM | IWM\_DEBUG\_RESET,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01825}01825                                     \textcolor{stringliteral}{"{}NVM access command failed on offset 0x\%x since that section size is multiple 2K\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01826}01826                                     \mbox{\hyperlink{structiwm__nvm__access__cmd_af3e6ff43918c941c61ae327acfa6bde1}{offset}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01827}01827                         *len = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01828}01828                         ret = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01829}01829                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01830}01830                         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_EEPROM | IWM\_DEBUG\_RESET,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01831}01831                                     \textcolor{stringliteral}{"{}NVM access command failed with status \%d\(\backslash\)n"{}}, ret);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01832}01832                         ret = EIO;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01833}01833                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01834}01834                 \textcolor{keywordflow}{goto} exit;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01835}01835         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01836}01836 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01837}01837         \textcolor{keywordflow}{if} (offset\_read != \mbox{\hyperlink{structiwm__nvm__access__cmd_af3e6ff43918c941c61ae327acfa6bde1}{offset}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01838}01838                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01839}01839                     \textcolor{stringliteral}{"{}NVM ACCESS response with invalid offset \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01840}01840                     offset\_read);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01841}01841                 ret = EINVAL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01842}01842                 \textcolor{keywordflow}{goto} exit;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01843}01843         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01844}01844 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01845}01845         \textcolor{keywordflow}{if} (bytes\_read > \mbox{\hyperlink{structiwm__nvm__access__cmd_a2ead48b4b0c756645997c1811c1b9da0}{length}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01846}01846                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01847}01847                     \textcolor{stringliteral}{"{}NVM ACCESS response with too much data "{}}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01848}01848                     \textcolor{stringliteral}{"{}(\%d bytes requested, \%d bytes received)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01849}01849                     \mbox{\hyperlink{structiwm__nvm__access__cmd_a2ead48b4b0c756645997c1811c1b9da0}{length}}, bytes\_read);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01850}01850                 ret = EINVAL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01851}01851                 \textcolor{keywordflow}{goto} exit;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01852}01852         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01853}01853 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01854}01854         \textcolor{comment}{/* Write data to NVM */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01855}01855         memcpy(\mbox{\hyperlink{structiwm__nvm__access__cmd_a34dd698422bc680eead30d2cc4d4175a}{data}} + \mbox{\hyperlink{structiwm__nvm__access__cmd_af3e6ff43918c941c61ae327acfa6bde1}{offset}}, resp\_data, bytes\_read);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01856}01856         *len = bytes\_read;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01857}01857 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01858}01858  exit:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01859}01859         \mbox{\hyperlink{if__iwm__util_8c_a64bdd9c1c2ade2c7e0a9cdb45b2f2c6e}{iwm\_free\_resp}}(sc, \&cmd);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01860}01860         \textcolor{keywordflow}{return} ret;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01861}01861 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01862}01862 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01863}01863 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01864}01864 \textcolor{comment}{ * Reads an NVM section completely.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01865}01865 \textcolor{comment}{ * NICs prior to 7000 family don't have a real NVM, but just read}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01866}01866 \textcolor{comment}{ * section 0 which is the EEPROM. Because the EEPROM reading is unlimited}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01867}01867 \textcolor{comment}{ * by uCode, we need to manually check in this case that we don't}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01868}01868 \textcolor{comment}{ * overflow and try to read more than the EEPROM size.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01869}01869 \textcolor{comment}{ * For 7000 family NICs, we supply the maximal size we can read, and}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01870}01870 \textcolor{comment}{ * the uCode fills the response with as much data as we can,}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01871}01871 \textcolor{comment}{ * without overflowing, so no check is needed.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01872}01872 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01873}01873 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01874}\mbox{\hyperlink{if__iwm_8c_a3dc02cf22c442cc7e7a62947ffd77f90}{01874}} \mbox{\hyperlink{if__iwm_8c_a3dc02cf22c442cc7e7a62947ffd77f90}{iwm\_nvm\_read\_section}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01875}01875         uint16\_t section, uint8\_t *\mbox{\hyperlink{structiwm__nvm__access__cmd_a34dd698422bc680eead30d2cc4d4175a}{data}}, uint16\_t *len, uint32\_t size\_read)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01876}01876 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01877}01877         uint16\_t seglen, \mbox{\hyperlink{structiwm__nvm__access__cmd_a2ead48b4b0c756645997c1811c1b9da0}{length}}, \mbox{\hyperlink{structiwm__nvm__access__cmd_af3e6ff43918c941c61ae327acfa6bde1}{offset}} = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01878}01878         \textcolor{keywordtype}{int} ret;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01879}01879 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01880}01880         \textcolor{comment}{/* Set nvm section read length */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01881}01881         \mbox{\hyperlink{structiwm__nvm__access__cmd_a2ead48b4b0c756645997c1811c1b9da0}{length}} = \mbox{\hyperlink{if__iwm_8c_a3516163621c43d25f28be2872710d451}{IWM\_NVM\_DEFAULT\_CHUNK\_SIZE}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01882}01882 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01883}01883         seglen = \mbox{\hyperlink{structiwm__nvm__access__cmd_a2ead48b4b0c756645997c1811c1b9da0}{length}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01884}01884 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01885}01885         \textcolor{comment}{/* Read the NVM until exhausted (reading less than requested) */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01886}01886         \textcolor{keywordflow}{while} (seglen == \mbox{\hyperlink{structiwm__nvm__access__cmd_a2ead48b4b0c756645997c1811c1b9da0}{length}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01887}01887                 \textcolor{comment}{/* Check no memory assumptions fail and cause an overflow */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01888}01888                 \textcolor{keywordflow}{if} ((size\_read + \mbox{\hyperlink{structiwm__nvm__access__cmd_af3e6ff43918c941c61ae327acfa6bde1}{offset}} + \mbox{\hyperlink{structiwm__nvm__access__cmd_a2ead48b4b0c756645997c1811c1b9da0}{length}}) >}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01889}01889                     sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_a47ae90cdef2422c3d74019c18620b8c3}{eeprom\_size}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01890}01890                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01891}01891                             \textcolor{stringliteral}{"{}EEPROM size is too small for NVM\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01892}01892                         \textcolor{keywordflow}{return} ENOBUFS;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01893}01893                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01894}01894 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01895}01895                 ret = \mbox{\hyperlink{if__iwm_8c_ae4a3c515811e06c89164b1958ab77279}{iwm\_nvm\_read\_chunk}}(sc, section, \mbox{\hyperlink{structiwm__nvm__access__cmd_af3e6ff43918c941c61ae327acfa6bde1}{offset}}, \mbox{\hyperlink{structiwm__nvm__access__cmd_a2ead48b4b0c756645997c1811c1b9da0}{length}}, \mbox{\hyperlink{structiwm__nvm__access__cmd_a34dd698422bc680eead30d2cc4d4175a}{data}}, \&seglen);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01896}01896                 \textcolor{keywordflow}{if} (ret) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01897}01897                         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_EEPROM | IWM\_DEBUG\_RESET,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01898}01898                                     \textcolor{stringliteral}{"{}Cannot read NVM from section \%d offset \%d, length \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01899}01899                                     section, \mbox{\hyperlink{structiwm__nvm__access__cmd_af3e6ff43918c941c61ae327acfa6bde1}{offset}}, \mbox{\hyperlink{structiwm__nvm__access__cmd_a2ead48b4b0c756645997c1811c1b9da0}{length}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01900}01900                         \textcolor{keywordflow}{return} ret;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01901}01901                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01902}01902                 \mbox{\hyperlink{structiwm__nvm__access__cmd_af3e6ff43918c941c61ae327acfa6bde1}{offset}} += seglen;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01903}01903         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01904}01904 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01905}01905         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_EEPROM | IWM\_DEBUG\_RESET,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01906}01906                     \textcolor{stringliteral}{"{}NVM section \%d read completed\(\backslash\)n"{}}, section);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01907}01907         *len = \mbox{\hyperlink{structiwm__nvm__access__cmd_af3e6ff43918c941c61ae327acfa6bde1}{offset}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01908}01908         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01909}01909 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01910}01910 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01911}01911 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01912}01912 \textcolor{comment}{ * BEGIN IWM\_NVM\_PARSE}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01913}01913 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01914}01914 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01915}01915 \textcolor{comment}{/* iwlwifi/iwl-\/nvm-\/parse.c */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01916}01916 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01917}01917 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01918}01918 \textcolor{comment}{ * Translate EEPROM flags to net80211.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01919}01919 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01920}01920 \textcolor{keyword}{static} uint32\_t}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01921}\mbox{\hyperlink{if__iwm_8c_acebc9cc101bdcb9cd4e7877ed662ab82}{01921}} \mbox{\hyperlink{if__iwm_8c_acebc9cc101bdcb9cd4e7877ed662ab82}{iwm\_eeprom\_channel\_flags}}(uint16\_t ch\_flags)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01922}01922 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01923}01923         uint32\_t nflags;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01924}01924 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01925}01925         nflags = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01926}01926         \textcolor{keywordflow}{if} ((ch\_flags \& \mbox{\hyperlink{if__iwmreg_8h_ae2b7ccc3bfb97f99ae6aebf33942c71f}{IWM\_NVM\_CHANNEL\_ACTIVE}}) == 0)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01927}01927                 nflags |= IEEE80211\_CHAN\_PASSIVE;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01928}01928         \textcolor{keywordflow}{if} ((ch\_flags \& \mbox{\hyperlink{if__iwmreg_8h_a7337f4de6ae3ce87fa4258542c227a10}{IWM\_NVM\_CHANNEL\_IBSS}}) == 0)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01929}01929                 nflags |= IEEE80211\_CHAN\_NOADHOC;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01930}01930         \textcolor{keywordflow}{if} (ch\_flags \& \mbox{\hyperlink{if__iwmreg_8h_aa5e752f51ddb3ca97c8419b8e66880b2}{IWM\_NVM\_CHANNEL\_RADAR}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01931}01931                 nflags |= IEEE80211\_CHAN\_DFS;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01932}01932                 \textcolor{comment}{/* Just in case. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01933}01933                 nflags |= IEEE80211\_CHAN\_NOADHOC;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01934}01934         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01935}01935 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01936}01936         \textcolor{keywordflow}{return} (nflags);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01937}01937 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01938}01938 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01939}01939 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01940}\mbox{\hyperlink{if__iwm_8c_a61c5bef0417dfdb03b66bf98554742b9}{01940}} \mbox{\hyperlink{if__iwm_8c_a61c5bef0417dfdb03b66bf98554742b9}{iwm\_add\_channel\_band}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keyword}{struct} ieee80211\_channel chans[],}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01941}01941     \textcolor{keywordtype}{int} maxchans, \textcolor{keywordtype}{int} *nchans, \textcolor{keywordtype}{int} ch\_idx, \textcolor{keywordtype}{size\_t} ch\_num,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01942}01942     \textcolor{keyword}{const} uint8\_t bands[])}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01943}01943 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01944}01944         \textcolor{keyword}{const} uint16\_t * \textcolor{keyword}{const} nvm\_ch\_flags = sc-\/>\mbox{\hyperlink{structiwm__softc_ac65155777b4c999bcc3e2729733e3db8}{nvm\_data}}-\/>\mbox{\hyperlink{structiwm__nvm__data_a6d4b3d4142f43bab7489425b6fbc37c8}{nvm\_ch\_flags}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01945}01945         uint32\_t nflags;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01946}01946         uint16\_t ch\_flags;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01947}01947         uint8\_t ieee;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01948}01948         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01949}01949 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01950}01950         \textcolor{keywordflow}{for} (; ch\_idx < ch\_num; ch\_idx++) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01951}01951                 ch\_flags = \mbox{\hyperlink{if__iwmreg_8h_ad1519497dfea5d98d99dfab552b3c2fb}{le16\_to\_cpup}}(nvm\_ch\_flags + ch\_idx);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01952}01952                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_a9b399704eeb3c9299fe79ff7ebf0b3c3}{device\_family}} == \mbox{\hyperlink{if__iwm__config_8h_a134dc690a22b13281e655ce3d4944141a8cb6f131b7633326d14c4046c4bbf0f5}{IWM\_DEVICE\_FAMILY\_7000}})}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01953}01953                         ieee = \mbox{\hyperlink{if__iwm_8c_ab5e34d8aa381234340c802954b0f3e5c}{iwm\_nvm\_channels}}[ch\_idx];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01954}01954                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01955}01955                         ieee = \mbox{\hyperlink{if__iwm_8c_a6816d65ce89508883c00a89c08f79cc9}{iwm\_nvm\_channels\_8000}}[ch\_idx];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01956}01956 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01957}01957                 \textcolor{keywordflow}{if} (!(ch\_flags \& \mbox{\hyperlink{if__iwmreg_8h_a98da09bb1695352ce3139a48bd024cfc}{IWM\_NVM\_CHANNEL\_VALID}})) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01958}01958                         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_EEPROM,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01959}01959                             \textcolor{stringliteral}{"{}Ch. \%d Flags \%x [\%sGHz] -\/ No traffic\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01960}01960                             ieee, ch\_flags,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01961}01961                             (ch\_idx >= \mbox{\hyperlink{if__iwm_8c_a30c6eb35fa910ea7094d439c824f2564}{IWM\_NUM\_2GHZ\_CHANNELS}}) ?}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01962}01962                             \textcolor{stringliteral}{"{}5.2"{}} : \textcolor{stringliteral}{"{}2.4"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01963}01963                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01964}01964                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01965}01965 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01966}01966                 nflags = \mbox{\hyperlink{if__iwm_8c_acebc9cc101bdcb9cd4e7877ed662ab82}{iwm\_eeprom\_channel\_flags}}(ch\_flags);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01967}01967                 error = ieee80211\_add\_channel(chans, maxchans, nchans,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01968}01968                     ieee, 0, 0, nflags, bands);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01969}01969                 \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01970}01970                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01971}01971 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01972}01972                 \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_EEPROM,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01973}01973                     \textcolor{stringliteral}{"{}Ch. \%d Flags \%x [\%sGHz] -\/ Added\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01974}01974                     ieee, ch\_flags,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01975}01975                     (ch\_idx >= \mbox{\hyperlink{if__iwm_8c_a30c6eb35fa910ea7094d439c824f2564}{IWM\_NUM\_2GHZ\_CHANNELS}}) ?}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01976}01976                     \textcolor{stringliteral}{"{}5.2"{}} : \textcolor{stringliteral}{"{}2.4"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01977}01977         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01978}01978 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01979}01979 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01980}01980 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01981}\mbox{\hyperlink{if__iwm_8c_adb1f59351443b35ffa01f4338a19f0e9}{01981}} \mbox{\hyperlink{if__iwm_8c_adb1f59351443b35ffa01f4338a19f0e9}{iwm\_init\_channel\_map}}(\textcolor{keyword}{struct} ieee80211com *ic, \textcolor{keywordtype}{int} maxchans, \textcolor{keywordtype}{int} *nchans,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01982}01982     \textcolor{keyword}{struct} ieee80211\_channel chans[])}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01983}01983 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01984}01984         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01985}01985         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__nvm__data}{iwm\_nvm\_data}} *data = sc-\/>\mbox{\hyperlink{structiwm__softc_ac65155777b4c999bcc3e2729733e3db8}{nvm\_data}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01986}01986         uint8\_t bands[IEEE80211\_MODE\_BYTES];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01987}01987         \textcolor{keywordtype}{size\_t} ch\_num;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01988}01988 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01989}01989         memset(bands, 0, \textcolor{keyword}{sizeof}(bands));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01990}01990         \textcolor{comment}{/* 1-\/13: 11b/g channels. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01991}01991         setbit(bands, IEEE80211\_MODE\_11B);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01992}01992         setbit(bands, IEEE80211\_MODE\_11G);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01993}01993         \mbox{\hyperlink{if__iwm_8c_a61c5bef0417dfdb03b66bf98554742b9}{iwm\_add\_channel\_band}}(sc, chans, maxchans, nchans, 0,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01994}01994             \mbox{\hyperlink{if__iwm_8c_a30c6eb35fa910ea7094d439c824f2564}{IWM\_NUM\_2GHZ\_CHANNELS}} -\/ 1, bands);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01995}01995 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01996}01996         \textcolor{comment}{/* 14: 11b channel only. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01997}01997         clrbit(bands, IEEE80211\_MODE\_11G);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01998}01998         \mbox{\hyperlink{if__iwm_8c_a61c5bef0417dfdb03b66bf98554742b9}{iwm\_add\_channel\_band}}(sc, chans, maxchans, nchans,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l01999}01999             \mbox{\hyperlink{if__iwm_8c_a30c6eb35fa910ea7094d439c824f2564}{IWM\_NUM\_2GHZ\_CHANNELS}} -\/ 1, \mbox{\hyperlink{if__iwm_8c_a30c6eb35fa910ea7094d439c824f2564}{IWM\_NUM\_2GHZ\_CHANNELS}}, bands);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02000}02000 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02001}02001         \textcolor{keywordflow}{if} (data-\/>\mbox{\hyperlink{structiwm__nvm__data_a6abdf11e5df91c715b86eb1c640185b0}{sku\_cap\_band\_52GHz\_enable}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02002}02002                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_a9b399704eeb3c9299fe79ff7ebf0b3c3}{device\_family}} == \mbox{\hyperlink{if__iwm__config_8h_a134dc690a22b13281e655ce3d4944141a8cb6f131b7633326d14c4046c4bbf0f5}{IWM\_DEVICE\_FAMILY\_7000}})}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02003}02003                         ch\_num = nitems(\mbox{\hyperlink{if__iwm_8c_ab5e34d8aa381234340c802954b0f3e5c}{iwm\_nvm\_channels}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02004}02004                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02005}02005                         ch\_num = nitems(\mbox{\hyperlink{if__iwm_8c_a6816d65ce89508883c00a89c08f79cc9}{iwm\_nvm\_channels\_8000}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02006}02006                 memset(bands, 0, \textcolor{keyword}{sizeof}(bands));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02007}02007                 setbit(bands, IEEE80211\_MODE\_11A);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02008}02008                 \mbox{\hyperlink{if__iwm_8c_a61c5bef0417dfdb03b66bf98554742b9}{iwm\_add\_channel\_band}}(sc, chans, maxchans, nchans,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02009}02009                     \mbox{\hyperlink{if__iwm_8c_a30c6eb35fa910ea7094d439c824f2564}{IWM\_NUM\_2GHZ\_CHANNELS}}, ch\_num, bands);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02010}02010         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02011}02011 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02012}02012 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02013}02013 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02014}\mbox{\hyperlink{if__iwm_8c_aadd6beca0e2545f91efdea91d02a0146}{02014}} \mbox{\hyperlink{if__iwm_8c_aadd6beca0e2545f91efdea91d02a0146}{iwm\_set\_hw\_address\_family\_8000}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__nvm__data}{iwm\_nvm\_data}} *data,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02015}02015         \textcolor{keyword}{const} uint16\_t *mac\_override, \textcolor{keyword}{const} uint16\_t *nvm\_hw)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02016}02016 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02017}02017         \textcolor{keyword}{const} uint8\_t *\mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02018}02018 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02019}02019         \textcolor{keywordflow}{if} (mac\_override) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02020}02020                 \textcolor{keyword}{static} \textcolor{keyword}{const} uint8\_t reserved\_mac[] = \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02021}02021                         0x02, 0xcc, 0xaa, 0xff, 0xee, 0x00}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02022}02022                 \};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02023}02023 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02024}02024                 \mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}} = (\textcolor{keyword}{const} uint8\_t *)(mac\_override +}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02025}02025                                  \mbox{\hyperlink{if__iwmreg_8h_a80e08c55071cba11f29d9beb7f1201da}{IWM\_MAC\_ADDRESS\_OVERRIDE\_8000}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02026}02026 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02027}02027                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02028}02028 \textcolor{comment}{                 * Store the MAC address from MAO section.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02029}02029 \textcolor{comment}{                 * No byte swapping is required in MAO section}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02030}02030 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02031}02031                 IEEE80211\_ADDR\_COPY(data-\/>\mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}}, \mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02032}02032 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02033}02033                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02034}02034 \textcolor{comment}{                 * Force the use of the OTP MAC address in case of reserved MAC}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02035}02035 \textcolor{comment}{                 * address in the NVM, or if address is given but invalid.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02036}02036 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02037}02037                 \textcolor{keywordflow}{if} (!IEEE80211\_ADDR\_EQ(reserved\_mac, \mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}}) \&\&}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02038}02038                     !IEEE80211\_ADDR\_EQ(ieee80211broadcastaddr, data-\/>\mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}}) \&\&}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02039}02039                     \mbox{\hyperlink{if__iwm_8c_a94d559e1f6be77b9e5ff735e59ec57e3}{iwm\_is\_valid\_ether\_addr}}(data-\/>\mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}}) \&\&}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02040}02040                     !IEEE80211\_IS\_MULTICAST(data-\/>\mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}}))}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02041}02041                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02042}02042 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02043}02043                 \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_RESET,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02044}02044                     \textcolor{stringliteral}{"{}\%s: mac address from nvm override section invalid\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02045}02045                     \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02046}02046         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02047}02047 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02048}02048         \textcolor{keywordflow}{if} (nvm\_hw) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02049}02049                 \textcolor{comment}{/* read the mac address from WFMP registers */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02050}02050                 uint32\_t mac\_addr0 =}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02051}02051                     htole32(\mbox{\hyperlink{if__iwm__pcie__trans_8c_a635add69da3722c9c5c8c8e88a910214}{iwm\_read\_prph}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a6e81261b670d8f1f16d6e0c5619b513e}{IWM\_WFMP\_MAC\_ADDR\_0}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02052}02052                 uint32\_t mac\_addr1 =}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02053}02053                     htole32(\mbox{\hyperlink{if__iwm__pcie__trans_8c_a635add69da3722c9c5c8c8e88a910214}{iwm\_read\_prph}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a60a13cb924d3189747fecf4f5b3ac876}{IWM\_WFMP\_MAC\_ADDR\_1}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02054}02054 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02055}02055                 \mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}} = (\textcolor{keyword}{const} uint8\_t *)\&mac\_addr0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02056}02056                 data-\/>\mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}}[0] = \mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}}[3];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02057}02057                 data-\/>\mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}}[1] = \mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}}[2];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02058}02058                 data-\/>\mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}}[2] = \mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}}[1];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02059}02059                 data-\/>\mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}}[3] = \mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}}[0];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02060}02060 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02061}02061                 \mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}} = (\textcolor{keyword}{const} uint8\_t *)\&mac\_addr1;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02062}02062                 data-\/>\mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}}[4] = \mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}}[1];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02063}02063                 data-\/>\mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}}[5] = \mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}}[0];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02064}02064 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02065}02065                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02066}02066         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02067}02067 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02068}02068         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%s: mac address not found\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02069}02069         memset(data-\/>\mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}}, 0, \textcolor{keyword}{sizeof}(data-\/>\mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02070}02070 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02071}02071 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02072}02072 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02073}\mbox{\hyperlink{if__iwm_8c_a9e33b16b4920b42b715190cd21d4b807}{02073}} \mbox{\hyperlink{if__iwm_8c_a9e33b16b4920b42b715190cd21d4b807}{iwm\_get\_sku}}(\textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keyword}{const} uint16\_t *nvm\_sw,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02074}02074             \textcolor{keyword}{const} uint16\_t *phy\_sku)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02075}02075 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02076}02076         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_a9b399704eeb3c9299fe79ff7ebf0b3c3}{device\_family}} < \mbox{\hyperlink{if__iwm__config_8h_a134dc690a22b13281e655ce3d4944141aece09942e3ab8587f2bbd9f34f47af41}{IWM\_DEVICE\_FAMILY\_8000}})}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02077}02077                 \textcolor{keywordflow}{return} \mbox{\hyperlink{if__iwmreg_8h_ad1519497dfea5d98d99dfab552b3c2fb}{le16\_to\_cpup}}(nvm\_sw + \mbox{\hyperlink{if__iwmreg_8h_aa79edc6e57d10a921cabe78c1e2d4664}{IWM\_SKU}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02078}02078 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02079}02079         \textcolor{keywordflow}{return} \mbox{\hyperlink{if__iwmreg_8h_af8369a1a868cd8f5f09a626daa727345}{le32\_to\_cpup}}((\textcolor{keyword}{const} uint32\_t *)(phy\_sku + \mbox{\hyperlink{if__iwmreg_8h_a81629b4ac0ab5c5551659a4358a9fcd1}{IWM\_SKU\_8000}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02080}02080 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02081}02081 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02082}02082 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02083}\mbox{\hyperlink{if__iwm_8c_a65949cc9575d51ea89193281d02bc20a}{02083}} \mbox{\hyperlink{if__iwm_8c_a65949cc9575d51ea89193281d02bc20a}{iwm\_get\_nvm\_version}}(\textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keyword}{const} uint16\_t *nvm\_sw)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02084}02084 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02085}02085         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_a9b399704eeb3c9299fe79ff7ebf0b3c3}{device\_family}} < \mbox{\hyperlink{if__iwm__config_8h_a134dc690a22b13281e655ce3d4944141aece09942e3ab8587f2bbd9f34f47af41}{IWM\_DEVICE\_FAMILY\_8000}})}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02086}02086                 \textcolor{keywordflow}{return} \mbox{\hyperlink{if__iwmreg_8h_ad1519497dfea5d98d99dfab552b3c2fb}{le16\_to\_cpup}}(nvm\_sw + \mbox{\hyperlink{if__iwmreg_8h_a7a726993171443ef28bcd8a2ff730ab7}{IWM\_NVM\_VERSION}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02087}02087         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02088}02088                 \textcolor{keywordflow}{return} \mbox{\hyperlink{if__iwmreg_8h_af8369a1a868cd8f5f09a626daa727345}{le32\_to\_cpup}}((\textcolor{keyword}{const} uint32\_t *)(nvm\_sw +}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02089}02089                                                 \mbox{\hyperlink{if__iwmreg_8h_a332af3f4438aad6e67b820906e6172b1}{IWM\_NVM\_VERSION\_8000}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02090}02090 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02091}02091 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02092}02092 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02093}\mbox{\hyperlink{if__iwm_8c_a616f6388427af0fe20f5de0f2dc8ae13}{02093}} \mbox{\hyperlink{if__iwm_8c_a616f6388427af0fe20f5de0f2dc8ae13}{iwm\_get\_radio\_cfg}}(\textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keyword}{const} uint16\_t *nvm\_sw,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02094}02094                   \textcolor{keyword}{const} uint16\_t *phy\_sku)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02095}02095 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02096}02096         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_a9b399704eeb3c9299fe79ff7ebf0b3c3}{device\_family}} < \mbox{\hyperlink{if__iwm__config_8h_a134dc690a22b13281e655ce3d4944141aece09942e3ab8587f2bbd9f34f47af41}{IWM\_DEVICE\_FAMILY\_8000}})}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02097}02097                 \textcolor{keywordflow}{return} \mbox{\hyperlink{if__iwmreg_8h_ad1519497dfea5d98d99dfab552b3c2fb}{le16\_to\_cpup}}(nvm\_sw + \mbox{\hyperlink{if__iwmreg_8h_af11a6c19b84600631144a6d5be1884ff}{IWM\_RADIO\_CFG}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02098}02098 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02099}02099         \textcolor{keywordflow}{return} \mbox{\hyperlink{if__iwmreg_8h_af8369a1a868cd8f5f09a626daa727345}{le32\_to\_cpup}}((\textcolor{keyword}{const} uint32\_t *)(phy\_sku + \mbox{\hyperlink{if__iwmreg_8h_a3ae82b14ed08059666b29beeb0777ca0}{IWM\_RADIO\_CFG\_8000}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02100}02100 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02101}02101 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02102}02102 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02103}\mbox{\hyperlink{if__iwm_8c_a524e5416cf88ebe8f643e6c8021edf47}{02103}} \mbox{\hyperlink{if__iwm_8c_a524e5416cf88ebe8f643e6c8021edf47}{iwm\_get\_n\_hw\_addrs}}(\textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keyword}{const} uint16\_t *nvm\_sw)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02104}02104 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02105}02105         \textcolor{keywordtype}{int} n\_hw\_addr;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02106}02106 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02107}02107         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_a9b399704eeb3c9299fe79ff7ebf0b3c3}{device\_family}} < \mbox{\hyperlink{if__iwm__config_8h_a134dc690a22b13281e655ce3d4944141aece09942e3ab8587f2bbd9f34f47af41}{IWM\_DEVICE\_FAMILY\_8000}})}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02108}02108                 \textcolor{keywordflow}{return} \mbox{\hyperlink{if__iwmreg_8h_ad1519497dfea5d98d99dfab552b3c2fb}{le16\_to\_cpup}}(nvm\_sw + \mbox{\hyperlink{if__iwmreg_8h_ab40b510549a7de10177767e37bbb4945}{IWM\_N\_HW\_ADDRS}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02109}02109 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02110}02110         n\_hw\_addr = \mbox{\hyperlink{if__iwmreg_8h_af8369a1a868cd8f5f09a626daa727345}{le32\_to\_cpup}}((\textcolor{keyword}{const} uint32\_t *)(nvm\_sw + \mbox{\hyperlink{if__iwmreg_8h_ac48fddc27f3030992d5b84a8bf4421dc}{IWM\_N\_HW\_ADDRS\_8000}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02111}02111 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02112}02112         \textcolor{keywordflow}{return} n\_hw\_addr \& \mbox{\hyperlink{if__iwm_8c_ad198936b2f83aaa68e557ab8f4f1d1b9}{IWM\_N\_HW\_ADDR\_MASK}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02113}02113 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02114}02114 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02115}02115 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02116}\mbox{\hyperlink{if__iwm_8c_aa623cd1db2dde7c9efb8bf7fe125d3f8}{02116}} \mbox{\hyperlink{if__iwm_8c_aa623cd1db2dde7c9efb8bf7fe125d3f8}{iwm\_set\_radio\_cfg}}(\textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__nvm__data}{iwm\_nvm\_data}} *data,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02117}02117                   uint32\_t radio\_cfg)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02118}02118 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02119}02119         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_a9b399704eeb3c9299fe79ff7ebf0b3c3}{device\_family}} < \mbox{\hyperlink{if__iwm__config_8h_a134dc690a22b13281e655ce3d4944141aece09942e3ab8587f2bbd9f34f47af41}{IWM\_DEVICE\_FAMILY\_8000}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02120}02120                 data-\/>\mbox{\hyperlink{structiwm__nvm__data_a25155a465f0fcc7010ea286c8c64d7be}{radio\_cfg\_type}} = \mbox{\hyperlink{if__iwmreg_8h_a3a6a558234bdfad2eee8273a3c94025c}{IWM\_NVM\_RF\_CFG\_TYPE\_MSK}}(radio\_cfg);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02121}02121                 data-\/>\mbox{\hyperlink{structiwm__nvm__data_a83865505ede8a9dda8ea08b774bcaff1}{radio\_cfg\_step}} = \mbox{\hyperlink{if__iwmreg_8h_acc87358ebe6b9410609fe3a32139735b}{IWM\_NVM\_RF\_CFG\_STEP\_MSK}}(radio\_cfg);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02122}02122                 data-\/>\mbox{\hyperlink{structiwm__nvm__data_aa75786b435f9780d0c8e21a62dbeb4e8}{radio\_cfg\_dash}} = \mbox{\hyperlink{if__iwmreg_8h_af198932bb31fd62304c9689c95d86de2}{IWM\_NVM\_RF\_CFG\_DASH\_MSK}}(radio\_cfg);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02123}02123                 data-\/>\mbox{\hyperlink{structiwm__nvm__data_a04a5e6723e7576929aa4d15897d0ab7a}{radio\_cfg\_pnum}} = \mbox{\hyperlink{if__iwmreg_8h_adb62d365b5224f48bb861d782fed6034}{IWM\_NVM\_RF\_CFG\_PNUM\_MSK}}(radio\_cfg);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02124}02124                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02125}02125         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02126}02126 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02127}02127         \textcolor{comment}{/* set the radio configuration for family 8000 */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02128}02128         data-\/>\mbox{\hyperlink{structiwm__nvm__data_a25155a465f0fcc7010ea286c8c64d7be}{radio\_cfg\_type}} = \mbox{\hyperlink{if__iwmreg_8h_ad278bdbc8e225e64f3cc03220c89a36a}{IWM\_NVM\_RF\_CFG\_TYPE\_MSK\_8000}}(radio\_cfg);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02129}02129         data-\/>\mbox{\hyperlink{structiwm__nvm__data_a83865505ede8a9dda8ea08b774bcaff1}{radio\_cfg\_step}} = \mbox{\hyperlink{if__iwmreg_8h_a62ac145320fe43ec1a4cb766c5ef91e1}{IWM\_NVM\_RF\_CFG\_STEP\_MSK\_8000}}(radio\_cfg);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02130}02130         data-\/>\mbox{\hyperlink{structiwm__nvm__data_aa75786b435f9780d0c8e21a62dbeb4e8}{radio\_cfg\_dash}} = \mbox{\hyperlink{if__iwmreg_8h_a13a0d4029c7faee8b3315daf1364c012}{IWM\_NVM\_RF\_CFG\_DASH\_MSK\_8000}}(radio\_cfg);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02131}02131         data-\/>\mbox{\hyperlink{structiwm__nvm__data_a04a5e6723e7576929aa4d15897d0ab7a}{radio\_cfg\_pnum}} = \mbox{\hyperlink{if__iwmreg_8h_a5da459d122a35c08419407d633322139}{IWM\_NVM\_RF\_CFG\_PNUM\_MSK\_8000}}(radio\_cfg);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02132}02132         data-\/>\mbox{\hyperlink{structiwm__nvm__data_ac4038c946de57379a73f4031d487011d}{valid\_tx\_ant}} = \mbox{\hyperlink{if__iwmreg_8h_aa3187815fe78c6d3ec5cbecfd9b8d6c9}{IWM\_NVM\_RF\_CFG\_TX\_ANT\_MSK\_8000}}(radio\_cfg);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02133}02133         data-\/>\mbox{\hyperlink{structiwm__nvm__data_a818d632c46760390cbe6c43d13eec3a6}{valid\_rx\_ant}} = \mbox{\hyperlink{if__iwmreg_8h_a5a7c80d603d3872d54fd5ea20df5b5e5}{IWM\_NVM\_RF\_CFG\_RX\_ANT\_MSK\_8000}}(radio\_cfg);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02134}02134 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02135}02135 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02136}02136 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02137}\mbox{\hyperlink{if__iwm_8c_a06e7bf83454b894804f5134f15a08430}{02137}} \mbox{\hyperlink{if__iwm_8c_a06e7bf83454b894804f5134f15a08430}{iwm\_set\_hw\_address}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__nvm__data}{iwm\_nvm\_data}} *data,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02138}02138                    \textcolor{keyword}{const} uint16\_t *nvm\_hw, \textcolor{keyword}{const} uint16\_t *mac\_override)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02139}02139 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02140}02140 \textcolor{preprocessor}{\#ifdef notyet }\textcolor{comment}{/* for FAMILY 9000 */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02141}02141         \textcolor{keywordflow}{if} (cfg-\/>mac\_addr\_from\_csr) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02142}02142                 iwm\_set\_hw\_address\_from\_csr(sc, data);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02143}02143         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02144}02144 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02145}02145         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_a9b399704eeb3c9299fe79ff7ebf0b3c3}{device\_family}} < \mbox{\hyperlink{if__iwm__config_8h_a134dc690a22b13281e655ce3d4944141aece09942e3ab8587f2bbd9f34f47af41}{IWM\_DEVICE\_FAMILY\_8000}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02146}02146                 \textcolor{keyword}{const} uint8\_t *\mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}} = (\textcolor{keyword}{const} uint8\_t *)(nvm\_hw + \mbox{\hyperlink{if__iwmreg_8h_afe29df2900bf840d85e93f2eeb15085c}{IWM\_HW\_ADDR}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02147}02147 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02148}02148                 \textcolor{comment}{/* The byte order is little endian 16 bit, meaning 214365 */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02149}02149                 data-\/>\mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}}[0] = \mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}}[1];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02150}02150                 data-\/>\mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}}[1] = \mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}}[0];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02151}02151                 data-\/>\mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}}[2] = \mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}}[3];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02152}02152                 data-\/>\mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}}[3] = \mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}}[2];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02153}02153                 data-\/>\mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}}[4] = \mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}}[5];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02154}02154                 data-\/>\mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}}[5] = \mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}}[4];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02155}02155         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02156}02156                 \mbox{\hyperlink{if__iwm_8c_aadd6beca0e2545f91efdea91d02a0146}{iwm\_set\_hw\_address\_family\_8000}}(sc, data, mac\_override, nvm\_hw);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02157}02157         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02158}02158 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02159}02159         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{if__iwm_8c_a94d559e1f6be77b9e5ff735e59ec57e3}{iwm\_is\_valid\_ether\_addr}}(data-\/>\mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}})) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02160}02160                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}no valid mac address was found\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02161}02161                 \textcolor{keywordflow}{return} EINVAL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02162}02162         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02163}02163 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02164}02164         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02165}02165 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02166}02166 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02167}02167 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__nvm__data}{iwm\_nvm\_data}} *}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02168}\mbox{\hyperlink{if__iwm_8c_a1fb452939f6d6611b988986520104330}{02168}} \mbox{\hyperlink{if__iwm_8c_a1fb452939f6d6611b988986520104330}{iwm\_parse\_nvm\_data}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02169}02169                    \textcolor{keyword}{const} uint16\_t *nvm\_hw, \textcolor{keyword}{const} uint16\_t *nvm\_sw,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02170}02170                    \textcolor{keyword}{const} uint16\_t *nvm\_calib, \textcolor{keyword}{const} uint16\_t *mac\_override,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02171}02171                    \textcolor{keyword}{const} uint16\_t *phy\_sku, \textcolor{keyword}{const} uint16\_t *regulatory)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02172}02172 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02173}02173         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__nvm__data}{iwm\_nvm\_data}} *data;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02174}02174         uint32\_t sku, radio\_cfg;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02175}02175         uint16\_t lar\_config;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02176}02176 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02177}02177         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_a9b399704eeb3c9299fe79ff7ebf0b3c3}{device\_family}} < \mbox{\hyperlink{if__iwm__config_8h_a134dc690a22b13281e655ce3d4944141aece09942e3ab8587f2bbd9f34f47af41}{IWM\_DEVICE\_FAMILY\_8000}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02178}02178                 data = malloc(\textcolor{keyword}{sizeof}(*data) +}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02179}02179                     \mbox{\hyperlink{if__iwmvar_8h_a940aad61c7e01c7c86c12da807f7423b}{IWM\_NUM\_CHANNELS}} * \textcolor{keyword}{sizeof}(uint16\_t),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02180}02180                     M\_DEVBUF, M\_NOWAIT | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02181}02181         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02182}02182                 data = malloc(\textcolor{keyword}{sizeof}(*data) +}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02183}02183                     \mbox{\hyperlink{if__iwmvar_8h_ac1b88599c587e7384cccc32eacc8fd56}{IWM\_NUM\_CHANNELS\_8000}} * \textcolor{keyword}{sizeof}(uint16\_t),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02184}02184                     M\_DEVBUF, M\_NOWAIT | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02185}02185         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02186}02186         \textcolor{keywordflow}{if} (!data)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02187}02187                 \textcolor{keywordflow}{return} NULL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02188}02188 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02189}02189         data-\/>\mbox{\hyperlink{structiwm__nvm__data_a95782c29c0680ace92a95ed3999b39f0}{nvm\_version}} = \mbox{\hyperlink{if__iwm_8c_a65949cc9575d51ea89193281d02bc20a}{iwm\_get\_nvm\_version}}(sc, nvm\_sw);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02190}02190 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02191}02191         radio\_cfg = \mbox{\hyperlink{if__iwm_8c_a616f6388427af0fe20f5de0f2dc8ae13}{iwm\_get\_radio\_cfg}}(sc, nvm\_sw, phy\_sku);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02192}02192         \mbox{\hyperlink{if__iwm_8c_aa623cd1db2dde7c9efb8bf7fe125d3f8}{iwm\_set\_radio\_cfg}}(sc, data, radio\_cfg);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02193}02193 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02194}02194         sku = \mbox{\hyperlink{if__iwm_8c_a9e33b16b4920b42b715190cd21d4b807}{iwm\_get\_sku}}(sc, nvm\_sw, phy\_sku);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02195}02195         data-\/>\mbox{\hyperlink{structiwm__nvm__data_ad02ed090f50798fef30f1227f308e775}{sku\_cap\_band\_24GHz\_enable}} = sku \& \mbox{\hyperlink{if__iwmreg_8h_aba463f867494486b2974040f62b00d12}{IWM\_NVM\_SKU\_CAP\_BAND\_24GHZ}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02196}02196         data-\/>\mbox{\hyperlink{structiwm__nvm__data_a6abdf11e5df91c715b86eb1c640185b0}{sku\_cap\_band\_52GHz\_enable}} = sku \& \mbox{\hyperlink{if__iwmreg_8h_a42f187d3b19d696b35316529f52fea4f}{IWM\_NVM\_SKU\_CAP\_BAND\_52GHZ}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02197}02197         data-\/>\mbox{\hyperlink{structiwm__nvm__data_a8e9fce37009a0caa2aff85e8692a08c6}{sku\_cap\_11n\_enable}} = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02198}02198 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02199}02199         data-\/>\mbox{\hyperlink{structiwm__nvm__data_a15383dd63b589d30d4f03d46584bfde8}{n\_hw\_addrs}} = \mbox{\hyperlink{if__iwm_8c_a524e5416cf88ebe8f643e6c8021edf47}{iwm\_get\_n\_hw\_addrs}}(sc, nvm\_sw);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02200}02200 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02201}02201         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_a9b399704eeb3c9299fe79ff7ebf0b3c3}{device\_family}} >= \mbox{\hyperlink{if__iwm__config_8h_a134dc690a22b13281e655ce3d4944141aece09942e3ab8587f2bbd9f34f47af41}{IWM\_DEVICE\_FAMILY\_8000}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02202}02202                 \textcolor{comment}{/* TODO: use IWL\_NVM\_EXT */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02203}02203                 uint16\_t lar\_offset = data-\/>\mbox{\hyperlink{structiwm__nvm__data_a95782c29c0680ace92a95ed3999b39f0}{nvm\_version}} < 0xE39 ?}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02204}02204                                        \mbox{\hyperlink{if__iwmreg_8h_af62087aee48da35e33c1be0e68de7308}{IWM\_NVM\_LAR\_OFFSET\_8000\_OLD}} :}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02205}02205                                        \mbox{\hyperlink{if__iwmreg_8h_a4740d26e9b197144c5224917dd315846}{IWM\_NVM\_LAR\_OFFSET\_8000}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02206}02206 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02207}02207                 lar\_config = \mbox{\hyperlink{if__iwmreg_8h_ad1519497dfea5d98d99dfab552b3c2fb}{le16\_to\_cpup}}(regulatory + lar\_offset);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02208}02208                 data-\/>\mbox{\hyperlink{structiwm__nvm__data_aa698463550d874dd407f714555c7eb59}{lar\_enabled}} = !!(lar\_config \&}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02209}02209                                        \mbox{\hyperlink{if__iwmreg_8h_a8df235b1341b31daaa3daeaa0ab3bf50}{IWM\_NVM\_LAR\_ENABLED\_8000}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02210}02210         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02211}02211 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02212}02212         \textcolor{comment}{/* If no valid mac address was found -\/ bail out */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02213}02213         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__iwm_8c_a06e7bf83454b894804f5134f15a08430}{iwm\_set\_hw\_address}}(sc, data, nvm\_hw, mac\_override)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02214}02214                 free(data, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02215}02215                 \textcolor{keywordflow}{return} NULL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02216}02216         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02217}02217 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02218}02218         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_a9b399704eeb3c9299fe79ff7ebf0b3c3}{device\_family}} == \mbox{\hyperlink{if__iwm__config_8h_a134dc690a22b13281e655ce3d4944141a8cb6f131b7633326d14c4046c4bbf0f5}{IWM\_DEVICE\_FAMILY\_7000}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02219}02219                 memcpy(data-\/>\mbox{\hyperlink{structiwm__nvm__data_a6d4b3d4142f43bab7489425b6fbc37c8}{nvm\_ch\_flags}}, sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_a60ba6e6366017014aa36fe444dfac6de}{nvm\_type}} == \mbox{\hyperlink{if__iwm__config_8h_aab226dd52aa40318916081a6bde02607a03396685873fdd78406a0ce1fdc6905a}{IWM\_NVM\_SDP}} ?}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02220}02220                     \&regulatory[0] : \&nvm\_sw[\mbox{\hyperlink{if__iwmreg_8h_a547911fe6cfdef6a5d13f0377c5c4104}{IWM\_NVM\_CHANNELS}}],}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02221}02221                     \mbox{\hyperlink{if__iwmvar_8h_a940aad61c7e01c7c86c12da807f7423b}{IWM\_NUM\_CHANNELS}} * \textcolor{keyword}{sizeof}(uint16\_t));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02222}02222         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02223}02223                 memcpy(data-\/>\mbox{\hyperlink{structiwm__nvm__data_a6d4b3d4142f43bab7489425b6fbc37c8}{nvm\_ch\_flags}}, \&regulatory[\mbox{\hyperlink{if__iwmreg_8h_a6847685b04bc5a87d6c3be5db79193b8}{IWM\_NVM\_CHANNELS\_8000}}],}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02224}02224                     \mbox{\hyperlink{if__iwmvar_8h_ac1b88599c587e7384cccc32eacc8fd56}{IWM\_NUM\_CHANNELS\_8000}} * \textcolor{keyword}{sizeof}(uint16\_t));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02225}02225         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02226}02226 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02227}02227         \textcolor{keywordflow}{return} data;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02228}02228 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02229}02229 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02230}02230 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02231}\mbox{\hyperlink{if__iwm_8c_a17cd82bde37907ca80043250f10ce685}{02231}} \mbox{\hyperlink{if__iwm_8c_a17cd82bde37907ca80043250f10ce685}{iwm\_free\_nvm\_data}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__nvm__data}{iwm\_nvm\_data}} *data)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02232}02232 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02233}02233         \textcolor{keywordflow}{if} (data != NULL)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02234}02234                 free(data, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02235}02235 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02236}02236 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02237}02237 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__nvm__data}{iwm\_nvm\_data}} *}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02238}\mbox{\hyperlink{if__iwm_8c_a9d580665467e0ce76ac94c6f8d62f332}{02238}} \mbox{\hyperlink{if__iwm_8c_a9d580665467e0ce76ac94c6f8d62f332}{iwm\_parse\_nvm\_sections}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__nvm__section}{iwm\_nvm\_section}} *sections)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02239}02239 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02240}02240         \textcolor{keyword}{const} uint16\_t *hw, *sw, *calib, *regulatory, *mac\_override, *phy\_sku;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02241}02241 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02242}02242         \textcolor{comment}{/* Checking for required sections */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02243}02243         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_a9b399704eeb3c9299fe79ff7ebf0b3c3}{device\_family}} == \mbox{\hyperlink{if__iwm__config_8h_a134dc690a22b13281e655ce3d4944141a8cb6f131b7633326d14c4046c4bbf0f5}{IWM\_DEVICE\_FAMILY\_7000}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02244}02244                 \textcolor{keywordflow}{if} (!sections[\mbox{\hyperlink{if__iwmreg_8h_a39a26036272dacb4413d66de046ca0e2}{IWM\_NVM\_SECTION\_TYPE\_SW}}].data ||}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02245}02245                     !sections[sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_ac060d6b4263c310e41da8db594810001}{nvm\_hw\_section\_num}}].\mbox{\hyperlink{structiwm__nvm__section_a0b299372143855d22600f8e27d7a8484}{data}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02246}02246                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02247}02247                             \textcolor{stringliteral}{"{}Can't parse empty OTP/NVM sections\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02248}02248                         \textcolor{keywordflow}{return} NULL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02249}02249                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02250}02250         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_a9b399704eeb3c9299fe79ff7ebf0b3c3}{device\_family}} >= \mbox{\hyperlink{if__iwm__config_8h_a134dc690a22b13281e655ce3d4944141aece09942e3ab8587f2bbd9f34f47af41}{IWM\_DEVICE\_FAMILY\_8000}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02251}02251                 \textcolor{comment}{/* SW and REGULATORY sections are mandatory */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02252}02252                 \textcolor{keywordflow}{if} (!sections[\mbox{\hyperlink{if__iwmreg_8h_a39a26036272dacb4413d66de046ca0e2}{IWM\_NVM\_SECTION\_TYPE\_SW}}].data ||}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02253}02253                     !sections[\mbox{\hyperlink{if__iwmreg_8h_ae48b1616f47571c04b88db1fdafcbb9c}{IWM\_NVM\_SECTION\_TYPE\_REGULATORY}}].data) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02254}02254                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02255}02255                             \textcolor{stringliteral}{"{}Can't parse empty OTP/NVM sections\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02256}02256                         \textcolor{keywordflow}{return} NULL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02257}02257                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02258}02258                 \textcolor{comment}{/* MAC\_OVERRIDE or at least HW section must exist */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02259}02259                 \textcolor{keywordflow}{if} (!sections[sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_ac060d6b4263c310e41da8db594810001}{nvm\_hw\_section\_num}}].\mbox{\hyperlink{structiwm__nvm__section_a0b299372143855d22600f8e27d7a8484}{data}} \&\&}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02260}02260                     !sections[\mbox{\hyperlink{if__iwmreg_8h_a132a8e9fce985ad27af799060768cd75}{IWM\_NVM\_SECTION\_TYPE\_MAC\_OVERRIDE}}].\mbox{\hyperlink{structiwm__nvm__section_a0b299372143855d22600f8e27d7a8484}{data}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02261}02261                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02262}02262                             \textcolor{stringliteral}{"{}Can't parse mac\_address, empty sections\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02263}02263                         \textcolor{keywordflow}{return} NULL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02264}02264                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02265}02265 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02266}02266                 \textcolor{comment}{/* PHY\_SKU section is mandatory in B0 */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02267}02267                 \textcolor{keywordflow}{if} (!sections[\mbox{\hyperlink{if__iwmreg_8h_a1e52960f6a6cdab28f1ac43943f0928b}{IWM\_NVM\_SECTION\_TYPE\_PHY\_SKU}}].data) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02268}02268                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02269}02269                             \textcolor{stringliteral}{"{}Can't parse phy\_sku in B0, empty sections\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02270}02270                         \textcolor{keywordflow}{return} NULL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02271}02271                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02272}02272         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02273}02273                 panic(\textcolor{stringliteral}{"{}unknown device family \%d\(\backslash\)n"{}}, sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_a9b399704eeb3c9299fe79ff7ebf0b3c3}{device\_family}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02274}02274         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02275}02275 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02276}02276         hw = (\textcolor{keyword}{const} uint16\_t *) sections[sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_ac060d6b4263c310e41da8db594810001}{nvm\_hw\_section\_num}}].\mbox{\hyperlink{structiwm__nvm__section_a0b299372143855d22600f8e27d7a8484}{data}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02277}02277         sw = (\textcolor{keyword}{const} uint16\_t *)sections[\mbox{\hyperlink{if__iwmreg_8h_a39a26036272dacb4413d66de046ca0e2}{IWM\_NVM\_SECTION\_TYPE\_SW}}].\mbox{\hyperlink{structiwm__nvm__section_a0b299372143855d22600f8e27d7a8484}{data}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02278}02278         calib = (\textcolor{keyword}{const} uint16\_t *)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02279}02279             sections[\mbox{\hyperlink{if__iwmreg_8h_a7cbf8ca5fb98298f86a6bae536b547b9}{IWM\_NVM\_SECTION\_TYPE\_CALIBRATION}}].data;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02280}02280         regulatory = sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_a60ba6e6366017014aa36fe444dfac6de}{nvm\_type}} == \mbox{\hyperlink{if__iwm__config_8h_aab226dd52aa40318916081a6bde02607a03396685873fdd78406a0ce1fdc6905a}{IWM\_NVM\_SDP}} ?}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02281}02281             (\textcolor{keyword}{const} uint16\_t *)sections[\mbox{\hyperlink{if__iwmreg_8h_a68edfaf68911b0dddfdb9b32830521c5}{IWM\_NVM\_SECTION\_TYPE\_REGULATORY\_SDP}}].data :}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02282}02282             (\textcolor{keyword}{const} uint16\_t *)sections[\mbox{\hyperlink{if__iwmreg_8h_ae48b1616f47571c04b88db1fdafcbb9c}{IWM\_NVM\_SECTION\_TYPE\_REGULATORY}}].\mbox{\hyperlink{structiwm__nvm__section_a0b299372143855d22600f8e27d7a8484}{data}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02283}02283         mac\_override = (\textcolor{keyword}{const} uint16\_t *)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02284}02284             sections[\mbox{\hyperlink{if__iwmreg_8h_a132a8e9fce985ad27af799060768cd75}{IWM\_NVM\_SECTION\_TYPE\_MAC\_OVERRIDE}}].data;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02285}02285         phy\_sku = (\textcolor{keyword}{const} uint16\_t *)sections[\mbox{\hyperlink{if__iwmreg_8h_a1e52960f6a6cdab28f1ac43943f0928b}{IWM\_NVM\_SECTION\_TYPE\_PHY\_SKU}}].data;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02286}02286 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02287}02287         \textcolor{keywordflow}{return} \mbox{\hyperlink{if__iwm_8c_a1fb452939f6d6611b988986520104330}{iwm\_parse\_nvm\_data}}(sc, hw, sw, calib, mac\_override,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02288}02288             phy\_sku, regulatory);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02289}02289 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02290}02290 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02291}02291 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02292}\mbox{\hyperlink{if__iwm_8c_a8022b1259eb9d94e86264a6f06bb23af}{02292}} \mbox{\hyperlink{if__iwm_8c_a8022b1259eb9d94e86264a6f06bb23af}{iwm\_nvm\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02293}02293 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02294}02294         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__nvm__section}{iwm\_nvm\_section}} nvm\_sections[\mbox{\hyperlink{if__iwmreg_8h_ad1cdd30ae9b2684a1a3a21a47423c90c}{IWM\_NVM\_NUM\_OF\_SECTIONS}}];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02295}02295         \textcolor{keywordtype}{int} i, ret, section;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02296}02296         uint32\_t size\_read = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02297}02297         uint8\_t *nvm\_buffer, *temp;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02298}02298         uint16\_t len;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02299}02299 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02300}02300         memset(nvm\_sections, 0, \textcolor{keyword}{sizeof}(nvm\_sections));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02301}02301 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02302}02302         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_ac060d6b4263c310e41da8db594810001}{nvm\_hw\_section\_num}} >= \mbox{\hyperlink{if__iwmreg_8h_ad1cdd30ae9b2684a1a3a21a47423c90c}{IWM\_NVM\_NUM\_OF\_SECTIONS}})}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02303}02303                 \textcolor{keywordflow}{return} EINVAL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02304}02304 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02305}02305         \textcolor{comment}{/* load NVM values from nic */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02306}02306         \textcolor{comment}{/* Read From FW NVM */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02307}02307         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_EEPROM, \textcolor{stringliteral}{"{}Read from NVM\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02308}02308 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02309}02309         nvm\_buffer = malloc(sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_a47ae90cdef2422c3d74019c18620b8c3}{eeprom\_size}}, M\_DEVBUF, M\_NOWAIT | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02310}02310         \textcolor{keywordflow}{if} (!nvm\_buffer)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02311}02311                 \textcolor{keywordflow}{return} ENOMEM;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02312}02312         \textcolor{keywordflow}{for} (section = 0; section < \mbox{\hyperlink{if__iwmreg_8h_ad1cdd30ae9b2684a1a3a21a47423c90c}{IWM\_NVM\_NUM\_OF\_SECTIONS}}; section++) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02313}02313                 \textcolor{comment}{/* we override the constness for initial read */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02314}02314                 ret = \mbox{\hyperlink{if__iwm_8c_a3dc02cf22c442cc7e7a62947ffd77f90}{iwm\_nvm\_read\_section}}(sc, section, nvm\_buffer,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02315}02315                                            \&len, size\_read);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02316}02316                 \textcolor{keywordflow}{if} (ret)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02317}02317                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02318}02318                 size\_read += len;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02319}02319                 temp = malloc(len, M\_DEVBUF, M\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02320}02320                 \textcolor{keywordflow}{if} (!temp) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02321}02321                         ret = ENOMEM;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02322}02322                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02323}02323                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02324}02324                 memcpy(temp, nvm\_buffer, len);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02325}02325 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02326}02326                 nvm\_sections[section].\mbox{\hyperlink{structiwm__nvm__section_a0b299372143855d22600f8e27d7a8484}{data}} = temp;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02327}02327                 nvm\_sections[section].\mbox{\hyperlink{structiwm__nvm__section_a9bba20790ac3aa46c97afd84c548ec4e}{length}} = len;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02328}02328         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02329}02329         \textcolor{keywordflow}{if} (!size\_read)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02330}02330                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}OTP is blank\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02331}02331         free(nvm\_buffer, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02332}02332 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02333}02333         sc-\/>\mbox{\hyperlink{structiwm__softc_ac65155777b4c999bcc3e2729733e3db8}{nvm\_data}} = \mbox{\hyperlink{if__iwm_8c_a9d580665467e0ce76ac94c6f8d62f332}{iwm\_parse\_nvm\_sections}}(sc, nvm\_sections);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02334}02334         \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structiwm__softc_ac65155777b4c999bcc3e2729733e3db8}{nvm\_data}})}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02335}02335                 \textcolor{keywordflow}{return} EINVAL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02336}02336         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_EEPROM | IWM\_DEBUG\_RESET,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02337}02337                     \textcolor{stringliteral}{"{}nvm version = \%x\(\backslash\)n"{}}, sc-\/>\mbox{\hyperlink{structiwm__softc_ac65155777b4c999bcc3e2729733e3db8}{nvm\_data}}-\/>\mbox{\hyperlink{structiwm__nvm__data_a95782c29c0680ace92a95ed3999b39f0}{nvm\_version}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02338}02338 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02339}02339         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{if__iwmreg_8h_ad1cdd30ae9b2684a1a3a21a47423c90c}{IWM\_NVM\_NUM\_OF\_SECTIONS}}; i++) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02340}02340                 \textcolor{keywordflow}{if} (nvm\_sections[i].\mbox{\hyperlink{structiwm__nvm__section_a0b299372143855d22600f8e27d7a8484}{data}} != NULL)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02341}02341                         free(nvm\_sections[i].\mbox{\hyperlink{structiwm__nvm__section_a0b299372143855d22600f8e27d7a8484}{data}}, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02342}02342         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02343}02343 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02344}02344         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02345}02345 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02346}02346 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02347}02347 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02348}\mbox{\hyperlink{if__iwm_8c_a48609f858a0fcf23ff12f77e7f938ee8}{02348}} \mbox{\hyperlink{if__iwm_8c_a48609f858a0fcf23ff12f77e7f938ee8}{iwm\_pcie\_load\_section}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, uint8\_t section\_num,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02349}02349         \textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__fw__desc}{iwm\_fw\_desc}} *section)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02350}02350 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02351}02351         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__dma__info}{iwm\_dma\_info}} *dma = \&sc-\/>\mbox{\hyperlink{structiwm__softc_abbfdd700f811040eb61ebaa9ef29d54d}{fw\_dma}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02352}02352         uint8\_t *v\_addr;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02353}02353         bus\_addr\_t p\_addr;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02354}02354         uint32\_t offset, chunk\_sz = MIN(\mbox{\hyperlink{if__iwmreg_8h_a8b06e85e47c790360bea18a9392c7101}{IWM\_FH\_MEM\_TB\_MAX\_LENGTH}}, section-\/>\mbox{\hyperlink{structiwm__fw__desc_a920bcd5979054dbe5f6ab635e8d5d9c4}{len}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02355}02355         \textcolor{keywordtype}{int} ret = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02356}02356 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02357}02357         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_RESET,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02358}02358                     \textcolor{stringliteral}{"{}\%s: [\%d] uCode section being loaded...\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02359}02359                     \_\_func\_\_, section\_num);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02360}02360 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02361}02361         v\_addr = dma-\/>\mbox{\hyperlink{structiwm__dma__info_a8b1776dfbd12b920fe7ec6fba682178d}{vaddr}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02362}02362         p\_addr = dma-\/>\mbox{\hyperlink{structiwm__dma__info_addd7774a4b8cc6802bbcc8b31452794c}{paddr}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02363}02363 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02364}02364         \textcolor{keywordflow}{for} (offset = 0; offset < section-\/>\mbox{\hyperlink{structiwm__fw__desc_a920bcd5979054dbe5f6ab635e8d5d9c4}{len}}; offset += chunk\_sz) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02365}02365                 uint32\_t copy\_size, dst\_addr;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02366}02366                 \textcolor{keywordtype}{int} extended\_addr = FALSE;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02367}02367 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02368}02368                 copy\_size = MIN(chunk\_sz, section-\/>\mbox{\hyperlink{structiwm__fw__desc_a920bcd5979054dbe5f6ab635e8d5d9c4}{len}} -\/ offset);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02369}02369                 dst\_addr = section-\/>\mbox{\hyperlink{structiwm__fw__desc_a46ae9c925ad999cef73b990ddd2e338c}{offset}} + offset;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02370}02370 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02371}02371                 \textcolor{keywordflow}{if} (dst\_addr >= \mbox{\hyperlink{if__iwmreg_8h_a78892a527b8d9d907b061008d4d7260c}{IWM\_FW\_MEM\_EXTENDED\_START}} \&\&}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02372}02372                     dst\_addr <= \mbox{\hyperlink{if__iwmreg_8h_a57f233f14d30249d2cb024f294ebd0c9}{IWM\_FW\_MEM\_EXTENDED\_END}})}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02373}02373                         extended\_addr = TRUE;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02374}02374 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02375}02375                 \textcolor{keywordflow}{if} (extended\_addr)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02376}02376                         \mbox{\hyperlink{if__iwm__pcie__trans_8c_a3bb7f8bf927e32aa62b6e70c4570e8b2}{iwm\_set\_bits\_prph}}(sc, \mbox{\hyperlink{if__iwmreg_8h_ad7f1a8c9e13adf98b308061ef48b5e8a}{IWM\_LMPM\_CHICK}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02377}02377                                           \mbox{\hyperlink{if__iwmreg_8h_a1e23c3c0a0ad9f6d16ae983bf2f3a2c0}{IWM\_LMPM\_CHICK\_EXTENDED\_ADDR\_SPACE}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02378}02378 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02379}02379                 memcpy(v\_addr, (\textcolor{keyword}{const} uint8\_t *)section-\/>\mbox{\hyperlink{structiwm__fw__desc_a54ef268b1050c35b257fe5276cf72aba}{data}} + offset,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02380}02380                     copy\_size);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02381}02381                 bus\_dmamap\_sync(dma-\/>\mbox{\hyperlink{structiwm__dma__info_a58938bb9054e381f73f7897fd7ae6ff1}{tag}}, dma-\/>\mbox{\hyperlink{structiwm__dma__info_a9088f1c56d08041ac6e9f2439dd9b3dd}{map}}, BUS\_DMASYNC\_PREWRITE);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02382}02382                 ret = \mbox{\hyperlink{if__iwm_8c_a1c0447531c69b575b5e81bed2741f6ce}{iwm\_pcie\_load\_firmware\_chunk}}(sc, dst\_addr, p\_addr,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02383}02383                                                    copy\_size);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02384}02384 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02385}02385                 \textcolor{keywordflow}{if} (extended\_addr)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02386}02386                         \mbox{\hyperlink{if__iwm__pcie__trans_8c_abc135e257998070a3efb9ddbcca16832}{iwm\_clear\_bits\_prph}}(sc, \mbox{\hyperlink{if__iwmreg_8h_ad7f1a8c9e13adf98b308061ef48b5e8a}{IWM\_LMPM\_CHICK}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02387}02387                                             \mbox{\hyperlink{if__iwmreg_8h_a1e23c3c0a0ad9f6d16ae983bf2f3a2c0}{IWM\_LMPM\_CHICK\_EXTENDED\_ADDR\_SPACE}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02388}02388 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02389}02389                 \textcolor{keywordflow}{if} (ret) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02390}02390                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02391}02391                             \textcolor{stringliteral}{"{}\%s: Could not load the [\%d] uCode section\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02392}02392                             \_\_func\_\_, section\_num);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02393}02393                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02394}02394                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02395}02395         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02396}02396 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02397}02397         \textcolor{keywordflow}{return} ret;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02398}02398 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02399}02399 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02400}02400 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02401}02401 \textcolor{comment}{ * ucode}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02402}02402 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02403}02403 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02404}\mbox{\hyperlink{if__iwm_8c_a1c0447531c69b575b5e81bed2741f6ce}{02404}} \mbox{\hyperlink{if__iwm_8c_a1c0447531c69b575b5e81bed2741f6ce}{iwm\_pcie\_load\_firmware\_chunk}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, uint32\_t dst\_addr,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02405}02405                              bus\_addr\_t phy\_addr, uint32\_t byte\_cnt)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02406}02406 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02407}02407         sc-\/>\mbox{\hyperlink{structiwm__softc_a16e3a4c45d9dfddbd3bf2bf096f21e25}{sc\_fw\_chunk\_done}} = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02408}02408 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02409}02409         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{if__iwm__pcie__trans_8c_a895bbe6909b405cde9df9bd57ec51fdb}{iwm\_nic\_lock}}(sc))}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02410}02410                 \textcolor{keywordflow}{return} EBUSY;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02411}02411 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02412}02412         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_abc6b4e8d6ac554aa8d55384e4c5e7451}{IWM\_FH\_TCSR\_CHNL\_TX\_CONFIG\_REG}}(\mbox{\hyperlink{if__iwmreg_8h_a6e0f68bdbe7be84275d7a407896e6107}{IWM\_FH\_SRVC\_CHNL}}),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02413}02413             \mbox{\hyperlink{if__iwmreg_8h_ae3a3f4500a15f97120eb1b5b36c8870a}{IWM\_FH\_TCSR\_TX\_CONFIG\_REG\_VAL\_DMA\_CHNL\_PAUSE}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02414}02414 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02415}02415         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a765fa2f3ed0bc9877fa5835088587f14}{IWM\_FH\_SRVC\_CHNL\_SRAM\_ADDR\_REG}}(\mbox{\hyperlink{if__iwmreg_8h_a6e0f68bdbe7be84275d7a407896e6107}{IWM\_FH\_SRVC\_CHNL}}),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02416}02416             dst\_addr);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02417}02417 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02418}02418         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_aea41e9790f07ba0e14559cb0c3580402}{IWM\_FH\_TFDIB\_CTRL0\_REG}}(\mbox{\hyperlink{if__iwmreg_8h_a6e0f68bdbe7be84275d7a407896e6107}{IWM\_FH\_SRVC\_CHNL}}),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02419}02419             phy\_addr \& \mbox{\hyperlink{if__iwmreg_8h_a54ac88b51fd3e3939570c34fd961b3f8}{IWM\_FH\_MEM\_TFDIB\_DRAM\_ADDR\_LSB\_MSK}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02420}02420 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02421}02421         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a12dfe4b4820256d7dbdab789ae0a36f0}{IWM\_FH\_TFDIB\_CTRL1\_REG}}(\mbox{\hyperlink{if__iwmreg_8h_a6e0f68bdbe7be84275d7a407896e6107}{IWM\_FH\_SRVC\_CHNL}}),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02422}02422             (\mbox{\hyperlink{if__iwmreg_8h_a93ed963e6f659fd4167bc670bfffc26b}{iwm\_get\_dma\_hi\_addr}}(phy\_addr)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02423}02423              << \mbox{\hyperlink{if__iwmreg_8h_a3e9817f5f3d3d6ef634d5e5690289c6a}{IWM\_FH\_MEM\_TFDIB\_REG1\_ADDR\_BITSHIFT}}) | byte\_cnt);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02424}02424 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02425}02425         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a78ed5afcfa05c92c4a80394cf0d10d35}{IWM\_FH\_TCSR\_CHNL\_TX\_BUF\_STS\_REG}}(\mbox{\hyperlink{if__iwmreg_8h_a6e0f68bdbe7be84275d7a407896e6107}{IWM\_FH\_SRVC\_CHNL}}),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02426}02426             1 << \mbox{\hyperlink{if__iwmreg_8h_a18842b46454b3ed0e4aee8629d614b8c}{IWM\_FH\_TCSR\_CHNL\_TX\_BUF\_STS\_REG\_POS\_TB\_NUM}} |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02427}02427             1 << \mbox{\hyperlink{if__iwmreg_8h_ac4d7840f3bc5fc9dd65ba493ace7e4a4}{IWM\_FH\_TCSR\_CHNL\_TX\_BUF\_STS\_REG\_POS\_TB\_IDX}} |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02428}02428             \mbox{\hyperlink{if__iwmreg_8h_ac35c92cdb8ba884323d84868cf30af9d}{IWM\_FH\_TCSR\_CHNL\_TX\_BUF\_STS\_REG\_VAL\_TFDB\_VALID}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02429}02429 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02430}02430         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_abc6b4e8d6ac554aa8d55384e4c5e7451}{IWM\_FH\_TCSR\_CHNL\_TX\_CONFIG\_REG}}(\mbox{\hyperlink{if__iwmreg_8h_a6e0f68bdbe7be84275d7a407896e6107}{IWM\_FH\_SRVC\_CHNL}}),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02431}02431             \mbox{\hyperlink{if__iwmreg_8h_a12265c37b30973baa62e7e51e813e41a}{IWM\_FH\_TCSR\_TX\_CONFIG\_REG\_VAL\_DMA\_CHNL\_ENABLE}}    |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02432}02432             \mbox{\hyperlink{if__iwmreg_8h_a73212f138cb1bfbba3353b97e2cfe327}{IWM\_FH\_TCSR\_TX\_CONFIG\_REG\_VAL\_DMA\_CREDIT\_DISABLE}} |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02433}02433             \mbox{\hyperlink{if__iwmreg_8h_a55fb2a3f3edc10d6e5ad34ae41165bc2}{IWM\_FH\_TCSR\_TX\_CONFIG\_REG\_VAL\_CIRQ\_HOST\_ENDTFD}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02434}02434 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02435}02435         \mbox{\hyperlink{if__iwm__pcie__trans_8c_a957b9219e85be1d4043332426844cb2f}{iwm\_nic\_unlock}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02436}02436 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02437}02437         \textcolor{comment}{/* wait up to 5s for this segment to load */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02438}02438         msleep(\&sc-\/>\mbox{\hyperlink{structiwm__softc_a1028ec58bea1aeb56974087433df5092}{sc\_fw}}, \&sc-\/>\mbox{\hyperlink{structiwm__softc_a6a2cf8481612bafdb1f80b84a331488b}{sc\_mtx}}, 0, \textcolor{stringliteral}{"{}iwmfw"{}}, hz * 5);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02439}02439 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02440}02440         \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structiwm__softc_a16e3a4c45d9dfddbd3bf2bf096f21e25}{sc\_fw\_chunk\_done}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02441}02441                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02442}02442                     \textcolor{stringliteral}{"{}fw chunk addr 0x\%x len \%d failed to load\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02443}02443                     dst\_addr, byte\_cnt);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02444}02444                 \textcolor{keywordflow}{return} ETIMEDOUT;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02445}02445         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02446}02446 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02447}02447         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02448}02448 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02449}02449 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02450}02450 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02451}\mbox{\hyperlink{if__iwm_8c_a4b4f4f8e99910dc8da61afa5509e9f0d}{02451}} \mbox{\hyperlink{if__iwm_8c_a4b4f4f8e99910dc8da61afa5509e9f0d}{iwm\_pcie\_load\_cpu\_sections\_8000}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02452}02452         \textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__fw__img}{iwm\_fw\_img}} *image, \textcolor{keywordtype}{int} cpu, \textcolor{keywordtype}{int} *first\_ucode\_section)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02453}02453 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02454}02454         \textcolor{keywordtype}{int} shift\_param;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02455}02455         \textcolor{keywordtype}{int} i, ret = 0, sec\_num = 0x1;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02456}02456         uint32\_t val, last\_read\_idx = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02457}02457 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02458}02458         \textcolor{keywordflow}{if} (cpu == 1) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02459}02459                 shift\_param = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02460}02460                 *first\_ucode\_section = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02461}02461         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02462}02462                 shift\_param = 16;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02463}02463                 (*first\_ucode\_section)++;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02464}02464         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02465}02465 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02466}02466         \textcolor{keywordflow}{for} (i = *first\_ucode\_section; i < \mbox{\hyperlink{if__iwmvar_8h_affa5de77078bd6ab5d6fdadbcfd3405a}{IWM\_UCODE\_SECTION\_MAX}}; i++) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02467}02467                 last\_read\_idx = i;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02468}02468 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02469}02469                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02470}02470 \textcolor{comment}{                 * CPU1\_CPU2\_SEPARATOR\_SECTION delimiter -\/ separate between}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02471}02471 \textcolor{comment}{                 * CPU1 to CPU2.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02472}02472 \textcolor{comment}{                 * PAGING\_SEPARATOR\_SECTION delimiter -\/ separate between}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02473}02473 \textcolor{comment}{                 * CPU2 non paged to CPU2 paging sec.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02474}02474 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02475}02475                 \textcolor{keywordflow}{if} (!image-\/>\mbox{\hyperlink{structiwm__fw__img_a89a37a9492675a952812c64720e551cd}{sec}}[i].\mbox{\hyperlink{structiwm__fw__desc_a54ef268b1050c35b257fe5276cf72aba}{data}} ||}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02476}02476                     image-\/>\mbox{\hyperlink{structiwm__fw__img_a89a37a9492675a952812c64720e551cd}{sec}}[i].\mbox{\hyperlink{structiwm__fw__desc_a46ae9c925ad999cef73b990ddd2e338c}{offset}} == \mbox{\hyperlink{if__iwmreg_8h_a6f8eae313d18daf5f3c9f1643706cb37}{IWM\_CPU1\_CPU2\_SEPARATOR\_SECTION}} ||}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02477}02477                     image-\/>\mbox{\hyperlink{structiwm__fw__img_a89a37a9492675a952812c64720e551cd}{sec}}[i].\mbox{\hyperlink{structiwm__fw__desc_a46ae9c925ad999cef73b990ddd2e338c}{offset}} == \mbox{\hyperlink{if__iwmreg_8h_ae31c8c06cb33ae4e18e957699e717940}{IWM\_PAGING\_SEPARATOR\_SECTION}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02478}02478                         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_RESET,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02479}02479                                     \textcolor{stringliteral}{"{}Break since Data not valid or Empty section, sec = \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02480}02480                                     i);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02481}02481                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02482}02482                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02483}02483                 ret = \mbox{\hyperlink{if__iwm_8c_a48609f858a0fcf23ff12f77e7f938ee8}{iwm\_pcie\_load\_section}}(sc, i, \&image-\/>\mbox{\hyperlink{structiwm__fw__img_a89a37a9492675a952812c64720e551cd}{sec}}[i]);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02484}02484                 \textcolor{keywordflow}{if} (ret)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02485}02485                         \textcolor{keywordflow}{return} ret;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02486}02486 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02487}02487                 \textcolor{comment}{/* Notify the ucode of the loaded section number and status */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02488}02488                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__iwm__pcie__trans_8c_a895bbe6909b405cde9df9bd57ec51fdb}{iwm\_nic\_lock}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02489}02489                         val = \mbox{\hyperlink{if__iwmreg_8h_a13e3589622c101bf4b40c82beccd732a}{IWM\_READ}}(sc, \mbox{\hyperlink{if__iwmreg_8h_afcfa806184b1405667fc10cfd753ece6}{IWM\_FH\_UCODE\_LOAD\_STATUS}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02490}02490                         val = val | (sec\_num << shift\_param);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02491}02491                         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_afcfa806184b1405667fc10cfd753ece6}{IWM\_FH\_UCODE\_LOAD\_STATUS}}, val);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02492}02492                         sec\_num = (sec\_num << 1) | 0x1;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02493}02493                         \mbox{\hyperlink{if__iwm__pcie__trans_8c_a957b9219e85be1d4043332426844cb2f}{iwm\_nic\_unlock}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02494}02494                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02495}02495         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02496}02496 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02497}02497         *first\_ucode\_section = last\_read\_idx;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02498}02498 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02499}02499         \mbox{\hyperlink{if__iwm_8c_afe3d7f1983238caff5e40b889728fbe0}{iwm\_enable\_interrupts}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02500}02500 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02501}02501         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__iwm__pcie__trans_8c_a895bbe6909b405cde9df9bd57ec51fdb}{iwm\_nic\_lock}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02502}02502                 \textcolor{keywordflow}{if} (cpu == 1)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02503}02503                         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_afcfa806184b1405667fc10cfd753ece6}{IWM\_FH\_UCODE\_LOAD\_STATUS}}, 0xFFFF);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02504}02504                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02505}02505                         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_afcfa806184b1405667fc10cfd753ece6}{IWM\_FH\_UCODE\_LOAD\_STATUS}}, 0xFFFFFFFF);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02506}02506                 \mbox{\hyperlink{if__iwm__pcie__trans_8c_a957b9219e85be1d4043332426844cb2f}{iwm\_nic\_unlock}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02507}02507         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02508}02508 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02509}02509         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02510}02510 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02511}02511 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02512}02512 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02513}\mbox{\hyperlink{if__iwm_8c_adee412e2840c87f7ba1c1d1745a959f4}{02513}} \mbox{\hyperlink{if__iwm_8c_adee412e2840c87f7ba1c1d1745a959f4}{iwm\_pcie\_load\_cpu\_sections}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02514}02514         \textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__fw__img}{iwm\_fw\_img}} *image, \textcolor{keywordtype}{int} cpu, \textcolor{keywordtype}{int} *first\_ucode\_section)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02515}02515 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02516}02516         \textcolor{keywordtype}{int} i, ret = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02517}02517         uint32\_t last\_read\_idx = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02518}02518 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02519}02519         \textcolor{keywordflow}{if} (cpu == 1) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02520}02520                 *first\_ucode\_section = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02521}02521         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02522}02522                 (*first\_ucode\_section)++;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02523}02523         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02524}02524 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02525}02525         \textcolor{keywordflow}{for} (i = *first\_ucode\_section; i < \mbox{\hyperlink{if__iwmvar_8h_affa5de77078bd6ab5d6fdadbcfd3405a}{IWM\_UCODE\_SECTION\_MAX}}; i++) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02526}02526                 last\_read\_idx = i;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02527}02527 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02528}02528                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02529}02529 \textcolor{comment}{                 * CPU1\_CPU2\_SEPARATOR\_SECTION delimiter -\/ separate between}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02530}02530 \textcolor{comment}{                 * CPU1 to CPU2.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02531}02531 \textcolor{comment}{                 * PAGING\_SEPARATOR\_SECTION delimiter -\/ separate between}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02532}02532 \textcolor{comment}{                 * CPU2 non paged to CPU2 paging sec.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02533}02533 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02534}02534                 \textcolor{keywordflow}{if} (!image-\/>\mbox{\hyperlink{structiwm__fw__img_a89a37a9492675a952812c64720e551cd}{sec}}[i].\mbox{\hyperlink{structiwm__fw__desc_a54ef268b1050c35b257fe5276cf72aba}{data}} ||}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02535}02535                     image-\/>\mbox{\hyperlink{structiwm__fw__img_a89a37a9492675a952812c64720e551cd}{sec}}[i].\mbox{\hyperlink{structiwm__fw__desc_a46ae9c925ad999cef73b990ddd2e338c}{offset}} == \mbox{\hyperlink{if__iwmreg_8h_a6f8eae313d18daf5f3c9f1643706cb37}{IWM\_CPU1\_CPU2\_SEPARATOR\_SECTION}} ||}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02536}02536                     image-\/>\mbox{\hyperlink{structiwm__fw__img_a89a37a9492675a952812c64720e551cd}{sec}}[i].\mbox{\hyperlink{structiwm__fw__desc_a46ae9c925ad999cef73b990ddd2e338c}{offset}} == \mbox{\hyperlink{if__iwmreg_8h_ae31c8c06cb33ae4e18e957699e717940}{IWM\_PAGING\_SEPARATOR\_SECTION}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02537}02537                         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_RESET,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02538}02538                                     \textcolor{stringliteral}{"{}Break since Data not valid or Empty section, sec = \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02539}02539                                      i);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02540}02540                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02541}02541                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02542}02542 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02543}02543                 ret = \mbox{\hyperlink{if__iwm_8c_a48609f858a0fcf23ff12f77e7f938ee8}{iwm\_pcie\_load\_section}}(sc, i, \&image-\/>\mbox{\hyperlink{structiwm__fw__img_a89a37a9492675a952812c64720e551cd}{sec}}[i]);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02544}02544                 \textcolor{keywordflow}{if} (ret)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02545}02545                         \textcolor{keywordflow}{return} ret;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02546}02546         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02547}02547 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02548}02548         *first\_ucode\_section = last\_read\_idx;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02549}02549 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02550}02550         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02551}02551 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02552}02552 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02553}02553 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02554}02554 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02555}\mbox{\hyperlink{if__iwm_8c_a0cea67712845d3b16f2b8a17133b70a9}{02555}} \mbox{\hyperlink{if__iwm_8c_a0cea67712845d3b16f2b8a17133b70a9}{iwm\_pcie\_load\_given\_ucode}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__fw__img}{iwm\_fw\_img}} *image)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02556}02556 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02557}02557         \textcolor{keywordtype}{int} ret = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02558}02558         \textcolor{keywordtype}{int} first\_ucode\_section;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02559}02559 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02560}02560         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_RESET, \textcolor{stringliteral}{"{}working with \%s CPU\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02561}02561                      image-\/>\mbox{\hyperlink{structiwm__fw__img_ad9d65c60ba7244348386063c051117d0}{is\_dual\_cpus}} ? \textcolor{stringliteral}{"{}Dual"{}} : \textcolor{stringliteral}{"{}Single"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02562}02562 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02563}02563         \textcolor{comment}{/* load to FW the binary non secured sections of CPU1 */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02564}02564         ret = \mbox{\hyperlink{if__iwm_8c_adee412e2840c87f7ba1c1d1745a959f4}{iwm\_pcie\_load\_cpu\_sections}}(sc, image, 1, \&first\_ucode\_section);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02565}02565         \textcolor{keywordflow}{if} (ret)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02566}02566                 \textcolor{keywordflow}{return} ret;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02567}02567 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02568}02568         \textcolor{keywordflow}{if} (image-\/>\mbox{\hyperlink{structiwm__fw__img_ad9d65c60ba7244348386063c051117d0}{is\_dual\_cpus}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02569}02569                 \textcolor{comment}{/* set CPU2 header address */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02570}02570                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__iwm__pcie__trans_8c_a895bbe6909b405cde9df9bd57ec51fdb}{iwm\_nic\_lock}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02571}02571                         \mbox{\hyperlink{if__iwm__pcie__trans_8c_ae575f08e5baf2f0f63c629f690b03704}{iwm\_write\_prph}}(sc,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02572}02572                                        \mbox{\hyperlink{if__iwmreg_8h_a2e3c87e3b41c626c9924bd965b0b56e9}{IWM\_LMPM\_SECURE\_UCODE\_LOAD\_CPU2\_HDR\_ADDR}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02573}02573                                        \mbox{\hyperlink{if__iwmreg_8h_a355b4c3af958fd285c110e779731afcf}{IWM\_LMPM\_SECURE\_CPU2\_HDR\_MEM\_SPACE}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02574}02574                         \mbox{\hyperlink{if__iwm__pcie__trans_8c_a957b9219e85be1d4043332426844cb2f}{iwm\_nic\_unlock}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02575}02575                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02576}02576 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02577}02577                 \textcolor{comment}{/* load to FW the binary sections of CPU2 */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02578}02578                 ret = \mbox{\hyperlink{if__iwm_8c_adee412e2840c87f7ba1c1d1745a959f4}{iwm\_pcie\_load\_cpu\_sections}}(sc, image, 2,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02579}02579                                                  \&first\_ucode\_section);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02580}02580                 \textcolor{keywordflow}{if} (ret)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02581}02581                         \textcolor{keywordflow}{return} ret;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02582}02582         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02583}02583 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02584}02584         \mbox{\hyperlink{if__iwm_8c_afe3d7f1983238caff5e40b889728fbe0}{iwm\_enable\_interrupts}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02585}02585 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02586}02586         \textcolor{comment}{/* release CPU reset */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02587}02587         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a880a3010d91cb40bf361f33412f9a1ff}{IWM\_CSR\_RESET}}, 0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02588}02588 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02589}02589         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02590}02590 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02591}02591 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02592}02592 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02593}\mbox{\hyperlink{if__iwm_8c_a87b5db7470855f03edc90f9c34873b7f}{02593}} \mbox{\hyperlink{if__iwm_8c_a87b5db7470855f03edc90f9c34873b7f}{iwm\_pcie\_load\_given\_ucode\_8000}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02594}02594         \textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__fw__img}{iwm\_fw\_img}} *image)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02595}02595 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02596}02596         \textcolor{keywordtype}{int} ret = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02597}02597         \textcolor{keywordtype}{int} first\_ucode\_section;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02598}02598 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02599}02599         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_RESET, \textcolor{stringliteral}{"{}working with \%s CPU\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02600}02600                     image-\/>\mbox{\hyperlink{structiwm__fw__img_ad9d65c60ba7244348386063c051117d0}{is\_dual\_cpus}} ? \textcolor{stringliteral}{"{}Dual"{}} : \textcolor{stringliteral}{"{}Single"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02601}02601 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02602}02602         \textcolor{comment}{/* configure the ucode to be ready to get the secured image */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02603}02603         \textcolor{comment}{/* release CPU reset */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02604}02604         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__iwm__pcie__trans_8c_a895bbe6909b405cde9df9bd57ec51fdb}{iwm\_nic\_lock}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02605}02605                 \mbox{\hyperlink{if__iwm__pcie__trans_8c_ae575f08e5baf2f0f63c629f690b03704}{iwm\_write\_prph}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a78cdaed884ee875e5dd403d818a1ffc0}{IWM\_RELEASE\_CPU\_RESET}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02606}02606                     \mbox{\hyperlink{if__iwmreg_8h_aac2c81f08d1977bf0ab1ddad4d6dfa95}{IWM\_RELEASE\_CPU\_RESET\_BIT}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02607}02607                 \mbox{\hyperlink{if__iwm__pcie__trans_8c_a957b9219e85be1d4043332426844cb2f}{iwm\_nic\_unlock}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02608}02608         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02609}02609 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02610}02610         \textcolor{comment}{/* load to FW the binary Secured sections of CPU1 */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02611}02611         ret = \mbox{\hyperlink{if__iwm_8c_a4b4f4f8e99910dc8da61afa5509e9f0d}{iwm\_pcie\_load\_cpu\_sections\_8000}}(sc, image, 1,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02612}02612             \&first\_ucode\_section);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02613}02613         \textcolor{keywordflow}{if} (ret)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02614}02614                 \textcolor{keywordflow}{return} ret;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02615}02615 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02616}02616         \textcolor{comment}{/* load to FW the binary sections of CPU2 */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02617}02617         \textcolor{keywordflow}{return} \mbox{\hyperlink{if__iwm_8c_a4b4f4f8e99910dc8da61afa5509e9f0d}{iwm\_pcie\_load\_cpu\_sections\_8000}}(sc, image, 2,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02618}02618             \&first\_ucode\_section);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02619}02619 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02620}02620 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02621}02621 \textcolor{comment}{/* XXX Get rid of this definition */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02622}02622 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02623}\mbox{\hyperlink{if__iwm_8c_add57731b99a31617d96bd8ca71a36168}{02623}} \mbox{\hyperlink{if__iwm_8c_add57731b99a31617d96bd8ca71a36168}{iwm\_enable\_fw\_load\_int}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02624}02624 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02625}02625         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_INTR, \textcolor{stringliteral}{"{}Enabling FW load interrupt\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02626}02626         sc-\/>\mbox{\hyperlink{structiwm__softc_af86bfc45da4bee42deba332d1c4bc4c5}{sc\_intmask}} = \mbox{\hyperlink{if__iwmreg_8h_a9d0791a12af29137faed76f475e4dda2}{IWM\_CSR\_INT\_BIT\_FH\_TX}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02627}02627         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a5e8968161116664e181090be66b176b6}{IWM\_CSR\_INT\_MASK}}, sc-\/>\mbox{\hyperlink{structiwm__softc_af86bfc45da4bee42deba332d1c4bc4c5}{sc\_intmask}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02628}02628 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02629}02629 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02630}02630 \textcolor{comment}{/* XXX Add proper rfkill support code */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02631}02631 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02632}\mbox{\hyperlink{if__iwm_8c_a2855baaac2ebd905359a2475128a1103}{02632}} \mbox{\hyperlink{if__iwm_8c_a2855baaac2ebd905359a2475128a1103}{iwm\_start\_fw}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__fw__img}{iwm\_fw\_img}} *fw)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02633}02633 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02634}02634         \textcolor{keywordtype}{int} ret;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02635}02635 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02636}02636         \textcolor{comment}{/* This may fail if AMT took ownership of the device */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02637}02637         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__iwm__pcie__trans_8c_a8bc352da3a8f4e59a937ffedc4c9e447}{iwm\_prepare\_card\_hw}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02638}02638                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02639}02639                     \textcolor{stringliteral}{"{}\%s: Exit HW not ready\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02640}02640                 ret = EIO;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02641}02641                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02642}02642         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02643}02643 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02644}02644         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a12fe1fe92a4c101c7911cff12a0c08c6}{IWM\_CSR\_INT}}, 0xFFFFFFFF);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02645}02645 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02646}02646         \mbox{\hyperlink{if__iwm_8c_a3e88bcc98e703758e6b69e766618d598}{iwm\_disable\_interrupts}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02647}02647 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02648}02648         \textcolor{comment}{/* make sure rfkill handshake bits are cleared */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02649}02649         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a3961ff7cd1b9ec47d21f4b34f9e712a8}{IWM\_CSR\_UCODE\_DRV\_GP1\_CLR}}, \mbox{\hyperlink{if__iwmreg_8h_a181d9989b259f4391df15208cec90626}{IWM\_CSR\_UCODE\_SW\_BIT\_RFKILL}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02650}02650         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a3961ff7cd1b9ec47d21f4b34f9e712a8}{IWM\_CSR\_UCODE\_DRV\_GP1\_CLR}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02651}02651             \mbox{\hyperlink{if__iwmreg_8h_a4849e19c4b7569b10437421fb1050949}{IWM\_CSR\_UCODE\_DRV\_GP1\_BIT\_CMD\_BLOCKED}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02652}02652 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02653}02653         \textcolor{comment}{/* clear (again), then enable host interrupts */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02654}02654         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a12fe1fe92a4c101c7911cff12a0c08c6}{IWM\_CSR\_INT}}, 0xFFFFFFFF);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02655}02655 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02656}02656         ret = \mbox{\hyperlink{if__iwm_8c_abcd09a4732b913d48203edae16ce7ff0}{iwm\_nic\_init}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02657}02657         \textcolor{keywordflow}{if} (ret) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02658}02658                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%s: Unable to init nic\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02659}02659                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02660}02660         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02661}02661 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02662}02662         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02663}02663 \textcolor{comment}{         * Now, we load the firmware and don't want to be interrupted, even}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02664}02664 \textcolor{comment}{         * by the RF-\/Kill interrupt (hence mask all the interrupt besides the}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02665}02665 \textcolor{comment}{         * FH\_TX interrupt which is needed to load the firmware). If the}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02666}02666 \textcolor{comment}{         * RF-\/Kill switch is toggled, we will find out after having loaded}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02667}02667 \textcolor{comment}{         * the firmware and return the proper value to the caller.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02668}02668 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02669}02669         \mbox{\hyperlink{if__iwm_8c_add57731b99a31617d96bd8ca71a36168}{iwm\_enable\_fw\_load\_int}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02670}02670 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02671}02671         \textcolor{comment}{/* really make sure rfkill handshake bits are cleared */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02672}02672         \textcolor{comment}{/* maybe we should write a few times more?  just to make sure */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02673}02673         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a3961ff7cd1b9ec47d21f4b34f9e712a8}{IWM\_CSR\_UCODE\_DRV\_GP1\_CLR}}, \mbox{\hyperlink{if__iwmreg_8h_a181d9989b259f4391df15208cec90626}{IWM\_CSR\_UCODE\_SW\_BIT\_RFKILL}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02674}02674         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a3961ff7cd1b9ec47d21f4b34f9e712a8}{IWM\_CSR\_UCODE\_DRV\_GP1\_CLR}}, \mbox{\hyperlink{if__iwmreg_8h_a181d9989b259f4391df15208cec90626}{IWM\_CSR\_UCODE\_SW\_BIT\_RFKILL}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02675}02675 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02676}02676         \textcolor{comment}{/* Load the given image to the HW */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02677}02677         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_a9b399704eeb3c9299fe79ff7ebf0b3c3}{device\_family}} >= \mbox{\hyperlink{if__iwm__config_8h_a134dc690a22b13281e655ce3d4944141aece09942e3ab8587f2bbd9f34f47af41}{IWM\_DEVICE\_FAMILY\_8000}})}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02678}02678                 ret = \mbox{\hyperlink{if__iwm_8c_a87b5db7470855f03edc90f9c34873b7f}{iwm\_pcie\_load\_given\_ucode\_8000}}(sc, fw);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02679}02679         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02680}02680                 ret = \mbox{\hyperlink{if__iwm_8c_a0cea67712845d3b16f2b8a17133b70a9}{iwm\_pcie\_load\_given\_ucode}}(sc, fw);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02681}02681 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02682}02682         \textcolor{comment}{/* XXX re-\/check RF-\/Kill state */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02683}02683 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02684}02684 out:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02685}02685         \textcolor{keywordflow}{return} ret;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02686}02686 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02687}02687 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02688}02688 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02689}\mbox{\hyperlink{if__iwm_8c_adcaf15bb311c4eb0dc4ca98374b371b3}{02689}} \mbox{\hyperlink{if__iwm_8c_adcaf15bb311c4eb0dc4ca98374b371b3}{iwm\_send\_tx\_ant\_cfg}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, uint8\_t valid\_tx\_ant)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02690}02690 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02691}02691         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__tx__ant__cfg__cmd}{iwm\_tx\_ant\_cfg\_cmd}} tx\_ant\_cmd = \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02692}02692                 .\mbox{\hyperlink{structiwm__tx__ant__cfg__cmd_abd270081c728f5dbd0df57f2363c52a6}{valid}} = htole32(valid\_tx\_ant),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02693}02693         \};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02694}02694 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02695}02695         \textcolor{keywordflow}{return} \mbox{\hyperlink{if__iwm__util_8c_ad7c0f40dbc21d1ec94f0c5f6194d1140}{iwm\_send\_cmd\_pdu}}(sc, \mbox{\hyperlink{if__iwmreg_8h_acf9211f167faa5b400a0ee034b7da09e}{IWM\_TX\_ANT\_CONFIGURATION\_CMD}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02696}02696             \mbox{\hyperlink{if__iwmvar_8h_a683e81a3f25e57c34df07e37e049bf07a1ed0b3a851376d8e5faa5be34d886df6}{IWM\_CMD\_SYNC}}, \textcolor{keyword}{sizeof}(tx\_ant\_cmd), \&tx\_ant\_cmd);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02697}02697 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02698}02698 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02699}02699 \textcolor{comment}{/* iwlwifi: mvm/fw.c */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02700}02700 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02701}\mbox{\hyperlink{if__iwm_8c_a8006bb57d2eac8cf8b28d750cf3b82b7}{02701}} \mbox{\hyperlink{if__iwm_8c_a8006bb57d2eac8cf8b28d750cf3b82b7}{iwm\_send\_phy\_cfg\_cmd}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02702}02702 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02703}02703         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__phy__cfg__cmd}{iwm\_phy\_cfg\_cmd}} phy\_cfg\_cmd;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02704}02704         \textcolor{keyword}{enum} \mbox{\hyperlink{if__iwmvar_8h_a680b88b47a331f93dcdf230bf57590ac}{iwm\_ucode\_type}} ucode\_type = sc-\/>\mbox{\hyperlink{structiwm__softc_a7be305fdfe29af283dc417456ad9285c}{cur\_ucode}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02705}02705 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02706}02706         \textcolor{comment}{/* Set parameters */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02707}02707         phy\_cfg\_cmd.\mbox{\hyperlink{structiwm__phy__cfg__cmd_a150461840785d704de0cdcb6a62fdbb4}{phy\_cfg}} = htole32(\mbox{\hyperlink{if__iwm__util_8h_acaffd89b744689e5cf8d6e2a62d4030c}{iwm\_get\_phy\_config}}(sc));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02708}02708         phy\_cfg\_cmd.\mbox{\hyperlink{structiwm__phy__cfg__cmd_adcb74529b300ec62dd02cc83ec135d75}{calib\_control}}.\mbox{\hyperlink{structiwm__calib__ctrl_a0ff3223fa25218f6f44edfcb377cb292}{event\_trigger}} =}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02709}02709             sc-\/>\mbox{\hyperlink{structiwm__softc_a06b8ab35a975ccdb9bf5e6ef70a7dd5d}{sc\_default\_calib}}[ucode\_type].\mbox{\hyperlink{structiwm__tlv__calib__ctrl_a4f58df9dd5ff8a41b6b0ebd37e07a764}{event\_trigger}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02710}02710         phy\_cfg\_cmd.\mbox{\hyperlink{structiwm__phy__cfg__cmd_adcb74529b300ec62dd02cc83ec135d75}{calib\_control}}.\mbox{\hyperlink{structiwm__calib__ctrl_a02a3c26207f6ae0b09db34fef4f72b81}{flow\_trigger}} =}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02711}02711             sc-\/>\mbox{\hyperlink{structiwm__softc_a06b8ab35a975ccdb9bf5e6ef70a7dd5d}{sc\_default\_calib}}[ucode\_type].\mbox{\hyperlink{structiwm__tlv__calib__ctrl_a59445fcb70b590061b7cf43feff56fc8}{flow\_trigger}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02712}02712 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02713}02713         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_CMD | IWM\_DEBUG\_RESET,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02714}02714             \textcolor{stringliteral}{"{}Sending Phy CFG command: 0x\%x\(\backslash\)n"{}}, phy\_cfg\_cmd.\mbox{\hyperlink{structiwm__phy__cfg__cmd_a150461840785d704de0cdcb6a62fdbb4}{phy\_cfg}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02715}02715         \textcolor{keywordflow}{return} \mbox{\hyperlink{if__iwm__util_8c_ad7c0f40dbc21d1ec94f0c5f6194d1140}{iwm\_send\_cmd\_pdu}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a00d6ff6b43d7a750de61b83241f3c357}{IWM\_PHY\_CONFIGURATION\_CMD}}, \mbox{\hyperlink{if__iwmvar_8h_a683e81a3f25e57c34df07e37e049bf07a1ed0b3a851376d8e5faa5be34d886df6}{IWM\_CMD\_SYNC}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02716}02716             \textcolor{keyword}{sizeof}(phy\_cfg\_cmd), \&phy\_cfg\_cmd);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02717}02717 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02718}02718 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02719}02719 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02720}\mbox{\hyperlink{if__iwm_8c_a8953020c88e1d21ec2652bf23d4e92eb}{02720}} \mbox{\hyperlink{if__iwm_8c_a8953020c88e1d21ec2652bf23d4e92eb}{iwm\_alive\_fn}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__rx__packet}{iwm\_rx\_packet}} *pkt, \textcolor{keywordtype}{void} *data)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02721}02721 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02722}02722         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__alive__data}{iwm\_alive\_data}} *alive\_data = data;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02723}02723         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__alive__resp__v3}{iwm\_alive\_resp\_v3}} *palive3;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02724}02724         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__alive__resp}{iwm\_alive\_resp}} *palive;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02725}02725         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__umac__alive}{iwm\_umac\_alive}} *umac;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02726}02726         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__lmac__alive}{iwm\_lmac\_alive}} *lmac1;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02727}02727         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__lmac__alive}{iwm\_lmac\_alive}} *lmac2 = NULL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02728}02728         uint16\_t status;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02729}02729 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02730}02730         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__iwmreg_8h_abe52e01a0c093b71e13554350e07d161}{iwm\_rx\_packet\_payload\_len}}(pkt) == \textcolor{keyword}{sizeof}(*palive)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02731}02731                 palive = (\textcolor{keywordtype}{void} *)pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a77036fd43499c32e7ec28e2d47ed1c33}{data}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02732}02732                 umac = \&palive-\/>\mbox{\hyperlink{structiwm__alive__resp_afab30ee86a20d27ee0f239cbc495c337}{umac\_data}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02733}02733                 lmac1 = \&palive-\/>\mbox{\hyperlink{structiwm__alive__resp_a11a25e2a1715161231bd7759fd2a5a0c}{lmac\_data}}[0];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02734}02734                 lmac2 = \&palive-\/>\mbox{\hyperlink{structiwm__alive__resp_a11a25e2a1715161231bd7759fd2a5a0c}{lmac\_data}}[1];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02735}02735                 status = le16toh(palive-\/>\mbox{\hyperlink{structiwm__alive__resp_afe26f9cece378aa9ae141aac9cd582c6}{status}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02736}02736         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02737}02737                 palive3 = (\textcolor{keywordtype}{void} *)pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a77036fd43499c32e7ec28e2d47ed1c33}{data}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02738}02738                 umac = \&palive3-\/>\mbox{\hyperlink{structiwm__alive__resp__v3_aea3ca6a3fa91e438321e366de3c4967f}{umac\_data}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02739}02739                 lmac1 = \&palive3-\/>\mbox{\hyperlink{structiwm__alive__resp__v3_ae7b0da2e2e4cbc1e5f58def9fb55ac00}{lmac\_data}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02740}02740                 status = le16toh(palive3-\/>\mbox{\hyperlink{structiwm__alive__resp__v3_a415abdc9d47555420e54ace3816dce80}{status}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02741}02741         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02742}02742 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02743}02743         sc-\/>\mbox{\hyperlink{structiwm__softc_a1c830f7530b7cb87156fbcb457ad1fb9}{error\_event\_table}}[0] = le32toh(lmac1-\/>\mbox{\hyperlink{structiwm__lmac__alive_a398aaa84ad41cc158e41baacc89a4967}{error\_event\_table\_ptr}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02744}02744         \textcolor{keywordflow}{if} (lmac2)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02745}02745                 sc-\/>\mbox{\hyperlink{structiwm__softc_a1c830f7530b7cb87156fbcb457ad1fb9}{error\_event\_table}}[1] =}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02746}02746                         le32toh(lmac2-\/>\mbox{\hyperlink{structiwm__lmac__alive_a398aaa84ad41cc158e41baacc89a4967}{error\_event\_table\_ptr}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02747}02747         sc-\/>\mbox{\hyperlink{structiwm__softc_a447fa80c46d70ede72484eabb76e2fb7}{log\_event\_table}} = le32toh(lmac1-\/>\mbox{\hyperlink{structiwm__lmac__alive_abd6562b0997d9349fad7a0c20e6fdd8e}{log\_event\_table\_ptr}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02748}02748         sc-\/>\mbox{\hyperlink{structiwm__softc_a01a3d496f80f21b1035d935f5ba19434}{umac\_error\_event\_table}} = le32toh(umac-\/>\mbox{\hyperlink{structiwm__umac__alive_a380d22969e2765ece353168debdf1a7d}{error\_info\_addr}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02749}02749         alive\_data-\/>\mbox{\hyperlink{structiwm__alive__data_a3061db68ed81a199a4461108d2f997ef}{scd\_base\_addr}} = le32toh(lmac1-\/>\mbox{\hyperlink{structiwm__lmac__alive_ad3551cfffd95996bae43d5c82546b7cf}{scd\_base\_ptr}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02750}02750         alive\_data-\/>\mbox{\hyperlink{structiwm__alive__data_a895f9181134420b0d078e42e87a9e8a5}{valid}} = status == \mbox{\hyperlink{if__iwmreg_8h_ae4bd95e68ed3dfd52e9ec6d890767b01}{IWM\_ALIVE\_STATUS\_OK}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02751}02751         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_a01a3d496f80f21b1035d935f5ba19434}{umac\_error\_event\_table}})}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02752}02752                 sc-\/>\mbox{\hyperlink{structiwm__softc_a35e0d9d7234bb9b999412e85c5c72240}{support\_umac\_log}} = TRUE;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02753}02753 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02754}02754         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_FW,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02755}02755                     \textcolor{stringliteral}{"{}Alive ucode status 0x\%04x revision 0x\%01X 0x\%01X\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02756}02756                     status, lmac1-\/>\mbox{\hyperlink{structiwm__lmac__alive_aee148b1b5e57754639aced76106fadbd}{ver\_type}}, lmac1-\/>\mbox{\hyperlink{structiwm__lmac__alive_a999feea1f2edda85ba19f94bf69392a8}{ver\_subtype}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02757}02757 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02758}02758         \textcolor{keywordflow}{if} (lmac2)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02759}02759                 \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_FW, \textcolor{stringliteral}{"{}Alive ucode CDB\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02760}02760 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02761}02761         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_FW,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02762}02762                     \textcolor{stringliteral}{"{}UMAC version: Major -\/ 0x\%x, Minor -\/ 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02763}02763                     le32toh(umac-\/>\mbox{\hyperlink{structiwm__umac__alive_ad48c1fcb36a92873bfa957c9aa4a2e4f}{umac\_major}}),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02764}02764                     le32toh(umac-\/>\mbox{\hyperlink{structiwm__umac__alive_a835058611e4f46844da115738d09b62f}{umac\_minor}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02765}02765 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02766}02766         \textcolor{keywordflow}{return} TRUE;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02767}02767 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02768}02768 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02769}02769 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02770}\mbox{\hyperlink{if__iwm_8c_ae81f12db35f21fc9b795e8bacc87e301}{02770}} \mbox{\hyperlink{if__iwm_8c_ae81f12db35f21fc9b795e8bacc87e301}{iwm\_wait\_phy\_db\_entry}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02771}02771         \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__rx__packet}{iwm\_rx\_packet}} *pkt, \textcolor{keywordtype}{void} *data)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02772}02772 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02773}02773         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__phy__db}{iwm\_phy\_db}} *phy\_db = data;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02774}02774 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02775}02775         \textcolor{keywordflow}{if} (pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a8a11c0fa2a44d68ee8343d1dfd141883}{hdr}}.\mbox{\hyperlink{structiwm__cmd__header_ab5a2f0282f933c196760d58dad786384}{code}} != \mbox{\hyperlink{if__iwmreg_8h_a844f7845e47975cccf3797aba1cdb7a9}{IWM\_CALIB\_RES\_NOTIF\_PHY\_DB}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02776}02776                 \textcolor{keywordflow}{if}(pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a8a11c0fa2a44d68ee8343d1dfd141883}{hdr}}.\mbox{\hyperlink{structiwm__cmd__header_ab5a2f0282f933c196760d58dad786384}{code}} != \mbox{\hyperlink{if__iwmreg_8h_abbacf0676fe656ed8b19087a3f9f755a}{IWM\_INIT\_COMPLETE\_NOTIF}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02777}02777                         device\_printf(\mbox{\hyperlink{structiwm__phy__db_a9106554744a9de0e3c187124df52f813}{sc}}-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%s: Unexpected cmd: \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02778}02778                             \_\_func\_\_, pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a8a11c0fa2a44d68ee8343d1dfd141883}{hdr}}.\mbox{\hyperlink{structiwm__cmd__header_ab5a2f0282f933c196760d58dad786384}{code}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02779}02779                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02780}02780                 \textcolor{keywordflow}{return} TRUE;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02781}02781         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02782}02782 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02783}02783         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__iwm__phy__db_8c_ae2c9b94db1de9945e189ebc02352f0e2}{iwm\_phy\_db\_set\_section}}(phy\_db, pkt)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02784}02784                 device\_printf(\mbox{\hyperlink{structiwm__phy__db_a9106554744a9de0e3c187124df52f813}{sc}}-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02785}02785                     \textcolor{stringliteral}{"{}\%s: iwm\_phy\_db\_set\_section failed\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02786}02786         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02787}02787 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02788}02788         \textcolor{keywordflow}{return} FALSE;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02789}02789 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02790}02790 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02791}02791 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02792}\mbox{\hyperlink{if__iwm_8c_af53df91d7015b4925b5c2938068b6856}{02792}} \mbox{\hyperlink{if__iwm_8c_af53df91d7015b4925b5c2938068b6856}{iwm\_load\_ucode\_wait\_alive}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *\mbox{\hyperlink{structiwm__phy__db_a9106554744a9de0e3c187124df52f813}{sc}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02793}02793         \textcolor{keyword}{enum} \mbox{\hyperlink{if__iwmvar_8h_a680b88b47a331f93dcdf230bf57590ac}{iwm\_ucode\_type}} ucode\_type)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02794}02794 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02795}02795         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__notification__wait}{iwm\_notification\_wait}} alive\_wait;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02796}02796         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__alive__data}{iwm\_alive\_data}} alive\_data;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02797}02797         \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__fw__img}{iwm\_fw\_img}} *fw;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02798}02798         \textcolor{keyword}{enum} \mbox{\hyperlink{if__iwmvar_8h_a680b88b47a331f93dcdf230bf57590ac}{iwm\_ucode\_type}} old\_type = sc-\/>\mbox{\hyperlink{structiwm__softc_a7be305fdfe29af283dc417456ad9285c}{cur\_ucode}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02799}02799         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02800}02800         \textcolor{keyword}{static} \textcolor{keyword}{const} uint16\_t alive\_cmd[] = \{ \mbox{\hyperlink{if__iwmreg_8h_ac3e5e9dc7ded66127b16922582ab9a28}{IWM\_ALIVE}} \};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02801}02801 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02802}02802         fw = \&sc-\/>\mbox{\hyperlink{structiwm__softc_a1028ec58bea1aeb56974087433df5092}{sc\_fw}}.\mbox{\hyperlink{structiwm__fw__info_a8421a11dce66fb699b5390ba54cf29bd}{img}}[ucode\_type];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02803}02803         sc-\/>\mbox{\hyperlink{structiwm__softc_a7be305fdfe29af283dc417456ad9285c}{cur\_ucode}} = ucode\_type;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02804}02804         sc-\/>\mbox{\hyperlink{structiwm__softc_a51c317825439608834fd5632860f0402}{ucode\_loaded}} = FALSE;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02805}02805 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02806}02806         memset(\&alive\_data, 0, \textcolor{keyword}{sizeof}(alive\_data));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02807}02807         \mbox{\hyperlink{if__iwm__notif__wait_8c_a7b11e5b6ee6b5ca2ef1633dd82872e70}{iwm\_init\_notification\_wait}}(sc-\/>\mbox{\hyperlink{structiwm__softc_ac9e8a0cb4380c845865cdd6eae7444aa}{sc\_notif\_wait}}, \&alive\_wait,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02808}02808                                    alive\_cmd, nitems(alive\_cmd),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02809}02809                                    \mbox{\hyperlink{if__iwm_8c_a8953020c88e1d21ec2652bf23d4e92eb}{iwm\_alive\_fn}}, \&alive\_data);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02810}02810 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02811}02811         error = \mbox{\hyperlink{if__iwm_8c_a2855baaac2ebd905359a2475128a1103}{iwm\_start\_fw}}(sc, fw);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02812}02812         \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02813}02813                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}iwm\_start\_fw: failed \%d\(\backslash\)n"{}}, error);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02814}02814                 sc-\/>\mbox{\hyperlink{structiwm__softc_a7be305fdfe29af283dc417456ad9285c}{cur\_ucode}} = old\_type;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02815}02815                 \mbox{\hyperlink{if__iwm__notif__wait_8c_a646e47cbe3b3f4dc3c7f06e1cf7cf0ca}{iwm\_remove\_notification}}(sc-\/>\mbox{\hyperlink{structiwm__softc_ac9e8a0cb4380c845865cdd6eae7444aa}{sc\_notif\_wait}}, \&alive\_wait);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02816}02816                 \textcolor{keywordflow}{return} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02817}02817         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02818}02818 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02819}02819         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02820}02820 \textcolor{comment}{         * Some things may run in the background now, but we}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02821}02821 \textcolor{comment}{         * just wait for the ALIVE notification here.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02822}02822 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02823}02823         \mbox{\hyperlink{if__iwmvar_8h_a2bc8b1196a564b1b70c11f96391760fa}{IWM\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02824}02824         error = \mbox{\hyperlink{if__iwm__notif__wait_8c_ac7be9157011f921d7d646174addb34ae}{iwm\_wait\_notification}}(sc-\/>\mbox{\hyperlink{structiwm__softc_ac9e8a0cb4380c845865cdd6eae7444aa}{sc\_notif\_wait}}, \&alive\_wait,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02825}02825                                       \mbox{\hyperlink{if__iwm_8c_a0615f2121bb7f78983739d9ca9f3eb82}{IWM\_UCODE\_ALIVE\_TIMEOUT}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02826}02826         \mbox{\hyperlink{if__iwmvar_8h_ac9f22c2982def9e764105396531c69be}{IWM\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02827}02827         \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02828}02828                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_a9b399704eeb3c9299fe79ff7ebf0b3c3}{device\_family}} >= \mbox{\hyperlink{if__iwm__config_8h_a134dc690a22b13281e655ce3d4944141aece09942e3ab8587f2bbd9f34f47af41}{IWM\_DEVICE\_FAMILY\_8000}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02829}02829                         uint32\_t a = 0x5a5a5a5a, b = 0x5a5a5a5a;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02830}02830                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__iwm__pcie__trans_8c_a895bbe6909b405cde9df9bd57ec51fdb}{iwm\_nic\_lock}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02831}02831                                 a = \mbox{\hyperlink{if__iwm__pcie__trans_8c_a635add69da3722c9c5c8c8e88a910214}{iwm\_read\_prph}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a8def232320dca070097b1df831cac0da}{IWM\_SB\_CPU\_1\_STATUS}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02832}02832                                 b = \mbox{\hyperlink{if__iwm__pcie__trans_8c_a635add69da3722c9c5c8c8e88a910214}{iwm\_read\_prph}}(sc, \mbox{\hyperlink{if__iwmreg_8h_aaafa604118796cda867670312fa09d9b}{IWM\_SB\_CPU\_2\_STATUS}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02833}02833                                 \mbox{\hyperlink{if__iwm__pcie__trans_8c_a957b9219e85be1d4043332426844cb2f}{iwm\_nic\_unlock}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02834}02834                         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02835}02835                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02836}02836                             \textcolor{stringliteral}{"{}SecBoot CPU1 Status: 0x\%x, CPU2 Status: 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02837}02837                             a, b);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02838}02838                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02839}02839                 sc-\/>\mbox{\hyperlink{structiwm__softc_a7be305fdfe29af283dc417456ad9285c}{cur\_ucode}} = old\_type;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02840}02840                 \textcolor{keywordflow}{return} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02841}02841         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02842}02842 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02843}02843         \textcolor{keywordflow}{if} (!alive\_data.\mbox{\hyperlink{structiwm__alive__data_a895f9181134420b0d078e42e87a9e8a5}{valid}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02844}02844                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%s: Loaded ucode is not valid\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02845}02845                     \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02846}02846                 sc-\/>\mbox{\hyperlink{structiwm__softc_a7be305fdfe29af283dc417456ad9285c}{cur\_ucode}} = old\_type;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02847}02847                 \textcolor{keywordflow}{return} EIO;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02848}02848         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02849}02849 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02850}02850         \mbox{\hyperlink{if__iwm_8c_a2e8fc4a0db01fe65cf3fa630e5be6414}{iwm\_trans\_pcie\_fw\_alive}}(sc, alive\_data.\mbox{\hyperlink{structiwm__alive__data_a3061db68ed81a199a4461108d2f997ef}{scd\_base\_addr}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02851}02851 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02852}02852         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02853}02853 \textcolor{comment}{         * configure and operate fw paging mechanism.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02854}02854 \textcolor{comment}{         * driver configures the paging flow only once, CPU2 paging image}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02855}02855 \textcolor{comment}{         * included in the IWM\_UCODE\_INIT image.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02856}02856 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02857}02857         \textcolor{keywordflow}{if} (fw-\/>\mbox{\hyperlink{structiwm__fw__img_aa7df3b46dd1292701b10cbb2e4154ce9}{paging\_mem\_size}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02858}02858                 error = \mbox{\hyperlink{if__iwm__fw_8c_a96572d11df0383814b71e144dff99f96}{iwm\_save\_fw\_paging}}(sc, fw);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02859}02859                 \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02860}02860                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02861}02861                             \textcolor{stringliteral}{"{}\%s: failed to save the FW paging image\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02862}02862                             \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02863}02863                         \textcolor{keywordflow}{return} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02864}02864                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02865}02865 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02866}02866                 error = \mbox{\hyperlink{if__iwm__fw_8c_a095d36b9bd2b8fbb2e437f8ad24042ab}{iwm\_send\_paging\_cmd}}(sc, fw);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02867}02867                 \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02868}02868                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02869}02869                             \textcolor{stringliteral}{"{}\%s: failed to send the paging cmd\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02870}02870                         \mbox{\hyperlink{if__iwm__fw_8c_ad76d99c89569a6db57c9819cc15299e5}{iwm\_free\_fw\_paging}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02871}02871                         \textcolor{keywordflow}{return} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02872}02872                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02873}02873         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02874}02874 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02875}02875         \textcolor{keywordflow}{if} (!error)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02876}02876                 sc-\/>\mbox{\hyperlink{structiwm__softc_a51c317825439608834fd5632860f0402}{ucode\_loaded}} = TRUE;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02877}02877         \textcolor{keywordflow}{return} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02878}02878 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02879}02879 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02880}02880 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02881}02881 \textcolor{comment}{ * mvm misc bits}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02882}02882 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02883}02883 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02884}02884 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02885}02885 \textcolor{comment}{ * follows iwlwifi/fw.c}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02886}02886 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02887}02887 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02888}\mbox{\hyperlink{if__iwm_8c_a11aec544b58ddec5ef1ca3278061f9c7}{02888}} \mbox{\hyperlink{if__iwm_8c_a11aec544b58ddec5ef1ca3278061f9c7}{iwm\_run\_init\_ucode}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keywordtype}{int} justnvm)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02889}02889 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02890}02890         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__notification__wait}{iwm\_notification\_wait}} calib\_wait;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02891}02891         \textcolor{keyword}{static} \textcolor{keyword}{const} uint16\_t init\_complete[] = \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02892}02892                 \mbox{\hyperlink{if__iwmreg_8h_abbacf0676fe656ed8b19087a3f9f755a}{IWM\_INIT\_COMPLETE\_NOTIF}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02893}02893                 \mbox{\hyperlink{if__iwmreg_8h_a844f7845e47975cccf3797aba1cdb7a9}{IWM\_CALIB\_RES\_NOTIF\_PHY\_DB}}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02894}02894         \};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02895}02895         \textcolor{keywordtype}{int} ret;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02896}02896 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02897}02897         \textcolor{comment}{/* do not operate with rfkill switch turned on */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02898}02898         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structiwm__softc_a67d7ea2a1eef39c9ca65e86178e54766}{sc\_flags}} \& \mbox{\hyperlink{if__iwmvar_8h_a945d1c21db27f2553840bf5cba4969fe}{IWM\_FLAG\_RFKILL}}) \&\& !justnvm) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02899}02899                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02900}02900                     \textcolor{stringliteral}{"{}radio is disabled by hardware switch\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02901}02901                 \textcolor{keywordflow}{return} EPERM;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02902}02902         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02903}02903 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02904}02904         \mbox{\hyperlink{if__iwm__notif__wait_8c_a7b11e5b6ee6b5ca2ef1633dd82872e70}{iwm\_init\_notification\_wait}}(sc-\/>\mbox{\hyperlink{structiwm__softc_ac9e8a0cb4380c845865cdd6eae7444aa}{sc\_notif\_wait}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02905}02905                                    \&calib\_wait,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02906}02906                                    init\_complete,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02907}02907                                    nitems(init\_complete),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02908}02908                                    \mbox{\hyperlink{if__iwm_8c_ae81f12db35f21fc9b795e8bacc87e301}{iwm\_wait\_phy\_db\_entry}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02909}02909                                    sc-\/>\mbox{\hyperlink{structiwm__softc_ac6daddccbf33fd79ff087cb3a85b8d70}{sc\_phy\_db}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02910}02910 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02911}02911         \textcolor{comment}{/* Will also start the device */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02912}02912         ret = \mbox{\hyperlink{if__iwm_8c_af53df91d7015b4925b5c2938068b6856}{iwm\_load\_ucode\_wait\_alive}}(sc, \mbox{\hyperlink{if__iwmvar_8h_a680b88b47a331f93dcdf230bf57590acae55f1de574733d730a25619c4a16578f}{IWM\_UCODE\_INIT}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02913}02913         \textcolor{keywordflow}{if} (ret) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02914}02914                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}Failed to start INIT ucode: \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02915}02915                     ret);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02916}02916                 \textcolor{keywordflow}{goto} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02917}02917         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02918}02918 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02919}02919         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_a9b399704eeb3c9299fe79ff7ebf0b3c3}{device\_family}} < \mbox{\hyperlink{if__iwm__config_8h_a134dc690a22b13281e655ce3d4944141aece09942e3ab8587f2bbd9f34f47af41}{IWM\_DEVICE\_FAMILY\_8000}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02920}02920                 ret = \mbox{\hyperlink{if__iwm_8c_ab1eec3afbd901b2e2b683fb563472dd8}{iwm\_send\_bt\_init\_conf}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02921}02921                 \textcolor{keywordflow}{if} (ret) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02922}02922                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02923}02923                             \textcolor{stringliteral}{"{}failed to send bt coex configuration: \%d\(\backslash\)n"{}}, ret);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02924}02924                         \textcolor{keywordflow}{goto} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02925}02925                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02926}02926         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02927}02927 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02928}02928         \textcolor{keywordflow}{if} (justnvm) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02929}02929                 \textcolor{comment}{/* Read nvm */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02930}02930                 ret = \mbox{\hyperlink{if__iwm_8c_a8022b1259eb9d94e86264a6f06bb23af}{iwm\_nvm\_init}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02931}02931                 \textcolor{keywordflow}{if} (ret) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02932}02932                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}failed to read nvm\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02933}02933                         \textcolor{keywordflow}{goto} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02934}02934                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02935}02935                 IEEE80211\_ADDR\_COPY(sc-\/>\mbox{\hyperlink{structiwm__softc_ada8054beb1d93be79364f98ff3bfbaf2}{sc\_ic}}.ic\_macaddr, sc-\/>\mbox{\hyperlink{structiwm__softc_ac65155777b4c999bcc3e2729733e3db8}{nvm\_data}}-\/>\mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02936}02936                 \textcolor{keywordflow}{goto} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02937}02937         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02938}02938 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02939}02939         \textcolor{comment}{/* Send TX valid antennas before triggering calibrations */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02940}02940         ret = \mbox{\hyperlink{if__iwm_8c_adcaf15bb311c4eb0dc4ca98374b371b3}{iwm\_send\_tx\_ant\_cfg}}(sc, \mbox{\hyperlink{if__iwm__util_8h_a4a4f8b3b7a0b8f1532ec47009131142b}{iwm\_get\_valid\_tx\_ant}}(sc));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02941}02941         \textcolor{keywordflow}{if} (ret) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02942}02942                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02943}02943                     \textcolor{stringliteral}{"{}failed to send antennas before calibration: \%d\(\backslash\)n"{}}, ret);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02944}02944                 \textcolor{keywordflow}{goto} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02945}02945         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02946}02946 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02947}02947         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02948}02948 \textcolor{comment}{         * Send phy configurations command to init uCode}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02949}02949 \textcolor{comment}{         * to start the 16.0 uCode init image internal calibrations.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02950}02950 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02951}02951         ret = \mbox{\hyperlink{if__iwm_8c_a8006bb57d2eac8cf8b28d750cf3b82b7}{iwm\_send\_phy\_cfg\_cmd}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02952}02952         \textcolor{keywordflow}{if} (ret) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02953}02953                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02954}02954                     \textcolor{stringliteral}{"{}\%s: Failed to run INIT calibrations: \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02955}02955                     \_\_func\_\_, ret);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02956}02956                 \textcolor{keywordflow}{goto} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02957}02957         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02958}02958 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02959}02959         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02960}02960 \textcolor{comment}{         * Nothing to do but wait for the init complete notification}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02961}02961 \textcolor{comment}{         * from the firmware.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02962}02962 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02963}02963         \mbox{\hyperlink{if__iwmvar_8h_a2bc8b1196a564b1b70c11f96391760fa}{IWM\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02964}02964         ret = \mbox{\hyperlink{if__iwm__notif__wait_8c_ac7be9157011f921d7d646174addb34ae}{iwm\_wait\_notification}}(sc-\/>\mbox{\hyperlink{structiwm__softc_ac9e8a0cb4380c845865cdd6eae7444aa}{sc\_notif\_wait}}, \&calib\_wait,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02965}02965             \mbox{\hyperlink{if__iwm_8c_a925f308c65ddcd0bb40183d9e7a172fc}{IWM\_UCODE\_CALIB\_TIMEOUT}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02966}02966         \mbox{\hyperlink{if__iwmvar_8h_ac9f22c2982def9e764105396531c69be}{IWM\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02967}02967 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02968}02968 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02969}02969         \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02970}02970 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02971}02971 error:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02972}02972         \mbox{\hyperlink{if__iwm__notif__wait_8c_a646e47cbe3b3f4dc3c7f06e1cf7cf0ca}{iwm\_remove\_notification}}(sc-\/>\mbox{\hyperlink{structiwm__softc_ac9e8a0cb4380c845865cdd6eae7444aa}{sc\_notif\_wait}}, \&calib\_wait);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02973}02973 out:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02974}02974         \textcolor{keywordflow}{return} ret;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02975}02975 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02976}02976 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02977}02977 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02978}\mbox{\hyperlink{if__iwm_8c_a0dcd79bb68188bdefcdc0b7fe0eee45a}{02978}} \mbox{\hyperlink{if__iwm_8c_a0dcd79bb68188bdefcdc0b7fe0eee45a}{iwm\_config\_ltr}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02979}02979 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02980}02980         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__ltr__config__cmd}{iwm\_ltr\_config\_cmd}} cmd = \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02981}02981                 .\mbox{\hyperlink{structiwm__ltr__config__cmd_abea704b1f125ae25f193e84b5b75f780}{flags}} = htole32(\mbox{\hyperlink{if__iwmreg_8h_ad86f4f18396079f98e7c9eb034a9d049}{IWM\_LTR\_CFG\_FLAG\_FEATURE\_ENABLE}}),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02982}02982         \};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02983}02983 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02984}02984         \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structiwm__softc_a0e723de79178ac249f780750a4b1bd52}{sc\_ltr\_enabled}})}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02985}02985                 \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02986}02986 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02987}02987         \textcolor{keywordflow}{return} \mbox{\hyperlink{if__iwm__util_8c_ad7c0f40dbc21d1ec94f0c5f6194d1140}{iwm\_send\_cmd\_pdu}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a21cbce4dd30cd26083fc272adeb36426}{IWM\_LTR\_CONFIG}}, 0, \textcolor{keyword}{sizeof}(cmd), \&cmd);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02988}02988 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02989}02989 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02990}02990 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02991}02991 \textcolor{comment}{ * receive side}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02992}02992 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02993}02993 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02994}02994 \textcolor{comment}{/* (re)stock rx ring, called at init-\/time and at runtime */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02995}02995 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02996}\mbox{\hyperlink{if__iwm_8c_aa1b2823899c8eee4079786fce140df73}{02996}} \mbox{\hyperlink{if__iwm_8c_aa1b2823899c8eee4079786fce140df73}{iwm\_rx\_addbuf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keywordtype}{int} size, \textcolor{keywordtype}{int} idx)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02997}02997 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02998}02998         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__rx__ring}{iwm\_rx\_ring}} *ring = \&sc-\/>\mbox{\hyperlink{structiwm__softc_a57cdc0da9cdb3a68e4f55cc47c3a3aed}{rxq}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l02999}02999         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__rx__data}{iwm\_rx\_data}} *data = \&ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a8b1de774963c1bc508647770ddb45ece}{data}}[idx];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03000}03000         \textcolor{keyword}{struct }mbuf *m;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03001}03001         bus\_dmamap\_t dmamap;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03002}03002         bus\_dma\_segment\_t seg;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03003}03003         \textcolor{keywordtype}{int} nsegs, error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03004}03004 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03005}03005         m = m\_getjcl(M\_NOWAIT, MT\_DATA, M\_PKTHDR, \mbox{\hyperlink{if__iwmvar_8h_a48ddf3e302d40d2169aeef4ea3610e4b}{IWM\_RBUF\_SIZE}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03006}03006         \textcolor{keywordflow}{if} (m == NULL)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03007}03007                 \textcolor{keywordflow}{return} ENOBUFS;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03008}03008 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03009}03009         m-\/>m\_len = m-\/>m\_pkthdr.len = m-\/>m\_ext.ext\_size;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03010}03010         error = bus\_dmamap\_load\_mbuf\_sg(ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a426927488ffe545180c75e567c0e5fcc}{data\_dmat}}, ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a45571e942af27341cd5f9a64e047838d}{spare\_map}}, m,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03011}03011             \&seg, \&nsegs, BUS\_DMA\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03012}03012         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03013}03013                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03014}03014                     \textcolor{stringliteral}{"{}\%s: can't map mbuf, error \%d\(\backslash\)n"{}}, \_\_func\_\_, error);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03015}03015                 m\_freem(m);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03016}03016                 \textcolor{keywordflow}{return} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03017}03017         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03018}03018 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03019}03019         \textcolor{keywordflow}{if} (data-\/>\mbox{\hyperlink{structiwm__rx__data_a229bc638540eb8ac7f033e428ba54f50}{m}} != NULL)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03020}03020                 bus\_dmamap\_unload(ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a426927488ffe545180c75e567c0e5fcc}{data\_dmat}}, data-\/>\mbox{\hyperlink{structiwm__rx__data_a0ca075d6bb3aa6dd619b469fb454f582}{map}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03021}03021 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03022}03022         \textcolor{comment}{/* Swap ring-\/>spare\_map with data-\/>map */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03023}03023         dmamap = data-\/>\mbox{\hyperlink{structiwm__rx__data_a0ca075d6bb3aa6dd619b469fb454f582}{map}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03024}03024         data-\/>\mbox{\hyperlink{structiwm__rx__data_a0ca075d6bb3aa6dd619b469fb454f582}{map}} = ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a45571e942af27341cd5f9a64e047838d}{spare\_map}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03025}03025         ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a45571e942af27341cd5f9a64e047838d}{spare\_map}} = dmamap;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03026}03026 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03027}03027         bus\_dmamap\_sync(ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a426927488ffe545180c75e567c0e5fcc}{data\_dmat}}, data-\/>\mbox{\hyperlink{structiwm__rx__data_a0ca075d6bb3aa6dd619b469fb454f582}{map}}, BUS\_DMASYNC\_PREREAD);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03028}03028         data-\/>\mbox{\hyperlink{structiwm__rx__data_a229bc638540eb8ac7f033e428ba54f50}{m}} = m;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03029}03029 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03030}03030         \textcolor{comment}{/* Update RX descriptor. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03031}03031         KASSERT((seg.ds\_addr \& 255) == 0, (\textcolor{stringliteral}{"{}seg.ds\_addr not aligned"{}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03032}03032         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_a4ace3f4eab56011b2fbbb76b5ad1dc67}{mqrx\_supported}})}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03033}03033                 ((uint64\_t *)ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a82b9e8547e50b153950d0a48e5c8b4c6}{desc}})[idx] = htole64(seg.ds\_addr);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03034}03034         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03035}03035                 ((uint32\_t *)ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a82b9e8547e50b153950d0a48e5c8b4c6}{desc}})[idx] = htole32(seg.ds\_addr >> 8);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03036}03036         bus\_dmamap\_sync(ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a212749f0d88d1ca6fd8e8fdb37442ea1}{free\_desc\_dma}}.\mbox{\hyperlink{structiwm__dma__info_a58938bb9054e381f73f7897fd7ae6ff1}{tag}}, ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a212749f0d88d1ca6fd8e8fdb37442ea1}{free\_desc\_dma}}.\mbox{\hyperlink{structiwm__dma__info_a9088f1c56d08041ac6e9f2439dd9b3dd}{map}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03037}03037             BUS\_DMASYNC\_PREWRITE);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03038}03038 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03039}03039         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03040}03040 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03041}03041 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03042}03042 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03043}\mbox{\hyperlink{if__iwm_8c_aa2b8ed080d154cd2bff59b15c657d59f}{03043}} \mbox{\hyperlink{if__iwm_8c_aa2b8ed080d154cd2bff59b15c657d59f}{iwm\_rx\_rx\_phy\_cmd}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__rx__packet}{iwm\_rx\_packet}} *pkt)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03044}03044 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03045}03045         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__rx__phy__info}{iwm\_rx\_phy\_info}} *phy\_info = (\textcolor{keywordtype}{void} *)pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a77036fd43499c32e7ec28e2d47ed1c33}{data}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03046}03046 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03047}03047         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_RECV, \textcolor{stringliteral}{"{}received PHY stats\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03048}03048 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03049}03049         memcpy(\&sc-\/>\mbox{\hyperlink{structiwm__softc_af581d823ca49360bcd6c6a50290207c3}{sc\_last\_phy\_info}}, phy\_info, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structiwm__softc_af581d823ca49360bcd6c6a50290207c3}{sc\_last\_phy\_info}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03050}03050 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03051}03051 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03052}03052 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03053}03053 \textcolor{comment}{ * Retrieve the average noise (in dBm) among receivers.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03054}03054 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03055}03055 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03056}\mbox{\hyperlink{if__iwm_8c_a2d5381cbd9b781c2b1e2eb95174791d2}{03056}} \mbox{\hyperlink{if__iwm_8c_a2d5381cbd9b781c2b1e2eb95174791d2}{iwm\_get\_noise}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03057}03057     \textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__statistics__rx__non__phy}{iwm\_statistics\_rx\_non\_phy}} *stats)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03058}03058 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03059}03059         \textcolor{keywordtype}{int} i, total, nbant, noise;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03060}03060 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03061}03061         total = nbant = noise = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03062}03062         \textcolor{keywordflow}{for} (i = 0; i < 3; i++) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03063}03063                 noise = le32toh(stats-\/>\mbox{\hyperlink{structiwm__statistics__rx__non__phy_a0353b1f8d8c6d2652c7fb854fc6284a6}{beacon\_silence\_rssi}}[i]) \& 0xff;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03064}03064                 \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_RECV, \textcolor{stringliteral}{"{}\%s: i=\%d, noise=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03065}03065                     \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03066}03066                     i,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03067}03067                     noise);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03068}03068 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03069}03069                 \textcolor{keywordflow}{if} (noise) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03070}03070                         total += noise;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03071}03071                         nbant++;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03072}03072                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03073}03073         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03074}03074 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03075}03075         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_RECV, \textcolor{stringliteral}{"{}\%s: nbant=\%d, total=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03076}03076             \_\_func\_\_, nbant, total);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03077}03077 \textcolor{preprocessor}{\#if 0}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03078}03078         \textcolor{comment}{/* There should be at least one antenna but check anyway. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03079}03079         \textcolor{keywordflow}{return} (nbant == 0) ? -\/127 : (total / nbant) -\/ 107;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03080}03080 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03081}03081         \textcolor{comment}{/* For now, just hard-\/code it to -\/96 to be safe */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03082}03082         \textcolor{keywordflow}{return} (-\/96);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03083}03083 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03084}03084 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03085}03085 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03086}03086 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03087}\mbox{\hyperlink{if__iwm_8c_a5f5ea0d62c3a15bb6bde9da74a60c89a}{03087}} \mbox{\hyperlink{if__iwm_8c_a5f5ea0d62c3a15bb6bde9da74a60c89a}{iwm\_handle\_rx\_statistics}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__rx__packet}{iwm\_rx\_packet}} *pkt)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03088}03088 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03089}03089         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__notif__statistics}{iwm\_notif\_statistics}} *stats = (\textcolor{keywordtype}{void} *)\&pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a77036fd43499c32e7ec28e2d47ed1c33}{data}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03090}03090 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03091}03091         memcpy(\&sc-\/>\mbox{\hyperlink{structiwm__softc_acf1477938646d47b708ad83d40bd057e}{sc\_stats}}, stats, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structiwm__softc_acf1477938646d47b708ad83d40bd057e}{sc\_stats}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03092}03092         sc-\/>\mbox{\hyperlink{structiwm__softc_a520fec740062d903b9ab3ca21e420aa8}{sc\_noise}} = \mbox{\hyperlink{if__iwm_8c_a2d5381cbd9b781c2b1e2eb95174791d2}{iwm\_get\_noise}}(sc, \&stats-\/>\mbox{\hyperlink{structiwm__notif__statistics_a5a91e5f5c7d5bd25ca76b1b3f0f4aacb}{rx}}.\mbox{\hyperlink{structiwm__statistics__rx_a91cc862b60243ea6f732fc3510a1f17f}{general}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03093}03093 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03094}03094 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03095}03095 \textcolor{comment}{/* iwlwifi: mvm/rx.c */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03096}03096 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03097}03097 \textcolor{comment}{ * iwm\_get\_signal\_strength -\/ use new rx PHY INFO API}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03098}03098 \textcolor{comment}{ * values are reported by the fw as positive values -\/ need to negate}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03099}03099 \textcolor{comment}{ * to obtain their dBM.  Account for missing antennas by replacing 0}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03100}03100 \textcolor{comment}{ * values by -\/256dBm: practically 0 power and a non-\/feasible 8 bit value.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03101}03101 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03102}03102 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03103}\mbox{\hyperlink{if__iwm_8c_ab4f4106db2c3b8e6019339eec6e2f0e4}{03103}} \mbox{\hyperlink{if__iwm_8c_ab4f4106db2c3b8e6019339eec6e2f0e4}{iwm\_rx\_get\_signal\_strength}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03104}03104     \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__rx__phy__info}{iwm\_rx\_phy\_info}} *phy\_info)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03105}03105 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03106}03106         \textcolor{keywordtype}{int} energy\_a, energy\_b, energy\_c, max\_energy;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03107}03107         uint32\_t val;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03108}03108 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03109}03109         val = le32toh(phy\_info-\/>\mbox{\hyperlink{structiwm__rx__phy__info_a719a81fc50de59bcda2bff2ea0c04f8d}{non\_cfg\_phy}}[\mbox{\hyperlink{if__iwmreg_8h_ae72ff1ba41cb372dfac0e84249742bc2}{IWM\_RX\_INFO\_ENERGY\_ANT\_ABC\_IDX}}]);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03110}03110         energy\_a = (val \& \mbox{\hyperlink{if__iwmreg_8h_aedd852409111cd0fcfd6c0ba6e0ea0ce}{IWM\_RX\_INFO\_ENERGY\_ANT\_A\_MSK}}) >>}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03111}03111             \mbox{\hyperlink{if__iwmreg_8h_a89f241a96a9ad68e8db7d1d1d40bd30d}{IWM\_RX\_INFO\_ENERGY\_ANT\_A\_POS}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03112}03112         energy\_a = energy\_a ? -\/energy\_a : -\/256;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03113}03113         energy\_b = (val \& \mbox{\hyperlink{if__iwmreg_8h_aa33d69674d96b34c3a167d3e5b9390e9}{IWM\_RX\_INFO\_ENERGY\_ANT\_B\_MSK}}) >>}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03114}03114             \mbox{\hyperlink{if__iwmreg_8h_a04be5bffc1707f587098c893fbc79a9b}{IWM\_RX\_INFO\_ENERGY\_ANT\_B\_POS}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03115}03115         energy\_b = energy\_b ? -\/energy\_b : -\/256;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03116}03116         energy\_c = (val \& \mbox{\hyperlink{if__iwmreg_8h_a242f13502d4d4df2774a59953a754532}{IWM\_RX\_INFO\_ENERGY\_ANT\_C\_MSK}}) >>}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03117}03117             \mbox{\hyperlink{if__iwmreg_8h_a7b6262dc9f717a03c99a449d63f82dba}{IWM\_RX\_INFO\_ENERGY\_ANT\_C\_POS}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03118}03118         energy\_c = energy\_c ? -\/energy\_c : -\/256;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03119}03119         max\_energy = MAX(energy\_a, energy\_b);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03120}03120         max\_energy = MAX(max\_energy, energy\_c);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03121}03121 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03122}03122         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_RECV,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03123}03123             \textcolor{stringliteral}{"{}energy In A \%d B \%d C \%d , and max \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03124}03124             energy\_a, energy\_b, energy\_c, max\_energy);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03125}03125 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03126}03126         \textcolor{keywordflow}{return} max\_energy;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03127}03127 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03128}03128 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03129}03129 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03130}\mbox{\hyperlink{if__iwm_8c_ae3ac2b8ded48426d6483d27593f9d022}{03130}} \mbox{\hyperlink{if__iwm_8c_ae3ac2b8ded48426d6483d27593f9d022}{iwm\_rxmq\_get\_signal\_strength}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03131}03131     \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__rx__mpdu__desc}{iwm\_rx\_mpdu\_desc}} *desc)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03132}03132 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03133}03133         \textcolor{keywordtype}{int} energy\_a, energy\_b;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03134}03134 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03135}03135         energy\_a = desc-\/>\mbox{\hyperlink{structiwm__rx__mpdu__desc_ac7acca977c992ad6614290cb4ad803b0}{v1}}.\mbox{\hyperlink{structiwm__rx__mpdu__desc__v1_a4e7dba25e519e89f543866921fe1021f}{energy\_a}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03136}03136         energy\_b = desc-\/>\mbox{\hyperlink{structiwm__rx__mpdu__desc_ac7acca977c992ad6614290cb4ad803b0}{v1}}.\mbox{\hyperlink{structiwm__rx__mpdu__desc__v1_af59b04e74e69c79b56ad2ffec6a1b8d7}{energy\_b}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03137}03137         energy\_a = energy\_a ? -\/energy\_a : -\/256;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03138}03138         energy\_b = energy\_b ? -\/energy\_b : -\/256;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03139}03139         \textcolor{keywordflow}{return} MAX(energy\_a, energy\_b);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03140}03140 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03141}03141 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03142}03142 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03143}03143 \textcolor{comment}{ * iwm\_rx\_rx\_mpdu -\/ IWM\_REPLY\_RX\_MPDU\_CMD handler}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03144}03144 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03145}03145 \textcolor{comment}{ * Handles the actual data of the Rx packet from the fw}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03146}03146 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03147}03147 \textcolor{keyword}{static} \textcolor{keywordtype}{bool}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03148}\mbox{\hyperlink{if__iwm_8c_ac0f736a685f1438217be7c18eef829dd}{03148}} \mbox{\hyperlink{if__iwm_8c_ac0f736a685f1438217be7c18eef829dd}{iwm\_rx\_rx\_mpdu}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keyword}{struct} mbuf *m, uint32\_t offset,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03149}03149     \textcolor{keywordtype}{bool} stolen)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03150}03150 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03151}03151         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structiwm__softc_ada8054beb1d93be79364f98ff3bfbaf2}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03152}03152         \textcolor{keyword}{struct }ieee80211vap *vap = TAILQ\_FIRST(\&ic-\/>ic\_vaps);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03153}03153         \textcolor{keyword}{struct }ieee80211\_rx\_stats rxs;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03154}03154         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__rx__phy__info}{iwm\_rx\_phy\_info}} *phy\_info;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03155}03155         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__rx__mpdu__res__start}{iwm\_rx\_mpdu\_res\_start}} *rx\_res;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03156}03156         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__rx__packet}{iwm\_rx\_packet}} *pkt = \mbox{\hyperlink{if__iwm_8c_a56917e17716be87862db2a902b12430e}{mtodoff}}(m, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__rx__packet}{iwm\_rx\_packet}} *, offset);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03157}03157         uint32\_t len;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03158}03158         uint32\_t rx\_pkt\_status;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03159}03159         \textcolor{keywordtype}{int} rssi;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03160}03160 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03161}03161         phy\_info = \&sc-\/>\mbox{\hyperlink{structiwm__softc_af581d823ca49360bcd6c6a50290207c3}{sc\_last\_phy\_info}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03162}03162         rx\_res = (\textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__rx__mpdu__res__start}{iwm\_rx\_mpdu\_res\_start}} *)pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a77036fd43499c32e7ec28e2d47ed1c33}{data}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03163}03163         len = le16toh(rx\_res-\/>\mbox{\hyperlink{structiwm__rx__mpdu__res__start_a9d82a996cd8229da61fcdbe7bbb7ae39}{byte\_count}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03164}03164         rx\_pkt\_status = le32toh(*(uint32\_t *)(pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a77036fd43499c32e7ec28e2d47ed1c33}{data}} + \textcolor{keyword}{sizeof}(*rx\_res) + len));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03165}03165 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03166}03166         \textcolor{keywordflow}{if} (\_\_predict\_false(phy\_info-\/>\mbox{\hyperlink{structiwm__rx__phy__info_ab1f67a2d4cbe8b5476b812b95af1b132}{cfg\_phy\_cnt}} > 20)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03167}03167                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03168}03168                     \textcolor{stringliteral}{"{}dsp size out of range [0,20]: \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03169}03169                     phy\_info-\/>\mbox{\hyperlink{structiwm__rx__phy__info_ab1f67a2d4cbe8b5476b812b95af1b132}{cfg\_phy\_cnt}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03170}03170                 \textcolor{keywordflow}{return} \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03171}03171         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03172}03172 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03173}03173         \textcolor{keywordflow}{if} (!(rx\_pkt\_status \& \mbox{\hyperlink{if__iwmreg_8h_ae43e3beeed2e371d0d091e99247a31ab}{IWM\_RX\_MPDU\_RES\_STATUS\_CRC\_OK}}) ||}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03174}03174             !(rx\_pkt\_status \& \mbox{\hyperlink{if__iwmreg_8h_aab76e87f9e15e9316328a48c0f144ad4}{IWM\_RX\_MPDU\_RES\_STATUS\_OVERRUN\_OK}})) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03175}03175                 \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_RECV,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03176}03176                     \textcolor{stringliteral}{"{}Bad CRC or FIFO: 0x\%08X.\(\backslash\)n"{}}, rx\_pkt\_status);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03177}03177                 \textcolor{keywordflow}{return} \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03178}03178         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03179}03179 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03180}03180         rssi = \mbox{\hyperlink{if__iwm_8c_ab4f4106db2c3b8e6019339eec6e2f0e4}{iwm\_rx\_get\_signal\_strength}}(sc, phy\_info);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03181}03181 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03182}03182         \textcolor{comment}{/* Map it to relative value */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03183}03183         rssi = rssi -\/ sc-\/>\mbox{\hyperlink{structiwm__softc_a520fec740062d903b9ab3ca21e420aa8}{sc\_noise}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03184}03184 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03185}03185         \textcolor{comment}{/* replenish ring for the buffer we're going to feed to the sharks */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03186}03186         \textcolor{keywordflow}{if} (!stolen \&\& \mbox{\hyperlink{if__iwm_8c_aa1b2823899c8eee4079786fce140df73}{iwm\_rx\_addbuf}}(sc, \mbox{\hyperlink{if__iwmvar_8h_a48ddf3e302d40d2169aeef4ea3610e4b}{IWM\_RBUF\_SIZE}}, sc-\/>\mbox{\hyperlink{structiwm__softc_a57cdc0da9cdb3a68e4f55cc47c3a3aed}{rxq}}.\mbox{\hyperlink{structiwm__rx__ring_addf1b35103b2f1b5cdafa91729a85f45}{cur}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03187}03187                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%s: unable to add more buffers\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03188}03188                     \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03189}03189                 \textcolor{keywordflow}{return} \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03190}03190         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03191}03191 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03192}03192         m-\/>m\_data = pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a77036fd43499c32e7ec28e2d47ed1c33}{data}} + \textcolor{keyword}{sizeof}(*rx\_res);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03193}03193         m-\/>m\_pkthdr.len = m-\/>m\_len = len;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03194}03194 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03195}03195         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_RECV,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03196}03196             \textcolor{stringliteral}{"{}\%s: rssi=\%d, noise=\%d\(\backslash\)n"{}}, \_\_func\_\_, rssi, sc-\/>\mbox{\hyperlink{structiwm__softc_a520fec740062d903b9ab3ca21e420aa8}{sc\_noise}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03197}03197 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03198}03198         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_RECV,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03199}03199             \textcolor{stringliteral}{"{}\%s: phy\_info: channel=\%d, flags=0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03200}03200             \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03201}03201             le16toh(phy\_info-\/>\mbox{\hyperlink{structiwm__rx__phy__info_aa5e1e32d8df222a8affd31bcf411c029}{channel}}),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03202}03202             le16toh(phy\_info-\/>\mbox{\hyperlink{structiwm__rx__phy__info_a1074012b10838f8c9fee220810f00ec0}{phy\_flags}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03203}03203 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03204}03204         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03205}03205 \textcolor{comment}{         * Populate an RX state struct with the provided information.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03206}03206 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03207}03207         bzero(\&rxs, \textcolor{keyword}{sizeof}(rxs));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03208}03208         rxs.r\_flags |= IEEE80211\_R\_IEEE | IEEE80211\_R\_FREQ;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03209}03209         rxs.r\_flags |= IEEE80211\_R\_BAND;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03210}03210         rxs.r\_flags |= IEEE80211\_R\_NF | IEEE80211\_R\_RSSI;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03211}03211         rxs.c\_ieee = le16toh(phy\_info-\/>\mbox{\hyperlink{structiwm__rx__phy__info_aa5e1e32d8df222a8affd31bcf411c029}{channel}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03212}03212         \textcolor{keywordflow}{if} (le16toh(phy\_info-\/>\mbox{\hyperlink{structiwm__rx__phy__info_a1074012b10838f8c9fee220810f00ec0}{phy\_flags}} \& \mbox{\hyperlink{if__iwmreg_8h_a4fde7721e6461f95ce586cf1b85bdc9f}{IWM\_RX\_RES\_PHY\_FLAGS\_BAND\_24}})) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03213}03213                 rxs.c\_freq = ieee80211\_ieee2mhz(rxs.c\_ieee, IEEE80211\_CHAN\_2GHZ);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03214}03214                 rxs.c\_band = IEEE80211\_CHAN\_2GHZ;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03215}03215         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03216}03216                 rxs.c\_freq = ieee80211\_ieee2mhz(rxs.c\_ieee, IEEE80211\_CHAN\_5GHZ);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03217}03217                 rxs.c\_band = IEEE80211\_CHAN\_5GHZ;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03218}03218         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03219}03219 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03220}03220         \textcolor{comment}{/* rssi is in 1/2db units */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03221}03221         rxs.c\_rssi = rssi * 2;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03222}03222         rxs.c\_nf = sc-\/>\mbox{\hyperlink{structiwm__softc_a520fec740062d903b9ab3ca21e420aa8}{sc\_noise}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03223}03223         \textcolor{keywordflow}{if} (ieee80211\_add\_rx\_params(m, \&rxs) == 0)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03224}03224                 \textcolor{keywordflow}{return} \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03225}03225 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03226}03226         \textcolor{keywordflow}{if} (ieee80211\_radiotap\_active\_vap(vap)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03227}03227                 \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__rx__radiotap__header}{iwm\_rx\_radiotap\_header}} *tap = \&sc-\/>\mbox{\hyperlink{structiwm__softc_a9eaf3abdd84a4ff4dc3c8f2e92fc1d94}{sc\_rxtap}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03228}03228 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03229}03229                 tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_ad980b75a233178364feec53a728ea45f}{wr\_flags}} = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03230}03230                 \textcolor{keywordflow}{if} (phy\_info-\/>\mbox{\hyperlink{structiwm__rx__phy__info_a1074012b10838f8c9fee220810f00ec0}{phy\_flags}} \& htole16(\mbox{\hyperlink{if__iwmreg_8h_aa0f16295d779b574619ddd0a4faafe1a}{IWM\_PHY\_INFO\_FLAG\_SHPREAMBLE}}))}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03231}03231                         tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_ad980b75a233178364feec53a728ea45f}{wr\_flags}} |= IEEE80211\_RADIOTAP\_F\_SHORTPRE;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03232}03232                 tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_a1092c35c756ec770347d02dc41102aee}{wr\_chan\_freq}} = htole16(rxs.c\_freq);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03233}03233                 \textcolor{comment}{/* XXX only if ic-\/>ic\_curchan-\/>ic\_ieee == rxs.c\_ieee */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03234}03234                 tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_a32ebfd83f72198ad20e503ee2f42a428}{wr\_chan\_flags}} = htole16(ic-\/>ic\_curchan-\/>ic\_flags);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03235}03235                 tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_a13776218589864b64b22cb422a8c1d10}{wr\_dbm\_antsignal}} = (int8\_t)rssi;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03236}03236                 tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_a20793939050a4d72aae9160c9743a2f1}{wr\_dbm\_antnoise}} = (int8\_t)sc-\/>\mbox{\hyperlink{structiwm__softc_a520fec740062d903b9ab3ca21e420aa8}{sc\_noise}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03237}03237                 tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_a419c31af373ac9670c2228b653916763}{wr\_tsft}} = phy\_info-\/>\mbox{\hyperlink{structiwm__rx__phy__info_a6e690603bc0387cc960114e0e2a98f16}{system\_timestamp}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03238}03238                 switch (phy\_info-\/>\mbox{\hyperlink{structiwm__rx__phy__info_a6f724724eff6c8d1eba662f5c881774f}{rate}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03239}03239                 \textcolor{comment}{/* CCK rates. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03240}03240                 \textcolor{keywordflow}{case}  10: tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_a26cfa0cae29ba51b1c1560152f3bfe01}{wr\_rate}} =   2; \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03241}03241                 \textcolor{keywordflow}{case}  20: tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_a26cfa0cae29ba51b1c1560152f3bfe01}{wr\_rate}} =   4; \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03242}03242                 \textcolor{keywordflow}{case}  55: tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_a26cfa0cae29ba51b1c1560152f3bfe01}{wr\_rate}} =  11; \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03243}03243                 \textcolor{keywordflow}{case} 110: tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_a26cfa0cae29ba51b1c1560152f3bfe01}{wr\_rate}} =  22; \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03244}03244                 \textcolor{comment}{/* OFDM rates. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03245}03245                 \textcolor{keywordflow}{case} 0xd: tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_a26cfa0cae29ba51b1c1560152f3bfe01}{wr\_rate}} =  12; \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03246}03246                 \textcolor{keywordflow}{case} 0xf: tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_a26cfa0cae29ba51b1c1560152f3bfe01}{wr\_rate}} =  18; \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03247}03247                 \textcolor{keywordflow}{case} 0x5: tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_a26cfa0cae29ba51b1c1560152f3bfe01}{wr\_rate}} =  24; \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03248}03248                 \textcolor{keywordflow}{case} 0x7: tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_a26cfa0cae29ba51b1c1560152f3bfe01}{wr\_rate}} =  36; \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03249}03249                 \textcolor{keywordflow}{case} 0x9: tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_a26cfa0cae29ba51b1c1560152f3bfe01}{wr\_rate}} =  48; \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03250}03250                 \textcolor{keywordflow}{case} 0xb: tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_a26cfa0cae29ba51b1c1560152f3bfe01}{wr\_rate}} =  72; \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03251}03251                 \textcolor{keywordflow}{case} 0x1: tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_a26cfa0cae29ba51b1c1560152f3bfe01}{wr\_rate}} =  96; \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03252}03252                 \textcolor{keywordflow}{case} 0x3: tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_a26cfa0cae29ba51b1c1560152f3bfe01}{wr\_rate}} = 108; \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03253}03253                 \textcolor{comment}{/* Unknown rate: should not happen. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03254}03254                 \textcolor{keywordflow}{default}:  tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_a26cfa0cae29ba51b1c1560152f3bfe01}{wr\_rate}} =   0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03255}03255                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03256}03256         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03257}03257 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03258}03258         \textcolor{keywordflow}{return} \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03259}03259 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03260}03260 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03261}03261 \textcolor{keyword}{static} \textcolor{keywordtype}{bool}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03262}\mbox{\hyperlink{if__iwm_8c_a3300aff48f30d653f30ac16e5c10d245}{03262}} \mbox{\hyperlink{if__iwm_8c_a3300aff48f30d653f30ac16e5c10d245}{iwm\_rx\_mpdu\_mq}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keyword}{struct} mbuf *m, uint32\_t offset,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03263}03263     \textcolor{keywordtype}{bool} stolen)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03264}03264 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03265}03265         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structiwm__softc_ada8054beb1d93be79364f98ff3bfbaf2}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03266}03266         \textcolor{keyword}{struct }ieee80211vap *vap = TAILQ\_FIRST(\&ic-\/>ic\_vaps);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03267}03267         \textcolor{keyword}{struct }ieee80211\_frame *wh;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03268}03268         \textcolor{keyword}{struct }ieee80211\_rx\_stats rxs;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03269}03269         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__rx__mpdu__desc}{iwm\_rx\_mpdu\_desc}} *desc;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03270}03270         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__rx__packet}{iwm\_rx\_packet}} *pkt;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03271}03271         \textcolor{keywordtype}{int} rssi;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03272}03272         uint32\_t hdrlen, len, rate\_n\_flags;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03273}03273         uint16\_t phy\_info;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03274}03274         uint8\_t channel;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03275}03275 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03276}03276         pkt = mtodo(m, offset);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03277}03277         desc = (\textcolor{keywordtype}{void} *)pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a77036fd43499c32e7ec28e2d47ed1c33}{data}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03278}03278 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03279}03279         if (!(desc-\/>\mbox{\hyperlink{structiwm__rx__mpdu__desc_a559577f0ce4c94c960b127f7ffec5315}{status}} \& htole16(\mbox{\hyperlink{if__iwmreg_8h_ae43e3beeed2e371d0d091e99247a31ab}{IWM\_RX\_MPDU\_RES\_STATUS\_CRC\_OK}})) ||}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03280}03280             !(desc-\/>\mbox{\hyperlink{structiwm__rx__mpdu__desc_a559577f0ce4c94c960b127f7ffec5315}{status}} \& htole16(\mbox{\hyperlink{if__iwmreg_8h_aab76e87f9e15e9316328a48c0f144ad4}{IWM\_RX\_MPDU\_RES\_STATUS\_OVERRUN\_OK}}))) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03281}03281                 \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_RECV,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03282}03282                     \textcolor{stringliteral}{"{}Bad CRC or FIFO: 0x\%08X.\(\backslash\)n"{}}, desc-\/>\mbox{\hyperlink{structiwm__rx__mpdu__desc_a559577f0ce4c94c960b127f7ffec5315}{status}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03283}03283                 \textcolor{keywordflow}{return} \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03284}03284         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03285}03285 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03286}03286         channel = desc-\/>\mbox{\hyperlink{structiwm__rx__mpdu__desc_ac7acca977c992ad6614290cb4ad803b0}{v1}}.\mbox{\hyperlink{structiwm__rx__mpdu__desc__v1_aa214e06bbdb7026ebaa18ddabcfee9af}{channel}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03287}03287         len = le16toh(desc-\/>\mbox{\hyperlink{structiwm__rx__mpdu__desc_aad214251266ad0f3bb7827050e05acdc}{mpdu\_len}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03288}03288         phy\_info = le16toh(desc-\/>\mbox{\hyperlink{structiwm__rx__mpdu__desc_ad2e4b498f8f02875751bd8ad8865997d}{phy\_info}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03289}03289         rate\_n\_flags = desc-\/>\mbox{\hyperlink{structiwm__rx__mpdu__desc_ac7acca977c992ad6614290cb4ad803b0}{v1}}.\mbox{\hyperlink{structiwm__rx__mpdu__desc__v1_a7c263458530c3d624ee3543fe4f473b0}{rate\_n\_flags}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03290}03290 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03291}03291         wh = mtodo(m, \textcolor{keyword}{sizeof}(*desc));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03292}03292         m-\/>m\_data = pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a77036fd43499c32e7ec28e2d47ed1c33}{data}} + \textcolor{keyword}{sizeof}(*desc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03293}03293         m-\/>m\_pkthdr.len = m-\/>m\_len = len;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03294}03294         m-\/>m\_len = len;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03295}03295 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03296}03296         \textcolor{comment}{/* Account for padding following the frame header. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03297}03297         \textcolor{keywordflow}{if} ((desc-\/>\mbox{\hyperlink{structiwm__rx__mpdu__desc_a1b44cd57f5b62019b9c4c59a3d1b029a}{mac\_flags2}} \& \mbox{\hyperlink{if__iwmreg_8h_aa40c110902fa6da5739ec06bfbb717bd}{IWM\_RX\_MPDU\_MFLG2\_PAD}})) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03298}03298                 hdrlen = ieee80211\_anyhdrsize(wh);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03299}03299                 memmove(mtodo(m, 2), mtodo(m, 0), hdrlen);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03300}03300                 m-\/>m\_data = mtodo(m, 2);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03301}03301                 wh = mtod(m, \textcolor{keyword}{struct} ieee80211\_frame *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03302}03302         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03303}03303 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03304}03304         \textcolor{comment}{/* Map it to relative value */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03305}03305         rssi = \mbox{\hyperlink{if__iwm_8c_ae3ac2b8ded48426d6483d27593f9d022}{iwm\_rxmq\_get\_signal\_strength}}(sc, desc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03306}03306         rssi = rssi -\/ sc-\/>\mbox{\hyperlink{structiwm__softc_a520fec740062d903b9ab3ca21e420aa8}{sc\_noise}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03307}03307 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03308}03308         \textcolor{comment}{/* replenish ring for the buffer we're going to feed to the sharks */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03309}03309         \textcolor{keywordflow}{if} (!stolen \&\& \mbox{\hyperlink{if__iwm_8c_aa1b2823899c8eee4079786fce140df73}{iwm\_rx\_addbuf}}(sc, \mbox{\hyperlink{if__iwmvar_8h_a48ddf3e302d40d2169aeef4ea3610e4b}{IWM\_RBUF\_SIZE}}, sc-\/>\mbox{\hyperlink{structiwm__softc_a57cdc0da9cdb3a68e4f55cc47c3a3aed}{rxq}}.\mbox{\hyperlink{structiwm__rx__ring_addf1b35103b2f1b5cdafa91729a85f45}{cur}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03310}03310                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%s: unable to add more buffers\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03311}03311                     \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03312}03312                 \textcolor{keywordflow}{return} \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03313}03313         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03314}03314 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03315}03315         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_RECV,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03316}03316             \textcolor{stringliteral}{"{}\%s: rssi=\%d, noise=\%d\(\backslash\)n"{}}, \_\_func\_\_, rssi, sc-\/>\mbox{\hyperlink{structiwm__softc_a520fec740062d903b9ab3ca21e420aa8}{sc\_noise}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03317}03317 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03318}03318         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03319}03319 \textcolor{comment}{         * Populate an RX state struct with the provided information.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03320}03320 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03321}03321         bzero(\&rxs, \textcolor{keyword}{sizeof}(rxs));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03322}03322         rxs.r\_flags |= IEEE80211\_R\_IEEE | IEEE80211\_R\_FREQ;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03323}03323         rxs.r\_flags |= IEEE80211\_R\_BAND;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03324}03324         rxs.r\_flags |= IEEE80211\_R\_NF | IEEE80211\_R\_RSSI;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03325}03325         rxs.c\_ieee = channel;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03326}03326         rxs.c\_freq = ieee80211\_ieee2mhz(rxs.c\_ieee,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03327}03327             channel <= 14 ? IEEE80211\_CHAN\_2GHZ : IEEE80211\_CHAN\_5GHZ);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03328}03328         rxs.c\_band = channel <= 14 ? IEEE80211\_CHAN\_2GHZ : IEEE80211\_CHAN\_5GHZ;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03329}03329 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03330}03330         \textcolor{comment}{/* rssi is in 1/2db units */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03331}03331         rxs.c\_rssi = rssi * 2;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03332}03332         rxs.c\_nf = sc-\/>\mbox{\hyperlink{structiwm__softc_a520fec740062d903b9ab3ca21e420aa8}{sc\_noise}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03333}03333         \textcolor{keywordflow}{if} (ieee80211\_add\_rx\_params(m, \&rxs) == 0)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03334}03334                 \textcolor{keywordflow}{return} \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03335}03335 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03336}03336         \textcolor{keywordflow}{if} (ieee80211\_radiotap\_active\_vap(vap)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03337}03337                 \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__rx__radiotap__header}{iwm\_rx\_radiotap\_header}} *tap = \&sc-\/>\mbox{\hyperlink{structiwm__softc_a9eaf3abdd84a4ff4dc3c8f2e92fc1d94}{sc\_rxtap}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03338}03338 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03339}03339                 tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_ad980b75a233178364feec53a728ea45f}{wr\_flags}} = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03340}03340                 \textcolor{keywordflow}{if} ((phy\_info \& \mbox{\hyperlink{if__iwmreg_8h_abba8583fdc4de31bc2159a0438d33b65}{IWM\_RX\_MPDU\_PHY\_SHORT\_PREAMBLE}}) != 0)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03341}03341                         tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_ad980b75a233178364feec53a728ea45f}{wr\_flags}} |= IEEE80211\_RADIOTAP\_F\_SHORTPRE;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03342}03342                 tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_a1092c35c756ec770347d02dc41102aee}{wr\_chan\_freq}} = htole16(rxs.c\_freq);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03343}03343                 \textcolor{comment}{/* XXX only if ic-\/>ic\_curchan-\/>ic\_ieee == rxs.c\_ieee */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03344}03344                 tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_a32ebfd83f72198ad20e503ee2f42a428}{wr\_chan\_flags}} = htole16(ic-\/>ic\_curchan-\/>ic\_flags);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03345}03345                 tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_a13776218589864b64b22cb422a8c1d10}{wr\_dbm\_antsignal}} = (int8\_t)rssi;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03346}03346                 tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_a20793939050a4d72aae9160c9743a2f1}{wr\_dbm\_antnoise}} = (int8\_t)sc-\/>\mbox{\hyperlink{structiwm__softc_a520fec740062d903b9ab3ca21e420aa8}{sc\_noise}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03347}03347                 tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_a419c31af373ac9670c2228b653916763}{wr\_tsft}} = desc-\/>\mbox{\hyperlink{structiwm__rx__mpdu__desc_ac7acca977c992ad6614290cb4ad803b0}{v1}}.\mbox{\hyperlink{structiwm__rx__mpdu__desc__v1_ae27a6ebaf0bbbb5fee38b089b9b9ad2d}{gp2\_on\_air\_rise}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03348}03348                 switch ((rate\_n\_flags \& 0xff)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03349}03349                 \textcolor{comment}{/* CCK rates. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03350}03350                 \textcolor{keywordflow}{case}  10: tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_a26cfa0cae29ba51b1c1560152f3bfe01}{wr\_rate}} =   2; \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03351}03351                 \textcolor{keywordflow}{case}  20: tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_a26cfa0cae29ba51b1c1560152f3bfe01}{wr\_rate}} =   4; \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03352}03352                 \textcolor{keywordflow}{case}  55: tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_a26cfa0cae29ba51b1c1560152f3bfe01}{wr\_rate}} =  11; \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03353}03353                 \textcolor{keywordflow}{case} 110: tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_a26cfa0cae29ba51b1c1560152f3bfe01}{wr\_rate}} =  22; \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03354}03354                 \textcolor{comment}{/* OFDM rates. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03355}03355                 \textcolor{keywordflow}{case} 0xd: tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_a26cfa0cae29ba51b1c1560152f3bfe01}{wr\_rate}} =  12; \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03356}03356                 \textcolor{keywordflow}{case} 0xf: tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_a26cfa0cae29ba51b1c1560152f3bfe01}{wr\_rate}} =  18; \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03357}03357                 \textcolor{keywordflow}{case} 0x5: tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_a26cfa0cae29ba51b1c1560152f3bfe01}{wr\_rate}} =  24; \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03358}03358                 \textcolor{keywordflow}{case} 0x7: tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_a26cfa0cae29ba51b1c1560152f3bfe01}{wr\_rate}} =  36; \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03359}03359                 \textcolor{keywordflow}{case} 0x9: tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_a26cfa0cae29ba51b1c1560152f3bfe01}{wr\_rate}} =  48; \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03360}03360                 \textcolor{keywordflow}{case} 0xb: tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_a26cfa0cae29ba51b1c1560152f3bfe01}{wr\_rate}} =  72; \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03361}03361                 \textcolor{keywordflow}{case} 0x1: tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_a26cfa0cae29ba51b1c1560152f3bfe01}{wr\_rate}} =  96; \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03362}03362                 \textcolor{keywordflow}{case} 0x3: tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_a26cfa0cae29ba51b1c1560152f3bfe01}{wr\_rate}} = 108; \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03363}03363                 \textcolor{comment}{/* Unknown rate: should not happen. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03364}03364                 \textcolor{keywordflow}{default}:  tap-\/>\mbox{\hyperlink{structiwm__rx__radiotap__header_a26cfa0cae29ba51b1c1560152f3bfe01}{wr\_rate}} =   0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03365}03365                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03366}03366         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03367}03367 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03368}03368         \textcolor{keywordflow}{return} \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03369}03369 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03370}03370 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03371}03371 \textcolor{keyword}{static} \textcolor{keywordtype}{bool}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03372}\mbox{\hyperlink{if__iwm_8c_a3a60596a2f04542b737f981208a97d58}{03372}} \mbox{\hyperlink{if__iwm_8c_a3a60596a2f04542b737f981208a97d58}{iwm\_rx\_mpdu}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keyword}{struct} mbuf *m, uint32\_t offset,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03373}03373     \textcolor{keywordtype}{bool} stolen)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03374}03374 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03375}03375         \textcolor{keyword}{struct }epoch\_tracker et;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03376}03376         \textcolor{keyword}{struct }ieee80211com *ic;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03377}03377         \textcolor{keyword}{struct }ieee80211\_frame *wh;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03378}03378         \textcolor{keyword}{struct }ieee80211\_node *ni;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03379}03379         \textcolor{keywordtype}{bool} ret;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03380}03380 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03381}03381         ic = \&sc-\/>\mbox{\hyperlink{structiwm__softc_ada8054beb1d93be79364f98ff3bfbaf2}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03382}03382 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03383}03383         ret = sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_a4ace3f4eab56011b2fbbb76b5ad1dc67}{mqrx\_supported}} ?}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03384}03384             \mbox{\hyperlink{if__iwm_8c_a3300aff48f30d653f30ac16e5c10d245}{iwm\_rx\_mpdu\_mq}}(sc, m, offset, stolen) :}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03385}03385             \mbox{\hyperlink{if__iwm_8c_ac0f736a685f1438217be7c18eef829dd}{iwm\_rx\_rx\_mpdu}}(sc, m, offset, stolen);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03386}03386         \textcolor{keywordflow}{if} (!ret) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03387}03387                 counter\_u64\_add(ic-\/>ic\_ierrors, 1);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03388}03388                 \textcolor{keywordflow}{return} (ret);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03389}03389         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03390}03390 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03391}03391         wh = mtod(m, \textcolor{keyword}{struct} ieee80211\_frame *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03392}03392         ni = ieee80211\_find\_rxnode(ic, (\textcolor{keyword}{struct} ieee80211\_frame\_min *)wh);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03393}03393 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03394}03394         \mbox{\hyperlink{if__iwmvar_8h_a2bc8b1196a564b1b70c11f96391760fa}{IWM\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03395}03395 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03396}03396         NET\_EPOCH\_ENTER(et);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03397}03397         \textcolor{keywordflow}{if} (ni != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03398}03398                 \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_RECV, \textcolor{stringliteral}{"{}input m \%p\(\backslash\)n"{}}, m);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03399}03399                 ieee80211\_input\_mimo(ni, m);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03400}03400                 ieee80211\_free\_node(ni);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03401}03401         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03402}03402                 \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_RECV, \textcolor{stringliteral}{"{}inputall m \%p\(\backslash\)n"{}}, m);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03403}03403                 ieee80211\_input\_mimo\_all(ic, m);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03404}03404         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03405}03405         NET\_EPOCH\_EXIT(et);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03406}03406 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03407}03407         \mbox{\hyperlink{if__iwmvar_8h_ac9f22c2982def9e764105396531c69be}{IWM\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03408}03408 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03409}03409         \textcolor{keywordflow}{return} \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03410}03410 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03411}03411 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03412}03412 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03413}\mbox{\hyperlink{if__iwm_8c_aa097595d77774ba5730e4a57ac86932e}{03413}} \mbox{\hyperlink{if__iwm_8c_aa097595d77774ba5730e4a57ac86932e}{iwm\_rx\_tx\_cmd\_single}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__rx__packet}{iwm\_rx\_packet}} *pkt,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03414}03414         \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__node}{iwm\_node}} *in)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03415}03415 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03416}03416         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__tx__resp}{iwm\_tx\_resp}} *tx\_resp = (\textcolor{keywordtype}{void} *)pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a77036fd43499c32e7ec28e2d47ed1c33}{data}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03417}03417         \textcolor{keyword}{struct} ieee80211\_ratectl\_tx\_status *txs = \&sc-\/>\mbox{\hyperlink{structiwm__softc_ab09061771c5c241e563b19b874f2fe1c}{sc\_txs}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03418}03418         \textcolor{keyword}{struct} ieee80211\_node *ni = \&in-\/>\mbox{\hyperlink{structiwm__node_ad467ee0de0b3403d7545869a1e547ef5}{in\_ni}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03419}03419         \textcolor{keyword}{struct} ieee80211vap *vap = ni-\/>ni\_vap;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03420}03420         \textcolor{keywordtype}{int} \mbox{\hyperlink{structiwm__tx__resp_a586f482b3bb3dfc7bbc3213e08d52912}{status}} = le16toh(tx\_resp-\/>\mbox{\hyperlink{structiwm__tx__resp_a586f482b3bb3dfc7bbc3213e08d52912}{status}}.\mbox{\hyperlink{structiwm__agg__tx__status_a0fd1b52317fd3bf572e36b3e87bd7c21}{status}}) \& \mbox{\hyperlink{if__iwmreg_8h_af16dacb0e3af2ea14d005dc89291a7da}{IWM\_TX\_STATUS\_MSK}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03421}03421         \textcolor{keywordtype}{int} new\_rate, cur\_rate = vap-\/>iv\_bss-\/>ni\_txrate;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03422}03422         boolean\_t rate\_matched;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03423}03423         uint8\_t tx\_resp\_rate;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03424}03424 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03425}03425         KASSERT(tx\_resp-\/>\mbox{\hyperlink{structiwm__tx__resp_a5b523cbd45714cb71a331bf5b05945f0}{frame\_count}} == 1, (\textcolor{stringliteral}{"{}too many frames"{}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03426}03426 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03427}03427         \textcolor{comment}{/* Update rate control statistics. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03428}03428         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_XMIT, \textcolor{stringliteral}{"{}\%s: status=0x\%04x, seq=\%d, fc=\%d, btc=\%d, frts=\%d, ff=\%d, irate=\%08x, wmt=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03429}03429             \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03430}03430             (\textcolor{keywordtype}{int}) le16toh(tx\_resp-\/>\mbox{\hyperlink{structiwm__tx__resp_a586f482b3bb3dfc7bbc3213e08d52912}{status}}.\mbox{\hyperlink{structiwm__agg__tx__status_a0fd1b52317fd3bf572e36b3e87bd7c21}{status}}),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03431}03431             (\textcolor{keywordtype}{int}) le16toh(tx\_resp-\/>\mbox{\hyperlink{structiwm__tx__resp_a586f482b3bb3dfc7bbc3213e08d52912}{status}}.\mbox{\hyperlink{structiwm__agg__tx__status_aea6e84bcd8bd1fd2f51818b1b20d5550}{sequence}}),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03432}03432             tx\_resp-\/>\mbox{\hyperlink{structiwm__tx__resp_a5b523cbd45714cb71a331bf5b05945f0}{frame\_count}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03433}03433             tx\_resp-\/>\mbox{\hyperlink{structiwm__tx__resp_af6e2e19bcc15b70795b3652069eaa8f9}{bt\_kill\_count}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03434}03434             tx\_resp-\/>\mbox{\hyperlink{structiwm__tx__resp_a9b48d6848a86eaa6c760e06e17576d0e}{failure\_rts}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03435}03435             tx\_resp-\/>\mbox{\hyperlink{structiwm__tx__resp_ac8402cb68e90b77beaf1e216d6a33458}{failure\_frame}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03436}03436             le32toh(tx\_resp-\/>\mbox{\hyperlink{structiwm__tx__resp_ab3bd648aac29d9b780db2858a3c97232}{initial\_rate}}),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03437}03437             (\textcolor{keywordtype}{int}) le16toh(tx\_resp-\/>\mbox{\hyperlink{structiwm__tx__resp_a0c1c4c5572df03e16bfb534bcc953137}{wireless\_media\_time}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03438}03438 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03439}03439         tx\_resp\_rate = \mbox{\hyperlink{if__iwm_8c_a9edea4b80e47984bd4b4e6a5929625f6}{iwm\_rate\_from\_ucode\_rate}}(le32toh(tx\_resp-\/>\mbox{\hyperlink{structiwm__tx__resp_ab3bd648aac29d9b780db2858a3c97232}{initial\_rate}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03440}03440 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03441}03441         \textcolor{comment}{/* For rate control, ignore frames sent at different initial rate */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03442}03442         rate\_matched = (tx\_resp\_rate != 0 \&\& tx\_resp\_rate == cur\_rate);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03443}03443 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03444}03444         \textcolor{keywordflow}{if} (tx\_resp\_rate != 0 \&\& cur\_rate != 0 \&\& !rate\_matched) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03445}03445                 \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_TXRATE,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03446}03446                     \textcolor{stringliteral}{"{}tx\_resp\_rate doesn't match ni\_txrate (tx\_resp\_rate=\%u "{}}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03447}03447                     \textcolor{stringliteral}{"{}ni\_txrate=\%d)\(\backslash\)n"{}}, tx\_resp\_rate, cur\_rate);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03448}03448         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03449}03449 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03450}03450         txs-\/>flags = IEEE80211\_RATECTL\_STATUS\_SHORT\_RETRY |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03451}03451                      IEEE80211\_RATECTL\_STATUS\_LONG\_RETRY;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03452}03452         txs-\/>short\_retries = tx\_resp-\/>\mbox{\hyperlink{structiwm__tx__resp_a9b48d6848a86eaa6c760e06e17576d0e}{failure\_rts}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03453}03453         txs-\/>long\_retries = tx\_resp-\/>\mbox{\hyperlink{structiwm__tx__resp_ac8402cb68e90b77beaf1e216d6a33458}{failure\_frame}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03454}03454         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structiwm__tx__resp_a586f482b3bb3dfc7bbc3213e08d52912}{status}} != \mbox{\hyperlink{if__iwmreg_8h_a0945aaa465d8216b9e99818fc74f5bea}{IWM\_TX\_STATUS\_SUCCESS}} \&\&}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03455}03455             \mbox{\hyperlink{structiwm__tx__resp_a586f482b3bb3dfc7bbc3213e08d52912}{status}} != \mbox{\hyperlink{if__iwmreg_8h_a20a55ff626cd9e69912da193bbbd67b2}{IWM\_TX\_STATUS\_DIRECT\_DONE}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03456}03456                 \textcolor{keywordflow}{switch} (\mbox{\hyperlink{structiwm__tx__resp_a586f482b3bb3dfc7bbc3213e08d52912}{status}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03457}03457                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a8b7e8046157192bb361ef326778757fa}{IWM\_TX\_STATUS\_FAIL\_SHORT\_LIMIT}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03458}03458                         txs-\/>status = IEEE80211\_RATECTL\_TX\_FAIL\_SHORT;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03459}03459                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03460}03460                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a86021803a60f16f32a32a3685bbbc356}{IWM\_TX\_STATUS\_FAIL\_LONG\_LIMIT}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03461}03461                         txs-\/>status = IEEE80211\_RATECTL\_TX\_FAIL\_LONG;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03462}03462                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03463}03463                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_ae04ff63ce80e45d6836d3968a32cf595}{IWM\_TX\_STATUS\_FAIL\_LIFE\_EXPIRE}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03464}03464                         txs-\/>status = IEEE80211\_RATECTL\_TX\_FAIL\_EXPIRED;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03465}03465                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03466}03466                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03467}03467                         txs-\/>status = IEEE80211\_RATECTL\_TX\_FAIL\_UNSPECIFIED;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03468}03468                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03469}03469                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03470}03470         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03471}03471                 txs-\/>status = IEEE80211\_RATECTL\_TX\_SUCCESS;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03472}03472         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03473}03473 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03474}03474         \textcolor{keywordflow}{if} (rate\_matched) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03475}03475                 ieee80211\_ratectl\_tx\_complete(ni, txs);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03476}03476 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03477}03477                 \textcolor{keywordtype}{int} rix = ieee80211\_ratectl\_rate(vap-\/>iv\_bss, NULL, 0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03478}03478                 new\_rate = vap-\/>iv\_bss-\/>ni\_txrate;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03479}03479                 \textcolor{keywordflow}{if} (new\_rate != 0 \&\& new\_rate != cur\_rate) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03480}03480                         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__node}{iwm\_node}} *in = \mbox{\hyperlink{if__iwmvar_8h_a371387d15226f5218ae8d2d2657934a5}{IWM\_NODE}}(vap-\/>iv\_bss);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03481}03481                         \mbox{\hyperlink{if__iwm_8c_a8340199cf0662991ff3258c7236a6660}{iwm\_setrates}}(sc, in, rix);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03482}03482                         \mbox{\hyperlink{if__iwm__util_8c_a950ea16a30664e3e5bbdbbbd99d7f7a9}{iwm\_send\_lq\_cmd}}(sc, \&in-\/>\mbox{\hyperlink{structiwm__node_afdd6f4c966573fb34efc32291b3019c4}{in\_lq}}, FALSE);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03483}03483                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03484}03484         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03485}03485 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03486}03486         \textcolor{keywordflow}{return} (txs-\/>status != IEEE80211\_RATECTL\_TX\_SUCCESS);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03487}03487 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03488}03488 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03489}03489 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03490}\mbox{\hyperlink{if__iwm_8c_a4110e078ef1f59f656cffbe3a4d8cee2}{03490}} \mbox{\hyperlink{if__iwm_8c_a4110e078ef1f59f656cffbe3a4d8cee2}{iwm\_rx\_tx\_cmd}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__rx__packet}{iwm\_rx\_packet}} *pkt)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03491}03491 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03492}03492         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__cmd__header}{iwm\_cmd\_header}} *cmd\_hdr;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03493}03493         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__tx__ring}{iwm\_tx\_ring}} *ring;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03494}03494         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__tx__data}{iwm\_tx\_data}} *txd;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03495}03495         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__node}{iwm\_node}} *in;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03496}03496         \textcolor{keyword}{struct }mbuf *m;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03497}03497         \textcolor{keywordtype}{int} idx, qid, qmsk, status;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03498}03498 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03499}03499         cmd\_hdr = \&pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a8a11c0fa2a44d68ee8343d1dfd141883}{hdr}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03500}03500         idx = cmd\_hdr-\/>\mbox{\hyperlink{structiwm__cmd__header_a0be44dad2b5bd9175744c7c4b02db536}{idx}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03501}03501         qid = cmd\_hdr-\/>\mbox{\hyperlink{structiwm__cmd__header_ac5fb938f115b71e3716a90df16442fe0}{qid}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03502}03502 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03503}03503         ring = \&sc-\/>\mbox{\hyperlink{structiwm__softc_a9580b1b4fe19ddaa7f8e8b987dc92f8b}{txq}}[qid];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03504}03504         txd = \&ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a283b917a5d00de60d0932208c9b88557}{data}}[idx];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03505}03505         in = txd-\/>\mbox{\hyperlink{structiwm__tx__data_ad04e9acac0c032d0b16a586b7a58d368}{in}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03506}03506         m = txd-\/>\mbox{\hyperlink{structiwm__tx__data_ab4827b5c8b3d54f814e0ba0bb9444b7a}{m}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03507}03507 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03508}03508         KASSERT(txd-\/>\mbox{\hyperlink{structiwm__tx__data_a35bbb291d317a2f7316582dd97cabeaa}{done}} == 0, (\textcolor{stringliteral}{"{}txd not done"{}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03509}03509         KASSERT(txd-\/>\mbox{\hyperlink{structiwm__tx__data_ad04e9acac0c032d0b16a586b7a58d368}{in}} != NULL, (\textcolor{stringliteral}{"{}txd without node"{}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03510}03510         KASSERT(txd-\/>\mbox{\hyperlink{structiwm__tx__data_ab4827b5c8b3d54f814e0ba0bb9444b7a}{m}} != NULL, (\textcolor{stringliteral}{"{}txd without mbuf"{}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03511}03511 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03512}03512         sc-\/>\mbox{\hyperlink{structiwm__softc_aff40795d688fc78465103c744ca2f3b2}{sc\_tx\_timer}} = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03513}03513 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03514}03514         status = \mbox{\hyperlink{if__iwm_8c_aa097595d77774ba5730e4a57ac86932e}{iwm\_rx\_tx\_cmd\_single}}(sc, pkt, in);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03515}03515 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03516}03516         \textcolor{comment}{/* Unmap and free mbuf. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03517}03517         bus\_dmamap\_sync(ring-\/>\mbox{\hyperlink{structiwm__tx__ring_aca7fb956f70df0acc0787fc191872fb3}{data\_dmat}}, txd-\/>\mbox{\hyperlink{structiwm__tx__data_a56a04caca9190302823ff8aa91363d1f}{map}}, BUS\_DMASYNC\_POSTWRITE);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03518}03518         bus\_dmamap\_unload(ring-\/>\mbox{\hyperlink{structiwm__tx__ring_aca7fb956f70df0acc0787fc191872fb3}{data\_dmat}}, txd-\/>\mbox{\hyperlink{structiwm__tx__data_a56a04caca9190302823ff8aa91363d1f}{map}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03519}03519 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03520}03520         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_XMIT,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03521}03521             \textcolor{stringliteral}{"{}free txd \%p, in \%p\(\backslash\)n"{}}, txd, txd-\/>\mbox{\hyperlink{structiwm__tx__data_ad04e9acac0c032d0b16a586b7a58d368}{in}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03522}03522         txd-\/>\mbox{\hyperlink{structiwm__tx__data_a35bbb291d317a2f7316582dd97cabeaa}{done}} = 1;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03523}03523         txd-\/>\mbox{\hyperlink{structiwm__tx__data_ab4827b5c8b3d54f814e0ba0bb9444b7a}{m}} = NULL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03524}03524         txd-\/>\mbox{\hyperlink{structiwm__tx__data_ad04e9acac0c032d0b16a586b7a58d368}{in}} = NULL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03525}03525 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03526}03526         ieee80211\_tx\_complete(\&in-\/>\mbox{\hyperlink{structiwm__node_ad467ee0de0b3403d7545869a1e547ef5}{in\_ni}}, m, status);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03527}03527 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03528}03528         qmsk = 1 << qid;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03529}03529         \textcolor{keywordflow}{if} (-\/-\/ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a6762a1b02dd4f4caf5370fbf3b3db768}{queued}} < \mbox{\hyperlink{if__iwmvar_8h_a595732a885ba0d45022ac27803051019}{IWM\_TX\_RING\_LOMARK}} \&\& (sc-\/>\mbox{\hyperlink{structiwm__softc_aa06fec14bd51ea7a0ef7b4b549c59c03}{qfullmsk}} \& qmsk) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03530}03530                 sc-\/>\mbox{\hyperlink{structiwm__softc_aa06fec14bd51ea7a0ef7b4b549c59c03}{qfullmsk}} \&= \string~qmsk;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03531}03531                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_aa06fec14bd51ea7a0ef7b4b549c59c03}{qfullmsk}} == 0)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03532}03532                         \mbox{\hyperlink{if__iwm_8c_a48e9d98a5d061d2b24bd4bfbd4f798da}{iwm\_start}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03533}03533         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03534}03534 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03535}03535 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03536}03536 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03537}03537 \textcolor{comment}{ * transmit side}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03538}03538 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03539}03539 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03540}03540 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03541}03541 \textcolor{comment}{ * Process a "{}command done"{} firmware notification.  This is where we wakeup}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03542}03542 \textcolor{comment}{ * processes waiting for a synchronous command completion.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03543}03543 \textcolor{comment}{ * from if\_iwn}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03544}03544 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03545}03545 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03546}\mbox{\hyperlink{if__iwm_8c_a00d2c8a71fbdf5f5645e8b44135cf2ae}{03546}} \mbox{\hyperlink{if__iwm_8c_a00d2c8a71fbdf5f5645e8b44135cf2ae}{iwm\_cmd\_done}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__rx__packet}{iwm\_rx\_packet}} *pkt)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03547}03547 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03548}03548         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__tx__ring}{iwm\_tx\_ring}} *ring = \&sc-\/>\mbox{\hyperlink{structiwm__softc_a9580b1b4fe19ddaa7f8e8b987dc92f8b}{txq}}[\mbox{\hyperlink{if__iwmreg_8h_afbe5feb99076494815e86de80d0ca658}{IWM\_CMD\_QUEUE}}];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03549}03549         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__tx__data}{iwm\_tx\_data}} *data;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03550}03550 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03551}03551         \textcolor{keywordflow}{if} (pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a8a11c0fa2a44d68ee8343d1dfd141883}{hdr}}.\mbox{\hyperlink{structiwm__cmd__header_ac5fb938f115b71e3716a90df16442fe0}{qid}} != \mbox{\hyperlink{if__iwmreg_8h_afbe5feb99076494815e86de80d0ca658}{IWM\_CMD\_QUEUE}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03552}03552                 \textcolor{keywordflow}{return}; \textcolor{comment}{/* Not a command ack. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03553}03553         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03554}03554 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03555}03555         \textcolor{comment}{/* XXX wide commands? */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03556}03556         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_CMD,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03557}03557             \textcolor{stringliteral}{"{}cmd notification type 0x\%x qid \%d idx \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03558}03558             pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a8a11c0fa2a44d68ee8343d1dfd141883}{hdr}}.\mbox{\hyperlink{structiwm__cmd__header_ab5a2f0282f933c196760d58dad786384}{code}}, pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a8a11c0fa2a44d68ee8343d1dfd141883}{hdr}}.\mbox{\hyperlink{structiwm__cmd__header_ac5fb938f115b71e3716a90df16442fe0}{qid}}, pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a8a11c0fa2a44d68ee8343d1dfd141883}{hdr}}.\mbox{\hyperlink{structiwm__cmd__header_a0be44dad2b5bd9175744c7c4b02db536}{idx}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03559}03559 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03560}03560         data = \&ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a283b917a5d00de60d0932208c9b88557}{data}}[pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a8a11c0fa2a44d68ee8343d1dfd141883}{hdr}}.\mbox{\hyperlink{structiwm__cmd__header_a0be44dad2b5bd9175744c7c4b02db536}{idx}}];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03561}03561 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03562}03562         \textcolor{comment}{/* If the command was mapped in an mbuf, free it. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03563}03563         \textcolor{keywordflow}{if} (data-\/>\mbox{\hyperlink{structiwm__tx__data_ab4827b5c8b3d54f814e0ba0bb9444b7a}{m}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03564}03564                 bus\_dmamap\_sync(ring-\/>\mbox{\hyperlink{structiwm__tx__ring_aca7fb956f70df0acc0787fc191872fb3}{data\_dmat}}, data-\/>\mbox{\hyperlink{structiwm__tx__data_a56a04caca9190302823ff8aa91363d1f}{map}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03565}03565                     BUS\_DMASYNC\_POSTWRITE);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03566}03566                 bus\_dmamap\_unload(ring-\/>\mbox{\hyperlink{structiwm__tx__ring_aca7fb956f70df0acc0787fc191872fb3}{data\_dmat}}, data-\/>\mbox{\hyperlink{structiwm__tx__data_a56a04caca9190302823ff8aa91363d1f}{map}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03567}03567                 m\_freem(data-\/>\mbox{\hyperlink{structiwm__tx__data_ab4827b5c8b3d54f814e0ba0bb9444b7a}{m}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03568}03568                 data-\/>\mbox{\hyperlink{structiwm__tx__data_ab4827b5c8b3d54f814e0ba0bb9444b7a}{m}} = NULL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03569}03569         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03570}03570         wakeup(\&ring-\/>\mbox{\hyperlink{structiwm__tx__ring_ab58d91977455bdf898526616a7ab2fb2}{desc}}[pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a8a11c0fa2a44d68ee8343d1dfd141883}{hdr}}.\mbox{\hyperlink{structiwm__cmd__header_a0be44dad2b5bd9175744c7c4b02db536}{idx}}]);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03571}03571 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03572}03572         \textcolor{keywordflow}{if} (((pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a8a11c0fa2a44d68ee8343d1dfd141883}{hdr}}.\mbox{\hyperlink{structiwm__cmd__header_a0be44dad2b5bd9175744c7c4b02db536}{idx}} + ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a6762a1b02dd4f4caf5370fbf3b3db768}{queued}}) \% \mbox{\hyperlink{if__iwmvar_8h_a20e51e5cdc7d74b0625e0cdeefd8df14}{IWM\_TX\_RING\_COUNT}}) != ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a0d0525e4e6e9ccaa6336bf14d8dce312}{cur}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03573}03573                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03574}03574                     \textcolor{stringliteral}{"{}\%s: Some HCMDs skipped?: idx=\%d queued=\%d cur=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03575}03575                     \_\_func\_\_, pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a8a11c0fa2a44d68ee8343d1dfd141883}{hdr}}.\mbox{\hyperlink{structiwm__cmd__header_a0be44dad2b5bd9175744c7c4b02db536}{idx}}, ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a6762a1b02dd4f4caf5370fbf3b3db768}{queued}}, ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a0d0525e4e6e9ccaa6336bf14d8dce312}{cur}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03576}03576                 \textcolor{comment}{/* XXX call iwm\_force\_nmi() */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03577}03577         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03578}03578 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03579}03579         KASSERT(ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a6762a1b02dd4f4caf5370fbf3b3db768}{queued}} > 0, (\textcolor{stringliteral}{"{}ring-\/>queued is empty?"{}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03580}03580         ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a6762a1b02dd4f4caf5370fbf3b3db768}{queued}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03581}03581         \textcolor{keywordflow}{if} (ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a6762a1b02dd4f4caf5370fbf3b3db768}{queued}} == 0)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03582}03582                 \mbox{\hyperlink{if__iwm__pcie__trans_8c_a681a51185c01cc92dd72468be6a901c3}{iwm\_pcie\_clear\_cmd\_in\_flight}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03583}03583 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03584}03584 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03585}03585 \textcolor{preprocessor}{\#if 0}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03586}03586 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03587}03587 \textcolor{comment}{ * necessary only for block ack mode}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03588}03588 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03589}03589 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03590}03590 iwm\_update\_sched(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keywordtype}{int} qid, \textcolor{keywordtype}{int} idx, uint8\_t sta\_id,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03591}03591         uint16\_t len)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03592}03592 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03593}03593         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__agn__scd__bc__tbl}{iwm\_agn\_scd\_bc\_tbl}} *scd\_bc\_tbl;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03594}03594         uint16\_t w\_val;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03595}03595 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03596}03596         scd\_bc\_tbl = sc-\/>\mbox{\hyperlink{structiwm__softc_ab3ce0638afeea2b71cc357b0c968f4dd}{sched\_dma}}.\mbox{\hyperlink{structiwm__dma__info_a8b1776dfbd12b920fe7ec6fba682178d}{vaddr}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03597}03597 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03598}03598         len += 8; \textcolor{comment}{/* magic numbers came naturally from paris */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03599}03599         len = roundup(len, 4) / 4;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03600}03600 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03601}03601         w\_val = htole16(sta\_id << 12 | len);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03602}03602 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03603}03603         \textcolor{comment}{/* Update TX scheduler. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03604}03604         scd\_bc\_tbl[qid].\mbox{\hyperlink{structiwm__agn__scd__bc__tbl_a9cf9cac50da9f2b3905fde5f48ce9347}{tfd\_offset}}[idx] = w\_val;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03605}03605         bus\_dmamap\_sync(sc-\/>\mbox{\hyperlink{structiwm__softc_ab3ce0638afeea2b71cc357b0c968f4dd}{sched\_dma}}.\mbox{\hyperlink{structiwm__dma__info_a58938bb9054e381f73f7897fd7ae6ff1}{tag}}, sc-\/>\mbox{\hyperlink{structiwm__softc_ab3ce0638afeea2b71cc357b0c968f4dd}{sched\_dma}}.\mbox{\hyperlink{structiwm__dma__info_a9088f1c56d08041ac6e9f2439dd9b3dd}{map}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03606}03606             BUS\_DMASYNC\_PREWRITE);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03607}03607 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03608}03608         \textcolor{comment}{/* I really wonder what this is ?!? */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03609}03609         \textcolor{keywordflow}{if} (idx < \mbox{\hyperlink{if__iwmreg_8h_a6da88d8a083330533f48a18683de670e}{IWM\_TFD\_QUEUE\_SIZE\_BC\_DUP}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03610}03610                 scd\_bc\_tbl[qid].\mbox{\hyperlink{structiwm__agn__scd__bc__tbl_a9cf9cac50da9f2b3905fde5f48ce9347}{tfd\_offset}}[\mbox{\hyperlink{if__iwmreg_8h_ab6dce988d86f7951d1eedde6cd71e6c8}{IWM\_TFD\_QUEUE\_SIZE\_MAX}} + idx] = w\_val;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03611}03611                 bus\_dmamap\_sync(sc-\/>\mbox{\hyperlink{structiwm__softc_ab3ce0638afeea2b71cc357b0c968f4dd}{sched\_dma}}.\mbox{\hyperlink{structiwm__dma__info_a58938bb9054e381f73f7897fd7ae6ff1}{tag}}, sc-\/>\mbox{\hyperlink{structiwm__softc_ab3ce0638afeea2b71cc357b0c968f4dd}{sched\_dma}}.\mbox{\hyperlink{structiwm__dma__info_a9088f1c56d08041ac6e9f2439dd9b3dd}{map}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03612}03612                     BUS\_DMASYNC\_PREWRITE);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03613}03613         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03614}03614 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03615}03615 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03616}03616 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03617}03617 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03618}\mbox{\hyperlink{if__iwm_8c_a3804f16c749a999d38cfe44e8c9d8c7a}{03618}} \mbox{\hyperlink{if__iwm_8c_a3804f16c749a999d38cfe44e8c9d8c7a}{iwm\_tx\_rateidx\_global\_lookup}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, uint8\_t rate)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03619}03619 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03620}03620         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03621}03621 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03622}03622         \textcolor{keywordflow}{for} (i = 0; i < nitems(\mbox{\hyperlink{if__iwm_8c_a08ef9e6176f57d36238a07cdc3dc336c}{iwm\_rates}}); i++) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03623}03623                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__iwm_8c_a08ef9e6176f57d36238a07cdc3dc336c}{iwm\_rates}}[i].rate == rate)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03624}03624                         \textcolor{keywordflow}{return} (i);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03625}03625         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03626}03626         \textcolor{comment}{/* XXX error? */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03627}03627         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_XMIT | IWM\_DEBUG\_TXRATE,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03628}03628             \textcolor{stringliteral}{"{}\%s: couldn't find an entry for rate=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03629}03629             \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03630}03630             rate);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03631}03631         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03632}03632 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03633}03633 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03634}03634 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03635}03635 \textcolor{comment}{ * Fill in the rate related information for a transmit command.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03636}03636 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03637}03637 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__rate}{iwm\_rate}} *}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03638}\mbox{\hyperlink{if__iwm_8c_a178a81815c44051bdf6555ae9caca65b}{03638}} \mbox{\hyperlink{if__iwm_8c_a178a81815c44051bdf6555ae9caca65b}{iwm\_tx\_fill\_cmd}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__node}{iwm\_node}} *in,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03639}03639         \textcolor{keyword}{struct} mbuf *m, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__tx__cmd}{iwm\_tx\_cmd}} *tx)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03640}03640 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03641}03641         \textcolor{keyword}{struct }ieee80211\_node *ni = \&in-\/>\mbox{\hyperlink{structiwm__node_ad467ee0de0b3403d7545869a1e547ef5}{in\_ni}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03642}03642         \textcolor{keyword}{struct }ieee80211\_frame *wh;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03643}03643         \textcolor{keyword}{const} \textcolor{keyword}{struct }ieee80211\_txparam *tp = ni-\/>ni\_txparms;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03644}03644         \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__rate}{iwm\_rate}} *rinfo;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03645}03645         \textcolor{keywordtype}{int} type;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03646}03646         \textcolor{keywordtype}{int} ridx, rate\_flags;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03647}03647 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03648}03648         wh = mtod(m, \textcolor{keyword}{struct} ieee80211\_frame *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03649}03649         type = wh-\/>i\_fc[0] \& IEEE80211\_FC0\_TYPE\_MASK;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03650}03650 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03651}03651         tx-\/>\mbox{\hyperlink{structiwm__tx__cmd_ace7052fd5d6a439e802545cf85f29f8e}{rts\_retry\_limit}} = \mbox{\hyperlink{if__iwmreg_8h_ae3b7ada80ab671270c2718310581b44b}{IWM\_RTS\_DFAULT\_RETRY\_LIMIT}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03652}03652         tx-\/>\mbox{\hyperlink{structiwm__tx__cmd_a0e071f10feed0423c99d25caccd96765}{data\_retry\_limit}} = \mbox{\hyperlink{if__iwmreg_8h_a206168612fd2cf91fc45a85c1e7afa75}{IWM\_DEFAULT\_TX\_RETRY}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03653}03653 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03654}03654         \textcolor{keywordflow}{if} (type == IEEE80211\_FC0\_TYPE\_MGT ||}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03655}03655             type == IEEE80211\_FC0\_TYPE\_CTL ||}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03656}03656             (m-\/>m\_flags \& M\_EAPOL) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03657}03657                 ridx = \mbox{\hyperlink{if__iwm_8c_a3804f16c749a999d38cfe44e8c9d8c7a}{iwm\_tx\_rateidx\_global\_lookup}}(sc, tp-\/>mgmtrate);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03658}03658                 \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_TXRATE,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03659}03659                     \textcolor{stringliteral}{"{}\%s: MGT (\%d)\(\backslash\)n"{}}, \_\_func\_\_, tp-\/>mgmtrate);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03660}03660         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (IEEE80211\_IS\_MULTICAST(wh-\/>i\_addr1)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03661}03661                 ridx = \mbox{\hyperlink{if__iwm_8c_a3804f16c749a999d38cfe44e8c9d8c7a}{iwm\_tx\_rateidx\_global\_lookup}}(sc, tp-\/>mcastrate);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03662}03662                 \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_TXRATE,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03663}03663                     \textcolor{stringliteral}{"{}\%s: MCAST (\%d)\(\backslash\)n"{}}, \_\_func\_\_, tp-\/>mcastrate);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03664}03664         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (tp-\/>ucastrate != IEEE80211\_FIXED\_RATE\_NONE) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03665}03665                 ridx = \mbox{\hyperlink{if__iwm_8c_a3804f16c749a999d38cfe44e8c9d8c7a}{iwm\_tx\_rateidx\_global\_lookup}}(sc, tp-\/>ucastrate);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03666}03666                 \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_TXRATE,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03667}03667                     \textcolor{stringliteral}{"{}\%s: FIXED\_RATE (\%d)\(\backslash\)n"{}}, \_\_func\_\_, tp-\/>ucastrate);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03668}03668         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03669}03669                 \textcolor{comment}{/* for data frames, use RS table */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03670}03670                 \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_TXRATE, \textcolor{stringliteral}{"{}\%s: DATA\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03671}03671                 ridx = \mbox{\hyperlink{if__iwm_8c_a27fa2e4e7df3a8837691fb2d965e3335}{iwm\_rate2ridx}}(sc, ni-\/>ni\_txrate);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03672}03672                 \textcolor{keywordflow}{if} (ridx == -\/1)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03673}03673                         ridx = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03674}03674 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03675}03675                 \textcolor{comment}{/* This is the index into the programmed table */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03676}03676                 tx-\/>\mbox{\hyperlink{structiwm__tx__cmd_a96dcad4a81e87b848e97cb402750014b}{initial\_rate\_index}} = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03677}03677                 tx-\/>\mbox{\hyperlink{structiwm__tx__cmd_ac642b4a88e5215548d10e14bf6ffedaa}{tx\_flags}} |= htole32(\mbox{\hyperlink{if__iwmreg_8h_a8f777a2e07389fa22d623eafd52008c4}{IWM\_TX\_CMD\_FLG\_STA\_RATE}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03678}03678         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03679}03679 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03680}03680         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_XMIT | IWM\_DEBUG\_TXRATE,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03681}03681             \textcolor{stringliteral}{"{}\%s: frame type=\%d txrate \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03682}03682                 \_\_func\_\_, type, \mbox{\hyperlink{if__iwm_8c_a08ef9e6176f57d36238a07cdc3dc336c}{iwm\_rates}}[ridx].\mbox{\hyperlink{structiwm__rate_aa16a3fc2d9313e70ebdcf29be6595006}{rate}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03683}03683 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03684}03684         rinfo = \&\mbox{\hyperlink{if__iwm_8c_a08ef9e6176f57d36238a07cdc3dc336c}{iwm\_rates}}[ridx];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03685}03685 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03686}03686         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_TXRATE, \textcolor{stringliteral}{"{}\%s: ridx=\%d; rate=\%d, CCK=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03687}03687             \_\_func\_\_, ridx,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03688}03688             rinfo-\/>\mbox{\hyperlink{structiwm__rate_aa16a3fc2d9313e70ebdcf29be6595006}{rate}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03689}03689             !! (\mbox{\hyperlink{if__iwm_8c_a0d2a2f868dde98abcf20edb8b64579cd}{IWM\_RIDX\_IS\_CCK}}(ridx))}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03690}03690             );}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03691}03691 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03692}03692         \textcolor{comment}{/* XXX TODO: hard-\/coded TX antenna? */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03693}03693         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_a9b399704eeb3c9299fe79ff7ebf0b3c3}{device\_family}} == \mbox{\hyperlink{if__iwm__config_8h_a134dc690a22b13281e655ce3d4944141a8a00713d5adbc31a19da103557621647}{IWM\_DEVICE\_FAMILY\_9000}})}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03694}03694                 rate\_flags = \mbox{\hyperlink{if__iwmreg_8h_a80922a61103e08b836b181354e38d909}{IWM\_RATE\_MCS\_ANT\_B\_MSK}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03695}03695         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03696}03696                 rate\_flags = \mbox{\hyperlink{if__iwmreg_8h_add50a74c7af6bec1ee274dbe6d0fbd08}{IWM\_RATE\_MCS\_ANT\_A\_MSK}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03697}03697         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__iwm_8c_a0d2a2f868dde98abcf20edb8b64579cd}{IWM\_RIDX\_IS\_CCK}}(ridx))}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03698}03698                 rate\_flags |= \mbox{\hyperlink{if__iwmreg_8h_aadfe6fb9a91375e8fb75c5f2d35f5f8f}{IWM\_RATE\_MCS\_CCK\_MSK}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03699}03699         tx-\/>\mbox{\hyperlink{structiwm__tx__cmd_ad5d5aa39bc2411ae3a546f79842b9150}{rate\_n\_flags}} = htole32(rate\_flags | rinfo-\/>\mbox{\hyperlink{structiwm__rate_ae4883c6ee5d2c0f3b49dc2d7082e9c6a}{plcp}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03700}03700 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03701}03701         \textcolor{keywordflow}{return} rinfo;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03702}03702 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03703}03703 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03704}\mbox{\hyperlink{if__iwm_8c_a99cf2db4bc130ed16717266f03835807}{03704}} \textcolor{preprocessor}{\#define TB0\_SIZE 16}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03705}03705 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03706}\mbox{\hyperlink{if__iwm_8c_a376e1489b8d710c2b759c2b74ad84808}{03706}} \mbox{\hyperlink{if__iwm_8c_a376e1489b8d710c2b759c2b74ad84808}{iwm\_tx}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keyword}{struct} mbuf *m, \textcolor{keyword}{struct} ieee80211\_node *ni, \textcolor{keywordtype}{int} ac)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03707}03707 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03708}03708         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structiwm__softc_ada8054beb1d93be79364f98ff3bfbaf2}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03709}03709         \textcolor{keyword}{struct }ieee80211vap *vap = TAILQ\_FIRST(\&ic-\/>ic\_vaps);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03710}03710         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__node}{iwm\_node}} *in = \mbox{\hyperlink{if__iwmvar_8h_a371387d15226f5218ae8d2d2657934a5}{IWM\_NODE}}(ni);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03711}03711         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__tx__ring}{iwm\_tx\_ring}} *ring;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03712}03712         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__tx__data}{iwm\_tx\_data}} *data;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03713}03713         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__tfd}{iwm\_tfd}} *desc;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03714}03714         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__device__cmd}{iwm\_device\_cmd}} *cmd;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03715}03715         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__tx__cmd}{iwm\_tx\_cmd}} *tx;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03716}03716         \textcolor{keyword}{struct }ieee80211\_frame *wh;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03717}03717         \textcolor{keyword}{struct }ieee80211\_key *k = NULL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03718}03718         \textcolor{keyword}{struct }mbuf *m1;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03719}03719         \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__rate}{iwm\_rate}} *rinfo;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03720}03720         uint32\_t flags;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03721}03721         u\_int hdrlen;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03722}03722         bus\_dma\_segment\_t *seg, segs[\mbox{\hyperlink{if__iwmvar_8h_a7f03ff078faff501559eac28020bbfdb}{IWM\_MAX\_SCATTER}}];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03723}03723         \textcolor{keywordtype}{int} nsegs;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03724}03724         uint8\_t tid, type;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03725}03725         \textcolor{keywordtype}{int} i, totlen, error, pad;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03726}03726 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03727}03727         wh = mtod(m, \textcolor{keyword}{struct} ieee80211\_frame *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03728}03728         hdrlen = ieee80211\_anyhdrsize(wh);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03729}03729         type = wh-\/>i\_fc[0] \& IEEE80211\_FC0\_TYPE\_MASK;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03730}03730         tid = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03731}03731         ring = \&sc-\/>\mbox{\hyperlink{structiwm__softc_a9580b1b4fe19ddaa7f8e8b987dc92f8b}{txq}}[ac];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03732}03732         desc = \&ring-\/>\mbox{\hyperlink{structiwm__tx__ring_ab58d91977455bdf898526616a7ab2fb2}{desc}}[ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a0d0525e4e6e9ccaa6336bf14d8dce312}{cur}}];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03733}03733         data = \&ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a283b917a5d00de60d0932208c9b88557}{data}}[ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a0d0525e4e6e9ccaa6336bf14d8dce312}{cur}}];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03734}03734 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03735}03735         \textcolor{comment}{/* Fill out iwm\_tx\_cmd to send to the firmware */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03736}03736         cmd = \&ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a992f51a65dcec815f15f12a0f53dd6ef}{cmd}}[ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a0d0525e4e6e9ccaa6336bf14d8dce312}{cur}}];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03737}03737         cmd-\/>\mbox{\hyperlink{structiwm__device__cmd_a1a1d03b215c6664e6b4a3a804d24ebcf}{hdr}}.\mbox{\hyperlink{structiwm__cmd__header_ab5a2f0282f933c196760d58dad786384}{code}} = \mbox{\hyperlink{if__iwmreg_8h_af65d7ad1f54b99701705e24ecde87b02}{IWM\_TX\_CMD}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03738}03738         cmd-\/>\mbox{\hyperlink{structiwm__device__cmd_a1a1d03b215c6664e6b4a3a804d24ebcf}{hdr}}.\mbox{\hyperlink{structiwm__cmd__header_a26e466f1aee729f521e363785eeb0d08}{flags}} = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03739}03739         cmd-\/>\mbox{\hyperlink{structiwm__device__cmd_a1a1d03b215c6664e6b4a3a804d24ebcf}{hdr}}.\mbox{\hyperlink{structiwm__cmd__header_ac5fb938f115b71e3716a90df16442fe0}{qid}} = ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a985ab594338fd5c2df0efdd225636f8a}{qid}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03740}03740         cmd-\/>\mbox{\hyperlink{structiwm__device__cmd_a1a1d03b215c6664e6b4a3a804d24ebcf}{hdr}}.\mbox{\hyperlink{structiwm__cmd__header_a0be44dad2b5bd9175744c7c4b02db536}{idx}} = ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a0d0525e4e6e9ccaa6336bf14d8dce312}{cur}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03741}03741 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03742}03742         tx = (\textcolor{keywordtype}{void} *)cmd-\/>\mbox{\hyperlink{structiwm__device__cmd_a1afe895aef4c11550b4ef79c3f6cb785}{data}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03743}03743         memset(tx, 0, \textcolor{keyword}{sizeof}(*tx));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03744}03744 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03745}03745         rinfo = \mbox{\hyperlink{if__iwm_8c_a178a81815c44051bdf6555ae9caca65b}{iwm\_tx\_fill\_cmd}}(sc, in, m, tx);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03746}03746 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03747}03747         \textcolor{comment}{/* Encrypt the frame if need be. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03748}03748         \textcolor{keywordflow}{if} (wh-\/>i\_fc[1] \& IEEE80211\_FC1\_PROTECTED) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03749}03749                 \textcolor{comment}{/* Retrieve key for TX \&\& do software encryption. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03750}03750                 k = ieee80211\_crypto\_encap(ni, m);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03751}03751                 \textcolor{keywordflow}{if} (k == NULL) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03752}03752                         m\_freem(m);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03753}03753                         \textcolor{keywordflow}{return} (ENOBUFS);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03754}03754                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03755}03755                 \textcolor{comment}{/* 802.11 header may have moved. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03756}03756                 wh = mtod(m, \textcolor{keyword}{struct} ieee80211\_frame *);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03757}03757         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03758}03758 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03759}03759         \textcolor{keywordflow}{if} (ieee80211\_radiotap\_active\_vap(vap)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03760}03760                 \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__tx__radiotap__header}{iwm\_tx\_radiotap\_header}} *tap = \&sc-\/>\mbox{\hyperlink{structiwm__softc_a0ec90ab0f4acd0aeb3ef0636b3ea6f94}{sc\_txtap}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03761}03761 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03762}03762                 tap-\/>\mbox{\hyperlink{structiwm__tx__radiotap__header_aee9da2a8cb6031d2a48d572f421e6db8}{wt\_flags}} = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03763}03763                 tap-\/>\mbox{\hyperlink{structiwm__tx__radiotap__header_a26bd66976a1794b7ac27555c09f1ed63}{wt\_chan\_freq}} = htole16(ni-\/>ni\_chan-\/>ic\_freq);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03764}03764                 tap-\/>\mbox{\hyperlink{structiwm__tx__radiotap__header_add8de9ad39ae66b5af8294be347c6346}{wt\_chan\_flags}} = htole16(ni-\/>ni\_chan-\/>ic\_flags);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03765}03765                 tap-\/>\mbox{\hyperlink{structiwm__tx__radiotap__header_a4d03b65bdf7b75c24b3da13e74161f00}{wt\_rate}} = rinfo-\/>\mbox{\hyperlink{structiwm__rate_aa16a3fc2d9313e70ebdcf29be6595006}{rate}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03766}03766                 \textcolor{keywordflow}{if} (k != NULL)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03767}03767                         tap-\/>\mbox{\hyperlink{structiwm__tx__radiotap__header_aee9da2a8cb6031d2a48d572f421e6db8}{wt\_flags}} |= IEEE80211\_RADIOTAP\_F\_WEP;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03768}03768                 ieee80211\_radiotap\_tx(vap, m);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03769}03769         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03770}03770 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03771}03771         flags = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03772}03772         totlen = m-\/>m\_pkthdr.len;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03773}03773         \textcolor{keywordflow}{if} (!IEEE80211\_IS\_MULTICAST(wh-\/>i\_addr1)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03774}03774                 flags |= \mbox{\hyperlink{if__iwmreg_8h_aa66d2a39ce6a7f7e4bc8a2e6e1de8010}{IWM\_TX\_CMD\_FLG\_ACK}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03775}03775         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03776}03776 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03777}03777         \textcolor{keywordflow}{if} (type == IEEE80211\_FC0\_TYPE\_DATA \&\&}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03778}03778             totlen + IEEE80211\_CRC\_LEN > vap-\/>iv\_rtsthreshold \&\&}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03779}03779             !IEEE80211\_IS\_MULTICAST(wh-\/>i\_addr1)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03780}03780                 flags |= \mbox{\hyperlink{if__iwmreg_8h_a15208f59bce9b493a9f33f95d702547f}{IWM\_TX\_CMD\_FLG\_PROT\_REQUIRE}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03781}03781         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03782}03782 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03783}03783         tx-\/>\mbox{\hyperlink{structiwm__tx__cmd_aa10546423752d9b1e6a62a79b86126b4}{sta\_id}} = \mbox{\hyperlink{if__iwmvar_8h_a91f3cca91add40062cd65ec754ef394d}{IWM\_STATION\_ID}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03784}03784 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03785}03785         \textcolor{keywordflow}{if} (type == IEEE80211\_FC0\_TYPE\_MGT) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03786}03786                 uint8\_t subtype = wh-\/>i\_fc[0] \& IEEE80211\_FC0\_SUBTYPE\_MASK;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03787}03787 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03788}03788                 \textcolor{keywordflow}{if} (subtype == IEEE80211\_FC0\_SUBTYPE\_ASSOC\_REQ ||}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03789}03789                     subtype == IEEE80211\_FC0\_SUBTYPE\_REASSOC\_REQ) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03790}03790                         tx-\/>\mbox{\hyperlink{structiwm__tx__cmd_a4b0adbf52aa10221ca9ffbb67b8825c7}{pm\_frame\_timeout}} = htole16(\mbox{\hyperlink{if__iwmreg_8h_afb96edcd4a4b97ba8c7ff0f62044b4e4ab94158d5509b73e2e4b707bbac5e256f}{IWM\_PM\_FRAME\_ASSOC}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03791}03791                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (subtype == IEEE80211\_FC0\_SUBTYPE\_ACTION) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03792}03792                         tx-\/>\mbox{\hyperlink{structiwm__tx__cmd_a4b0adbf52aa10221ca9ffbb67b8825c7}{pm\_frame\_timeout}} = htole16(\mbox{\hyperlink{if__iwmreg_8h_afb96edcd4a4b97ba8c7ff0f62044b4e4aa93ee80579c36293e78fd6e802f86017}{IWM\_PM\_FRAME\_NONE}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03793}03793                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03794}03794                         tx-\/>\mbox{\hyperlink{structiwm__tx__cmd_a4b0adbf52aa10221ca9ffbb67b8825c7}{pm\_frame\_timeout}} = htole16(\mbox{\hyperlink{if__iwmreg_8h_afb96edcd4a4b97ba8c7ff0f62044b4e4a481dad666f61bd2334d70a266f35ef54}{IWM\_PM\_FRAME\_MGMT}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03795}03795                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03796}03796         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03797}03797                 tx-\/>\mbox{\hyperlink{structiwm__tx__cmd_a4b0adbf52aa10221ca9ffbb67b8825c7}{pm\_frame\_timeout}} = htole16(\mbox{\hyperlink{if__iwmreg_8h_afb96edcd4a4b97ba8c7ff0f62044b4e4aa93ee80579c36293e78fd6e802f86017}{IWM\_PM\_FRAME\_NONE}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03798}03798         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03799}03799 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03800}03800         \textcolor{keywordflow}{if} (hdrlen \& 3) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03801}03801                 \textcolor{comment}{/* First segment length must be a multiple of 4. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03802}03802                 flags |= \mbox{\hyperlink{if__iwmreg_8h_a6eb1c21a5074c94f77ecd602460fea63}{IWM\_TX\_CMD\_FLG\_MH\_PAD}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03803}03803                 tx-\/>\mbox{\hyperlink{structiwm__tx__cmd_a5cbf30ad34524837b47d503116564079}{offload\_assist}} |= htole16(\mbox{\hyperlink{if__iwmreg_8h_ad3057609636aaa360e8960ad6b0194ae}{IWM\_TX\_CMD\_OFFLD\_PAD}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03804}03804                 pad = 4 -\/ (hdrlen \& 3);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03805}03805         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03806}03806                 tx-\/>\mbox{\hyperlink{structiwm__tx__cmd_a5cbf30ad34524837b47d503116564079}{offload\_assist}} = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03807}03807                 pad = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03808}03808         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03809}03809 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03810}03810         tx-\/>\mbox{\hyperlink{structiwm__tx__cmd_ae8b4eeb3789fbc1c95a74b2f8fc9429c}{len}} = htole16(totlen);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03811}03811         tx-\/>\mbox{\hyperlink{structiwm__tx__cmd_ab9c3a8118f7e7cedddb7812a69b77e79}{tid\_tspec}} = tid;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03812}03812         tx-\/>\mbox{\hyperlink{structiwm__tx__cmd_a5b3261322a1784a209a7bc47d0b159f3}{life\_time}} = htole32(\mbox{\hyperlink{if__iwmreg_8h_a4b133db69dca871fd5652d86aebb99cc}{IWM\_TX\_CMD\_LIFE\_TIME\_INFINITE}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03813}03813 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03814}03814         \textcolor{comment}{/* Set physical address of "{}scratch area"{}. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03815}03815         tx-\/>\mbox{\hyperlink{structiwm__tx__cmd_a7a3d9c085f14dedb8c8303ceef52b03d}{dram\_lsb\_ptr}} = htole32(data-\/>\mbox{\hyperlink{structiwm__tx__data_a499449df34d80fe5397688a0ecc381f0}{scratch\_paddr}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03816}03816         tx-\/>\mbox{\hyperlink{structiwm__tx__cmd_a28c6434b52172fcd7912e5bf1c40dafa}{dram\_msb\_ptr}} = \mbox{\hyperlink{if__iwmreg_8h_a93ed963e6f659fd4167bc670bfffc26b}{iwm\_get\_dma\_hi\_addr}}(data-\/>\mbox{\hyperlink{structiwm__tx__data_a499449df34d80fe5397688a0ecc381f0}{scratch\_paddr}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03817}03817 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03818}03818         \textcolor{comment}{/* Copy 802.11 header in TX command. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03819}03819         memcpy((uint8\_t *)tx + \textcolor{keyword}{sizeof}(*tx), wh, hdrlen);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03820}03820 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03821}03821         flags |= \mbox{\hyperlink{if__iwmreg_8h_abb3692f2f265cb3672d1c128916ea355}{IWM\_TX\_CMD\_FLG\_BT\_DIS}} | \mbox{\hyperlink{if__iwmreg_8h_ad66717b11d7adf4ae3c6e0375eae1acc}{IWM\_TX\_CMD\_FLG\_SEQ\_CTL}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03822}03822 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03823}03823         tx-\/>\mbox{\hyperlink{structiwm__tx__cmd_a0dfd4851ba40908fbea3efad36b2259c}{sec\_ctl}} = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03824}03824         tx-\/>\mbox{\hyperlink{structiwm__tx__cmd_ac642b4a88e5215548d10e14bf6ffedaa}{tx\_flags}} |= htole32(flags);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03825}03825 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03826}03826         \textcolor{comment}{/* Trim 802.11 header. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03827}03827         m\_adj(m, hdrlen);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03828}03828         error = bus\_dmamap\_load\_mbuf\_sg(ring-\/>\mbox{\hyperlink{structiwm__tx__ring_aca7fb956f70df0acc0787fc191872fb3}{data\_dmat}}, data-\/>\mbox{\hyperlink{structiwm__tx__data_a56a04caca9190302823ff8aa91363d1f}{map}}, m,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03829}03829             segs, \&nsegs, BUS\_DMA\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03830}03830         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03831}03831                 \textcolor{keywordflow}{if} (error != EFBIG) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03832}03832                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}can't map mbuf (error \%d)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03833}03833                             error);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03834}03834                         m\_freem(m);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03835}03835                         \textcolor{keywordflow}{return} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03836}03836                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03837}03837                 \textcolor{comment}{/* Too many DMA segments, linearize mbuf. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03838}03838                 m1 = m\_collapse(m, M\_NOWAIT, \mbox{\hyperlink{if__iwmvar_8h_a7f03ff078faff501559eac28020bbfdb}{IWM\_MAX\_SCATTER}} -\/ 2);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03839}03839                 \textcolor{keywordflow}{if} (m1 == NULL) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03840}03840                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03841}03841                             \textcolor{stringliteral}{"{}\%s: could not defrag mbuf\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03842}03842                         m\_freem(m);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03843}03843                         \textcolor{keywordflow}{return} (ENOBUFS);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03844}03844                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03845}03845                 m = m1;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03846}03846 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03847}03847                 error = bus\_dmamap\_load\_mbuf\_sg(ring-\/>\mbox{\hyperlink{structiwm__tx__ring_aca7fb956f70df0acc0787fc191872fb3}{data\_dmat}}, data-\/>\mbox{\hyperlink{structiwm__tx__data_a56a04caca9190302823ff8aa91363d1f}{map}}, m,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03848}03848                     segs, \&nsegs, BUS\_DMA\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03849}03849                 \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03850}03850                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}can't map mbuf (error \%d)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03851}03851                             error);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03852}03852                         m\_freem(m);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03853}03853                         \textcolor{keywordflow}{return} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03854}03854                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03855}03855         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03856}03856         data-\/>\mbox{\hyperlink{structiwm__tx__data_ab4827b5c8b3d54f814e0ba0bb9444b7a}{m}} = m;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03857}03857         data-\/>\mbox{\hyperlink{structiwm__tx__data_ad04e9acac0c032d0b16a586b7a58d368}{in}} = in;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03858}03858         data-\/>\mbox{\hyperlink{structiwm__tx__data_a35bbb291d317a2f7316582dd97cabeaa}{done}} = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03859}03859 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03860}03860         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_XMIT,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03861}03861             \textcolor{stringliteral}{"{}sending txd \%p, in \%p\(\backslash\)n"{}}, data, data-\/>\mbox{\hyperlink{structiwm__tx__data_ad04e9acac0c032d0b16a586b7a58d368}{in}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03862}03862         KASSERT(data-\/>\mbox{\hyperlink{structiwm__tx__data_ad04e9acac0c032d0b16a586b7a58d368}{in}} != NULL, (\textcolor{stringliteral}{"{}node is NULL"{}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03863}03863 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03864}03864         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_XMIT,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03865}03865             \textcolor{stringliteral}{"{}sending data: qid=\%d idx=\%d len=\%d nsegs=\%d txflags=0x\%08x rate\_n\_flags=0x\%08x rateidx=\%u\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03866}03866             ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a985ab594338fd5c2df0efdd225636f8a}{qid}}, ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a0d0525e4e6e9ccaa6336bf14d8dce312}{cur}}, totlen, nsegs,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03867}03867             le32toh(tx-\/>\mbox{\hyperlink{structiwm__tx__cmd_ac642b4a88e5215548d10e14bf6ffedaa}{tx\_flags}}),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03868}03868             le32toh(tx-\/>\mbox{\hyperlink{structiwm__tx__cmd_ad5d5aa39bc2411ae3a546f79842b9150}{rate\_n\_flags}}),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03869}03869             tx-\/>\mbox{\hyperlink{structiwm__tx__cmd_a96dcad4a81e87b848e97cb402750014b}{initial\_rate\_index}}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03870}03870             );}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03871}03871 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03872}03872         \textcolor{comment}{/* Fill TX descriptor. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03873}03873         memset(desc, 0, \textcolor{keyword}{sizeof}(*desc));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03874}03874         desc-\/>\mbox{\hyperlink{structiwm__tfd_a66d5f6032197ceaeced50b8ea8cea9ac}{num\_tbs}} = 2 + nsegs;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03875}03875 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03876}03876         desc-\/>\mbox{\hyperlink{structiwm__tfd_ae225ead448693f77242f0f8927000989}{tbs}}[0].\mbox{\hyperlink{structiwm__tfd__tb_a318b13be004dfbe851fb09b230c51a51}{lo}} = htole32(data-\/>\mbox{\hyperlink{structiwm__tx__data_a0a5514d80fb252c55ee351c69178167e}{cmd\_paddr}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03877}03877         desc-\/>\mbox{\hyperlink{structiwm__tfd_ae225ead448693f77242f0f8927000989}{tbs}}[0].\mbox{\hyperlink{structiwm__tfd__tb_aa21ed6289b795ebafeeeb170566d9627}{hi\_n\_len}} = htole16(\mbox{\hyperlink{if__iwmreg_8h_a93ed963e6f659fd4167bc670bfffc26b}{iwm\_get\_dma\_hi\_addr}}(data-\/>\mbox{\hyperlink{structiwm__tx__data_a0a5514d80fb252c55ee351c69178167e}{cmd\_paddr}}) |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03878}03878             (\mbox{\hyperlink{if__iwm_8c_a99cf2db4bc130ed16717266f03835807}{TB0\_SIZE}} << 4));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03879}03879         desc-\/>\mbox{\hyperlink{structiwm__tfd_ae225ead448693f77242f0f8927000989}{tbs}}[1].\mbox{\hyperlink{structiwm__tfd__tb_a318b13be004dfbe851fb09b230c51a51}{lo}} = htole32(data-\/>\mbox{\hyperlink{structiwm__tx__data_a0a5514d80fb252c55ee351c69178167e}{cmd\_paddr}} + \mbox{\hyperlink{if__iwm_8c_a99cf2db4bc130ed16717266f03835807}{TB0\_SIZE}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03880}03880         desc-\/>\mbox{\hyperlink{structiwm__tfd_ae225ead448693f77242f0f8927000989}{tbs}}[1].\mbox{\hyperlink{structiwm__tfd__tb_aa21ed6289b795ebafeeeb170566d9627}{hi\_n\_len}} = htole16(\mbox{\hyperlink{if__iwmreg_8h_a93ed963e6f659fd4167bc670bfffc26b}{iwm\_get\_dma\_hi\_addr}}(data-\/>\mbox{\hyperlink{structiwm__tx__data_a0a5514d80fb252c55ee351c69178167e}{cmd\_paddr}}) |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03881}03881             ((\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__cmd__header}{iwm\_cmd\_header}}) + \textcolor{keyword}{sizeof}(*tx) +}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03882}03882             hdrlen + pad -\/ \mbox{\hyperlink{if__iwm_8c_a99cf2db4bc130ed16717266f03835807}{TB0\_SIZE}}) << 4));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03883}03883 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03884}03884         \textcolor{comment}{/* Other DMA segments are for data payload. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03885}03885         \textcolor{keywordflow}{for} (i = 0; i < nsegs; i++) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03886}03886                 seg = \&segs[i];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03887}03887                 desc-\/>\mbox{\hyperlink{structiwm__tfd_ae225ead448693f77242f0f8927000989}{tbs}}[i + 2].\mbox{\hyperlink{structiwm__tfd__tb_a318b13be004dfbe851fb09b230c51a51}{lo}} = htole32(seg-\/>ds\_addr);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03888}03888                 desc-\/>\mbox{\hyperlink{structiwm__tfd_ae225ead448693f77242f0f8927000989}{tbs}}[i + 2].\mbox{\hyperlink{structiwm__tfd__tb_aa21ed6289b795ebafeeeb170566d9627}{hi\_n\_len}} =}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03889}03889                     htole16(\mbox{\hyperlink{if__iwmreg_8h_a93ed963e6f659fd4167bc670bfffc26b}{iwm\_get\_dma\_hi\_addr}}(seg-\/>ds\_addr)) |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03890}03890                     (seg-\/>ds\_len << 4);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03891}03891         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03892}03892 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03893}03893         bus\_dmamap\_sync(ring-\/>\mbox{\hyperlink{structiwm__tx__ring_aca7fb956f70df0acc0787fc191872fb3}{data\_dmat}}, data-\/>\mbox{\hyperlink{structiwm__tx__data_a56a04caca9190302823ff8aa91363d1f}{map}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03894}03894             BUS\_DMASYNC\_PREWRITE);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03895}03895         bus\_dmamap\_sync(ring-\/>\mbox{\hyperlink{structiwm__tx__ring_adbab9691a34e7f1e1ed21cabb52e1023}{cmd\_dma}}.\mbox{\hyperlink{structiwm__dma__info_a58938bb9054e381f73f7897fd7ae6ff1}{tag}}, ring-\/>\mbox{\hyperlink{structiwm__tx__ring_adbab9691a34e7f1e1ed21cabb52e1023}{cmd\_dma}}.\mbox{\hyperlink{structiwm__dma__info_a9088f1c56d08041ac6e9f2439dd9b3dd}{map}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03896}03896             BUS\_DMASYNC\_PREWRITE);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03897}03897         bus\_dmamap\_sync(ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a06c9b0667b51f00845f9decf8849cd0e}{desc\_dma}}.\mbox{\hyperlink{structiwm__dma__info_a58938bb9054e381f73f7897fd7ae6ff1}{tag}}, ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a06c9b0667b51f00845f9decf8849cd0e}{desc\_dma}}.\mbox{\hyperlink{structiwm__dma__info_a9088f1c56d08041ac6e9f2439dd9b3dd}{map}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03898}03898             BUS\_DMASYNC\_PREWRITE);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03899}03899 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03900}03900 \textcolor{preprocessor}{\#if 0}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03901}03901         iwm\_update\_sched(sc, ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a985ab594338fd5c2df0efdd225636f8a}{qid}}, ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a0d0525e4e6e9ccaa6336bf14d8dce312}{cur}}, tx-\/>\mbox{\hyperlink{structiwm__tx__cmd_aa10546423752d9b1e6a62a79b86126b4}{sta\_id}}, le16toh(tx-\/>\mbox{\hyperlink{structiwm__tx__cmd_ae8b4eeb3789fbc1c95a74b2f8fc9429c}{len}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03902}03902 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03903}03903 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03904}03904         \textcolor{comment}{/* Kick TX ring. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03905}03905         ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a0d0525e4e6e9ccaa6336bf14d8dce312}{cur}} = (ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a0d0525e4e6e9ccaa6336bf14d8dce312}{cur}} + 1) \% \mbox{\hyperlink{if__iwmvar_8h_a20e51e5cdc7d74b0625e0cdeefd8df14}{IWM\_TX\_RING\_COUNT}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03906}03906         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_aefbeb9e39bbdbf6e3f87fba49efd9ff7}{IWM\_HBUS\_TARG\_WRPTR}}, ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a985ab594338fd5c2df0efdd225636f8a}{qid}} << 8 | ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a0d0525e4e6e9ccaa6336bf14d8dce312}{cur}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03907}03907 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03908}03908         \textcolor{comment}{/* Mark TX ring as full if we reach a certain threshold. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03909}03909         \textcolor{keywordflow}{if} (++ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a6762a1b02dd4f4caf5370fbf3b3db768}{queued}} > \mbox{\hyperlink{if__iwmvar_8h_a48eee94116ff310cc67434b5118edd7a}{IWM\_TX\_RING\_HIMARK}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03910}03910                 sc-\/>\mbox{\hyperlink{structiwm__softc_aa06fec14bd51ea7a0ef7b4b549c59c03}{qfullmsk}} |= 1 << ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a985ab594338fd5c2df0efdd225636f8a}{qid}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03911}03911         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03912}03912 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03913}03913         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03914}03914 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03915}03915 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03916}03916 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03917}\mbox{\hyperlink{if__iwm_8c_a0e58378103e84487e7ee8b5bc7f42f38}{03917}} \mbox{\hyperlink{if__iwm_8c_a0e58378103e84487e7ee8b5bc7f42f38}{iwm\_raw\_xmit}}(\textcolor{keyword}{struct} ieee80211\_node *ni, \textcolor{keyword}{struct} mbuf *m,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03918}03918     \textcolor{keyword}{const} \textcolor{keyword}{struct} ieee80211\_bpf\_params *params)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03919}03919 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03920}03920         \textcolor{keyword}{struct }ieee80211com *ic = ni-\/>ni\_ic;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03921}03921         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03922}03922         \textcolor{keywordtype}{int} error = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03923}03923 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03924}03924         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_XMIT,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03925}03925             \textcolor{stringliteral}{"{}-\/>\%s begin\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03926}03926 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03927}03927         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structiwm__softc_a67d7ea2a1eef39c9ca65e86178e54766}{sc\_flags}} \& \mbox{\hyperlink{if__iwmvar_8h_ad7e99f8e27769f3ca96607a815f59428}{IWM\_FLAG\_HW\_INITED}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03928}03928                 m\_freem(m);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03929}03929                 \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_XMIT,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03930}03930                     \textcolor{stringliteral}{"{}<-\/\%s not RUNNING\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03931}03931                 \textcolor{keywordflow}{return} (ENETDOWN);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03932}03932         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03933}03933 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03934}03934         \mbox{\hyperlink{if__iwmvar_8h_ac9f22c2982def9e764105396531c69be}{IWM\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03935}03935         \textcolor{comment}{/* XXX fix this */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03936}03936         \textcolor{keywordflow}{if} (params == NULL) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03937}03937                 error = \mbox{\hyperlink{if__iwm_8c_a376e1489b8d710c2b759c2b74ad84808}{iwm\_tx}}(sc, m, ni, 0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03938}03938         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03939}03939                 error = \mbox{\hyperlink{if__iwm_8c_a376e1489b8d710c2b759c2b74ad84808}{iwm\_tx}}(sc, m, ni, 0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03940}03940         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03941}03941         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_aff40795d688fc78465103c744ca2f3b2}{sc\_tx\_timer}} == 0)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03942}03942                 callout\_reset(\&sc-\/>\mbox{\hyperlink{structiwm__softc_aa23512c0249b8a3513d3ec43f828bd39}{sc\_watchdog\_to}}, hz, \mbox{\hyperlink{if__iwm_8c_a14ef35a8916993cdb67f1dd50737957f}{iwm\_watchdog}}, sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03943}03943         sc-\/>\mbox{\hyperlink{structiwm__softc_aff40795d688fc78465103c744ca2f3b2}{sc\_tx\_timer}} = 5;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03944}03944         \mbox{\hyperlink{if__iwmvar_8h_a2bc8b1196a564b1b70c11f96391760fa}{IWM\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03945}03945 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03946}03946         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03947}03947 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03948}03948 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03949}03949 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03950}03950 \textcolor{comment}{ * mvm/tx.c}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03951}03951 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03952}03952 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03953}03953 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03954}03954 \textcolor{comment}{ * Note that there are transports that buffer frames before they reach}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03955}03955 \textcolor{comment}{ * the firmware. This means that after flush\_tx\_path is called, the}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03956}03956 \textcolor{comment}{ * queue might not be empty. The race-\/free way to handle this is to:}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03957}03957 \textcolor{comment}{ * 1) set the station as draining}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03958}03958 \textcolor{comment}{ * 2) flush the Tx path}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03959}03959 \textcolor{comment}{ * 3) wait for the transport queues to be empty}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03960}03960 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03961}03961 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03962}\mbox{\hyperlink{if__iwm_8c_a57d82de6c2f25e48c3870bb49d496f93}{03962}} \mbox{\hyperlink{if__iwm_8c_a57d82de6c2f25e48c3870bb49d496f93}{iwm\_flush\_tx\_path}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, uint32\_t tfd\_msk, uint32\_t flags)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03963}03963 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03964}03964         \textcolor{keywordtype}{int} ret;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03965}03965         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__tx__path__flush__cmd__v1}{iwm\_tx\_path\_flush\_cmd\_v1}} flush\_cmd = \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03966}03966                 .\mbox{\hyperlink{structiwm__tx__path__flush__cmd__v1_a27fff06581864cbc1534b719b9d5baf9}{queues\_ctl}} = htole32(tfd\_msk),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03967}03967                 .flush\_ctl = htole16(\mbox{\hyperlink{if__iwmreg_8h_a7970642053004fafcae4fc8aac53c97c}{IWM\_DUMP\_TX\_FIFO\_FLUSH}}),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03968}03968         \};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03969}03969 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03970}03970         ret = \mbox{\hyperlink{if__iwm__util_8c_ad7c0f40dbc21d1ec94f0c5f6194d1140}{iwm\_send\_cmd\_pdu}}(sc, \mbox{\hyperlink{if__iwmreg_8h_aaa39b0c77489f9c8dc4a77fdace9927a}{IWM\_TXPATH\_FLUSH}}, flags,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03971}03971             \textcolor{keyword}{sizeof}(flush\_cmd), \&flush\_cmd);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03972}03972         \textcolor{keywordflow}{if} (ret)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03973}03973                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03974}03974                     \textcolor{stringliteral}{"{}Flushing tx queue failed: \%d\(\backslash\)n"{}}, ret);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03975}03975         \textcolor{keywordflow}{return} ret;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03976}03976 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03977}03977 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03978}03978 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03979}03979 \textcolor{comment}{ * BEGIN mvm/quota.c}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03980}03980 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03981}03981 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03982}03982 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03983}\mbox{\hyperlink{if__iwm_8c_a0314d524d42c8172bfac5233b4502ad8}{03983}} \mbox{\hyperlink{if__iwm_8c_a0314d524d42c8172bfac5233b4502ad8}{iwm\_update\_quotas}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__vap}{iwm\_vap}} *ivp)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03984}03984 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03985}03985         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__time__quota__cmd__v1}{iwm\_time\_quota\_cmd\_v1}} cmd;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03986}03986         \textcolor{keywordtype}{int} i, idx, ret, num\_active\_macs, quota, quota\_rem;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03987}03987         \textcolor{keywordtype}{int} colors[\mbox{\hyperlink{if__iwmreg_8h_a4d6dbbe95cb595c23463d9c331e5d99c}{IWM\_MAX\_BINDINGS}}] = \{ -\/1, -\/1, -\/1, -\/1, \};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03988}03988         \textcolor{keywordtype}{int} n\_ifs[\mbox{\hyperlink{if__iwmreg_8h_a4d6dbbe95cb595c23463d9c331e5d99c}{IWM\_MAX\_BINDINGS}}] = \{0, \};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03989}03989         uint16\_t id;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03990}03990 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03991}03991         memset(\&cmd, 0, \textcolor{keyword}{sizeof}(cmd));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03992}03992 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03993}03993         \textcolor{comment}{/* currently, PHY ID == binding ID */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03994}03994         \textcolor{keywordflow}{if} (ivp) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03995}03995                 \textcolor{keywordtype}{id} = ivp-\/>\mbox{\hyperlink{structiwm__vap_a448a47a542ee0070949b36d0b86c83ad}{phy\_ctxt}}-\/>\mbox{\hyperlink{structiwm__phy__ctxt_afc56bb654d1f6ab679d0a1b9e03ff7b2}{id}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03996}03996                 KASSERT(\textcolor{keywordtype}{id} < \mbox{\hyperlink{if__iwmreg_8h_a4d6dbbe95cb595c23463d9c331e5d99c}{IWM\_MAX\_BINDINGS}}, (\textcolor{stringliteral}{"{}invalid id"{}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03997}03997                 colors[id] = ivp-\/>\mbox{\hyperlink{structiwm__vap_a448a47a542ee0070949b36d0b86c83ad}{phy\_ctxt}}-\/>\mbox{\hyperlink{structiwm__phy__ctxt_ab6c61bac828cf7a77fcdc9c593c7d7f7}{color}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03998}03998 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l03999}03999                 \textcolor{keywordflow}{if} (1)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04000}04000                         n\_ifs[id] = 1;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04001}04001         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04002}04002 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04003}04003         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04004}04004 \textcolor{comment}{         * The FW's scheduling session consists of}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04005}04005 \textcolor{comment}{         * IWM\_MAX\_QUOTA fragments. Divide these fragments}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04006}04006 \textcolor{comment}{         * equally between all the bindings that require quota}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04007}04007 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04008}04008         num\_active\_macs = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04009}04009         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{if__iwmreg_8h_a4d6dbbe95cb595c23463d9c331e5d99c}{IWM\_MAX\_BINDINGS}}; i++) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04010}04010                 cmd.\mbox{\hyperlink{structiwm__time__quota__cmd__v1_a40638ab9e6736aa87b226361dfca6993}{quotas}}[i].\mbox{\hyperlink{structiwm__time__quota__data__v1_abbd2cfd8807432da0c71f0e4edffb11c}{id\_and\_color}} = htole32(\mbox{\hyperlink{if__iwmreg_8h_a81de620ae6c967356659b85fa408b75d}{IWM\_FW\_CTXT\_INVALID}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04011}04011                 num\_active\_macs += n\_ifs[i];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04012}04012         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04013}04013 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04014}04014         quota = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04015}04015         quota\_rem = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04016}04016         \textcolor{keywordflow}{if} (num\_active\_macs) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04017}04017                 quota = \mbox{\hyperlink{if__iwmreg_8h_abe10ca3c2fc38af53c4933a1ad5b86db}{IWM\_MAX\_QUOTA}} / num\_active\_macs;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04018}04018                 quota\_rem = \mbox{\hyperlink{if__iwmreg_8h_abe10ca3c2fc38af53c4933a1ad5b86db}{IWM\_MAX\_QUOTA}} \% num\_active\_macs;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04019}04019         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04020}04020 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04021}04021         \textcolor{keywordflow}{for} (idx = 0, i = 0; i < \mbox{\hyperlink{if__iwmreg_8h_a4d6dbbe95cb595c23463d9c331e5d99c}{IWM\_MAX\_BINDINGS}}; i++) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04022}04022                 \textcolor{keywordflow}{if} (colors[i] < 0)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04023}04023                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04024}04024 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04025}04025                 cmd.\mbox{\hyperlink{structiwm__time__quota__cmd__v1_a40638ab9e6736aa87b226361dfca6993}{quotas}}[idx].\mbox{\hyperlink{structiwm__time__quota__data__v1_abbd2cfd8807432da0c71f0e4edffb11c}{id\_and\_color}} =}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04026}04026                         htole32(\mbox{\hyperlink{if__iwmreg_8h_a3d79b39233e901d2c82b8be01ddb73ed}{IWM\_FW\_CMD\_ID\_AND\_COLOR}}(i, colors[i]));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04027}04027 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04028}04028                 \textcolor{keywordflow}{if} (n\_ifs[i] <= 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04029}04029                         cmd.\mbox{\hyperlink{structiwm__time__quota__cmd__v1_a40638ab9e6736aa87b226361dfca6993}{quotas}}[idx].\mbox{\hyperlink{structiwm__time__quota__data__v1_a1ccd53e1840199b8cf1bd3d570d30d14}{quota}} = htole32(0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04030}04030                         cmd.\mbox{\hyperlink{structiwm__time__quota__cmd__v1_a40638ab9e6736aa87b226361dfca6993}{quotas}}[idx].\mbox{\hyperlink{structiwm__time__quota__data__v1_ad6347f0fad496d08ed9e20d8ee703ee0}{max\_duration}} = htole32(0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04031}04031                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04032}04032                         cmd.\mbox{\hyperlink{structiwm__time__quota__cmd__v1_a40638ab9e6736aa87b226361dfca6993}{quotas}}[idx].\mbox{\hyperlink{structiwm__time__quota__data__v1_a1ccd53e1840199b8cf1bd3d570d30d14}{quota}} = htole32(quota * n\_ifs[i]);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04033}04033                         cmd.\mbox{\hyperlink{structiwm__time__quota__cmd__v1_a40638ab9e6736aa87b226361dfca6993}{quotas}}[idx].\mbox{\hyperlink{structiwm__time__quota__data__v1_ad6347f0fad496d08ed9e20d8ee703ee0}{max\_duration}} = htole32(0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04034}04034                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04035}04035                 idx++;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04036}04036         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04037}04037 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04038}04038         \textcolor{comment}{/* Give the remainder of the session to the first binding */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04039}04039         cmd.\mbox{\hyperlink{structiwm__time__quota__cmd__v1_a40638ab9e6736aa87b226361dfca6993}{quotas}}[0].\mbox{\hyperlink{structiwm__time__quota__data__v1_a1ccd53e1840199b8cf1bd3d570d30d14}{quota}} = htole32(le32toh(cmd.\mbox{\hyperlink{structiwm__time__quota__cmd__v1_a40638ab9e6736aa87b226361dfca6993}{quotas}}[0].\mbox{\hyperlink{structiwm__time__quota__data__v1_a1ccd53e1840199b8cf1bd3d570d30d14}{quota}}) + quota\_rem);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04040}04040 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04041}04041         ret = \mbox{\hyperlink{if__iwm__util_8c_ad7c0f40dbc21d1ec94f0c5f6194d1140}{iwm\_send\_cmd\_pdu}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a53f87408bbc2e80b9fe4d969e6f885d1}{IWM\_TIME\_QUOTA\_CMD}}, \mbox{\hyperlink{if__iwmvar_8h_a683e81a3f25e57c34df07e37e049bf07a1ed0b3a851376d8e5faa5be34d886df6}{IWM\_CMD\_SYNC}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04042}04042             \textcolor{keyword}{sizeof}(cmd), \&cmd);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04043}04043         \textcolor{keywordflow}{if} (ret)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04044}04044                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04045}04045                     \textcolor{stringliteral}{"{}\%s: Failed to send quota: \%d\(\backslash\)n"{}}, \_\_func\_\_, ret);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04046}04046         \textcolor{keywordflow}{return} ret;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04047}04047 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04048}04048 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04049}04049 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04050}04050 \textcolor{comment}{ * END mvm/quota.c}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04051}04051 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04052}04052 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04053}04053 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04054}04054 \textcolor{comment}{ * ieee80211 routines}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04055}04055 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04056}04056 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04057}04057 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04058}04058 \textcolor{comment}{ * Change to AUTH state in 80211 state machine.  Roughly matches what}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04059}04059 \textcolor{comment}{ * Linux does in bss\_info\_changed().}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04060}04060 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04061}04061 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04062}\mbox{\hyperlink{if__iwm_8c_abb26bc3b3bc33889d06d11c89d5bac56}{04062}} \mbox{\hyperlink{if__iwm_8c_abb26bc3b3bc33889d06d11c89d5bac56}{iwm\_auth}}(\textcolor{keyword}{struct} ieee80211vap *vap, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04063}04063 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04064}04064         \textcolor{keyword}{struct }ieee80211\_node *ni;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04065}04065         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__node}{iwm\_node}} *in;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04066}04066         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__vap}{iwm\_vap}} *iv = \mbox{\hyperlink{if__iwmvar_8h_a411a4f289df166d363076401a075b455}{IWM\_VAP}}(vap);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04067}04067         uint32\_t duration;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04068}04068         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04069}04069 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04070}04070         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04071}04071 \textcolor{comment}{         * XXX i have a feeling that the vap node is being}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04072}04072 \textcolor{comment}{         * freed from underneath us. Grr.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04073}04073 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04074}04074         ni = ieee80211\_ref\_node(vap-\/>iv\_bss);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04075}04075         in = \mbox{\hyperlink{if__iwmvar_8h_a371387d15226f5218ae8d2d2657934a5}{IWM\_NODE}}(ni);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04076}04076         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_RESET | IWM\_DEBUG\_STATE,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04077}04077             \textcolor{stringliteral}{"{}\%s: called; vap=\%p, bss ni=\%p\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04078}04078             \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04079}04079             vap,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04080}04080             ni);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04081}04081         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_STATE, \textcolor{stringliteral}{"{}\%s: Current node bssid: \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04082}04082             \_\_func\_\_, ether\_sprintf(ni-\/>ni\_bssid));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04083}04083 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04084}04084         in-\/>\mbox{\hyperlink{structiwm__node_ab9c110e875f6b18efe62656d210592c0}{in\_assoc}} = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04085}04085         iv-\/>\mbox{\hyperlink{structiwm__vap_ad65ae6967cb8d9c5aef1cbb48b40ad58}{iv\_auth}} = 1;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04086}04086 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04087}04087         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04088}04088 \textcolor{comment}{         * Firmware bug -\/ it'll crash if the beacon interval is less}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04089}04089 \textcolor{comment}{         * than 16. We can't avoid connecting at all, so refuse the}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04090}04090 \textcolor{comment}{         * station state change, this will cause net80211 to abandon}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04091}04091 \textcolor{comment}{         * attempts to connect to this AP, and eventually wpa\_s will}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04092}04092 \textcolor{comment}{         * blacklist the AP...}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04093}04093 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04094}04094         \textcolor{keywordflow}{if} (ni-\/>ni\_intval < 16) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04095}04095                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04096}04096                     \textcolor{stringliteral}{"{}AP \%s beacon interval is \%d, refusing due to firmware bug!\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04097}04097                     ether\_sprintf(ni-\/>ni\_bssid), ni-\/>ni\_intval);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04098}04098                 error = EINVAL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04099}04099                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04100}04100         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04101}04101 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04102}04102         error = \mbox{\hyperlink{if__iwm_8c_ae61233c5b54e71cd531791f7beecf8cc}{iwm\_allow\_mcast}}(vap, sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04103}04103         \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04104}04104                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04105}04105                     \textcolor{stringliteral}{"{}\%s: failed to set multicast\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04106}04106                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04107}04107         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04108}04108 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04109}04109         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04110}04110 \textcolor{comment}{         * This is where it deviates from what Linux does.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04111}04111 \textcolor{comment}{         *}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04112}04112 \textcolor{comment}{         * Linux iwlwifi doesn't reset the nic each time, nor does it}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04113}04113 \textcolor{comment}{         * call ctxt\_add() here.  Instead, it adds it during vap creation,}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04114}04114 \textcolor{comment}{         * and always does a mac\_ctx\_changed().}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04115}04115 \textcolor{comment}{         *}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04116}04116 \textcolor{comment}{         * The openbsd port doesn't attempt to do that -\/ it reset things}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04117}04117 \textcolor{comment}{         * at odd states and does the add here.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04118}04118 \textcolor{comment}{         *}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04119}04119 \textcolor{comment}{         * So, until the state handling is fixed (ie, we never reset}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04120}04120 \textcolor{comment}{         * the NIC except for a firmware failure, which should drag}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04121}04121 \textcolor{comment}{         * the NIC back to IDLE, re-\/setup and re-\/add all the mac/phy}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04122}04122 \textcolor{comment}{         * contexts that are required), let's do a dirty hack here.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04123}04123 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04124}04124         \textcolor{keywordflow}{if} (iv-\/>\mbox{\hyperlink{structiwm__vap_acedd1a3b1b86b73619826502c2be182c}{is\_uploaded}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04125}04125                 \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{if__iwm__mac__ctxt_8c_a881f62de0b699e2c3054da3e709f53a4}{iwm\_mac\_ctxt\_changed}}(sc, vap)) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04126}04126                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04127}04127                             \textcolor{stringliteral}{"{}\%s: failed to update MAC\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04128}04128                         \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04129}04129                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04130}04130         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04131}04131                 \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{if__iwm__mac__ctxt_8c_a716c5bcccd2810faa3a635ed354e1b7c}{iwm\_mac\_ctxt\_add}}(sc, vap)) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04132}04132                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04133}04133                             \textcolor{stringliteral}{"{}\%s: failed to add MAC\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04134}04134                         \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04135}04135                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04136}04136         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04137}04137         sc-\/>\mbox{\hyperlink{structiwm__softc_a064fd76be7f7ab79f6da894c344419e0}{sc\_firmware\_state}} = 1;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04138}04138 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04139}04139         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{if__iwm__phy__ctxt_8c_a41211772f1f59991a8cce259807fb54c}{iwm\_phy\_ctxt\_changed}}(sc, \&sc-\/>\mbox{\hyperlink{structiwm__softc_ab5b4db19ac74e24f6b96f22fb4fee594}{sc\_phyctxt}}[0],}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04140}04140             in-\/>\mbox{\hyperlink{structiwm__node_ad467ee0de0b3403d7545869a1e547ef5}{in\_ni}}.ni\_chan, 1, 1)) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04141}04141                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04142}04142                     \textcolor{stringliteral}{"{}\%s: failed update phy ctxt\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04143}04143                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04144}04144         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04145}04145         iv-\/>\mbox{\hyperlink{structiwm__vap_a448a47a542ee0070949b36d0b86c83ad}{phy\_ctxt}} = \&sc-\/>\mbox{\hyperlink{structiwm__softc_ab5b4db19ac74e24f6b96f22fb4fee594}{sc\_phyctxt}}[0];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04146}04146 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04147}04147         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{if__iwm__binding_8c_ab51986057258803017e5ca077d06860f}{iwm\_binding\_add\_vif}}(sc, iv)) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04148}04148                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04149}04149                     \textcolor{stringliteral}{"{}\%s: binding update cmd\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04150}04150                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04151}04151         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04152}04152         sc-\/>\mbox{\hyperlink{structiwm__softc_a064fd76be7f7ab79f6da894c344419e0}{sc\_firmware\_state}} = 2;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04153}04153         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04154}04154 \textcolor{comment}{         * Authentication becomes unreliable when powersaving is left enabled}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04155}04155 \textcolor{comment}{         * here. Powersaving will be activated again when association has}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04156}04156 \textcolor{comment}{         * finished or is aborted.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04157}04157 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04158}04158         iv-\/>\mbox{\hyperlink{structiwm__vap_abb2b681c49dadd24f29fa56164fb79f0}{ps\_disabled}} = TRUE;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04159}04159         error = \mbox{\hyperlink{if__iwm__power_8c_a2ec4cf2528c4b24a2433572eaf9c0eb6}{iwm\_power\_update\_mac}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04160}04160         iv-\/>\mbox{\hyperlink{structiwm__vap_abb2b681c49dadd24f29fa56164fb79f0}{ps\_disabled}} = FALSE;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04161}04161         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04162}04162                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04163}04163                     \textcolor{stringliteral}{"{}\%s: failed to update power management\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04164}04164                     \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04165}04165                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04166}04166         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04167}04167         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{if__iwm__sta_8c_acdd5befb7ea4a58a8c08a03b8c9eb77d}{iwm\_add\_sta}}(sc, in)) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04168}04168                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04169}04169                     \textcolor{stringliteral}{"{}\%s: failed to add sta\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04170}04170                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04171}04171         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04172}04172         sc-\/>\mbox{\hyperlink{structiwm__softc_a064fd76be7f7ab79f6da894c344419e0}{sc\_firmware\_state}} = 3;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04173}04173 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04174}04174         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04175}04175 \textcolor{comment}{         * Prevent the FW from wandering off channel during association}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04176}04176 \textcolor{comment}{         * by "{}protecting"{} the session with a time event.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04177}04177 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04178}04178         \textcolor{comment}{/* XXX duration is in units of TU, not MS */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04179}04179         duration = \mbox{\hyperlink{if__iwmvar_8h_a4ba6b41f3e5f460ee84944d4247e5e47}{IWM\_TE\_SESSION\_PROTECTION\_MAX\_TIME\_MS}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04180}04180         \mbox{\hyperlink{if__iwm__time__event_8c_a2b675507d9b025fbd0deb835f7f6c240}{iwm\_protect\_session}}(sc, iv, duration, 500 \textcolor{comment}{/* XXX magic number */}, TRUE);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04181}04181 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04182}04182         error = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04183}04183 out:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04184}04184         \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04185}04185                 iv-\/>\mbox{\hyperlink{structiwm__vap_ad65ae6967cb8d9c5aef1cbb48b40ad58}{iv\_auth}} = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04186}04186         ieee80211\_free\_node(ni);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04187}04187         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04188}04188 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04189}04189 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04190}04190 \textcolor{keyword}{static} \textcolor{keyword}{struct }ieee80211\_node *}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04191}\mbox{\hyperlink{if__iwm_8c_a28d3e75328a677098089201db9922cd6}{04191}} \mbox{\hyperlink{if__iwm_8c_a28d3e75328a677098089201db9922cd6}{iwm\_node\_alloc}}(\textcolor{keyword}{struct} ieee80211vap *vap, \textcolor{keyword}{const} uint8\_t mac[IEEE80211\_ADDR\_LEN])}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04192}04192 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04193}04193         \textcolor{keywordflow}{return} malloc(\textcolor{keyword}{sizeof} (\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__node}{iwm\_node}}), M\_80211\_NODE,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04194}04194             M\_NOWAIT | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04195}04195 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04196}04196 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04197}04197 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04198}\mbox{\hyperlink{if__iwm_8c_a9edea4b80e47984bd4b4e6a5929625f6}{04198}} \mbox{\hyperlink{if__iwm_8c_a9edea4b80e47984bd4b4e6a5929625f6}{iwm\_rate\_from\_ucode\_rate}}(uint32\_t rate\_n\_flags)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04199}04199 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04200}04200         uint8\_t plcp = rate\_n\_flags \& 0xff;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04201}04201         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04202}04202 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04203}04203         \textcolor{keywordflow}{for} (i = 0; i <= \mbox{\hyperlink{if__iwm_8c_a1cc60dd9c8869cbcab518b6033692b50}{IWM\_RIDX\_MAX}}; i++) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04204}04204                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__iwm_8c_a08ef9e6176f57d36238a07cdc3dc336c}{iwm\_rates}}[i].plcp == plcp)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04205}04205                         \textcolor{keywordflow}{return} \mbox{\hyperlink{if__iwm_8c_a08ef9e6176f57d36238a07cdc3dc336c}{iwm\_rates}}[i].\mbox{\hyperlink{structiwm__rate_aa16a3fc2d9313e70ebdcf29be6595006}{rate}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04206}04206         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04207}04207         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04208}04208 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04209}04209 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04210}04210 uint8\_t}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04211}\mbox{\hyperlink{if__iwm_8c_ab6e6464c762b736a929bf3391ebac89f}{04211}} \mbox{\hyperlink{if__iwm_8c_ab6e6464c762b736a929bf3391ebac89f}{iwm\_ridx2rate}}(\textcolor{keyword}{struct} ieee80211\_rateset *rs, \textcolor{keywordtype}{int} ridx)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04212}04212 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04213}04213         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04214}04214         uint8\_t rval;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04215}04215 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04216}04216         \textcolor{keywordflow}{for} (i = 0; i < rs-\/>rs\_nrates; i++) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04217}04217                 rval = (rs-\/>rs\_rates[i] \& IEEE80211\_RATE\_VAL);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04218}04218                 \textcolor{keywordflow}{if} (rval == \mbox{\hyperlink{if__iwm_8c_a08ef9e6176f57d36238a07cdc3dc336c}{iwm\_rates}}[ridx].rate)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04219}04219                         \textcolor{keywordflow}{return} rs-\/>rs\_rates[i];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04220}04220         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04221}04221 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04222}04222         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04223}04223 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04224}04224 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04225}04225 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04226}\mbox{\hyperlink{if__iwm_8c_a27fa2e4e7df3a8837691fb2d965e3335}{04226}} \mbox{\hyperlink{if__iwm_8c_a27fa2e4e7df3a8837691fb2d965e3335}{iwm\_rate2ridx}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, uint8\_t rate)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04227}04227 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04228}04228         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04229}04229 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04230}04230         \textcolor{keywordflow}{for} (i = 0; i <= \mbox{\hyperlink{if__iwm_8c_a1cc60dd9c8869cbcab518b6033692b50}{IWM\_RIDX\_MAX}}; i++) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04231}04231                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__iwm_8c_a08ef9e6176f57d36238a07cdc3dc336c}{iwm\_rates}}[i].rate == rate)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04232}04232                         \textcolor{keywordflow}{return} i;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04233}04233         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04234}04234 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04235}04235         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04236}04236             \textcolor{stringliteral}{"{}\%s: WARNING: device rate for \%u not found!\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04237}04237             \_\_func\_\_, rate);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04238}04238 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04239}04239         \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04240}04240 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04241}04241 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04242}04242 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04243}04243 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04244}\mbox{\hyperlink{if__iwm_8c_a8340199cf0662991ff3258c7236a6660}{04244}} \mbox{\hyperlink{if__iwm_8c_a8340199cf0662991ff3258c7236a6660}{iwm\_setrates}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__node}{iwm\_node}} *in, \textcolor{keywordtype}{int} rix)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04245}04245 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04246}04246         \textcolor{keyword}{struct }ieee80211\_node *ni = \&in-\/>\mbox{\hyperlink{structiwm__node_ad467ee0de0b3403d7545869a1e547ef5}{in\_ni}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04247}04247         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__lq__cmd}{iwm\_lq\_cmd}} *lq = \&in-\/>\mbox{\hyperlink{structiwm__node_afdd6f4c966573fb34efc32291b3019c4}{in\_lq}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04248}04248         \textcolor{keyword}{struct }ieee80211\_rateset *rs = \&ni-\/>ni\_rates;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04249}04249         \textcolor{keywordtype}{int} nrates = rs-\/>rs\_nrates;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04250}04250         \textcolor{keywordtype}{int} i, ridx, tab = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04251}04251 \textcolor{comment}{//      int txant = 0;}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04252}04252 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04253}04253         KASSERT(rix >= 0 \&\& rix < nrates, (\textcolor{stringliteral}{"{}invalid rix"{}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04254}04254 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04255}04255         \textcolor{keywordflow}{if} (nrates > nitems(lq-\/>\mbox{\hyperlink{structiwm__lq__cmd_a40693b36a2a50d7d0ba463217620a6cb}{rs\_table}})) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04256}04256                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04257}04257                     \textcolor{stringliteral}{"{}\%s: node supports \%d rates, driver handles "{}}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04258}04258                     \textcolor{stringliteral}{"{}only \%zu\(\backslash\)n"{}}, \_\_func\_\_, nrates, nitems(lq-\/>\mbox{\hyperlink{structiwm__lq__cmd_a40693b36a2a50d7d0ba463217620a6cb}{rs\_table}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04259}04259                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04260}04260         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04261}04261         \textcolor{keywordflow}{if} (nrates == 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04262}04262                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04263}04263                     \textcolor{stringliteral}{"{}\%s: node supports 0 rates, odd!\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04264}04264                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04265}04265         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04266}04266         nrates = imin(rix + 1, nrates);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04267}04267 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04268}04268         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_TXRATE,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04269}04269             \textcolor{stringliteral}{"{}\%s: nrates=\%d\(\backslash\)n"{}}, \_\_func\_\_, nrates);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04270}04270 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04271}04271         \textcolor{comment}{/* then construct a lq\_cmd based on those */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04272}04272         memset(lq, 0, \textcolor{keyword}{sizeof}(*lq));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04273}04273         lq-\/>\mbox{\hyperlink{structiwm__lq__cmd_a0d88a9b1d9833cbcd257957da4fefe72}{sta\_id}} = \mbox{\hyperlink{if__iwmvar_8h_a91f3cca91add40062cd65ec754ef394d}{IWM\_STATION\_ID}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04274}04274 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04275}04275         \textcolor{comment}{/* For HT, always enable RTS/CTS to avoid excessive retries. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04276}04276         \textcolor{keywordflow}{if} (ni-\/>ni\_flags \& IEEE80211\_NODE\_HT)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04277}04277                 lq-\/>\mbox{\hyperlink{structiwm__lq__cmd_a0948f882208e406fce527ab5a6d1fbc4}{flags}} |= \mbox{\hyperlink{if__iwmreg_8h_aab13aba56f5c426d58a33cfdb8231e97}{IWM\_LQ\_FLAG\_USE\_RTS\_MSK}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04278}04278 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04279}04279         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04280}04280 \textcolor{comment}{         * are these used? (we don't do SISO or MIMO)}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04281}04281 \textcolor{comment}{         * need to set them to non-\/zero, though, or we get an error.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04282}04282 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04283}04283         lq-\/>\mbox{\hyperlink{structiwm__lq__cmd_a584f003d76cc605d2a47eb8d8a8a5896}{single\_stream\_ant\_msk}} = 1;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04284}04284         lq-\/>\mbox{\hyperlink{structiwm__lq__cmd_a080ab148e02b02c55cba3a085cf7dad6}{dual\_stream\_ant\_msk}} = 1;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04285}04285 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04286}04286         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04287}04287 \textcolor{comment}{         * Build the actual rate selection table.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04288}04288 \textcolor{comment}{         * The lowest bits are the rates.  Additionally,}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04289}04289 \textcolor{comment}{         * CCK needs bit 9 to be set.  The rest of the bits}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04290}04290 \textcolor{comment}{         * we add to the table select the tx antenna}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04291}04291 \textcolor{comment}{         * Note that we add the rates in the highest rate first}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04292}04292 \textcolor{comment}{         * (opposite of ni\_rates).}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04293}04293 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04294}04294         \textcolor{keywordflow}{for} (i = 0; i < nrates; i++) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04295}04295                 \textcolor{keywordtype}{int} rate = rs-\/>rs\_rates[rix -\/ i] \& IEEE80211\_RATE\_VAL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04296}04296                 \textcolor{keywordtype}{int} nextant;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04297}04297 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04298}04298                 \textcolor{comment}{/* Map 802.11 rate to HW rate index. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04299}04299                 ridx = \mbox{\hyperlink{if__iwm_8c_a27fa2e4e7df3a8837691fb2d965e3335}{iwm\_rate2ridx}}(sc, rate);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04300}04300                 \textcolor{keywordflow}{if} (ridx == -\/1)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04301}04301                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04302}04302 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04303}04303 \textcolor{preprocessor}{\#if 0}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04304}04304                 \textcolor{keywordflow}{if} (txant == 0)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04305}04305                         txant = \mbox{\hyperlink{if__iwm__util_8h_a4a4f8b3b7a0b8f1532ec47009131142b}{iwm\_get\_valid\_tx\_ant}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04306}04306                 nextant = 1<<(ffs(txant)-\/1);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04307}04307                 txant \&= \string~nextant;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04308}04308 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04309}04309                 nextant = \mbox{\hyperlink{if__iwm__util_8h_a4a4f8b3b7a0b8f1532ec47009131142b}{iwm\_get\_valid\_tx\_ant}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04310}04310 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04311}04311                 tab = \mbox{\hyperlink{if__iwm_8c_a08ef9e6176f57d36238a07cdc3dc336c}{iwm\_rates}}[ridx].\mbox{\hyperlink{structiwm__rate_ae4883c6ee5d2c0f3b49dc2d7082e9c6a}{plcp}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04312}04312                 tab |= nextant << \mbox{\hyperlink{if__iwmreg_8h_ad04f05189e8f56a8d5c2e429a5b6a9c0}{IWM\_RATE\_MCS\_ANT\_POS}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04313}04313                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__iwm_8c_a0d2a2f868dde98abcf20edb8b64579cd}{IWM\_RIDX\_IS\_CCK}}(ridx))}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04314}04314                         tab |= \mbox{\hyperlink{if__iwmreg_8h_aadfe6fb9a91375e8fb75c5f2d35f5f8f}{IWM\_RATE\_MCS\_CCK\_MSK}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04315}04315                 \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_TXRATE,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04316}04316                     \textcolor{stringliteral}{"{}station rate i=\%d, rate=\%d, hw=\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04317}04317                     i, \mbox{\hyperlink{if__iwm_8c_a08ef9e6176f57d36238a07cdc3dc336c}{iwm\_rates}}[ridx].rate, tab);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04318}04318                 lq-\/>\mbox{\hyperlink{structiwm__lq__cmd_a40693b36a2a50d7d0ba463217620a6cb}{rs\_table}}[i] = htole32(tab);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04319}04319         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04320}04320         \textcolor{comment}{/* then fill the rest with the lowest possible rate */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04321}04321         \textcolor{keywordflow}{for} (i = nrates; i < nitems(lq-\/>\mbox{\hyperlink{structiwm__lq__cmd_a40693b36a2a50d7d0ba463217620a6cb}{rs\_table}}); i++) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04322}04322                 KASSERT(tab != 0, (\textcolor{stringliteral}{"{}invalid tab"{}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04323}04323                 lq-\/>\mbox{\hyperlink{structiwm__lq__cmd_a40693b36a2a50d7d0ba463217620a6cb}{rs\_table}}[i] = htole32(tab);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04324}04324         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04325}04325 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04326}04326 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04327}04327 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04328}\mbox{\hyperlink{if__iwm_8c_abbd0aeecf3e83e32e887cdeba1fa5787}{04328}} \mbox{\hyperlink{if__iwm_8c_abbd0aeecf3e83e32e887cdeba1fa5787}{iwm\_bring\_down\_firmware}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keyword}{struct} ieee80211vap *vap)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04329}04329 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04330}04330         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__vap}{iwm\_vap}} *ivp = \mbox{\hyperlink{if__iwmvar_8h_a411a4f289df166d363076401a075b455}{IWM\_VAP}}(vap);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04331}04331         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04332}04332 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04333}04333         \textcolor{comment}{/* Avoid Tx watchdog triggering, when transfers get dropped here. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04334}04334         sc-\/>\mbox{\hyperlink{structiwm__softc_aff40795d688fc78465103c744ca2f3b2}{sc\_tx\_timer}} = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04335}04335 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04336}04336         ivp-\/>\mbox{\hyperlink{structiwm__vap_ad65ae6967cb8d9c5aef1cbb48b40ad58}{iv\_auth}} = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04337}04337         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_a064fd76be7f7ab79f6da894c344419e0}{sc\_firmware\_state}} == 3) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04338}04338                 \mbox{\hyperlink{if__iwm_8c_a7bae0f1004518a3ebc5c68b50a2e02b8}{iwm\_xmit\_queue\_drain}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04339}04339 \textcolor{comment}{//              iwm\_flush\_tx\_path(sc, 0xf, IWM\_CMD\_SYNC);}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04340}04340                 error = \mbox{\hyperlink{if__iwm__sta_8c_a10b36bc150f30aa31381e295bba63707}{iwm\_rm\_sta}}(sc, vap, TRUE);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04341}04341                 \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04342}04342                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04343}04343                             \textcolor{stringliteral}{"{}\%s: Failed to remove station: \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04344}04344                             \_\_func\_\_, error);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04345}04345                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04346}04346         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04347}04347         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_a064fd76be7f7ab79f6da894c344419e0}{sc\_firmware\_state}} == 3) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04348}04348                 error = \mbox{\hyperlink{if__iwm__mac__ctxt_8c_a881f62de0b699e2c3054da3e709f53a4}{iwm\_mac\_ctxt\_changed}}(sc, vap);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04349}04349                 \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04350}04350                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04351}04351                             \textcolor{stringliteral}{"{}\%s: Failed to change mac context: \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04352}04352                             \_\_func\_\_, error);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04353}04353                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04354}04354         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04355}04355         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_a064fd76be7f7ab79f6da894c344419e0}{sc\_firmware\_state}} == 3) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04356}04356                 error = \mbox{\hyperlink{if__iwm__sf_8c_a0406d7ed2bfe1ce729140dfc625cffd6}{iwm\_sf\_update}}(sc, vap, FALSE);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04357}04357                 \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04358}04358                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04359}04359                             \textcolor{stringliteral}{"{}\%s: Failed to update smart FIFO: \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04360}04360                             \_\_func\_\_, error);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04361}04361                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04362}04362         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04363}04363         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_a064fd76be7f7ab79f6da894c344419e0}{sc\_firmware\_state}} == 3) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04364}04364                 error = \mbox{\hyperlink{if__iwm__sta_8c_a43ffe89d8e82b185d73181671b5f71b0}{iwm\_rm\_sta\_id}}(sc, vap);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04365}04365                 \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04366}04366                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04367}04367                             \textcolor{stringliteral}{"{}\%s: Failed to remove station id: \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04368}04368                             \_\_func\_\_, error);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04369}04369                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04370}04370         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04371}04371         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_a064fd76be7f7ab79f6da894c344419e0}{sc\_firmware\_state}} == 3) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04372}04372                 error = \mbox{\hyperlink{if__iwm_8c_a0314d524d42c8172bfac5233b4502ad8}{iwm\_update\_quotas}}(sc, NULL);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04373}04373                 \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04374}04374                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04375}04375                             \textcolor{stringliteral}{"{}\%s: Failed to update PHY quota: \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04376}04376                             \_\_func\_\_, error);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04377}04377                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04378}04378         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04379}04379         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_a064fd76be7f7ab79f6da894c344419e0}{sc\_firmware\_state}} == 3) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04380}04380                 \textcolor{comment}{/* XXX Might need to specify bssid correctly. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04381}04381                 error = \mbox{\hyperlink{if__iwm__mac__ctxt_8c_a881f62de0b699e2c3054da3e709f53a4}{iwm\_mac\_ctxt\_changed}}(sc, vap);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04382}04382                 \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04383}04383                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04384}04384                             \textcolor{stringliteral}{"{}\%s: Failed to change mac context: \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04385}04385                             \_\_func\_\_, error);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04386}04386                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04387}04387         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04388}04388         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_a064fd76be7f7ab79f6da894c344419e0}{sc\_firmware\_state}} == 3) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04389}04389                 sc-\/>\mbox{\hyperlink{structiwm__softc_a064fd76be7f7ab79f6da894c344419e0}{sc\_firmware\_state}} = 2;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04390}04390         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04391}04391         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_a064fd76be7f7ab79f6da894c344419e0}{sc\_firmware\_state}} > 1) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04392}04392                 error = \mbox{\hyperlink{if__iwm__binding_8c_a794d59d73527bbcea7e8627a0c4263ad}{iwm\_binding\_remove\_vif}}(sc, ivp);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04393}04393                 \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04394}04394                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04395}04395                             \textcolor{stringliteral}{"{}\%s: Failed to remove channel ctx: \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04396}04396                             \_\_func\_\_, error);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04397}04397                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04398}04398         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04399}04399         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_a064fd76be7f7ab79f6da894c344419e0}{sc\_firmware\_state}} > 1) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04400}04400                 sc-\/>\mbox{\hyperlink{structiwm__softc_a064fd76be7f7ab79f6da894c344419e0}{sc\_firmware\_state}} = 1;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04401}04401         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04402}04402         ivp-\/>\mbox{\hyperlink{structiwm__vap_a448a47a542ee0070949b36d0b86c83ad}{phy\_ctxt}} = NULL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04403}04403         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_a064fd76be7f7ab79f6da894c344419e0}{sc\_firmware\_state}} > 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04404}04404                 error = \mbox{\hyperlink{if__iwm__mac__ctxt_8c_a881f62de0b699e2c3054da3e709f53a4}{iwm\_mac\_ctxt\_changed}}(sc, vap);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04405}04405                 \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04406}04406                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04407}04407                             \textcolor{stringliteral}{"{}\%s: Failed to change mac context: \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04408}04408                             \_\_func\_\_, error);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04409}04409                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04410}04410         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04411}04411         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_a064fd76be7f7ab79f6da894c344419e0}{sc\_firmware\_state}} > 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04412}04412                 error = \mbox{\hyperlink{if__iwm__power_8c_a2ec4cf2528c4b24a2433572eaf9c0eb6}{iwm\_power\_update\_mac}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04413}04413                 \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04414}04414                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04415}04415                             \textcolor{stringliteral}{"{}\%s: failed to update power management\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04416}04416                             \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04417}04417                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04418}04418         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04419}04419         sc-\/>\mbox{\hyperlink{structiwm__softc_a064fd76be7f7ab79f6da894c344419e0}{sc\_firmware\_state}} = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04420}04420 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04421}04421 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04422}04422 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04423}\mbox{\hyperlink{if__iwm_8c_a2206679645aba97dcc6b5e5cec53c8b8}{04423}} \mbox{\hyperlink{if__iwm_8c_a2206679645aba97dcc6b5e5cec53c8b8}{iwm\_newstate}}(\textcolor{keyword}{struct} ieee80211vap *vap, \textcolor{keyword}{enum} ieee80211\_state nstate, \textcolor{keywordtype}{int} arg)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04424}04424 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04425}04425         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__vap}{iwm\_vap}} *ivp = \mbox{\hyperlink{if__iwmvar_8h_a411a4f289df166d363076401a075b455}{IWM\_VAP}}(vap);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04426}04426         \textcolor{keyword}{struct }ieee80211com *ic = vap-\/>iv\_ic;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04427}04427         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04428}04428         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__node}{iwm\_node}} *in;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04429}04429         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04430}04430 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04431}04431         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_STATE,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04432}04432             \textcolor{stringliteral}{"{}switching state \%s -\/> \%s arg=0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04433}04433             ieee80211\_state\_name[vap-\/>iv\_state],}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04434}04434             ieee80211\_state\_name[nstate],}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04435}04435             arg);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04436}04436 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04437}04437         IEEE80211\_UNLOCK(ic);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04438}04438         \mbox{\hyperlink{if__iwmvar_8h_ac9f22c2982def9e764105396531c69be}{IWM\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04439}04439 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04440}04440         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structiwm__softc_a67d7ea2a1eef39c9ca65e86178e54766}{sc\_flags}} \& \mbox{\hyperlink{if__iwmvar_8h_ad21a28e9ab6945204f4b4ee7f9e1b0ac}{IWM\_FLAG\_SCAN\_RUNNING}}) \&\&}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04441}04441             (nstate == IEEE80211\_S\_AUTH ||}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04442}04442              nstate == IEEE80211\_S\_ASSOC ||}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04443}04443              nstate == IEEE80211\_S\_RUN)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04444}04444                 \textcolor{comment}{/* Stop blinking for a scan, when authenticating. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04445}04445                 \mbox{\hyperlink{if__iwm__led_8c_a7090420ddea7b70667572a5fcf036268}{iwm\_led\_blink\_stop}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04446}04446         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04447}04447 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04448}04448         \textcolor{keywordflow}{if} (vap-\/>iv\_state == IEEE80211\_S\_RUN \&\& nstate != IEEE80211\_S\_RUN) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04449}04449                 \mbox{\hyperlink{if__iwm__led_8c_a6570221e4a285825c35723b7706e2f66}{iwm\_led\_disable}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04450}04450                 \textcolor{comment}{/* disable beacon filtering if we're hopping out of RUN */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04451}04451                 \mbox{\hyperlink{if__iwm__power_8c_a0c33d4bf1cf7667e9ab8f06d25c175d0}{iwm\_disable\_beacon\_filter}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04452}04452                 \textcolor{keywordflow}{if} (((in = \mbox{\hyperlink{if__iwmvar_8h_a371387d15226f5218ae8d2d2657934a5}{IWM\_NODE}}(vap-\/>iv\_bss)) != NULL))}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04453}04453                         in-\/>\mbox{\hyperlink{structiwm__node_ab9c110e875f6b18efe62656d210592c0}{in\_assoc}} = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04454}04454         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04455}04455 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04456}04456         \textcolor{keywordflow}{if} ((vap-\/>iv\_state == IEEE80211\_S\_AUTH ||}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04457}04457              vap-\/>iv\_state == IEEE80211\_S\_ASSOC ||}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04458}04458              vap-\/>iv\_state == IEEE80211\_S\_RUN) \&\&}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04459}04459             (nstate == IEEE80211\_S\_INIT ||}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04460}04460              nstate == IEEE80211\_S\_SCAN ||}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04461}04461              nstate == IEEE80211\_S\_AUTH)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04462}04462                 \mbox{\hyperlink{if__iwm__time__event_8c_afcfe94b90e01c17de87cec9e2fe7070b}{iwm\_stop\_session\_protection}}(sc, ivp);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04463}04463         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04464}04464 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04465}04465         \textcolor{keywordflow}{if} ((vap-\/>iv\_state == IEEE80211\_S\_RUN ||}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04466}04466              vap-\/>iv\_state == IEEE80211\_S\_ASSOC) \&\&}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04467}04467             nstate == IEEE80211\_S\_INIT) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04468}04468                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04469}04469 \textcolor{comment}{                 * In this case, iv\_newstate() wants to send an 80211 frame on}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04470}04470 \textcolor{comment}{                 * the network that we are leaving. So we need to call it,}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04471}04471 \textcolor{comment}{                 * before tearing down all the firmware state.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04472}04472 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04473}04473                 \mbox{\hyperlink{if__iwmvar_8h_a2bc8b1196a564b1b70c11f96391760fa}{IWM\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04474}04474                 IEEE80211\_LOCK(ic);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04475}04475                 ivp-\/>\mbox{\hyperlink{structiwm__vap_ad2a4c767333707f044c9d4277a3f4720}{iv\_newstate}}(vap, nstate, arg);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04476}04476                 IEEE80211\_UNLOCK(ic);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04477}04477                 \mbox{\hyperlink{if__iwmvar_8h_ac9f22c2982def9e764105396531c69be}{IWM\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04478}04478                 \mbox{\hyperlink{if__iwm_8c_abbd0aeecf3e83e32e887cdeba1fa5787}{iwm\_bring\_down\_firmware}}(sc, vap);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04479}04479                 \mbox{\hyperlink{if__iwmvar_8h_a2bc8b1196a564b1b70c11f96391760fa}{IWM\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04480}04480                 IEEE80211\_LOCK(ic);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04481}04481                 \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04482}04482         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04483}04483 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04484}04484         \textcolor{keywordflow}{switch} (nstate) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04485}04485         \textcolor{keywordflow}{case} IEEE80211\_S\_INIT:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04486}04486         \textcolor{keywordflow}{case} IEEE80211\_S\_SCAN:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04487}04487                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04488}04488 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04489}04489         \textcolor{keywordflow}{case} IEEE80211\_S\_AUTH:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04490}04490                 \mbox{\hyperlink{if__iwm_8c_abbd0aeecf3e83e32e887cdeba1fa5787}{iwm\_bring\_down\_firmware}}(sc, vap);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04491}04491                 \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{if__iwm_8c_abb26bc3b3bc33889d06d11c89d5bac56}{iwm\_auth}}(vap, sc)) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04492}04492                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04493}04493                             \textcolor{stringliteral}{"{}\%s: could not move to auth state: \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04494}04494                             \_\_func\_\_, error);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04495}04495                         \mbox{\hyperlink{if__iwm_8c_abbd0aeecf3e83e32e887cdeba1fa5787}{iwm\_bring\_down\_firmware}}(sc, vap);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04496}04496                         \mbox{\hyperlink{if__iwmvar_8h_a2bc8b1196a564b1b70c11f96391760fa}{IWM\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04497}04497                         IEEE80211\_LOCK(ic);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04498}04498                         \textcolor{keywordflow}{return} 1;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04499}04499                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04500}04500                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04501}04501 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04502}04502         \textcolor{keywordflow}{case} IEEE80211\_S\_ASSOC:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04503}04503                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04504}04504 \textcolor{comment}{                 * EBS may be disabled due to previous failures reported by FW.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04505}04505 \textcolor{comment}{                 * Reset EBS status here assuming environment has been changed.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04506}04506 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04507}04507                 sc-\/>\mbox{\hyperlink{structiwm__softc_a818822ce44a62f90e3e43fbab1d7406a}{last\_ebs\_successful}} = TRUE;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04508}04508                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04509}04509 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04510}04510         \textcolor{keywordflow}{case} IEEE80211\_S\_RUN:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04511}04511                 in = \mbox{\hyperlink{if__iwmvar_8h_a371387d15226f5218ae8d2d2657934a5}{IWM\_NODE}}(vap-\/>iv\_bss);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04512}04512                 \textcolor{comment}{/* Update the association state, now we have it all */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04513}04513                 \textcolor{comment}{/* (eg associd comes in at this point */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04514}04514                 error = \mbox{\hyperlink{if__iwm__sta_8c_a73310fab5e13a7dcdbdb4e1ce4603c7b}{iwm\_update\_sta}}(sc, in);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04515}04515                 \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04516}04516                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04517}04517                             \textcolor{stringliteral}{"{}\%s: failed to update STA\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04518}04518                         \mbox{\hyperlink{if__iwmvar_8h_a2bc8b1196a564b1b70c11f96391760fa}{IWM\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04519}04519                         IEEE80211\_LOCK(ic);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04520}04520                         \textcolor{keywordflow}{return} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04521}04521                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04522}04522                 in-\/>\mbox{\hyperlink{structiwm__node_ab9c110e875f6b18efe62656d210592c0}{in\_assoc}} = 1;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04523}04523                 error = \mbox{\hyperlink{if__iwm__mac__ctxt_8c_a881f62de0b699e2c3054da3e709f53a4}{iwm\_mac\_ctxt\_changed}}(sc, vap);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04524}04524                 \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04525}04525                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04526}04526                             \textcolor{stringliteral}{"{}\%s: failed to update MAC: \%d\(\backslash\)n"{}}, \_\_func\_\_, error);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04527}04527                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04528}04528 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04529}04529                 \mbox{\hyperlink{if__iwm__sf_8c_a0406d7ed2bfe1ce729140dfc625cffd6}{iwm\_sf\_update}}(sc, vap, FALSE);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04530}04530                 \mbox{\hyperlink{if__iwm__power_8c_a7f2bcc68997fdbd465331c3532d8d893}{iwm\_enable\_beacon\_filter}}(sc, ivp);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04531}04531                 \mbox{\hyperlink{if__iwm__power_8c_a2ec4cf2528c4b24a2433572eaf9c0eb6}{iwm\_power\_update\_mac}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04532}04532                 \mbox{\hyperlink{if__iwm_8c_a0314d524d42c8172bfac5233b4502ad8}{iwm\_update\_quotas}}(sc, ivp);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04533}04533                 \textcolor{keywordtype}{int} rix = ieee80211\_ratectl\_rate(\&in-\/>\mbox{\hyperlink{structiwm__node_ad467ee0de0b3403d7545869a1e547ef5}{in\_ni}}, NULL, 0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04534}04534                 \mbox{\hyperlink{if__iwm_8c_a8340199cf0662991ff3258c7236a6660}{iwm\_setrates}}(sc, in, rix);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04535}04535 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04536}04536                 \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{if__iwm__util_8c_a950ea16a30664e3e5bbdbbbd99d7f7a9}{iwm\_send\_lq\_cmd}}(sc, \&in-\/>\mbox{\hyperlink{structiwm__node_afdd6f4c966573fb34efc32291b3019c4}{in\_lq}}, TRUE)) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04537}04537                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04538}04538                             \textcolor{stringliteral}{"{}\%s: IWM\_LQ\_CMD failed: \%d\(\backslash\)n"{}}, \_\_func\_\_, error);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04539}04539                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04540}04540 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04541}04541                 \mbox{\hyperlink{if__iwm__led_8c_a2b23e16d04ca04e146af40e3742f8e1e}{iwm\_led\_enable}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04542}04542                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04543}04543 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04544}04544         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04545}04545                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04546}04546         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04547}04547         \mbox{\hyperlink{if__iwmvar_8h_a2bc8b1196a564b1b70c11f96391760fa}{IWM\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04548}04548         IEEE80211\_LOCK(ic);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04549}04549 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04550}04550         \textcolor{keywordflow}{return} (ivp-\/>\mbox{\hyperlink{structiwm__vap_ad2a4c767333707f044c9d4277a3f4720}{iv\_newstate}}(vap, nstate, arg));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04551}04551 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04552}04552 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04553}04553 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04554}\mbox{\hyperlink{if__iwm_8c_aaa155c13ec0523930d0be8f3cba9a9da}{04554}} \mbox{\hyperlink{if__iwm_8c_aaa155c13ec0523930d0be8f3cba9a9da}{iwm\_endscan\_cb}}(\textcolor{keywordtype}{void} *arg, \textcolor{keywordtype}{int} pending)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04555}04555 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04556}04556         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc = arg;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04557}04557         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structiwm__softc_ada8054beb1d93be79364f98ff3bfbaf2}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04558}04558 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04559}04559         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_SCAN | IWM\_DEBUG\_TRACE,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04560}04560             \textcolor{stringliteral}{"{}\%s: scan ended\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04561}04561             \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04562}04562 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04563}04563         ieee80211\_scan\_done(TAILQ\_FIRST(\&ic-\/>ic\_vaps));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04564}04564 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04565}04565 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04566}04566 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04567}\mbox{\hyperlink{if__iwm_8c_ab1eec3afbd901b2e2b683fb563472dd8}{04567}} \mbox{\hyperlink{if__iwm_8c_ab1eec3afbd901b2e2b683fb563472dd8}{iwm\_send\_bt\_init\_conf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04568}04568 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04569}04569         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__bt__coex__cmd}{iwm\_bt\_coex\_cmd}} bt\_cmd;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04570}04570 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04571}04571         bt\_cmd.\mbox{\hyperlink{structiwm__bt__coex__cmd_ae5f1e834476e2e480c98d45fcd10c6ac}{mode}} = htole32(\mbox{\hyperlink{if__iwmreg_8h_a1aded7659ee3146d589c627363a6ad1c}{IWM\_BT\_COEX\_WIFI}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04572}04572         bt\_cmd.\mbox{\hyperlink{structiwm__bt__coex__cmd_aa6cfdcc15fb5df9c610850a5bff779a8}{enabled\_modules}} = htole32(\mbox{\hyperlink{if__iwmreg_8h_af64493d48cf3a84b5587dff68fef41ed}{IWM\_BT\_COEX\_HIGH\_BAND\_RET}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04573}04573 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04574}04574         \textcolor{keywordflow}{return} \mbox{\hyperlink{if__iwm__util_8c_ad7c0f40dbc21d1ec94f0c5f6194d1140}{iwm\_send\_cmd\_pdu}}(sc, \mbox{\hyperlink{if__iwmreg_8h_aedf12f883d83d6f43efd106d3112d680}{IWM\_BT\_CONFIG}}, 0, \textcolor{keyword}{sizeof}(bt\_cmd),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04575}04575             \&bt\_cmd);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04576}04576 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04577}04577 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04578}04578 \textcolor{keyword}{static} boolean\_t}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04579}\mbox{\hyperlink{if__iwm_8c_ae55a8114a6b5bc01c29e1c353edccd6e}{04579}} \mbox{\hyperlink{if__iwm_8c_ae55a8114a6b5bc01c29e1c353edccd6e}{iwm\_is\_lar\_supported}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04580}04580 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04581}04581         boolean\_t nvm\_lar = sc-\/>\mbox{\hyperlink{structiwm__softc_ac65155777b4c999bcc3e2729733e3db8}{nvm\_data}}-\/>\mbox{\hyperlink{structiwm__nvm__data_aa698463550d874dd407f714555c7eb59}{lar\_enabled}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04582}04582         boolean\_t tlv\_lar = \mbox{\hyperlink{if__iwmvar_8h_a9d312dee2db5d5033a7d062bb001203b}{iwm\_fw\_has\_capa}}(sc, \mbox{\hyperlink{if__iwmreg_8h_aed363af041d6cf0e638b0d6854bb74b5}{IWM\_UCODE\_TLV\_CAPA\_LAR\_SUPPORT}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04583}04583 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04584}04584         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__iwm_8c_a67c60bb19e042898b3d2a95d8f668aa9}{iwm\_lar\_disable}})}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04585}04585                 \textcolor{keywordflow}{return} FALSE;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04586}04586 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04587}04587         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04588}04588 \textcolor{comment}{         * Enable LAR only if it is supported by the FW (TLV) \&\&}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04589}04589 \textcolor{comment}{         * enabled in the NVM}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04590}04590 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04591}04591         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_a9b399704eeb3c9299fe79ff7ebf0b3c3}{device\_family}} >= \mbox{\hyperlink{if__iwm__config_8h_a134dc690a22b13281e655ce3d4944141aece09942e3ab8587f2bbd9f34f47af41}{IWM\_DEVICE\_FAMILY\_8000}})}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04592}04592                 \textcolor{keywordflow}{return} nvm\_lar \&\& tlv\_lar;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04593}04593         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04594}04594                 \textcolor{keywordflow}{return} tlv\_lar;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04595}04595 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04596}04596 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04597}04597 \textcolor{keyword}{static} boolean\_t}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04598}\mbox{\hyperlink{if__iwm_8c_ac010032a58072d78c6c91e29152d5b39}{04598}} \mbox{\hyperlink{if__iwm_8c_ac010032a58072d78c6c91e29152d5b39}{iwm\_is\_wifi\_mcc\_supported}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04599}04599 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04600}04600         \textcolor{keywordflow}{return} \mbox{\hyperlink{if__iwmvar_8h_adc89785dcc690aec1507dd7392f8e107}{iwm\_fw\_has\_api}}(sc, \mbox{\hyperlink{if__iwmreg_8h_ac7d242e51ccba8b79f5085dcdb82d9af}{IWM\_UCODE\_TLV\_API\_WIFI\_MCC\_UPDATE}}) ||}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04601}04601             \mbox{\hyperlink{if__iwmvar_8h_a9d312dee2db5d5033a7d062bb001203b}{iwm\_fw\_has\_capa}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a7c0add6b380a295be0f92c5e581e0faa}{IWM\_UCODE\_TLV\_CAPA\_LAR\_MULTI\_MCC}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04602}04602 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04603}04603 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04604}04604 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04605}\mbox{\hyperlink{if__iwm_8c_ae632bbe9af83a24021523ef7b9494167}{04605}} \mbox{\hyperlink{if__iwm_8c_ae632bbe9af83a24021523ef7b9494167}{iwm\_send\_update\_mcc\_cmd}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *alpha2)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04606}04606 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04607}04607         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__mcc__update__cmd}{iwm\_mcc\_update\_cmd}} mcc\_cmd;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04608}04608         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__host__cmd}{iwm\_host\_cmd}} hcmd = \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04609}04609                 .\mbox{\hyperlink{structiwm__host__cmd_a44cf199ff72a040dd4d74c9082e448ab}{id}} = \mbox{\hyperlink{if__iwmreg_8h_a78e1f737dcbaac5cb512bf52824e8a07}{IWM\_MCC\_UPDATE\_CMD}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04610}04610                 .flags = (\mbox{\hyperlink{if__iwmvar_8h_a683e81a3f25e57c34df07e37e049bf07a1ed0b3a851376d8e5faa5be34d886df6}{IWM\_CMD\_SYNC}} | \mbox{\hyperlink{if__iwmvar_8h_a683e81a3f25e57c34df07e37e049bf07a4bab9fa9b338e6e412256ea03704efe6}{IWM\_CMD\_WANT\_SKB}}),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04611}04611                 .\mbox{\hyperlink{structiwm__host__cmd_ab152e15c33fb9988da260f3e5e14123a}{data}} = \{ \&mcc\_cmd \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04612}04612         \};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04613}04613         \textcolor{keywordtype}{int} ret;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04614}04614 \textcolor{preprocessor}{\#ifdef IWM\_DEBUG}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04615}04615         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__rx__packet}{iwm\_rx\_packet}} *pkt;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04616}04616         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__mcc__update__resp__v1}{iwm\_mcc\_update\_resp\_v1}} *mcc\_resp\_v1 = NULL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04617}04617         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__mcc__update__resp__v2}{iwm\_mcc\_update\_resp\_v2}} *mcc\_resp;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04618}04618         \textcolor{keywordtype}{int} \mbox{\hyperlink{structiwm__mcc__update__resp__v2_aa63152651b7c0c16c97ef3b60c066173}{n\_channels}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04619}04619         uint16\_t \mbox{\hyperlink{structiwm__mcc__update__resp__v2_aee4bd866cfe5fdec2205f2f29401b4c0}{mcc}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04620}04620 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04621}04621         \textcolor{keywordtype}{int} resp\_v2 = \mbox{\hyperlink{if__iwmvar_8h_a9d312dee2db5d5033a7d062bb001203b}{iwm\_fw\_has\_capa}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a8b2da2e691e50101886c6bd7a0e02a73}{IWM\_UCODE\_TLV\_CAPA\_LAR\_SUPPORT\_V2}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04622}04622 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04623}04623         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{if__iwm_8c_ae55a8114a6b5bc01c29e1c353edccd6e}{iwm\_is\_lar\_supported}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04624}04624                 \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_LAR, \textcolor{stringliteral}{"{}\%s: no LAR support\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04625}04625                     \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04626}04626                 \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04627}04627         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04628}04628 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04629}04629         memset(\&mcc\_cmd, 0, \textcolor{keyword}{sizeof}(mcc\_cmd));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04630}04630         mcc\_cmd.\mbox{\hyperlink{structiwm__mcc__update__cmd_a3901910e7883e3d7c304ef19aa2227ef}{mcc}} = htole16(alpha2[0] << 8 | alpha2[1]);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04631}04631         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__iwm_8c_ac010032a58072d78c6c91e29152d5b39}{iwm\_is\_wifi\_mcc\_supported}}(sc))}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04632}04632                 mcc\_cmd.\mbox{\hyperlink{structiwm__mcc__update__cmd_abf249574b5f91e6f136ecd2dae7ea62d}{source\_id}} = \mbox{\hyperlink{if__iwmreg_8h_a944e6a60f49de21dbf6faaab5616388a}{IWM\_MCC\_SOURCE\_GET\_CURRENT}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04633}04633         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04634}04634                 mcc\_cmd.\mbox{\hyperlink{structiwm__mcc__update__cmd_abf249574b5f91e6f136ecd2dae7ea62d}{source\_id}} = \mbox{\hyperlink{if__iwmreg_8h_aad1f7fcea6d32bb37675742e46391708}{IWM\_MCC\_SOURCE\_OLD\_FW}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04635}04635 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04636}04636         \textcolor{keywordflow}{if} (resp\_v2)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04637}04637                 hcmd.\mbox{\hyperlink{structiwm__host__cmd_a4cf9f45e18a86a3a2ea657decbb78e2c}{len}}[0] = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__mcc__update__cmd}{iwm\_mcc\_update\_cmd}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04638}04638         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04639}04639                 hcmd.\mbox{\hyperlink{structiwm__host__cmd_a4cf9f45e18a86a3a2ea657decbb78e2c}{len}}[0] = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__mcc__update__cmd__v1}{iwm\_mcc\_update\_cmd\_v1}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04640}04640 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04641}04641         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_LAR,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04642}04642             \textcolor{stringliteral}{"{}send MCC update to FW with '\%c\%c' src = \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04643}04643             alpha2[0], alpha2[1], mcc\_cmd.\mbox{\hyperlink{structiwm__mcc__update__cmd_abf249574b5f91e6f136ecd2dae7ea62d}{source\_id}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04644}04644 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04645}04645         ret = \mbox{\hyperlink{if__iwm__util_8c_ae8d91626a2554dec50cbf71952d35226}{iwm\_send\_cmd}}(sc, \&hcmd);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04646}04646         \textcolor{keywordflow}{if} (ret)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04647}04647                 \textcolor{keywordflow}{return} ret;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04648}04648 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04649}04649 \textcolor{preprocessor}{\#ifdef IWM\_DEBUG}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04650}04650         pkt = hcmd.\mbox{\hyperlink{structiwm__host__cmd_a46c98d2ab8ea9b6db85a6e1aa0aefb34}{resp\_pkt}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04651}04651 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04652}04652         \textcolor{comment}{/* Extract MCC response */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04653}04653         \textcolor{keywordflow}{if} (resp\_v2) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04654}04654                 mcc\_resp = (\textcolor{keywordtype}{void} *)pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a77036fd43499c32e7ec28e2d47ed1c33}{data}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04655}04655                 \mbox{\hyperlink{structiwm__mcc__update__cmd__v1_acb9c914f16a09b310f1655e24a93f6b4}{mcc}} = mcc\_resp-\/>\mbox{\hyperlink{structiwm__mcc__update__resp__v2_aee4bd866cfe5fdec2205f2f29401b4c0}{mcc}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04656}04656                 n\_channels =  le32toh(mcc\_resp-\/>\mbox{\hyperlink{structiwm__mcc__update__resp__v2_aa63152651b7c0c16c97ef3b60c066173}{n\_channels}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04657}04657         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04658}04658                 mcc\_resp\_v1 = (\textcolor{keywordtype}{void} *)pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a77036fd43499c32e7ec28e2d47ed1c33}{data}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04659}04659                 \mbox{\hyperlink{structiwm__mcc__update__cmd__v1_acb9c914f16a09b310f1655e24a93f6b4}{mcc}} = mcc\_resp\_v1-\/>\mbox{\hyperlink{structiwm__mcc__update__resp__v1_a1c3ad4bdf2d59142e6325574ababfc47}{mcc}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04660}04660                 n\_channels =  le32toh(mcc\_resp\_v1-\/>\mbox{\hyperlink{structiwm__mcc__update__resp__v1_ad95baa98067ddd6c51b828738bdedb97}{n\_channels}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04661}04661         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04662}04662 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04663}04663         \textcolor{comment}{/* W/A for a FW/NVM issue -\/ returns 0x00 for the world domain */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04664}04664         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structiwm__mcc__update__cmd__v1_acb9c914f16a09b310f1655e24a93f6b4}{mcc}} == 0)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04665}04665                 \mbox{\hyperlink{structiwm__mcc__update__cmd__v1_acb9c914f16a09b310f1655e24a93f6b4}{mcc}} = 0x3030;  \textcolor{comment}{/* "{}00"{} -\/ world */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04666}04666 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04667}04667         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_LAR,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04668}04668             \textcolor{stringliteral}{"{}regulatory domain '\%c\%c' (\%d channels available)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04669}04669             \mbox{\hyperlink{structiwm__mcc__update__cmd__v1_acb9c914f16a09b310f1655e24a93f6b4}{mcc}} >> 8, \mbox{\hyperlink{structiwm__mcc__update__cmd__v1_acb9c914f16a09b310f1655e24a93f6b4}{mcc}} \& 0xff, n\_channels);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04670}04670 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04671}04671         \mbox{\hyperlink{if__iwm__util_8c_a64bdd9c1c2ade2c7e0a9cdb45b2f2c6e}{iwm\_free\_resp}}(sc, \&hcmd);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04672}04672 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04673}04673         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04674}04674 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04675}04675 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04676}04676 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04677}\mbox{\hyperlink{if__iwm_8c_ad4d6b0516f9e0dfac348e5373313cacb}{04677}} \mbox{\hyperlink{if__iwm_8c_ad4d6b0516f9e0dfac348e5373313cacb}{iwm\_tt\_tx\_backoff}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, uint32\_t backoff)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04678}04678 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04679}04679         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__host__cmd}{iwm\_host\_cmd}} cmd = \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04680}04680                 .\mbox{\hyperlink{structiwm__host__cmd_a44cf199ff72a040dd4d74c9082e448ab}{id}} = \mbox{\hyperlink{if__iwmreg_8h_ab895f481047af06abeb6ae8e1da0eba4}{IWM\_REPLY\_THERMAL\_MNG\_BACKOFF}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04681}04681                 .len = \{ \textcolor{keyword}{sizeof}(uint32\_t), \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04682}04682                 .data = \{ \&backoff, \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04683}04683         \};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04684}04684 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04685}04685         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__iwm__util_8c_ae8d91626a2554dec50cbf71952d35226}{iwm\_send\_cmd}}(sc, \&cmd) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04686}04686                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04687}04687                     \textcolor{stringliteral}{"{}failed to change thermal tx backoff\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04688}04688         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04689}04689 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04690}04690 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04691}04691 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04692}\mbox{\hyperlink{if__iwm_8c_a5a2a206119954b9f2d00d4d4c2d3cdbc}{04692}} \mbox{\hyperlink{if__iwm_8c_a5a2a206119954b9f2d00d4d4c2d3cdbc}{iwm\_init\_hw}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04693}04693 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04694}04694         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structiwm__softc_ada8054beb1d93be79364f98ff3bfbaf2}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04695}04695         \textcolor{keywordtype}{int} error, i, ac;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04696}04696 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04697}04697         sc-\/>\mbox{\hyperlink{structiwm__softc_a666b0d35ec5dff20dbfbcb51294dc0d1}{sf\_state}} = \mbox{\hyperlink{if__iwmreg_8h_ae0c4b2df21f4690048d8bb50d2a340c6a6533f48063182107c62ba6b80ded01e0}{IWM\_SF\_UNINIT}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04698}04698 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04699}04699         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{if__iwm__pcie__trans_8c_a7f32a846bb11060568ee96d3007ba18f}{iwm\_start\_hw}}(sc)) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04700}04700                 printf(\textcolor{stringliteral}{"{}iwm\_start\_hw: failed \%d\(\backslash\)n"{}}, error);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04701}04701                 \textcolor{keywordflow}{return} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04702}04702         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04703}04703 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04704}04704         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{if__iwm_8c_a11aec544b58ddec5ef1ca3278061f9c7}{iwm\_run\_init\_ucode}}(sc, 0)) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04705}04705                 printf(\textcolor{stringliteral}{"{}iwm\_run\_init\_ucode: failed \%d\(\backslash\)n"{}}, error);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04706}04706                 \textcolor{keywordflow}{return} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04707}04707         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04708}04708 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04709}04709         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04710}04710 \textcolor{comment}{         * should stop and start HW since that INIT}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04711}04711 \textcolor{comment}{         * image just loaded}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04712}04712 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04713}04713         \mbox{\hyperlink{if__iwm_8c_a0aac1aec10b3f7f3fdbec8d4252038c1}{iwm\_stop\_device}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04714}04714         sc-\/>\mbox{\hyperlink{structiwm__softc_ad690c0315f6c7b1a0f7611a95231290c}{sc\_ps\_disabled}} = FALSE;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04715}04715         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{if__iwm__pcie__trans_8c_a7f32a846bb11060568ee96d3007ba18f}{iwm\_start\_hw}}(sc)) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04716}04716                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}could not initialize hardware\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04717}04717                 \textcolor{keywordflow}{return} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04718}04718         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04719}04719 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04720}04720         \textcolor{comment}{/* omstart, this time with the regular firmware */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04721}04721         error = \mbox{\hyperlink{if__iwm_8c_af53df91d7015b4925b5c2938068b6856}{iwm\_load\_ucode\_wait\_alive}}(sc, \mbox{\hyperlink{if__iwmvar_8h_a680b88b47a331f93dcdf230bf57590aca05bb856b78181c5cb35e62368d763488}{IWM\_UCODE\_REGULAR}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04722}04722         \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04723}04723                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}could not load firmware\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04724}04724                 \textcolor{keywordflow}{goto} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04725}04725         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04726}04726 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04727}04727         error = \mbox{\hyperlink{if__iwm__sf_8c_a0406d7ed2bfe1ce729140dfc625cffd6}{iwm\_sf\_update}}(sc, NULL, FALSE);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04728}04728         \textcolor{keywordflow}{if} (error)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04729}04729                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}Failed to initialize Smart Fifo\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04730}04730 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04731}04731         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{if__iwm_8c_ab1eec3afbd901b2e2b683fb563472dd8}{iwm\_send\_bt\_init\_conf}}(sc)) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04732}04732                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}bt init conf failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04733}04733                 \textcolor{keywordflow}{goto} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04734}04734         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04735}04735 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04736}04736         error = \mbox{\hyperlink{if__iwm_8c_adcaf15bb311c4eb0dc4ca98374b371b3}{iwm\_send\_tx\_ant\_cfg}}(sc, \mbox{\hyperlink{if__iwm__util_8h_a4a4f8b3b7a0b8f1532ec47009131142b}{iwm\_get\_valid\_tx\_ant}}(sc));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04737}04737         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04738}04738                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}antenna config failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04739}04739                 \textcolor{keywordflow}{goto} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04740}04740         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04741}04741 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04742}04742         \textcolor{comment}{/* Send phy db control command and then phy db calibration */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04743}04743         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{if__iwm__phy__db_8c_a067e5fecc8067da898f6ef01e1596f0e}{iwm\_send\_phy\_db\_data}}(sc-\/>\mbox{\hyperlink{structiwm__softc_ac6daddccbf33fd79ff087cb3a85b8d70}{sc\_phy\_db}})) != 0)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04744}04744                 \textcolor{keywordflow}{goto} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04745}04745 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04746}04746         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{if__iwm_8c_a8006bb57d2eac8cf8b28d750cf3b82b7}{iwm\_send\_phy\_cfg\_cmd}}(sc)) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04747}04747                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}phy\_cfg\_cmd failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04748}04748                 \textcolor{keywordflow}{goto} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04749}04749         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04750}04750 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04751}04751         \textcolor{comment}{/* Add auxiliary station for scanning */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04752}04752         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{if__iwm__sta_8c_aae0b99e40d7d2ab8f5ce4530219bf3c7}{iwm\_add\_aux\_sta}}(sc)) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04753}04753                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}add\_aux\_sta failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04754}04754                 \textcolor{keywordflow}{goto} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04755}04755         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04756}04756 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04757}04757         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{if__iwmreg_8h_a8d96e5bc98f4f70963e4d685808a57a2}{IWM\_NUM\_PHY\_CTX}}; i++) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04758}04758                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04759}04759 \textcolor{comment}{                 * The channel used here isn't relevant as it's}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04760}04760 \textcolor{comment}{                 * going to be overwritten in the other flows.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04761}04761 \textcolor{comment}{                 * For now use the first channel we have.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04762}04762 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04763}04763                 \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{if__iwm__phy__ctxt_8c_a361f77da0787ec7e2ba1557da5c21a84}{iwm\_phy\_ctxt\_add}}(sc,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04764}04764                     \&sc-\/>\mbox{\hyperlink{structiwm__softc_ab5b4db19ac74e24f6b96f22fb4fee594}{sc\_phyctxt}}[i], \&ic-\/>ic\_channels[1], 1, 1)) != 0)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04765}04765                         \textcolor{keywordflow}{goto} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04766}04766         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04767}04767 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04768}04768         \textcolor{comment}{/* Initialize tx backoffs to the minimum. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04769}04769         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_a9b399704eeb3c9299fe79ff7ebf0b3c3}{device\_family}} == \mbox{\hyperlink{if__iwm__config_8h_a134dc690a22b13281e655ce3d4944141a8cb6f131b7633326d14c4046c4bbf0f5}{IWM\_DEVICE\_FAMILY\_7000}})}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04770}04770                 \mbox{\hyperlink{if__iwm_8c_ad4d6b0516f9e0dfac348e5373313cacb}{iwm\_tt\_tx\_backoff}}(sc, 0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04771}04771 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04772}04772         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__iwm_8c_a0dcd79bb68188bdefcdc0b7fe0eee45a}{iwm\_config\_ltr}}(sc) != 0)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04773}04773                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}PCIe LTR configuration failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04774}04774 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04775}04775         error = \mbox{\hyperlink{if__iwm__power_8c_af849dc4686a3c62ac12d16eab46749fd}{iwm\_power\_update\_device}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04776}04776         \textcolor{keywordflow}{if} (error)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04777}04777                 \textcolor{keywordflow}{goto} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04778}04778 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04779}04779         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{if__iwm_8c_ae632bbe9af83a24021523ef7b9494167}{iwm\_send\_update\_mcc\_cmd}}(sc, \textcolor{stringliteral}{"{}ZZ"{}})) != 0)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04780}04780                 \textcolor{keywordflow}{goto} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04781}04781 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04782}04782         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__iwmvar_8h_a9d312dee2db5d5033a7d062bb001203b}{iwm\_fw\_has\_capa}}(sc, \mbox{\hyperlink{if__iwmreg_8h_aa724f16782d7772095512ce6f824caa1}{IWM\_UCODE\_TLV\_CAPA\_UMAC\_SCAN}})) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04783}04783                 \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{if__iwm__scan_8c_ad216bfc5ad441956b48155f64ec529e4}{iwm\_config\_umac\_scan}}(sc)) != 0)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04784}04784                         \textcolor{keywordflow}{goto} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04785}04785         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04786}04786 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04787}04787         \textcolor{comment}{/* Enable Tx queues. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04788}04788         \textcolor{keywordflow}{for} (ac = 0; ac < WME\_NUM\_AC; ac++) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04789}04789                 error = \mbox{\hyperlink{if__iwm_8c_a0ee3a6fe5f92850b68a50b9350a42a8c}{iwm\_enable\_txq}}(sc, \mbox{\hyperlink{if__iwmvar_8h_a91f3cca91add40062cd65ec754ef394d}{IWM\_STATION\_ID}}, ac,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04790}04790                     \mbox{\hyperlink{if__iwm__mac__ctxt_8c_a6fb8387d7aa6f48d0b8fd4a740b9a896}{iwm\_ac\_to\_tx\_fifo}}[ac]);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04791}04791                 \textcolor{keywordflow}{if} (error)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04792}04792                         \textcolor{keywordflow}{goto} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04793}04793         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04794}04794 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04795}04795         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{if__iwm__power_8c_a0c33d4bf1cf7667e9ab8f06d25c175d0}{iwm\_disable\_beacon\_filter}}(sc)) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04796}04796                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}failed to disable beacon filter\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04797}04797                 \textcolor{keywordflow}{goto} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04798}04798         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04799}04799 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04800}04800         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04801}04801 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04802}04802  error:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04803}04803         \mbox{\hyperlink{if__iwm_8c_a0aac1aec10b3f7f3fdbec8d4252038c1}{iwm\_stop\_device}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04804}04804         \textcolor{keywordflow}{return} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04805}04805 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04806}04806 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04807}04807 \textcolor{comment}{/* Allow multicast from our BSSID. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04808}04808 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04809}\mbox{\hyperlink{if__iwm_8c_ae61233c5b54e71cd531791f7beecf8cc}{04809}} \mbox{\hyperlink{if__iwm_8c_ae61233c5b54e71cd531791f7beecf8cc}{iwm\_allow\_mcast}}(\textcolor{keyword}{struct} ieee80211vap *vap, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04810}04810 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04811}04811         \textcolor{keyword}{struct }ieee80211\_node *ni = vap-\/>iv\_bss;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04812}04812         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__mcast__filter__cmd}{iwm\_mcast\_filter\_cmd}} *cmd;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04813}04813         \textcolor{keywordtype}{size\_t} size;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04814}04814         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04815}04815 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04816}04816         size = roundup(\textcolor{keyword}{sizeof}(*cmd), 4);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04817}04817         cmd = malloc(size, M\_DEVBUF, M\_NOWAIT | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04818}04818         \textcolor{keywordflow}{if} (cmd == NULL)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04819}04819                 \textcolor{keywordflow}{return} ENOMEM;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04820}04820         cmd-\/>\mbox{\hyperlink{structiwm__mcast__filter__cmd_a0b7da8fe453f5624fdca06dd22bfc096}{filter\_own}} = 1;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04821}04821         cmd-\/>\mbox{\hyperlink{structiwm__mcast__filter__cmd_a7c0089b831bbd38add6db02451e5f7a8}{port\_id}} = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04822}04822         cmd-\/>\mbox{\hyperlink{structiwm__mcast__filter__cmd_ab17c9fad600f7fa5479695704bcc76dd}{count}} = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04823}04823         cmd-\/>\mbox{\hyperlink{structiwm__mcast__filter__cmd_a144b0be1e99e4488a1457435fc49ddac}{pass\_all}} = 1;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04824}04824         IEEE80211\_ADDR\_COPY(cmd-\/>\mbox{\hyperlink{structiwm__mcast__filter__cmd_a8c86d9bdd4899eb7526b710848345cf5}{bssid}}, ni-\/>ni\_bssid);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04825}04825 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04826}04826         error = \mbox{\hyperlink{if__iwm__util_8c_ad7c0f40dbc21d1ec94f0c5f6194d1140}{iwm\_send\_cmd\_pdu}}(sc, \mbox{\hyperlink{if__iwmreg_8h_ada6f70b22b25a03f91c514a3c9e82f55}{IWM\_MCAST\_FILTER\_CMD}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04827}04827             \mbox{\hyperlink{if__iwmvar_8h_a683e81a3f25e57c34df07e37e049bf07a1ed0b3a851376d8e5faa5be34d886df6}{IWM\_CMD\_SYNC}}, size, cmd);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04828}04828         free(cmd, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04829}04829 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04830}04830         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04831}04831 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04832}04832 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04833}04833 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04834}04834 \textcolor{comment}{ * ifnet interfaces}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04835}04835 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04836}04836 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04837}04837 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04838}\mbox{\hyperlink{if__iwm_8c_a2f1740409045c3379d208637e549985c}{04838}} \mbox{\hyperlink{if__iwm_8c_a2f1740409045c3379d208637e549985c}{iwm\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04839}04839 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04840}04840         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04841}04841 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04842}04842         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_a67d7ea2a1eef39c9ca65e86178e54766}{sc\_flags}} \& \mbox{\hyperlink{if__iwmvar_8h_ad7e99f8e27769f3ca96607a815f59428}{IWM\_FLAG\_HW\_INITED}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04843}04843                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04844}04844         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04845}04845         sc-\/>\mbox{\hyperlink{structiwm__softc_a258bbf56765aee751cafb3ed2b32f486}{sc\_generation}}++;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04846}04846         sc-\/>\mbox{\hyperlink{structiwm__softc_a67d7ea2a1eef39c9ca65e86178e54766}{sc\_flags}} \&= \string~IWM\_FLAG\_STOPPED;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04847}04847 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04848}04848         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{if__iwm_8c_a5a2a206119954b9f2d00d4d4c2d3cdbc}{iwm\_init\_hw}}(sc)) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04849}04849                 printf(\textcolor{stringliteral}{"{}iwm\_init\_hw failed \%d\(\backslash\)n"{}}, error);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04850}04850                 \mbox{\hyperlink{if__iwm_8c_a0825fe7959f3d4f96a3435079bd1b37d}{iwm\_stop}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04851}04851                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04852}04852         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04853}04853 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04854}04854         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04855}04855 \textcolor{comment}{         * Ok, firmware loaded and we are jogging}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04856}04856 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04857}04857         sc-\/>\mbox{\hyperlink{structiwm__softc_a67d7ea2a1eef39c9ca65e86178e54766}{sc\_flags}} |= \mbox{\hyperlink{if__iwmvar_8h_ad7e99f8e27769f3ca96607a815f59428}{IWM\_FLAG\_HW\_INITED}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04858}04858 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04859}04859 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04860}04860 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04861}\mbox{\hyperlink{if__iwm_8c_a0ab0f26da802dee19e492c3e0bca31e0}{04861}} \mbox{\hyperlink{if__iwm_8c_a0ab0f26da802dee19e492c3e0bca31e0}{iwm\_transmit}}(\textcolor{keyword}{struct} ieee80211com *ic, \textcolor{keyword}{struct} mbuf *m)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04862}04862 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04863}04863         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04864}04864         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04865}04865 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04866}04866         sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04867}04867 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04868}04868         \mbox{\hyperlink{if__iwmvar_8h_ac9f22c2982def9e764105396531c69be}{IWM\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04869}04869         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structiwm__softc_a67d7ea2a1eef39c9ca65e86178e54766}{sc\_flags}} \& \mbox{\hyperlink{if__iwmvar_8h_ad7e99f8e27769f3ca96607a815f59428}{IWM\_FLAG\_HW\_INITED}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04870}04870                 \mbox{\hyperlink{if__iwmvar_8h_a2bc8b1196a564b1b70c11f96391760fa}{IWM\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04871}04871                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04872}04872         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04873}04873         error = mbufq\_enqueue(\&sc-\/>\mbox{\hyperlink{structiwm__softc_a135aafeef98b9fd92696efaa14730e5f}{sc\_snd}}, m);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04874}04874         \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04875}04875                 \mbox{\hyperlink{if__iwmvar_8h_a2bc8b1196a564b1b70c11f96391760fa}{IWM\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04876}04876                 \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04877}04877         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04878}04878         \mbox{\hyperlink{if__iwm_8c_a48e9d98a5d061d2b24bd4bfbd4f798da}{iwm\_start}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04879}04879         \mbox{\hyperlink{if__iwmvar_8h_a2bc8b1196a564b1b70c11f96391760fa}{IWM\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04880}04880         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04881}04881 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04882}04882 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04883}04883 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04884}04884 \textcolor{comment}{ * Dequeue packets from sendq and call send.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04885}04885 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04886}04886 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04887}\mbox{\hyperlink{if__iwm_8c_a48e9d98a5d061d2b24bd4bfbd4f798da}{04887}} \mbox{\hyperlink{if__iwm_8c_a48e9d98a5d061d2b24bd4bfbd4f798da}{iwm\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04888}04888 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04889}04889         \textcolor{keyword}{struct }ieee80211\_node *ni;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04890}04890         \textcolor{keyword}{struct }mbuf *m;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04891}04891         \textcolor{keywordtype}{int} ac = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04892}04892 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04893}04893         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_XMIT | IWM\_DEBUG\_TRACE, \textcolor{stringliteral}{"{}-\/>\%s\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04894}04894         \textcolor{keywordflow}{while} (sc-\/>\mbox{\hyperlink{structiwm__softc_aa06fec14bd51ea7a0ef7b4b549c59c03}{qfullmsk}} == 0 \&\&}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04895}04895                 (m = mbufq\_dequeue(\&sc-\/>\mbox{\hyperlink{structiwm__softc_a135aafeef98b9fd92696efaa14730e5f}{sc\_snd}})) != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04896}04896                 ni = (\textcolor{keyword}{struct }ieee80211\_node *)m-\/>m\_pkthdr.rcvif;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04897}04897                 if (\mbox{\hyperlink{if__iwm_8c_a376e1489b8d710c2b759c2b74ad84808}{iwm\_tx}}(sc, m, ni, ac) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04898}04898                         if\_inc\_counter(ni-\/>ni\_vap-\/>iv\_ifp,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04899}04899                             IFCOUNTER\_OERRORS, 1);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04900}04900                         ieee80211\_free\_node(ni);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04901}04901                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04902}04902                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04903}04903                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_aff40795d688fc78465103c744ca2f3b2}{sc\_tx\_timer}} == 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04904}04904                         callout\_reset(\&sc-\/>\mbox{\hyperlink{structiwm__softc_aa23512c0249b8a3513d3ec43f828bd39}{sc\_watchdog\_to}}, hz, \mbox{\hyperlink{if__iwm_8c_a14ef35a8916993cdb67f1dd50737957f}{iwm\_watchdog}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04905}04905                             sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04906}04906                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04907}04907                 sc-\/>\mbox{\hyperlink{structiwm__softc_aff40795d688fc78465103c744ca2f3b2}{sc\_tx\_timer}} = 15;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04908}04908         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04909}04909         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_XMIT | IWM\_DEBUG\_TRACE, \textcolor{stringliteral}{"{}<-\/\%s\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04910}04910 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04911}04911 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04912}04912 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04913}\mbox{\hyperlink{if__iwm_8c_a0825fe7959f3d4f96a3435079bd1b37d}{04913}} \mbox{\hyperlink{if__iwm_8c_a0825fe7959f3d4f96a3435079bd1b37d}{iwm\_stop}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04914}04914 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04915}04915 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04916}04916         sc-\/>\mbox{\hyperlink{structiwm__softc_a67d7ea2a1eef39c9ca65e86178e54766}{sc\_flags}} \&= \string~IWM\_FLAG\_HW\_INITED;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04917}04917         sc-\/>\mbox{\hyperlink{structiwm__softc_a67d7ea2a1eef39c9ca65e86178e54766}{sc\_flags}} |= \mbox{\hyperlink{if__iwmvar_8h_a001ef25161b6f3349134f2f711d6b97e}{IWM\_FLAG\_STOPPED}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04918}04918         sc-\/>\mbox{\hyperlink{structiwm__softc_a258bbf56765aee751cafb3ed2b32f486}{sc\_generation}}++;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04919}04919         \mbox{\hyperlink{if__iwm__led_8c_a7090420ddea7b70667572a5fcf036268}{iwm\_led\_blink\_stop}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04920}04920         sc-\/>\mbox{\hyperlink{structiwm__softc_aff40795d688fc78465103c744ca2f3b2}{sc\_tx\_timer}} = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04921}04921         \mbox{\hyperlink{if__iwm_8c_a0aac1aec10b3f7f3fdbec8d4252038c1}{iwm\_stop\_device}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04922}04922         sc-\/>\mbox{\hyperlink{structiwm__softc_a67d7ea2a1eef39c9ca65e86178e54766}{sc\_flags}} \&= \string~IWM\_FLAG\_SCAN\_RUNNING;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04923}04923 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04924}04924 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04925}04925 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04926}\mbox{\hyperlink{if__iwm_8c_a14ef35a8916993cdb67f1dd50737957f}{04926}} \mbox{\hyperlink{if__iwm_8c_a14ef35a8916993cdb67f1dd50737957f}{iwm\_watchdog}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04927}04927 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04928}04928         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc = arg;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04929}04929         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structiwm__softc_ada8054beb1d93be79364f98ff3bfbaf2}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04930}04930 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04931}04931         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_a7e78e57794efb601b6511067e5848350}{sc\_attached}} == 0)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04932}04932                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04933}04933 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04934}04934         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_aff40795d688fc78465103c744ca2f3b2}{sc\_tx\_timer}} > 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04935}04935                 \textcolor{keywordflow}{if} (-\/-\/sc-\/>\mbox{\hyperlink{structiwm__softc_aff40795d688fc78465103c744ca2f3b2}{sc\_tx\_timer}} == 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04936}04936                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}device timeout\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04937}04937 \textcolor{preprocessor}{\#ifdef IWM\_DEBUG}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04938}04938                         iwm\_nic\_error(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04939}04939 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04940}04940                         ieee80211\_restart\_all(ic);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04941}04941                         counter\_u64\_add(sc-\/>\mbox{\hyperlink{structiwm__softc_ada8054beb1d93be79364f98ff3bfbaf2}{sc\_ic}}.ic\_oerrors, 1);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04942}04942                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04943}04943                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04944}04944                 callout\_reset(\&sc-\/>\mbox{\hyperlink{structiwm__softc_aa23512c0249b8a3513d3ec43f828bd39}{sc\_watchdog\_to}}, hz, \mbox{\hyperlink{if__iwm_8c_a14ef35a8916993cdb67f1dd50737957f}{iwm\_watchdog}}, sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04945}04945         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04946}04946 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04947}04947 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04948}04948 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04949}\mbox{\hyperlink{if__iwm_8c_a72f5d3a3ce113c5610b38c9aa09232c9}{04949}} \mbox{\hyperlink{if__iwm_8c_a72f5d3a3ce113c5610b38c9aa09232c9}{iwm\_parent}}(\textcolor{keyword}{struct} ieee80211com *ic)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04950}04950 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04951}04951         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04952}04952         \textcolor{keywordtype}{int} startall = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04953}04953         \textcolor{keywordtype}{int} rfkill = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04954}04954 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04955}04955         \mbox{\hyperlink{if__iwmvar_8h_ac9f22c2982def9e764105396531c69be}{IWM\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04956}04956         \textcolor{keywordflow}{if} (ic-\/>ic\_nrunning > 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04957}04957                 \textcolor{keywordflow}{if} (!(sc-\/>\mbox{\hyperlink{structiwm__softc_a67d7ea2a1eef39c9ca65e86178e54766}{sc\_flags}} \& \mbox{\hyperlink{if__iwmvar_8h_ad7e99f8e27769f3ca96607a815f59428}{IWM\_FLAG\_HW\_INITED}})) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04958}04958                         \mbox{\hyperlink{if__iwm_8c_a2f1740409045c3379d208637e549985c}{iwm\_init}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04959}04959                         rfkill = \mbox{\hyperlink{if__iwm__pcie__trans_8c_a8270049723375524645a285e9313a966}{iwm\_check\_rfkill}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04960}04960                         \textcolor{keywordflow}{if} (!rfkill)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04961}04961                                 startall = 1;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04962}04962                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04963}04963         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_a67d7ea2a1eef39c9ca65e86178e54766}{sc\_flags}} \& \mbox{\hyperlink{if__iwmvar_8h_ad7e99f8e27769f3ca96607a815f59428}{IWM\_FLAG\_HW\_INITED}})}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04964}04964                 \mbox{\hyperlink{if__iwm_8c_a0825fe7959f3d4f96a3435079bd1b37d}{iwm\_stop}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04965}04965         \mbox{\hyperlink{if__iwmvar_8h_a2bc8b1196a564b1b70c11f96391760fa}{IWM\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04966}04966         \textcolor{keywordflow}{if} (startall)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04967}04967                 ieee80211\_start\_all(ic);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04968}04968         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (rfkill)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04969}04969                 taskqueue\_enqueue(sc-\/>\mbox{\hyperlink{structiwm__softc_a3e8d63b3935f7502ced829aaeafa4cf2}{sc\_tq}}, \&sc-\/>\mbox{\hyperlink{structiwm__softc_a4ef4df195eaaa379d0de824dfde70a08}{sc\_rftoggle\_task}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04970}04970 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04971}04971 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04972}04972 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04973}\mbox{\hyperlink{if__iwm_8c_a542d77a26ef58febc71a7575d87f5e3c}{04973}} \mbox{\hyperlink{if__iwm_8c_a542d77a26ef58febc71a7575d87f5e3c}{iwm\_rftoggle\_task}}(\textcolor{keywordtype}{void} *arg, \textcolor{keywordtype}{int} npending \_\_unused)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04974}04974 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04975}04975         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc = arg;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04976}04976         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structiwm__softc_ada8054beb1d93be79364f98ff3bfbaf2}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04977}04977         \textcolor{keywordtype}{int} rfkill;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04978}04978 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04979}04979         \mbox{\hyperlink{if__iwmvar_8h_ac9f22c2982def9e764105396531c69be}{IWM\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04980}04980         rfkill = \mbox{\hyperlink{if__iwm__pcie__trans_8c_a8270049723375524645a285e9313a966}{iwm\_check\_rfkill}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04981}04981         \mbox{\hyperlink{if__iwmvar_8h_a2bc8b1196a564b1b70c11f96391760fa}{IWM\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04982}04982         \textcolor{keywordflow}{if} (rfkill) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04983}04983                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04984}04984                     \textcolor{stringliteral}{"{}\%s: rfkill switch, disabling interface\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04985}04985                 ieee80211\_suspend\_all(ic);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04986}04986                 ieee80211\_notify\_radio(ic, 0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04987}04987         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04988}04988                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04989}04989                     \textcolor{stringliteral}{"{}\%s: rfkill cleared, re-\/enabling interface\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04990}04990                 ieee80211\_resume\_all(ic);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04991}04991                 ieee80211\_notify\_radio(ic, 1);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04992}04992         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04993}04993 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04994}04994 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04995}04995 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04996}04996 \textcolor{comment}{ * The interrupt side of things}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04997}04997 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04998}04998 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l04999}04999 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05000}05000 \textcolor{comment}{ * error dumping routines are from iwlwifi/mvm/utils.c}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05001}05001 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05002}05002 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05003}05003 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05004}05004 \textcolor{comment}{ * Note: This structure is read from the device with IO accesses,}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05005}05005 \textcolor{comment}{ * and the reading already does the endian conversion. As it is}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05006}05006 \textcolor{comment}{ * read with uint32\_t-\/sized accesses, any members with a different size}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05007}05007 \textcolor{comment}{ * need to be ordered correctly though!}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05008}05008 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05009}\mbox{\hyperlink{structiwm__error__event__table}{05009}} \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__error__event__table}{iwm\_error\_event\_table}} \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05010}\mbox{\hyperlink{structiwm__error__event__table_ae0a4bb472b2b14e0917c50859c8072b5}{05010}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_ae0a4bb472b2b14e0917c50859c8072b5}{valid}};            \textcolor{comment}{/* (nonzero) valid, (0) log is empty */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05011}\mbox{\hyperlink{structiwm__error__event__table_af1a7aff193e20d3659ed345b54fd9296}{05011}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_af1a7aff193e20d3659ed345b54fd9296}{error\_id}};              \textcolor{comment}{/* type of error */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05012}\mbox{\hyperlink{structiwm__error__event__table_a9ce671505f2a70f38e6c452f2b0026c6}{05012}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_a9ce671505f2a70f38e6c452f2b0026c6}{trm\_hw\_status0}};  \textcolor{comment}{/* TRM HW status */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05013}\mbox{\hyperlink{structiwm__error__event__table_ae95f161f153b196910706bf0069dfae3}{05013}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_ae95f161f153b196910706bf0069dfae3}{trm\_hw\_status1}};  \textcolor{comment}{/* TRM HW status */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05014}\mbox{\hyperlink{structiwm__error__event__table_ab89cf691afcac2d6c55e7cd1c0dbb8ba}{05014}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_ab89cf691afcac2d6c55e7cd1c0dbb8ba}{blink2}};          \textcolor{comment}{/* branch link */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05015}\mbox{\hyperlink{structiwm__error__event__table_aadadfd29f8eff52569dd6a8f26a8c1d8}{05015}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_aadadfd29f8eff52569dd6a8f26a8c1d8}{ilink1}};          \textcolor{comment}{/* interrupt link */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05016}\mbox{\hyperlink{structiwm__error__event__table_a4d0135eb89a106838c734af80a75b1f2}{05016}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_a4d0135eb89a106838c734af80a75b1f2}{ilink2}};          \textcolor{comment}{/* interrupt link */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05017}\mbox{\hyperlink{structiwm__error__event__table_a3b35eec73e447bf382146f156013fa5f}{05017}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_a3b35eec73e447bf382146f156013fa5f}{data1}};            \textcolor{comment}{/* error-\/specific data */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05018}\mbox{\hyperlink{structiwm__error__event__table_af0c9584a9bfea6e9c2c9f189a0150f9f}{05018}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_af0c9584a9bfea6e9c2c9f189a0150f9f}{data2}};            \textcolor{comment}{/* error-\/specific data */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05019}\mbox{\hyperlink{structiwm__error__event__table_a48540472f245849ed6753d4bfdac6010}{05019}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_a48540472f245849ed6753d4bfdac6010}{data3}};            \textcolor{comment}{/* error-\/specific data */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05020}\mbox{\hyperlink{structiwm__error__event__table_a8cfb9d94c2a0de8261e5a660e6a96414}{05020}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_a8cfb9d94c2a0de8261e5a660e6a96414}{bcon\_time}};            \textcolor{comment}{/* beacon timer */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05021}\mbox{\hyperlink{structiwm__error__event__table_af311cff1d664d5d39b0d7a508aa49369}{05021}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_af311cff1d664d5d39b0d7a508aa49369}{tsf\_low}};                \textcolor{comment}{/* network timestamp function timer */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05022}\mbox{\hyperlink{structiwm__error__event__table_a453906160ef9f1f02a07deb2be199238}{05022}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_a453906160ef9f1f02a07deb2be199238}{tsf\_hi}};          \textcolor{comment}{/* network timestamp function timer */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05023}\mbox{\hyperlink{structiwm__error__event__table_afe8b8ee7cc045659fa8a03d1169b5cc7}{05023}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_afe8b8ee7cc045659fa8a03d1169b5cc7}{gp1}};                \textcolor{comment}{/* GP1 timer register */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05024}\mbox{\hyperlink{structiwm__error__event__table_ad74d257ee419348cabbf5575c25dfec6}{05024}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_ad74d257ee419348cabbf5575c25dfec6}{gp2}};                \textcolor{comment}{/* GP2 timer register */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05025}\mbox{\hyperlink{structiwm__error__event__table_ad9ab4a2a258895d87af279e99ea5e5c4}{05025}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_ad9ab4a2a258895d87af279e99ea5e5c4}{fw\_rev\_type}};        \textcolor{comment}{/* firmware revision type */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05026}\mbox{\hyperlink{structiwm__error__event__table_ad03a9f471b1f09510041d2afde7fd3b7}{05026}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_ad03a9f471b1f09510041d2afde7fd3b7}{major}};            \textcolor{comment}{/* uCode version major */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05027}\mbox{\hyperlink{structiwm__error__event__table_ab9ede7efed8ba539ec3a147c7b53ec4b}{05027}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_ab9ede7efed8ba539ec3a147c7b53ec4b}{minor}};            \textcolor{comment}{/* uCode version minor */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05028}\mbox{\hyperlink{structiwm__error__event__table_a67f951f15bb1aa65d27ab74906727fac}{05028}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_a67f951f15bb1aa65d27ab74906727fac}{hw\_ver}};          \textcolor{comment}{/* HW Silicon version */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05029}\mbox{\hyperlink{structiwm__error__event__table_acf9dfc8cf7aa3dda732d825036ea07ac}{05029}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_acf9dfc8cf7aa3dda732d825036ea07ac}{brd\_ver}};                \textcolor{comment}{/* HW board version */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05030}\mbox{\hyperlink{structiwm__error__event__table_a07a91318131084d8c2260c372acd4b25}{05030}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_a07a91318131084d8c2260c372acd4b25}{log\_pc}};          \textcolor{comment}{/* log program counter */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05031}\mbox{\hyperlink{structiwm__error__event__table_a925d3a9bea02dde0af57d2ff65a322a3}{05031}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_a925d3a9bea02dde0af57d2ff65a322a3}{frame\_ptr}};            \textcolor{comment}{/* frame pointer */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05032}\mbox{\hyperlink{structiwm__error__event__table_aa794381fe495b2fc537806fad1cf4eaf}{05032}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_aa794381fe495b2fc537806fad1cf4eaf}{stack\_ptr}};            \textcolor{comment}{/* stack pointer */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05033}\mbox{\hyperlink{structiwm__error__event__table_a49ea5fe41482d84d6ab5098cc1fbd5cc}{05033}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_a49ea5fe41482d84d6ab5098cc1fbd5cc}{hcmd}};              \textcolor{comment}{/* last host command header */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05034}\mbox{\hyperlink{structiwm__error__event__table_a1b0d800d5677497f6df086fa17444a6b}{05034}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_a1b0d800d5677497f6df086fa17444a6b}{isr0}};              \textcolor{comment}{/* isr status register LMPM\_NIC\_ISR0:}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05035}05035 \textcolor{comment}{                                 * rxtx\_flag */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05036}\mbox{\hyperlink{structiwm__error__event__table_a0295f47061db295bda22bc844f628831}{05036}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_a0295f47061db295bda22bc844f628831}{isr1}};              \textcolor{comment}{/* isr status register LMPM\_NIC\_ISR1:}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05037}05037 \textcolor{comment}{                                 * host\_flag */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05038}\mbox{\hyperlink{structiwm__error__event__table_a3d64c903fc80e7530458e18cab98fddf}{05038}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_a3d64c903fc80e7530458e18cab98fddf}{isr2}};              \textcolor{comment}{/* isr status register LMPM\_NIC\_ISR2:}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05039}05039 \textcolor{comment}{                                 * enc\_flag */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05040}\mbox{\hyperlink{structiwm__error__event__table_ae855c3241d4c1b66da07f115ed847106}{05040}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_ae855c3241d4c1b66da07f115ed847106}{isr3}};              \textcolor{comment}{/* isr status register LMPM\_NIC\_ISR3:}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05041}05041 \textcolor{comment}{                                 * time\_flag */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05042}\mbox{\hyperlink{structiwm__error__event__table_a389321ed9c36ee5f5c630466c86f3090}{05042}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_a389321ed9c36ee5f5c630466c86f3090}{isr4}};              \textcolor{comment}{/* isr status register LMPM\_NIC\_ISR4:}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05043}05043 \textcolor{comment}{                                 * wico interrupt */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05044}\mbox{\hyperlink{structiwm__error__event__table_a91eec2655c53038f9f39369204ac8ace}{05044}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_a91eec2655c53038f9f39369204ac8ace}{last\_cmd\_id}};        \textcolor{comment}{/* last HCMD id handled by the firmware */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05045}\mbox{\hyperlink{structiwm__error__event__table_adbaf0e0cc5e0c2a7e001fef892c7825f}{05045}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_adbaf0e0cc5e0c2a7e001fef892c7825f}{wait\_event}};          \textcolor{comment}{/* wait event() caller address */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05046}\mbox{\hyperlink{structiwm__error__event__table_a81a5d01d97f73e67726a127a661a1168}{05046}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_a81a5d01d97f73e67726a127a661a1168}{l2p\_control}};        \textcolor{comment}{/* L2pControlField */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05047}\mbox{\hyperlink{structiwm__error__event__table_a565302c94bdba0446f75fa3390b51620}{05047}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_a565302c94bdba0446f75fa3390b51620}{l2p\_duration}};      \textcolor{comment}{/* L2pDurationField */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05048}\mbox{\hyperlink{structiwm__error__event__table_adac4ed6b6cd3404a2f94c0f16f8da0cc}{05048}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_adac4ed6b6cd3404a2f94c0f16f8da0cc}{l2p\_mhvalid}};        \textcolor{comment}{/* L2pMhValidBits */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05049}\mbox{\hyperlink{structiwm__error__event__table_a2090ed0c3dddd403df23ec3fb2ab7b67}{05049}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_a2090ed0c3dddd403df23ec3fb2ab7b67}{l2p\_addr\_match}};  \textcolor{comment}{/* L2pAddrMatchStat */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05050}\mbox{\hyperlink{structiwm__error__event__table_a561477e7c1c9ccab41fba228ab0a785c}{05050}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_a561477e7c1c9ccab41fba228ab0a785c}{lmpm\_pmg\_sel}};      \textcolor{comment}{/* indicate which clocks are turned on}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05051}05051 \textcolor{comment}{                                 * (LMPM\_PMG\_SEL) */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05052}\mbox{\hyperlink{structiwm__error__event__table_ac2541a42c347a04d95db09d7f559e64f}{05052}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_ac2541a42c347a04d95db09d7f559e64f}{u\_timestamp}};        \textcolor{comment}{/* indicate when the date and time of the}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05053}05053 \textcolor{comment}{                                 * compilation */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05054}\mbox{\hyperlink{structiwm__error__event__table_acb32b9e6f73dc7703d31b8b1dab86452}{05054}}         uint32\_t \mbox{\hyperlink{structiwm__error__event__table_acb32b9e6f73dc7703d31b8b1dab86452}{flow\_handler}};      \textcolor{comment}{/* FH read/write pointers, RX credit */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05055}05055 \} \mbox{\hyperlink{if__iwm_8c_ac68066da98bc2d0edc402fac7467cd6b}{\_\_packed}} \textcolor{comment}{/* LOG\_ERROR\_TABLE\_API\_S\_VER\_3 */};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05056}05056 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05057}05057 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05058}05058 \textcolor{comment}{ * UMAC error struct -\/ relevant starting from family 8000 chip.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05059}05059 \textcolor{comment}{ * Note: This structure is read from the device with IO accesses,}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05060}05060 \textcolor{comment}{ * and the reading already does the endian conversion. As it is}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05061}05061 \textcolor{comment}{ * read with u32-\/sized accesses, any members with a different size}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05062}05062 \textcolor{comment}{ * need to be ordered correctly though!}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05063}05063 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05064}\mbox{\hyperlink{structiwm__umac__error__event__table}{05064}} \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__umac__error__event__table}{iwm\_umac\_error\_event\_table}} \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05065}\mbox{\hyperlink{structiwm__umac__error__event__table_ae788c75bb9bb651703c3817e2dc16330}{05065}}         uint32\_t \mbox{\hyperlink{structiwm__umac__error__event__table_ae788c75bb9bb651703c3817e2dc16330}{valid}};            \textcolor{comment}{/* (nonzero) valid, (0) log is empty */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05066}\mbox{\hyperlink{structiwm__umac__error__event__table_a3ede5ef0b51a7666081d0e4898e0c16f}{05066}}         uint32\_t \mbox{\hyperlink{structiwm__umac__error__event__table_a3ede5ef0b51a7666081d0e4898e0c16f}{error\_id}};      \textcolor{comment}{/* type of error */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05067}\mbox{\hyperlink{structiwm__umac__error__event__table_a6f97b26ab87b54a2232ee50ee86fefb9}{05067}}         uint32\_t \mbox{\hyperlink{structiwm__umac__error__event__table_a6f97b26ab87b54a2232ee50ee86fefb9}{blink1}};  \textcolor{comment}{/* branch link */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05068}\mbox{\hyperlink{structiwm__umac__error__event__table_ab947f68f0d48ecdb37e505a9d919e2b0}{05068}}         uint32\_t \mbox{\hyperlink{structiwm__umac__error__event__table_ab947f68f0d48ecdb37e505a9d919e2b0}{blink2}};  \textcolor{comment}{/* branch link */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05069}\mbox{\hyperlink{structiwm__umac__error__event__table_a991436028d5cb87990bb7afe7dd93115}{05069}}         uint32\_t \mbox{\hyperlink{structiwm__umac__error__event__table_a991436028d5cb87990bb7afe7dd93115}{ilink1}};  \textcolor{comment}{/* interrupt link */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05070}\mbox{\hyperlink{structiwm__umac__error__event__table_a062d0609bb4f51d8bfea7d2c62c4d087}{05070}}         uint32\_t \mbox{\hyperlink{structiwm__umac__error__event__table_a062d0609bb4f51d8bfea7d2c62c4d087}{ilink2}};  \textcolor{comment}{/* interrupt link */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05071}\mbox{\hyperlink{structiwm__umac__error__event__table_a105a5d0e773f7b793f3cbc65892de61d}{05071}}         uint32\_t \mbox{\hyperlink{structiwm__umac__error__event__table_a105a5d0e773f7b793f3cbc65892de61d}{data1}};            \textcolor{comment}{/* error-\/specific data */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05072}\mbox{\hyperlink{structiwm__umac__error__event__table_aa17228e5fac7d5500461f87eae667caa}{05072}}         uint32\_t \mbox{\hyperlink{structiwm__umac__error__event__table_aa17228e5fac7d5500461f87eae667caa}{data2}};            \textcolor{comment}{/* error-\/specific data */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05073}\mbox{\hyperlink{structiwm__umac__error__event__table_afa6141c05290462388fb51df7c27f8ac}{05073}}         uint32\_t \mbox{\hyperlink{structiwm__umac__error__event__table_afa6141c05290462388fb51df7c27f8ac}{data3}};            \textcolor{comment}{/* error-\/specific data */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05074}\mbox{\hyperlink{structiwm__umac__error__event__table_a09b43565cf79eb708d336d8da4b075e8}{05074}}         uint32\_t \mbox{\hyperlink{structiwm__umac__error__event__table_a09b43565cf79eb708d336d8da4b075e8}{umac\_major}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05075}\mbox{\hyperlink{structiwm__umac__error__event__table_a41e785d67fa047093a7c545a3b80cf67}{05075}}         uint32\_t \mbox{\hyperlink{structiwm__umac__error__event__table_a41e785d67fa047093a7c545a3b80cf67}{umac\_minor}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05076}\mbox{\hyperlink{structiwm__umac__error__event__table_acfd83156fe4d4d2bf498eefddc32a4e0}{05076}}         uint32\_t \mbox{\hyperlink{structiwm__umac__error__event__table_acfd83156fe4d4d2bf498eefddc32a4e0}{frame\_pointer}};    \textcolor{comment}{/* core register 27*/}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05077}\mbox{\hyperlink{structiwm__umac__error__event__table_a6ae5421f507f96707def74ed6df36c8f}{05077}}         uint32\_t \mbox{\hyperlink{structiwm__umac__error__event__table_a6ae5421f507f96707def74ed6df36c8f}{stack\_pointer}};    \textcolor{comment}{/* core register 28 */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05078}\mbox{\hyperlink{structiwm__umac__error__event__table_a8c04c9451c04f116367132f637b6a71b}{05078}}         uint32\_t \mbox{\hyperlink{structiwm__umac__error__event__table_a8c04c9451c04f116367132f637b6a71b}{cmd\_header}};  \textcolor{comment}{/* latest host cmd sent to UMAC */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05079}\mbox{\hyperlink{structiwm__umac__error__event__table_a01067a45dc49fc046c150ca923e09884}{05079}}         uint32\_t \mbox{\hyperlink{structiwm__umac__error__event__table_a01067a45dc49fc046c150ca923e09884}{nic\_isr\_pref}};      \textcolor{comment}{/* ISR status register */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05080}05080 \} \mbox{\hyperlink{if__iwm_8c_ac68066da98bc2d0edc402fac7467cd6b}{\_\_packed}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05081}05081 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05082}\mbox{\hyperlink{if__iwm_8c_aee990792336337cb5d00e3ef38b041cf}{05082}} \textcolor{preprocessor}{\#define ERROR\_START\_OFFSET  (1 * sizeof(uint32\_t))}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05083}\mbox{\hyperlink{if__iwm_8c_a6dc499f1e32c61cd66529cd37daa7ee2}{05083}} \textcolor{preprocessor}{\#define ERROR\_ELEM\_SIZE     (7 * sizeof(uint32\_t))}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05084}05084 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05085}05085 \textcolor{preprocessor}{\#ifdef IWM\_DEBUG}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05086}05086 \textcolor{keyword}{struct }\{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05087}05087         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *name;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05088}05088         uint8\_t num;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05089}05089 \} advanced\_lookup[] = \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05090}05090         \{ \textcolor{stringliteral}{"{}NMI\_INTERRUPT\_WDG"{}}, 0x34 \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05091}05091         \{ \textcolor{stringliteral}{"{}SYSASSERT"{}}, 0x35 \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05092}05092         \{ \textcolor{stringliteral}{"{}UCODE\_VERSION\_MISMATCH"{}}, 0x37 \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05093}05093         \{ \textcolor{stringliteral}{"{}BAD\_COMMAND"{}}, 0x38 \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05094}05094         \{ \textcolor{stringliteral}{"{}NMI\_INTERRUPT\_DATA\_ACTION\_PT"{}}, 0x3C \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05095}05095         \{ \textcolor{stringliteral}{"{}FATAL\_ERROR"{}}, 0x3D \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05096}05096         \{ \textcolor{stringliteral}{"{}NMI\_TRM\_HW\_ERR"{}}, 0x46 \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05097}05097         \{ \textcolor{stringliteral}{"{}NMI\_INTERRUPT\_TRM"{}}, 0x4C \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05098}05098         \{ \textcolor{stringliteral}{"{}NMI\_INTERRUPT\_BREAK\_POINT"{}}, 0x54 \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05099}05099         \{ \textcolor{stringliteral}{"{}NMI\_INTERRUPT\_WDG\_RXF\_FULL"{}}, 0x5C \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05100}05100         \{ \textcolor{stringliteral}{"{}NMI\_INTERRUPT\_WDG\_NO\_RBD\_RXF\_FULL"{}}, 0x64 \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05101}05101         \{ \textcolor{stringliteral}{"{}NMI\_INTERRUPT\_HOST"{}}, 0x66 \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05102}05102         \{ \textcolor{stringliteral}{"{}NMI\_INTERRUPT\_ACTION\_PT"{}}, 0x7C \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05103}05103         \{ \textcolor{stringliteral}{"{}NMI\_INTERRUPT\_UNKNOWN"{}}, 0x84 \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05104}05104         \{ \textcolor{stringliteral}{"{}NMI\_INTERRUPT\_INST\_ACTION\_PT"{}}, 0x86 \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05105}05105         \{ \textcolor{stringliteral}{"{}ADVANCED\_SYSASSERT"{}}, 0 \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05106}05106 \};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05107}05107 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05108}05108 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05109}05109 iwm\_desc\_lookup(uint32\_t num)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05110}05110 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05111}05111         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05112}05112 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05113}05113         \textcolor{keywordflow}{for} (i = 0; i < nitems(advanced\_lookup) -\/ 1; i++)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05114}05114                 \textcolor{keywordflow}{if} (advanced\_lookup[i].num == num)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05115}05115                         \textcolor{keywordflow}{return} advanced\_lookup[i].name;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05116}05116 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05117}05117         \textcolor{comment}{/* No entry matches 'num', so it is the last: ADVANCED\_SYSASSERT */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05118}05118         \textcolor{keywordflow}{return} advanced\_lookup[i].name;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05119}05119 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05120}05120 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05121}05121 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05122}05122 iwm\_nic\_umac\_error(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05123}05123 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05124}05124         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__umac__error__event__table}{iwm\_umac\_error\_event\_table}} table;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05125}05125         uint32\_t base;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05126}05126 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05127}05127         base = sc-\/>\mbox{\hyperlink{structiwm__softc_a01a3d496f80f21b1035d935f5ba19434}{umac\_error\_event\_table}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05128}05128 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05129}05129         \textcolor{keywordflow}{if} (base < 0x800000) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05130}05130                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}Invalid error log pointer 0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05131}05131                     base);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05132}05132                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05133}05133         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05134}05134 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05135}05135         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__iwm__pcie__trans_8h_a9a45ef1a28cb173bb6ff1f41050aed73}{iwm\_read\_mem}}(sc, base, \&table, \textcolor{keyword}{sizeof}(table)/\textcolor{keyword}{sizeof}(uint32\_t))) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05136}05136                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}reading errlog failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05137}05137                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05138}05138         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05139}05139 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05140}05140         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__iwm_8c_aee990792336337cb5d00e3ef38b041cf}{ERROR\_START\_OFFSET}} <= table.valid * \mbox{\hyperlink{if__iwm_8c_a6dc499f1e32c61cd66529cd37daa7ee2}{ERROR\_ELEM\_SIZE}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05141}05141                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}Start UMAC Error Log Dump:\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05142}05142                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}Status: 0x\%x, count: \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05143}05143                     sc-\/>\mbox{\hyperlink{structiwm__softc_a67d7ea2a1eef39c9ca65e86178e54766}{sc\_flags}}, table.valid);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05144}05144         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05145}05145 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05146}05146         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}0x\%08X | \%s\(\backslash\)n"{}}, table.error\_id,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05147}05147                 iwm\_desc\_lookup(table.error\_id));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05148}05148         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}0x\%08X | umac branchlink1\(\backslash\)n"{}}, table.blink1);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05149}05149         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}0x\%08X | umac branchlink2\(\backslash\)n"{}}, table.blink2);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05150}05150         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}0x\%08X | umac interruptlink1\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05151}05151             table.ilink1);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05152}05152         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}0x\%08X | umac interruptlink2\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05153}05153             table.ilink2);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05154}05154         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}0x\%08X | umac data1\(\backslash\)n"{}}, table.data1);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05155}05155         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}0x\%08X | umac data2\(\backslash\)n"{}}, table.data2);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05156}05156         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}0x\%08X | umac data3\(\backslash\)n"{}}, table.data3);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05157}05157         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}0x\%08X | umac major\(\backslash\)n"{}}, table.umac\_major);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05158}05158         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}0x\%08X | umac minor\(\backslash\)n"{}}, table.umac\_minor);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05159}05159         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}0x\%08X | frame pointer\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05160}05160             table.frame\_pointer);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05161}05161         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}0x\%08X | stack pointer\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05162}05162             table.stack\_pointer);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05163}05163         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}0x\%08X | last host cmd\(\backslash\)n"{}}, table.cmd\_header);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05164}05164         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}0x\%08X | isr status reg\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05165}05165             table.nic\_isr\_pref);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05166}05166 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05167}05167 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05168}05168 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05169}05169 \textcolor{comment}{ * Support for dumping the error log seemed like a good idea ...}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05170}05170 \textcolor{comment}{ * but it's mostly hex junk and the only sensible thing is the}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05171}05171 \textcolor{comment}{ * hw/ucode revision (which we know anyway).  Since it's here,}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05172}05172 \textcolor{comment}{ * I'll just leave it in, just in case e.g. the Intel guys want to}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05173}05173 \textcolor{comment}{ * help us decipher some "{}ADVANCED\_SYSASSERT"{} later.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05174}05174 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05175}05175 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05176}05176 iwm\_nic\_error(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05177}05177 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05178}05178         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__error__event__table}{iwm\_error\_event\_table}} table;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05179}05179         uint32\_t base;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05180}05180 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05181}05181         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}dumping device error log\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05182}05182         base = sc-\/>\mbox{\hyperlink{structiwm__softc_a1c830f7530b7cb87156fbcb457ad1fb9}{error\_event\_table}}[0];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05183}05183         \textcolor{keywordflow}{if} (base < 0x800000) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05184}05184                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05185}05185                     \textcolor{stringliteral}{"{}Invalid error log pointer 0x\%08x\(\backslash\)n"{}}, base);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05186}05186                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05187}05187         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05188}05188 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05189}05189         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__iwm__pcie__trans_8h_a9a45ef1a28cb173bb6ff1f41050aed73}{iwm\_read\_mem}}(sc, base, \&table, \textcolor{keyword}{sizeof}(table)/\textcolor{keyword}{sizeof}(uint32\_t))) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05190}05190                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}reading errlog failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05191}05191                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05192}05192         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05193}05193 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05194}05194         \textcolor{keywordflow}{if} (!table.valid) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05195}05195                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}errlog not found, skipping\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05196}05196                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05197}05197         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05198}05198 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05199}05199         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__iwm_8c_aee990792336337cb5d00e3ef38b041cf}{ERROR\_START\_OFFSET}} <= table.valid * \mbox{\hyperlink{if__iwm_8c_a6dc499f1e32c61cd66529cd37daa7ee2}{ERROR\_ELEM\_SIZE}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05200}05200                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}Start Error Log Dump:\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05201}05201                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}Status: 0x\%x, count: \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05202}05202                     sc-\/>\mbox{\hyperlink{structiwm__softc_a67d7ea2a1eef39c9ca65e86178e54766}{sc\_flags}}, table.valid);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05203}05203         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05204}05204 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05205}05205         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}0x\%08X | \%-\/28s\(\backslash\)n"{}}, table.error\_id,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05206}05206             iwm\_desc\_lookup(table.error\_id));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05207}05207         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%08X | trm\_hw\_status0\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05208}05208             table.trm\_hw\_status0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05209}05209         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%08X | trm\_hw\_status1\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05210}05210             table.trm\_hw\_status1);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05211}05211         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%08X | branchlink2\(\backslash\)n"{}}, table.blink2);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05212}05212         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%08X | interruptlink1\(\backslash\)n"{}}, table.ilink1);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05213}05213         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%08X | interruptlink2\(\backslash\)n"{}}, table.ilink2);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05214}05214         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%08X | data1\(\backslash\)n"{}}, table.data1);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05215}05215         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%08X | data2\(\backslash\)n"{}}, table.data2);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05216}05216         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%08X | data3\(\backslash\)n"{}}, table.data3);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05217}05217         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%08X | beacon time\(\backslash\)n"{}}, table.bcon\_time);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05218}05218         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%08X | tsf low\(\backslash\)n"{}}, table.tsf\_low);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05219}05219         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%08X | tsf hi\(\backslash\)n"{}}, table.tsf\_hi);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05220}05220         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%08X | time gp1\(\backslash\)n"{}}, table.gp1);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05221}05221         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%08X | time gp2\(\backslash\)n"{}}, table.gp2);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05222}05222         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%08X | uCode revision type\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05223}05223             table.fw\_rev\_type);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05224}05224         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%08X | uCode version major\(\backslash\)n"{}}, table.major);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05225}05225         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%08X | uCode version minor\(\backslash\)n"{}}, table.minor);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05226}05226         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%08X | hw version\(\backslash\)n"{}}, table.hw\_ver);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05227}05227         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%08X | board version\(\backslash\)n"{}}, table.brd\_ver);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05228}05228         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%08X | hcmd\(\backslash\)n"{}}, table.hcmd);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05229}05229         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%08X | isr0\(\backslash\)n"{}}, table.isr0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05230}05230         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%08X | isr1\(\backslash\)n"{}}, table.isr1);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05231}05231         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%08X | isr2\(\backslash\)n"{}}, table.isr2);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05232}05232         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%08X | isr3\(\backslash\)n"{}}, table.isr3);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05233}05233         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%08X | isr4\(\backslash\)n"{}}, table.isr4);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05234}05234         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%08X | last cmd Id\(\backslash\)n"{}}, table.last\_cmd\_id);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05235}05235         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%08X | wait\_event\(\backslash\)n"{}}, table.wait\_event);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05236}05236         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%08X | l2p\_control\(\backslash\)n"{}}, table.l2p\_control);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05237}05237         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%08X | l2p\_duration\(\backslash\)n"{}}, table.l2p\_duration);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05238}05238         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%08X | l2p\_mhvalid\(\backslash\)n"{}}, table.l2p\_mhvalid);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05239}05239         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%08X | l2p\_addr\_match\(\backslash\)n"{}}, table.l2p\_addr\_match);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05240}05240         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%08X | lmpm\_pmg\_sel\(\backslash\)n"{}}, table.lmpm\_pmg\_sel);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05241}05241         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%08X | timestamp\(\backslash\)n"{}}, table.u\_timestamp);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05242}05242         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%08X | flow\_handler\(\backslash\)n"{}}, table.flow\_handler);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05243}05243 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05244}05244         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_a01a3d496f80f21b1035d935f5ba19434}{umac\_error\_event\_table}})}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05245}05245                 iwm\_nic\_umac\_error(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05246}05246 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05247}05247 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05248}05248 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05249}05249 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05250}\mbox{\hyperlink{if__iwm_8c_aecba9ae5d85dfb270cf2e369496c4386}{05250}} \mbox{\hyperlink{if__iwm_8c_aecba9ae5d85dfb270cf2e369496c4386}{iwm\_handle\_rxb}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keyword}{struct} mbuf *m)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05251}05251 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05252}05252         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structiwm__softc_ada8054beb1d93be79364f98ff3bfbaf2}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05253}05253         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__cmd__response}{iwm\_cmd\_response}} *cresp;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05254}05254         \textcolor{keyword}{struct }mbuf *m1;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05255}05255         uint32\_t offset = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05256}05256         uint32\_t maxoff = \mbox{\hyperlink{if__iwmvar_8h_a48ddf3e302d40d2169aeef4ea3610e4b}{IWM\_RBUF\_SIZE}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05257}05257         uint32\_t nextoff;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05258}05258         boolean\_t stolen = FALSE;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05259}05259 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05260}05260 \textcolor{preprocessor}{\#define HAVEROOM(a)     \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05261}05261 \textcolor{preprocessor}{    ((a) + sizeof(uint32\_t) + sizeof(struct iwm\_cmd\_header) < maxoff)}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05262}05262 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05263}05263         \textcolor{keywordflow}{while} (\mbox{\hyperlink{if__iwm_8c_aed8d9adc1987459a97f7142126ef1d36}{HAVEROOM}}(offset)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05264}05264                 \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__rx__packet}{iwm\_rx\_packet}} *pkt = \mbox{\hyperlink{if__iwm_8c_a56917e17716be87862db2a902b12430e}{mtodoff}}(m, \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__rx__packet}{iwm\_rx\_packet}} *,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05265}05265                     offset);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05266}05266                 \textcolor{keywordtype}{int} qid, idx, code, len;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05267}05267 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05268}05268                 qid = pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a8a11c0fa2a44d68ee8343d1dfd141883}{hdr}}.\mbox{\hyperlink{structiwm__cmd__header_ac5fb938f115b71e3716a90df16442fe0}{qid}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05269}05269                 idx = pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a8a11c0fa2a44d68ee8343d1dfd141883}{hdr}}.\mbox{\hyperlink{structiwm__cmd__header_a0be44dad2b5bd9175744c7c4b02db536}{idx}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05270}05270 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05271}05271                 code = \mbox{\hyperlink{if__iwmreg_8h_af637c7660f3efaa3ed0f66c404fe059f}{IWM\_WIDE\_ID}}(pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a8a11c0fa2a44d68ee8343d1dfd141883}{hdr}}.\mbox{\hyperlink{structiwm__cmd__header_a26e466f1aee729f521e363785eeb0d08}{flags}}, pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a8a11c0fa2a44d68ee8343d1dfd141883}{hdr}}.\mbox{\hyperlink{structiwm__cmd__header_ab5a2f0282f933c196760d58dad786384}{code}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05272}05272 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05273}05273                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05274}05274 \textcolor{comment}{                 * randomly get these from the firmware, no idea why.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05275}05275 \textcolor{comment}{                 * they at least seem harmless, so just ignore them for now}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05276}05276 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05277}05277                 \textcolor{keywordflow}{if} ((pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a8a11c0fa2a44d68ee8343d1dfd141883}{hdr}}.\mbox{\hyperlink{structiwm__cmd__header_ab5a2f0282f933c196760d58dad786384}{code}} == 0 \&\& (qid \& \string~0x80) == 0 \&\& idx == 0) ||}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05278}05278                     pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a130d107c6ff0151e0b0617bf2c08054b}{len\_n\_flags}} == htole32(\mbox{\hyperlink{if__iwmreg_8h_af1bdfdad50f863247de72ae59c9e8169}{IWM\_FH\_RSCSR\_FRAME\_INVALID}})) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05279}05279                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05280}05280                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05281}05281 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05282}05282                 \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_INTR,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05283}05283                     \textcolor{stringliteral}{"{}rx packet qid=\%d idx=\%d type=\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05284}05284                     qid \& \string~0x80, pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a8a11c0fa2a44d68ee8343d1dfd141883}{hdr}}.\mbox{\hyperlink{structiwm__cmd__header_a0be44dad2b5bd9175744c7c4b02db536}{idx}}, code);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05285}05285 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05286}05286                 len = \mbox{\hyperlink{if__iwmreg_8h_adad1db04a2636ee176a4ba25f075aa10}{iwm\_rx\_packet\_len}}(pkt);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05287}05287                 len += \textcolor{keyword}{sizeof}(uint32\_t); \textcolor{comment}{/* account for status word */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05288}05288                 nextoff = offset + roundup2(len, \mbox{\hyperlink{if__iwmreg_8h_a15714a29999392c9fcdd1af69a18de43}{IWM\_FH\_RSCSR\_FRAME\_ALIGN}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05289}05289 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05290}05290                 \mbox{\hyperlink{if__iwm__notif__wait_8c_ac9543f9104aa1e4b5ef4a93b2a48976b}{iwm\_notification\_wait\_notify}}(sc-\/>\mbox{\hyperlink{structiwm__softc_ac9e8a0cb4380c845865cdd6eae7444aa}{sc\_notif\_wait}}, code, pkt);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05291}05291 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05292}05292                 \textcolor{keywordflow}{switch} (code) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05293}05293                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a0dcacb5c3e9e45de0aa4dad8882535bd}{IWM\_REPLY\_RX\_PHY\_CMD}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05294}05294                         \mbox{\hyperlink{if__iwm_8c_aa2b8ed080d154cd2bff59b15c657d59f}{iwm\_rx\_rx\_phy\_cmd}}(sc, pkt);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05295}05295                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05296}05296 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05297}05297                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_ac5deb720018d404b74708165c49e7334}{IWM\_REPLY\_RX\_MPDU\_CMD}}: \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05298}05298                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05299}05299 \textcolor{comment}{                         * If this is the last frame in the RX buffer, we}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05300}05300 \textcolor{comment}{                         * can directly feed the mbuf to the sharks here.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05301}05301 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05302}05302                         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__rx__packet}{iwm\_rx\_packet}} *nextpkt = \mbox{\hyperlink{if__iwm_8c_a56917e17716be87862db2a902b12430e}{mtodoff}}(m,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05303}05303                             \textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__rx__packet}{iwm\_rx\_packet}} *, nextoff);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05304}05304                         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{if__iwm_8c_aed8d9adc1987459a97f7142126ef1d36}{HAVEROOM}}(nextoff) ||}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05305}05305                             (nextpkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a8a11c0fa2a44d68ee8343d1dfd141883}{hdr}}.\mbox{\hyperlink{structiwm__cmd__header_ab5a2f0282f933c196760d58dad786384}{code}} == 0 \&\&}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05306}05306                              (nextpkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a8a11c0fa2a44d68ee8343d1dfd141883}{hdr}}.\mbox{\hyperlink{structiwm__cmd__header_ac5fb938f115b71e3716a90df16442fe0}{qid}} \& \string~0x80) == 0 \&\&}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05307}05307                              nextpkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a8a11c0fa2a44d68ee8343d1dfd141883}{hdr}}.\mbox{\hyperlink{structiwm__cmd__header_a0be44dad2b5bd9175744c7c4b02db536}{idx}} == 0) ||}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05308}05308                             (nextpkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a130d107c6ff0151e0b0617bf2c08054b}{len\_n\_flags}} ==}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05309}05309                              htole32(\mbox{\hyperlink{if__iwmreg_8h_af1bdfdad50f863247de72ae59c9e8169}{IWM\_FH\_RSCSR\_FRAME\_INVALID}}))) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05310}05310                                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__iwm_8c_a3a60596a2f04542b737f981208a97d58}{iwm\_rx\_mpdu}}(sc, m, offset, stolen)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05311}05311                                         stolen = FALSE;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05312}05312                                         \textcolor{comment}{/* Make sure we abort the loop */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05313}05313                                         nextoff = maxoff;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05314}05314                                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05315}05315                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05316}05316                         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05317}05317 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05318}05318                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05319}05319 \textcolor{comment}{                         * Use m\_copym instead of m\_split, because that}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05320}05320 \textcolor{comment}{                         * makes it easier to keep a valid rx buffer in}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05321}05321 \textcolor{comment}{                         * the ring, when iwm\_rx\_mpdu() fails.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05322}05322 \textcolor{comment}{                         *}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05323}05323 \textcolor{comment}{                         * We need to start m\_copym() at offset 0, to get the}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05324}05324 \textcolor{comment}{                         * M\_PKTHDR flag preserved.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05325}05325 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05326}05326                         m1 = m\_copym(m, 0, M\_COPYALL, M\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05327}05327                         \textcolor{keywordflow}{if} (m1) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05328}05328                                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__iwm_8c_a3a60596a2f04542b737f981208a97d58}{iwm\_rx\_mpdu}}(sc, m1, offset, stolen))}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05329}05329                                         stolen = TRUE;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05330}05330                                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05331}05331                                         m\_freem(m1);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05332}05332                         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05333}05333                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05334}05334                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05335}05335 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05336}05336                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_af65d7ad1f54b99701705e24ecde87b02}{IWM\_TX\_CMD}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05337}05337                         \mbox{\hyperlink{if__iwm_8c_a4110e078ef1f59f656cffbe3a4d8cee2}{iwm\_rx\_tx\_cmd}}(sc, pkt);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05338}05338                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05339}05339 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05340}05340                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a6478b23f9ff18d53b614025562e7d4fb}{IWM\_MISSED\_BEACONS\_NOTIFICATION}}: \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05341}05341                         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__missed__beacons__notif}{iwm\_missed\_beacons\_notif}} *resp;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05342}05342                         \textcolor{keywordtype}{int} missed;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05343}05343 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05344}05344                         \textcolor{comment}{/* XXX look at mac\_id to determine interface ID */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05345}05345                         \textcolor{keyword}{struct }ieee80211vap *vap = TAILQ\_FIRST(\&ic-\/>ic\_vaps);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05346}05346 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05347}05347                         resp = (\textcolor{keywordtype}{void} *)pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a77036fd43499c32e7ec28e2d47ed1c33}{data}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05348}05348                         missed = le32toh(resp-\/>\mbox{\hyperlink{structiwm__missed__beacons__notif_a877315767578a879eba9f56f17d6839d}{consec\_missed\_beacons}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05349}05349 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05350}05350                         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_BEACON | IWM\_DEBUG\_STATE,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05351}05351                             \textcolor{stringliteral}{"{}\%s: MISSED\_BEACON: mac\_id=\%d, "{}}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05352}05352                             \textcolor{stringliteral}{"{}consec\_since\_last\_rx=\%d, consec=\%d, num\_expect=\%d "{}}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05353}05353                             \textcolor{stringliteral}{"{}num\_rx=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05354}05354                             \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05355}05355                             le32toh(resp-\/>\mbox{\hyperlink{structiwm__missed__beacons__notif_a8f7a2b3e3f54bf0633d03546b3f0eec9}{mac\_id}}),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05356}05356                             le32toh(resp-\/>\mbox{\hyperlink{structiwm__missed__beacons__notif_a31d244fbf84c8a4c551e3075a62c8fbc}{consec\_missed\_beacons\_since\_last\_rx}}),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05357}05357                             le32toh(resp-\/>\mbox{\hyperlink{structiwm__missed__beacons__notif_a877315767578a879eba9f56f17d6839d}{consec\_missed\_beacons}}),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05358}05358                             le32toh(resp-\/>\mbox{\hyperlink{structiwm__missed__beacons__notif_ac0863b2475e71014205964d07bf9a040}{num\_expected\_beacons}}),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05359}05359                             le32toh(resp-\/>\mbox{\hyperlink{structiwm__missed__beacons__notif_ac43983845e61e9cb4692367542196a7c}{num\_recvd\_beacons}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05360}05360 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05361}05361                         \textcolor{comment}{/* Be paranoid */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05362}05362                         \textcolor{keywordflow}{if} (vap == NULL)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05363}05363                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05364}05364 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05365}05365                         \textcolor{comment}{/* XXX no net80211 locking? */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05366}05366                         \textcolor{keywordflow}{if} (vap-\/>iv\_state == IEEE80211\_S\_RUN \&\&}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05367}05367                             (ic-\/>ic\_flags \& IEEE80211\_F\_SCAN) == 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05368}05368                                 \textcolor{keywordflow}{if} (missed > vap-\/>iv\_bmissthreshold) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05369}05369                                         \textcolor{comment}{/* XXX bad locking; turn into task */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05370}05370                                         \mbox{\hyperlink{if__iwmvar_8h_a2bc8b1196a564b1b70c11f96391760fa}{IWM\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05371}05371                                         ieee80211\_beacon\_miss(ic);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05372}05372                                         \mbox{\hyperlink{if__iwmvar_8h_ac9f22c2982def9e764105396531c69be}{IWM\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05373}05373                                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05374}05374                         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05375}05375 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05376}05376                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05377}05377                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05378}05378 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05379}05379                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a8802b0a3d8e64be6766fe1f2168cd0e2}{IWM\_MFUART\_LOAD\_NOTIFICATION}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05380}05380                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05381}05381 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05382}05382                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_ac3e5e9dc7ded66127b16922582ab9a28}{IWM\_ALIVE}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05383}05383                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05384}05384 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05385}05385                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a844f7845e47975cccf3797aba1cdb7a9}{IWM\_CALIB\_RES\_NOTIF\_PHY\_DB}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05386}05386                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05387}05387 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05388}05388                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_aa683bbbd3512d319ec6cf9c5b8a41c9d}{IWM\_STATISTICS\_NOTIFICATION}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05389}05389                         \mbox{\hyperlink{if__iwm_8c_a5f5ea0d62c3a15bb6bde9da74a60c89a}{iwm\_handle\_rx\_statistics}}(sc, pkt);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05390}05390                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05391}05391 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05392}05392                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a352d940fb0443bccd4a9e848c2a9eb25}{IWM\_NVM\_ACCESS\_CMD}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05393}05393                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a78e1f737dcbaac5cb512bf52824e8a07}{IWM\_MCC\_UPDATE\_CMD}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05394}05394                         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_a504d9e1f17037219000d3eb5cc66b2f6}{sc\_wantresp}} == (((qid \& \string~0x80) << 16) | idx)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05395}05395                                 memcpy(sc-\/>\mbox{\hyperlink{structiwm__softc_ac3365b263a96d3ab3cb8fc601458dcd4}{sc\_cmd\_resp}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05396}05396                                     pkt, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structiwm__softc_ac3365b263a96d3ab3cb8fc601458dcd4}{sc\_cmd\_resp}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05397}05397                         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05398}05398                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05399}05399 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05400}05400                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_ae15b4b7619d7f0fcd9629ffcadd30e7a}{IWM\_MCC\_CHUB\_UPDATE\_CMD}}: \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05401}05401                         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__mcc__chub__notif}{iwm\_mcc\_chub\_notif}} *notif;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05402}05402                         notif = (\textcolor{keywordtype}{void} *)pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a77036fd43499c32e7ec28e2d47ed1c33}{data}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05403}05403 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05404}05404                         sc-\/>\mbox{\hyperlink{structiwm__softc_a9fac93466c413035ac40b2122fa66934}{sc\_fw\_mcc}}[0] = (notif-\/>\mbox{\hyperlink{structiwm__mcc__chub__notif_ab84971a59b0887b09e31de96877f93cb}{mcc}} \& 0xff00) >> 8;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05405}05405                         sc-\/>\mbox{\hyperlink{structiwm__softc_a9fac93466c413035ac40b2122fa66934}{sc\_fw\_mcc}}[1] = notif-\/>\mbox{\hyperlink{structiwm__mcc__chub__notif_ab84971a59b0887b09e31de96877f93cb}{mcc}} \& 0xff;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05406}05406                         sc-\/>\mbox{\hyperlink{structiwm__softc_a9fac93466c413035ac40b2122fa66934}{sc\_fw\_mcc}}[2] = \textcolor{charliteral}{'\(\backslash\)0'};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05407}05407                         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_LAR,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05408}05408                             \textcolor{stringliteral}{"{}fw source \%d sent CC '\%s'\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05409}05409                             notif-\/>\mbox{\hyperlink{structiwm__mcc__chub__notif_a8588c9ef3e33b0eef8780ddc829be775}{source\_id}}, sc-\/>\mbox{\hyperlink{structiwm__softc_a9fac93466c413035ac40b2122fa66934}{sc\_fw\_mcc}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05410}05410                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05411}05411                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05412}05412 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05413}05413                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a6c9cbe2d2377e008229105711cbdaf1f}{IWM\_DTS\_MEASUREMENT\_NOTIFICATION}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05414}05414                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_af637c7660f3efaa3ed0f66c404fe059f}{IWM\_WIDE\_ID}}(\mbox{\hyperlink{if__iwmreg_8h_add4fa26ad224b2a64979cc754bb03691}{IWM\_PHY\_OPS\_GROUP}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05415}05415                                  \mbox{\hyperlink{if__iwmreg_8h_a629238978d2b8ee7fd5ee2c5f8ad8312}{IWM\_DTS\_MEASUREMENT\_NOTIF\_WIDE}}): \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05416}05416                         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__dts__measurement__notif__v1}{iwm\_dts\_measurement\_notif\_v1}} *notif;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05417}05417 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05418}05418                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__iwmreg_8h_abe52e01a0c093b71e13554350e07d161}{iwm\_rx\_packet\_payload\_len}}(pkt) < \textcolor{keyword}{sizeof}(*notif)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05419}05419                                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05420}05420                                     \textcolor{stringliteral}{"{}Invalid DTS\_MEASUREMENT\_NOTIFICATION\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05421}05421                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05422}05422                         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05423}05423                         notif = (\textcolor{keywordtype}{void} *)pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a77036fd43499c32e7ec28e2d47ed1c33}{data}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05424}05424                         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_TEMP,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05425}05425                             \textcolor{stringliteral}{"{}IWM\_DTS\_MEASUREMENT\_NOTIFICATION -\/ \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05426}05426                             notif-\/>\mbox{\hyperlink{structiwm__dts__measurement__notif__v1_abb3ced9f1297856054dc2d6a10d673e7}{temp}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05427}05427                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05428}05428                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05429}05429 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05430}05430                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a00d6ff6b43d7a750de61b83241f3c357}{IWM\_PHY\_CONFIGURATION\_CMD}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05431}05431                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_acf9211f167faa5b400a0ee034b7da09e}{IWM\_TX\_ANT\_CONFIGURATION\_CMD}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05432}05432                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_ac9ba106f5527ff473ad11225d4195a6d}{IWM\_ADD\_STA}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05433}05433                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a2381a2bb2659b99cab849c5d8dbb7619}{IWM\_MAC\_CONTEXT\_CMD}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05434}05434                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_aeb2c2fc549f0474173b5c0f4c1f18426}{IWM\_REPLY\_SF\_CFG\_CMD}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05435}05435                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_aab7e0daefc131316db25bd08ae085c01}{IWM\_POWER\_TABLE\_CMD}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05436}05436                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a21cbce4dd30cd26083fc272adeb36426}{IWM\_LTR\_CONFIG}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05437}05437                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a572b24da35c8857025f7c0715eab4244}{IWM\_PHY\_CONTEXT\_CMD}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05438}05438                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_ae655a099af5776e36f1a8befc8746985}{IWM\_BINDING\_CONTEXT\_CMD}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05439}05439                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a54b9e703eb80512f9bd832e6b7a6d89b}{IWM\_TIME\_EVENT\_CMD}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05440}05440                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_af637c7660f3efaa3ed0f66c404fe059f}{IWM\_WIDE\_ID}}(\mbox{\hyperlink{if__iwmreg_8h_a0fc47a3ae9e0eaac1dc7759d3acaafc2}{IWM\_ALWAYS\_LONG\_GROUP}}, \mbox{\hyperlink{if__iwmreg_8h_a721cd067517118b822bcf488a241b5e3}{IWM\_SCAN\_CFG\_CMD}}):}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05441}05441                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_af637c7660f3efaa3ed0f66c404fe059f}{IWM\_WIDE\_ID}}(\mbox{\hyperlink{if__iwmreg_8h_a0fc47a3ae9e0eaac1dc7759d3acaafc2}{IWM\_ALWAYS\_LONG\_GROUP}}, \mbox{\hyperlink{if__iwmreg_8h_abd755cd54a5cf207effabf34efc20800}{IWM\_SCAN\_REQ\_UMAC}}):}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05442}05442                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_af637c7660f3efaa3ed0f66c404fe059f}{IWM\_WIDE\_ID}}(\mbox{\hyperlink{if__iwmreg_8h_a0fc47a3ae9e0eaac1dc7759d3acaafc2}{IWM\_ALWAYS\_LONG\_GROUP}}, \mbox{\hyperlink{if__iwmreg_8h_a617ef6703937cfdd0771e036502877bf}{IWM\_SCAN\_ABORT\_UMAC}}):}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05443}05443                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a9b4d3eb0e2849a70fdc2b82475d41018}{IWM\_SCAN\_OFFLOAD\_REQUEST\_CMD}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05444}05444                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_ab72161ceb14c16c8ebe0cc44fbb8db8e}{IWM\_SCAN\_OFFLOAD\_ABORT\_CMD}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05445}05445                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a42d1e6b2c78d5f2626a7cec342355f06}{IWM\_REPLY\_BEACON\_FILTERING\_CMD}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05446}05446                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a1b8a181b9b0e90f4dd50b11267fd10e0}{IWM\_MAC\_PM\_POWER\_TABLE}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05447}05447                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a53f87408bbc2e80b9fe4d969e6f885d1}{IWM\_TIME\_QUOTA\_CMD}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05448}05448                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a2b878cf07d7db78ab2c47873ae202a71}{IWM\_REMOVE\_STA}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05449}05449                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_aaa39b0c77489f9c8dc4a77fdace9927a}{IWM\_TXPATH\_FLUSH}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05450}05450                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a32b70cc7c633e169abb5a4c303fa2c7c}{IWM\_LQ\_CMD}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05451}05451                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_af637c7660f3efaa3ed0f66c404fe059f}{IWM\_WIDE\_ID}}(\mbox{\hyperlink{if__iwmreg_8h_a0fc47a3ae9e0eaac1dc7759d3acaafc2}{IWM\_ALWAYS\_LONG\_GROUP}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05452}05452                                  \mbox{\hyperlink{if__iwmreg_8h_a69c2bedeec1ffc5026036efb473a26c5}{IWM\_FW\_PAGING\_BLOCK\_CMD}}):}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05453}05453                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_aedf12f883d83d6f43efd106d3112d680}{IWM\_BT\_CONFIG}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05454}05454                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_ab895f481047af06abeb6ae8e1da0eba4}{IWM\_REPLY\_THERMAL\_MNG\_BACKOFF}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05455}05455                         cresp = (\textcolor{keywordtype}{void} *)pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a77036fd43499c32e7ec28e2d47ed1c33}{data}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05456}05456                         if (sc-\/>\mbox{\hyperlink{structiwm__softc_a504d9e1f17037219000d3eb5cc66b2f6}{sc\_wantresp}} == (((qid \& \string~0x80) << 16) | idx)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05457}05457                                 memcpy(sc-\/>\mbox{\hyperlink{structiwm__softc_ac3365b263a96d3ab3cb8fc601458dcd4}{sc\_cmd\_resp}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05458}05458                                     pkt, \textcolor{keyword}{sizeof}(*pkt)+\textcolor{keyword}{sizeof}(*cresp));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05459}05459                         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05460}05460                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05461}05461 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05462}05462                 \textcolor{comment}{/* ignore */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05463}05463                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_aaa547b677634e446a98c6c2d7cfe9206}{IWM\_PHY\_DB\_CMD}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05464}05464                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05465}05465 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05466}05466                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_abbacf0676fe656ed8b19087a3f9f755a}{IWM\_INIT\_COMPLETE\_NOTIF}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05467}05467                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05468}05468 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05469}05469                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a8b619d2777dba4f5ea4062dcbd676d91}{IWM\_SCAN\_OFFLOAD\_COMPLETE}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05470}05470                         \mbox{\hyperlink{if__iwm__scan_8c_a042167c33d75b5d3234d8651a13ecd45}{iwm\_rx\_lmac\_scan\_complete\_notif}}(sc, pkt);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05471}05471                         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_a67d7ea2a1eef39c9ca65e86178e54766}{sc\_flags}} \& \mbox{\hyperlink{if__iwmvar_8h_ad21a28e9ab6945204f4b4ee7f9e1b0ac}{IWM\_FLAG\_SCAN\_RUNNING}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05472}05472                                 sc-\/>\mbox{\hyperlink{structiwm__softc_a67d7ea2a1eef39c9ca65e86178e54766}{sc\_flags}} \&= \string~IWM\_FLAG\_SCAN\_RUNNING;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05473}05473                                 ieee80211\_runtask(ic, \&sc-\/>\mbox{\hyperlink{structiwm__softc_ab07424b6011a1ca6f3a1723d2b7e6317}{sc\_es\_task}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05474}05474                         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05475}05475                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05476}05476 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05477}05477                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_ae40d04bee721d40029429de43fc5aa87}{IWM\_SCAN\_ITERATION\_COMPLETE}}: \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05478}05478                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05479}05479                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05480}05480 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05481}05481                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a8fedb39cbf57e3f87a508fa8495d87ce}{IWM\_SCAN\_COMPLETE\_UMAC}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05482}05482                         \mbox{\hyperlink{if__iwm__scan_8c_a94ca705e4ca4765609758d3a99e522c8}{iwm\_rx\_umac\_scan\_complete\_notif}}(sc, pkt);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05483}05483                         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_a67d7ea2a1eef39c9ca65e86178e54766}{sc\_flags}} \& \mbox{\hyperlink{if__iwmvar_8h_ad21a28e9ab6945204f4b4ee7f9e1b0ac}{IWM\_FLAG\_SCAN\_RUNNING}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05484}05484                                 sc-\/>\mbox{\hyperlink{structiwm__softc_a67d7ea2a1eef39c9ca65e86178e54766}{sc\_flags}} \&= \string~IWM\_FLAG\_SCAN\_RUNNING;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05485}05485                                 ieee80211\_runtask(ic, \&sc-\/>\mbox{\hyperlink{structiwm__softc_ab07424b6011a1ca6f3a1723d2b7e6317}{sc\_es\_task}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05486}05486                         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05487}05487                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05488}05488 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05489}05489                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a43bdaf696d8cb6ad2f161af88ea060db}{IWM\_SCAN\_ITERATION\_COMPLETE\_UMAC}}: \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05490}05490                         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__umac__scan__iter__complete__notif}{iwm\_umac\_scan\_iter\_complete\_notif}} *notif;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05491}05491                         notif = (\textcolor{keywordtype}{void} *)pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a77036fd43499c32e7ec28e2d47ed1c33}{data}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05492}05492 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05493}05493                         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_SCAN, \textcolor{stringliteral}{"{}UMAC scan iteration "{}}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05494}05494                             \textcolor{stringliteral}{"{}complete, status=0x\%x, \%d channels scanned\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05495}05495                             notif-\/>\mbox{\hyperlink{structiwm__umac__scan__iter__complete__notif_a655cae701e44b46a8b874054896805af}{status}}, notif-\/>\mbox{\hyperlink{structiwm__umac__scan__iter__complete__notif_a3ce02a024d2eb7ed7b5afc42e40368f3}{scanned\_channels}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05496}05496                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05497}05497                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05498}05498 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05499}05499                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_ab052697c563335ebdef25767868ab8f0}{IWM\_REPLY\_ERROR}}: \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05500}05500                         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__error__resp}{iwm\_error\_resp}} *resp;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05501}05501                         resp = (\textcolor{keywordtype}{void} *)pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a77036fd43499c32e7ec28e2d47ed1c33}{data}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05502}05502 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05503}05503                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05504}05504                             \textcolor{stringliteral}{"{}firmware error 0x\%x, cmd 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05505}05505                             le32toh(resp-\/>\mbox{\hyperlink{structiwm__error__resp_aee8d022eecc615f84360e00c451760f0}{error\_type}}),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05506}05506                             resp-\/>\mbox{\hyperlink{structiwm__error__resp_a42b57627aad2620e301f7bf309d94916}{cmd\_id}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05507}05507                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05508}05508                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05509}05509 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05510}05510                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_adaa11aa39dfe354a6296dec6e643a321}{IWM\_TIME\_EVENT\_NOTIFICATION}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05511}05511                         \mbox{\hyperlink{if__iwm__time__event_8c_a79f8617da97ef6980fbc6c53a4daa68c}{iwm\_rx\_time\_event\_notif}}(sc, pkt);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05512}05512                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05513}05513 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05514}05514                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05515}05515 \textcolor{comment}{                 * Firmware versions 21 and 22 generate some DEBUG\_LOG\_MSG}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05516}05516 \textcolor{comment}{                 * messages. Just ignore them for now.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05517}05517 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05518}05518                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a962e6af18744d5388cb458582045e538}{IWM\_DEBUG\_LOG\_MSG}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05519}05519                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05520}05520 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05521}05521                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_ada6f70b22b25a03f91c514a3c9e82f55}{IWM\_MCAST\_FILTER\_CMD}}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05522}05522                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05523}05523 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05524}05524                 \textcolor{keywordflow}{case} \mbox{\hyperlink{if__iwmreg_8h_a088a858a86912012549d05974e8e3e65}{IWM\_SCD\_QUEUE\_CFG}}: \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05525}05525                         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__scd__txq__cfg__rsp}{iwm\_scd\_txq\_cfg\_rsp}} *rsp;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05526}05526                         rsp = (\textcolor{keywordtype}{void} *)pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a77036fd43499c32e7ec28e2d47ed1c33}{data}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05527}05527 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05528}05528                         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_CMD,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05529}05529                             \textcolor{stringliteral}{"{}queue cfg token=0x\%x sta\_id=\%d "{}}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05530}05530                             \textcolor{stringliteral}{"{}tid=\%d scd\_queue=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05531}05531                             rsp-\/>\mbox{\hyperlink{structiwm__scd__txq__cfg__rsp_ab3f3eb36121cc1f76b77d0a5c2ec827b}{token}}, rsp-\/>\mbox{\hyperlink{structiwm__scd__txq__cfg__rsp_a5c473ebea41f20ccbc224b92fa99310c}{sta\_id}}, rsp-\/>\mbox{\hyperlink{structiwm__scd__txq__cfg__rsp_ae73f12c9b28b6966111f586ebde08405}{tid}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05532}05532                             rsp-\/>\mbox{\hyperlink{structiwm__scd__txq__cfg__rsp_a407b9874accbced2e367fbd852d679e0}{scd\_queue}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05533}05533                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05534}05534                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05535}05535 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05536}05536                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05537}05537                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05538}05538                             \textcolor{stringliteral}{"{}code \%x, frame \%d/\%d \%x unhandled\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05539}05539                             code, qid \& \string~0x80, idx, pkt-\/>\mbox{\hyperlink{structiwm__rx__packet_a130d107c6ff0151e0b0617bf2c08054b}{len\_n\_flags}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05540}05540                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05541}05541                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05542}05542 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05543}05543                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05544}05544 \textcolor{comment}{                 * Why test bit 0x80?  The Linux driver:}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05545}05545 \textcolor{comment}{                 *}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05546}05546 \textcolor{comment}{                 * There is one exception:  uCode sets bit 15 when it}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05547}05547 \textcolor{comment}{                 * originates the response/notification, i.e. when the}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05548}05548 \textcolor{comment}{                 * response/notification is not a direct response to a}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05549}05549 \textcolor{comment}{                 * command sent by the driver.  For example, uCode issues}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05550}05550 \textcolor{comment}{                 * IWM\_REPLY\_RX when it sends a received frame to the driver;}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05551}05551 \textcolor{comment}{                 * it is not a direct response to any driver command.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05552}05552 \textcolor{comment}{                 *}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05553}05553 \textcolor{comment}{                 * Ok, so since when is 7 == 15?  Well, the Linux driver}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05554}05554 \textcolor{comment}{                 * uses a slightly different format for pkt-\/>hdr, and "{}qid"{}}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05555}05555 \textcolor{comment}{                 * is actually the upper byte of a two-\/byte field.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05556}05556 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05557}05557                 \textcolor{keywordflow}{if} (!(qid \& (1 << 7)))}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05558}05558                         \mbox{\hyperlink{if__iwm_8c_a00d2c8a71fbdf5f5645e8b44135cf2ae}{iwm\_cmd\_done}}(sc, pkt);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05559}05559 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05560}05560                 offset = nextoff;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05561}05561         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05562}05562         \textcolor{keywordflow}{if} (stolen)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05563}05563                 m\_freem(m);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05564}05564 \textcolor{preprocessor}{\#undef HAVEROOM}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05565}05565 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05566}05566 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05567}05567 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05568}05568 \textcolor{comment}{ * Process an IWM\_CSR\_INT\_BIT\_FH\_RX or IWM\_CSR\_INT\_BIT\_SW\_RX interrupt.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05569}05569 \textcolor{comment}{ * Basic structure from if\_iwn}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05570}05570 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05571}05571 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05572}\mbox{\hyperlink{if__iwm_8c_a6cde834579010be718e17ab03ca9cf2e}{05572}} \mbox{\hyperlink{if__iwm_8c_a6cde834579010be718e17ab03ca9cf2e}{iwm\_notif\_intr}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05573}05573 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05574}05574         \textcolor{keywordtype}{int} count;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05575}05575         uint32\_t wreg;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05576}05576         uint16\_t hw;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05577}05577 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05578}05578         bus\_dmamap\_sync(sc-\/>\mbox{\hyperlink{structiwm__softc_a57cdc0da9cdb3a68e4f55cc47c3a3aed}{rxq}}.\mbox{\hyperlink{structiwm__rx__ring_a7ecf69ca61669767934f89491a1d5582}{stat\_dma}}.\mbox{\hyperlink{structiwm__dma__info_a58938bb9054e381f73f7897fd7ae6ff1}{tag}}, sc-\/>\mbox{\hyperlink{structiwm__softc_a57cdc0da9cdb3a68e4f55cc47c3a3aed}{rxq}}.\mbox{\hyperlink{structiwm__rx__ring_a7ecf69ca61669767934f89491a1d5582}{stat\_dma}}.\mbox{\hyperlink{structiwm__dma__info_a9088f1c56d08041ac6e9f2439dd9b3dd}{map}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05579}05579             BUS\_DMASYNC\_POSTREAD);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05580}05580 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05581}05581         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_a4ace3f4eab56011b2fbbb76b5ad1dc67}{mqrx\_supported}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05582}05582                 count = \mbox{\hyperlink{if__iwmvar_8h_a459cd70f324ec10d397ce73265b8da1c}{IWM\_RX\_MQ\_RING\_COUNT}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05583}05583                 wreg = \mbox{\hyperlink{if__iwmreg_8h_ae0b9e130906b373daaa1887078e3df23}{IWM\_RFH\_Q0\_FRBDCB\_WIDX\_TRG}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05584}05584         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05585}05585                 count = \mbox{\hyperlink{if__iwmvar_8h_a06f1db00fa76847c38d0ac365d5db818}{IWM\_RX\_LEGACY\_RING\_COUNT}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05586}05586                 wreg = \mbox{\hyperlink{if__iwmreg_8h_a119757724961d7e406e04bed0adbef7a}{IWM\_FH\_RSCSR\_CHNL0\_WPTR}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05587}05587         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05588}05588 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05589}05589         hw = le16toh(sc-\/>\mbox{\hyperlink{structiwm__softc_a57cdc0da9cdb3a68e4f55cc47c3a3aed}{rxq}}.\mbox{\hyperlink{structiwm__rx__ring_ab61228bdfeafeddb39d4a3580a1e86f5}{stat}}-\/>\mbox{\hyperlink{structiwm__rb__status_a1c3f4b170fe127ddb187d4b03aa52662}{closed\_rb\_num}}) \& 0xfff;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05590}05590 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05591}05591         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05592}05592 \textcolor{comment}{         * Process responses}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05593}05593 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05594}05594         \textcolor{keywordflow}{while} (sc-\/>\mbox{\hyperlink{structiwm__softc_a57cdc0da9cdb3a68e4f55cc47c3a3aed}{rxq}}.\mbox{\hyperlink{structiwm__rx__ring_addf1b35103b2f1b5cdafa91729a85f45}{cur}} != hw) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05595}05595                 \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__rx__ring}{iwm\_rx\_ring}} *ring = \&sc-\/>\mbox{\hyperlink{structiwm__softc_a57cdc0da9cdb3a68e4f55cc47c3a3aed}{rxq}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05596}05596                 \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__rx__data}{iwm\_rx\_data}} *data = \&ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a8b1de774963c1bc508647770ddb45ece}{data}}[ring-\/>\mbox{\hyperlink{structiwm__rx__ring_addf1b35103b2f1b5cdafa91729a85f45}{cur}}];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05597}05597 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05598}05598                 bus\_dmamap\_sync(ring-\/>\mbox{\hyperlink{structiwm__rx__ring_a426927488ffe545180c75e567c0e5fcc}{data\_dmat}}, data-\/>\mbox{\hyperlink{structiwm__rx__data_a0ca075d6bb3aa6dd619b469fb454f582}{map}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05599}05599                     BUS\_DMASYNC\_POSTREAD);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05600}05600 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05601}05601                 \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_INTR,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05602}05602                     \textcolor{stringliteral}{"{}\%s: hw = \%d cur = \%d\(\backslash\)n"{}}, \_\_func\_\_, hw, ring-\/>\mbox{\hyperlink{structiwm__rx__ring_addf1b35103b2f1b5cdafa91729a85f45}{cur}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05603}05603                 \mbox{\hyperlink{if__iwm_8c_aecba9ae5d85dfb270cf2e369496c4386}{iwm\_handle\_rxb}}(sc, data-\/>\mbox{\hyperlink{structiwm__rx__data_a229bc638540eb8ac7f033e428ba54f50}{m}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05604}05604 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05605}05605                 ring-\/>\mbox{\hyperlink{structiwm__rx__ring_addf1b35103b2f1b5cdafa91729a85f45}{cur}} = (ring-\/>\mbox{\hyperlink{structiwm__rx__ring_addf1b35103b2f1b5cdafa91729a85f45}{cur}} + 1) \% count;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05606}05606         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05607}05607 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05608}05608         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05609}05609 \textcolor{comment}{         * Tell the firmware that it can reuse the ring entries that}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05610}05610 \textcolor{comment}{         * we have just processed.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05611}05611 \textcolor{comment}{         * Seems like the hardware gets upset unless we align}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05612}05612 \textcolor{comment}{         * the write by 8??}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05613}05613 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05614}05614         hw = (hw == 0) ? count -\/ 1 : hw -\/ 1;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05615}05615         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, wreg, rounddown2(hw, 8));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05616}05616 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05617}05617 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05618}05618 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05619}\mbox{\hyperlink{if__iwm_8c_a4d392305ad6239312228b80f25991af1}{05619}} \mbox{\hyperlink{if__iwm_8c_a4d392305ad6239312228b80f25991af1}{iwm\_intr}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05620}05620 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05621}05621         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc = arg;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05622}05622         \textcolor{keywordtype}{int} handled = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05623}05623         \textcolor{keywordtype}{int} r1, r2;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05624}05624         \textcolor{keywordtype}{int} isperiodic = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05625}05625 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05626}05626         \mbox{\hyperlink{if__iwmvar_8h_ac9f22c2982def9e764105396531c69be}{IWM\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05627}05627         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a5e8968161116664e181090be66b176b6}{IWM\_CSR\_INT\_MASK}}, 0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05628}05628 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05629}05629         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_a67d7ea2a1eef39c9ca65e86178e54766}{sc\_flags}} \& \mbox{\hyperlink{if__iwmvar_8h_aeb3043c3b0d302e795bf902c96ad68e9}{IWM\_FLAG\_USE\_ICT}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05630}05630                 uint32\_t *ict = sc-\/>\mbox{\hyperlink{structiwm__softc_aa0e657a2c5629c84832ec6e88ffcaeea}{ict\_dma}}.\mbox{\hyperlink{structiwm__dma__info_a8b1776dfbd12b920fe7ec6fba682178d}{vaddr}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05631}05631                 \textcolor{keywordtype}{int} tmp;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05632}05632 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05633}05633                 tmp = htole32(ict[sc-\/>\mbox{\hyperlink{structiwm__softc_a4c1ed3bd45821f39e55a371e9ae04575}{ict\_cur}}]);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05634}05634                 \textcolor{keywordflow}{if} (!tmp)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05635}05635                         \textcolor{keywordflow}{goto} out\_ena;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05636}05636 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05637}05637                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05638}05638 \textcolor{comment}{                 * ok, there was something.  keep plowing until we have all.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05639}05639 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05640}05640                 r1 = r2 = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05641}05641                 \textcolor{keywordflow}{while} (tmp) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05642}05642                         r1 |= tmp;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05643}05643                         ict[sc-\/>\mbox{\hyperlink{structiwm__softc_a4c1ed3bd45821f39e55a371e9ae04575}{ict\_cur}}] = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05644}05644                         sc-\/>\mbox{\hyperlink{structiwm__softc_a4c1ed3bd45821f39e55a371e9ae04575}{ict\_cur}} = (sc-\/>\mbox{\hyperlink{structiwm__softc_a4c1ed3bd45821f39e55a371e9ae04575}{ict\_cur}}+1) \% \mbox{\hyperlink{if__iwmvar_8h_a9afa4e54b11364ada02b92d497439807}{IWM\_ICT\_COUNT}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05645}05645                         tmp = htole32(ict[sc-\/>\mbox{\hyperlink{structiwm__softc_a4c1ed3bd45821f39e55a371e9ae04575}{ict\_cur}}]);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05646}05646                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05647}05647 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05648}05648                 \textcolor{comment}{/* this is where the fun begins.  don't ask */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05649}05649                 \textcolor{keywordflow}{if} (r1 == 0xffffffff)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05650}05650                         r1 = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05651}05651 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05652}05652                 \textcolor{comment}{/* i am not expected to understand this */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05653}05653                 \textcolor{keywordflow}{if} (r1 \& 0xc0000)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05654}05654                         r1 |= 0x8000;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05655}05655                 r1 = (0xff \& r1) | ((0xff00 \& r1) << 16);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05656}05656         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05657}05657                 r1 = \mbox{\hyperlink{if__iwmreg_8h_a13e3589622c101bf4b40c82beccd732a}{IWM\_READ}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a12fe1fe92a4c101c7911cff12a0c08c6}{IWM\_CSR\_INT}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05658}05658                 \textcolor{comment}{/* "{}hardware gone"{} (where, fishing?) */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05659}05659                 \textcolor{keywordflow}{if} (r1 == 0xffffffff || (r1 \& 0xfffffff0) == 0xa5a5a5a0)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05660}05660                         \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05661}05661                 r2 = \mbox{\hyperlink{if__iwmreg_8h_a13e3589622c101bf4b40c82beccd732a}{IWM\_READ}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a00578eaa8ca21f8d8e62ee790995d68b}{IWM\_CSR\_FH\_INT\_STATUS}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05662}05662         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05663}05663         \textcolor{keywordflow}{if} (r1 == 0 \&\& r2 == 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05664}05664                 \textcolor{keywordflow}{goto} out\_ena;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05665}05665         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05666}05666 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05667}05667         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a12fe1fe92a4c101c7911cff12a0c08c6}{IWM\_CSR\_INT}}, r1 | \string~sc-\/>\mbox{\hyperlink{structiwm__softc_af86bfc45da4bee42deba332d1c4bc4c5}{sc\_intmask}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05668}05668 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05669}05669         \textcolor{comment}{/* Safely ignore these bits for debug checks below */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05670}05670         r1 \&= \string~(\mbox{\hyperlink{if__iwmreg_8h_a9a711aa89ea45162e370fbc44175abcb}{IWM\_CSR\_INT\_BIT\_ALIVE}} | \mbox{\hyperlink{if__iwmreg_8h_aa96ae000a0558708d064069ee1431915}{IWM\_CSR\_INT\_BIT\_SCD}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05671}05671 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05672}05672         \textcolor{keywordflow}{if} (r1 \& \mbox{\hyperlink{if__iwmreg_8h_ad61bf005d1ef39b08de03e41ef1c55d8}{IWM\_CSR\_INT\_BIT\_SW\_ERR}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05673}05673                 \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05674}05674                 \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structiwm__softc_ada8054beb1d93be79364f98ff3bfbaf2}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05675}05675                 \textcolor{keyword}{struct }ieee80211vap *vap = TAILQ\_FIRST(\&ic-\/>ic\_vaps);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05676}05676 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05677}05677 \textcolor{preprocessor}{\#ifdef IWM\_DEBUG}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05678}05678                 iwm\_nic\_error(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05679}05679 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05680}05680                 \textcolor{comment}{/* Dump driver status (TX and RX rings) while we're here. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05681}05681                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}driver status:\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05682}05682                 \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{if__iwmreg_8h_a1fc09f366abcdb44957c1121598d1c42}{IWM\_MAX\_QUEUES}}; i++) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05683}05683                         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__tx__ring}{iwm\_tx\_ring}} *ring = \&sc-\/>\mbox{\hyperlink{structiwm__softc_a9580b1b4fe19ddaa7f8e8b987dc92f8b}{txq}}[i];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05684}05684                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05685}05685                             \textcolor{stringliteral}{"{}  tx ring \%2d: qid=\%-\/2d cur=\%-\/3d "{}}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05686}05686                             \textcolor{stringliteral}{"{}queued=\%-\/3d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05687}05687                             i, ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a985ab594338fd5c2df0efdd225636f8a}{qid}}, ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a0d0525e4e6e9ccaa6336bf14d8dce312}{cur}}, ring-\/>\mbox{\hyperlink{structiwm__tx__ring_a6762a1b02dd4f4caf5370fbf3b3db768}{queued}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05688}05688                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05689}05689                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05690}05690                     \textcolor{stringliteral}{"{}  rx ring: cur=\%d\(\backslash\)n"{}}, sc-\/>\mbox{\hyperlink{structiwm__softc_a57cdc0da9cdb3a68e4f55cc47c3a3aed}{rxq}}.\mbox{\hyperlink{structiwm__rx__ring_addf1b35103b2f1b5cdafa91729a85f45}{cur}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05691}05691                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05692}05692                     \textcolor{stringliteral}{"{}  802.11 state \%d\(\backslash\)n"{}}, (vap == NULL) ? -\/1 : vap-\/>iv\_state);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05693}05693 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05694}05694                 \textcolor{comment}{/* Reset our firmware state tracking. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05695}05695                 sc-\/>\mbox{\hyperlink{structiwm__softc_a064fd76be7f7ab79f6da894c344419e0}{sc\_firmware\_state}} = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05696}05696                 \textcolor{comment}{/* Don't stop the device; just do a VAP restart */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05697}05697                 \mbox{\hyperlink{if__iwmvar_8h_a2bc8b1196a564b1b70c11f96391760fa}{IWM\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05698}05698 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05699}05699                 \textcolor{keywordflow}{if} (vap == NULL) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05700}05700                         printf(\textcolor{stringliteral}{"{}\%s: null vap\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05701}05701                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05702}05702                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05703}05703 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05704}05704                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}\%s: controller panicked, iv\_state = \%d; "{}}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05705}05705                     \textcolor{stringliteral}{"{}restarting\(\backslash\)n"{}}, \_\_func\_\_, vap-\/>iv\_state);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05706}05706 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05707}05707                 ieee80211\_restart\_all(ic);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05708}05708                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05709}05709         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05710}05710 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05711}05711         \textcolor{keywordflow}{if} (r1 \& \mbox{\hyperlink{if__iwmreg_8h_a05fc007d70db610b014ae3fe2285afd5}{IWM\_CSR\_INT\_BIT\_HW\_ERR}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05712}05712                 handled |= \mbox{\hyperlink{if__iwmreg_8h_a05fc007d70db610b014ae3fe2285afd5}{IWM\_CSR\_INT\_BIT\_HW\_ERR}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05713}05713                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}hardware error, stopping device\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05714}05714                 \mbox{\hyperlink{if__iwm_8c_a0825fe7959f3d4f96a3435079bd1b37d}{iwm\_stop}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05715}05715                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05716}05716         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05717}05717 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05718}05718         \textcolor{comment}{/* firmware chunk loaded */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05719}05719         \textcolor{keywordflow}{if} (r1 \& \mbox{\hyperlink{if__iwmreg_8h_a9d0791a12af29137faed76f475e4dda2}{IWM\_CSR\_INT\_BIT\_FH\_TX}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05720}05720                 \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a00578eaa8ca21f8d8e62ee790995d68b}{IWM\_CSR\_FH\_INT\_STATUS}}, \mbox{\hyperlink{if__iwmreg_8h_a42331d9ddf87ce979a8c4674ddca55ce}{IWM\_CSR\_FH\_INT\_TX\_MASK}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05721}05721                 handled |= \mbox{\hyperlink{if__iwmreg_8h_a9d0791a12af29137faed76f475e4dda2}{IWM\_CSR\_INT\_BIT\_FH\_TX}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05722}05722                 sc-\/>\mbox{\hyperlink{structiwm__softc_a16e3a4c45d9dfddbd3bf2bf096f21e25}{sc\_fw\_chunk\_done}} = 1;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05723}05723                 wakeup(\&sc-\/>\mbox{\hyperlink{structiwm__softc_a1028ec58bea1aeb56974087433df5092}{sc\_fw}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05724}05724         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05725}05725 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05726}05726         \textcolor{keywordflow}{if} (r1 \& \mbox{\hyperlink{if__iwmreg_8h_a2d2cfaa71fb2e2a09c3f9a50d252c604}{IWM\_CSR\_INT\_BIT\_RF\_KILL}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05727}05727                 handled |= \mbox{\hyperlink{if__iwmreg_8h_a2d2cfaa71fb2e2a09c3f9a50d252c604}{IWM\_CSR\_INT\_BIT\_RF\_KILL}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05728}05728                 taskqueue\_enqueue(sc-\/>\mbox{\hyperlink{structiwm__softc_a3e8d63b3935f7502ced829aaeafa4cf2}{sc\_tq}}, \&sc-\/>\mbox{\hyperlink{structiwm__softc_a4ef4df195eaaa379d0de824dfde70a08}{sc\_rftoggle\_task}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05729}05729         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05730}05730 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05731}05731         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05732}05732 \textcolor{comment}{         * The Linux driver uses periodic interrupts to avoid races.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05733}05733 \textcolor{comment}{         * We cargo-\/cult like it's going out of fashion.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05734}05734 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05735}05735         \textcolor{keywordflow}{if} (r1 \& \mbox{\hyperlink{if__iwmreg_8h_abd1aa8a4312421902a05e0cee9dca8f4}{IWM\_CSR\_INT\_BIT\_RX\_PERIODIC}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05736}05736                 handled |= \mbox{\hyperlink{if__iwmreg_8h_abd1aa8a4312421902a05e0cee9dca8f4}{IWM\_CSR\_INT\_BIT\_RX\_PERIODIC}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05737}05737                 \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a12fe1fe92a4c101c7911cff12a0c08c6}{IWM\_CSR\_INT}}, \mbox{\hyperlink{if__iwmreg_8h_abd1aa8a4312421902a05e0cee9dca8f4}{IWM\_CSR\_INT\_BIT\_RX\_PERIODIC}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05738}05738                 \textcolor{keywordflow}{if} ((r1 \& (\mbox{\hyperlink{if__iwmreg_8h_aae27034e42cb14774c995e609353ed3f}{IWM\_CSR\_INT\_BIT\_FH\_RX}} | \mbox{\hyperlink{if__iwmreg_8h_aaf0cb7f4da42ef2b15080b230cc42ef0}{IWM\_CSR\_INT\_BIT\_SW\_RX}})) == 0)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05739}05739                         \mbox{\hyperlink{if__iwmreg_8h_ab88896bdd5b2361a366533fc825f22ae}{IWM\_WRITE\_1}}(sc,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05740}05740                             \mbox{\hyperlink{if__iwmreg_8h_a27b5503510621ca8944b920f2900c911}{IWM\_CSR\_INT\_PERIODIC\_REG}}, \mbox{\hyperlink{if__iwmreg_8h_a8d97f1dea4230b644747c256cc2ca2b4}{IWM\_CSR\_INT\_PERIODIC\_DIS}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05741}05741                 isperiodic = 1;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05742}05742         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05743}05743 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05744}05744         \textcolor{keywordflow}{if} ((r1 \& (\mbox{\hyperlink{if__iwmreg_8h_aae27034e42cb14774c995e609353ed3f}{IWM\_CSR\_INT\_BIT\_FH\_RX}} | \mbox{\hyperlink{if__iwmreg_8h_aaf0cb7f4da42ef2b15080b230cc42ef0}{IWM\_CSR\_INT\_BIT\_SW\_RX}})) || isperiodic) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05745}05745                 handled |= (\mbox{\hyperlink{if__iwmreg_8h_aae27034e42cb14774c995e609353ed3f}{IWM\_CSR\_INT\_BIT\_FH\_RX}} | \mbox{\hyperlink{if__iwmreg_8h_aaf0cb7f4da42ef2b15080b230cc42ef0}{IWM\_CSR\_INT\_BIT\_SW\_RX}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05746}05746                 \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a00578eaa8ca21f8d8e62ee790995d68b}{IWM\_CSR\_FH\_INT\_STATUS}}, \mbox{\hyperlink{if__iwmreg_8h_a285c79f5208e4d51226fd387c9803901}{IWM\_CSR\_FH\_INT\_RX\_MASK}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05747}05747 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05748}05748                 \mbox{\hyperlink{if__iwm_8c_a6cde834579010be718e17ab03ca9cf2e}{iwm\_notif\_intr}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05749}05749 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05750}05750                 \textcolor{comment}{/* enable periodic interrupt, see above */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05751}05751                 \textcolor{keywordflow}{if} (r1 \& (\mbox{\hyperlink{if__iwmreg_8h_aae27034e42cb14774c995e609353ed3f}{IWM\_CSR\_INT\_BIT\_FH\_RX}} | \mbox{\hyperlink{if__iwmreg_8h_aaf0cb7f4da42ef2b15080b230cc42ef0}{IWM\_CSR\_INT\_BIT\_SW\_RX}}) \&\& !isperiodic)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05752}05752                         \mbox{\hyperlink{if__iwmreg_8h_ab88896bdd5b2361a366533fc825f22ae}{IWM\_WRITE\_1}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a27b5503510621ca8944b920f2900c911}{IWM\_CSR\_INT\_PERIODIC\_REG}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05753}05753                             \mbox{\hyperlink{if__iwmreg_8h_af53f605eb765f2b1d3e1e40626830adc}{IWM\_CSR\_INT\_PERIODIC\_ENA}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05754}05754         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05755}05755 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05756}05756         \textcolor{keywordflow}{if} (\_\_predict\_false(r1 \& \string~handled))}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05757}05757                 \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_INTR,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05758}05758                     \textcolor{stringliteral}{"{}\%s: unhandled interrupts: \%x\(\backslash\)n"{}}, \_\_func\_\_, r1);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05759}05759  out\_ena:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05760}05760         \mbox{\hyperlink{if__iwm_8c_ae798b664f07f4912afe3cc0b52aa2f42}{iwm\_restore\_interrupts}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05761}05761  out:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05762}05762         \mbox{\hyperlink{if__iwmvar_8h_a2bc8b1196a564b1b70c11f96391760fa}{IWM\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05763}05763         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05764}05764 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05765}05765 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05766}05766 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05767}05767 \textcolor{comment}{ * Autoconf glue-\/sniffing}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05768}05768 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05769}\mbox{\hyperlink{if__iwm_8c_a18379ffbf8e989b867e86fda515d3eae}{05769}} \textcolor{preprocessor}{\#define PCI\_VENDOR\_INTEL                0x8086}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05770}\mbox{\hyperlink{if__iwm_8c_a41b2b53c1726095a5c188ee44a3e46f7}{05770}} \textcolor{preprocessor}{\#define PCI\_PRODUCT\_INTEL\_WL\_3160\_1     0x08b3}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05771}\mbox{\hyperlink{if__iwm_8c_ad716498346b59ba1dfeb0b6036c5b8bd}{05771}} \textcolor{preprocessor}{\#define PCI\_PRODUCT\_INTEL\_WL\_3160\_2     0x08b4}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05772}\mbox{\hyperlink{if__iwm_8c_a867314a5103c47747ff24127d7c56ad8}{05772}} \textcolor{preprocessor}{\#define PCI\_PRODUCT\_INTEL\_WL\_3165\_1     0x3165}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05773}\mbox{\hyperlink{if__iwm_8c_ab5e3653fcba420cc891a783788204e82}{05773}} \textcolor{preprocessor}{\#define PCI\_PRODUCT\_INTEL\_WL\_3165\_2     0x3166}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05774}\mbox{\hyperlink{if__iwm_8c_af8637f97836a8bbfae16da11d4a51f62}{05774}} \textcolor{preprocessor}{\#define PCI\_PRODUCT\_INTEL\_WL\_3168\_1     0x24fb}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05775}\mbox{\hyperlink{if__iwm_8c_ad0d8e4c06f6841ff4cd8d626e9cd5b9e}{05775}} \textcolor{preprocessor}{\#define PCI\_PRODUCT\_INTEL\_WL\_7260\_1     0x08b1}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05776}\mbox{\hyperlink{if__iwm_8c_a5ecb761908152c9ad8f9ec848d2d9b9c}{05776}} \textcolor{preprocessor}{\#define PCI\_PRODUCT\_INTEL\_WL\_7260\_2     0x08b2}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05777}\mbox{\hyperlink{if__iwm_8c_a0f3414d00ee2121af01e5d0471ebee4a}{05777}} \textcolor{preprocessor}{\#define PCI\_PRODUCT\_INTEL\_WL\_7265\_1     0x095a}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05778}\mbox{\hyperlink{if__iwm_8c_a0f0942072211660add993a0392ba6959}{05778}} \textcolor{preprocessor}{\#define PCI\_PRODUCT\_INTEL\_WL\_7265\_2     0x095b}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05779}\mbox{\hyperlink{if__iwm_8c_ac4e0951f25986e9161b6554a82b755ac}{05779}} \textcolor{preprocessor}{\#define PCI\_PRODUCT\_INTEL\_WL\_8260\_1     0x24f3}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05780}\mbox{\hyperlink{if__iwm_8c_aa5849cce5db57ff251f55b4e4067656b}{05780}} \textcolor{preprocessor}{\#define PCI\_PRODUCT\_INTEL\_WL\_8260\_2     0x24f4}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05781}\mbox{\hyperlink{if__iwm_8c_a87628847bc4e43d0a2e88fd8b6884f6f}{05781}} \textcolor{preprocessor}{\#define PCI\_PRODUCT\_INTEL\_WL\_8265\_1     0x24fd}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05782}\mbox{\hyperlink{if__iwm_8c_a637f0707ac82a309380431895a86396c}{05782}} \textcolor{preprocessor}{\#define PCI\_PRODUCT\_INTEL\_WL\_9560\_1     0x9df0}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05783}\mbox{\hyperlink{if__iwm_8c_a3da820dff5b2a8b290aaea034da9354c}{05783}} \textcolor{preprocessor}{\#define PCI\_PRODUCT\_INTEL\_WL\_9560\_2     0xa370}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05784}\mbox{\hyperlink{if__iwm_8c_af0d2c9fe0cdbb15bed8ecdd8a1762787}{05784}} \textcolor{preprocessor}{\#define PCI\_PRODUCT\_INTEL\_WL\_9560\_3     0x31dc}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05785}\mbox{\hyperlink{if__iwm_8c_ab1b6abe6626275ed57e2d491c8b1d2cd}{05785}} \textcolor{preprocessor}{\#define PCI\_PRODUCT\_INTEL\_WL\_9260\_1     0x2526}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05786}05786 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05787}\mbox{\hyperlink{structiwm__devices}{05787}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__devices}{iwm\_devices}} \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05788}\mbox{\hyperlink{structiwm__devices_a880536fd59ed8962134ddc528c12c5b2}{05788}}         uint16\_t                \mbox{\hyperlink{structiwm__devices_a880536fd59ed8962134ddc528c12c5b2}{device}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05789}\mbox{\hyperlink{structiwm__devices_a2bab3b2c24c27be18b2fa0985502b103}{05789}}         \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__cfg}{iwm\_cfg}}     *\mbox{\hyperlink{structiwm__devices_a2bab3b2c24c27be18b2fa0985502b103}{cfg}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05790}05790 \} \mbox{\hyperlink{structiwm__devices}{iwm\_devices}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05791}05791         \{ \mbox{\hyperlink{if__iwm_8c_a41b2b53c1726095a5c188ee44a3e46f7}{PCI\_PRODUCT\_INTEL\_WL\_3160\_1}}, \&\mbox{\hyperlink{if__iwm__7000_8c_a03a43d34935c68b33f1770d7be1a2e09}{iwm3160\_cfg}} \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05792}05792         \{ \mbox{\hyperlink{if__iwm_8c_ad716498346b59ba1dfeb0b6036c5b8bd}{PCI\_PRODUCT\_INTEL\_WL\_3160\_2}}, \&\mbox{\hyperlink{if__iwm__7000_8c_a03a43d34935c68b33f1770d7be1a2e09}{iwm3160\_cfg}} \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05793}05793         \{ \mbox{\hyperlink{if__iwm_8c_a867314a5103c47747ff24127d7c56ad8}{PCI\_PRODUCT\_INTEL\_WL\_3165\_1}}, \&\mbox{\hyperlink{if__iwm__7000_8c_abb44ceadb89b39f76daf281c786d1bc5}{iwm3165\_cfg}} \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05794}05794         \{ \mbox{\hyperlink{if__iwm_8c_ab5e3653fcba420cc891a783788204e82}{PCI\_PRODUCT\_INTEL\_WL\_3165\_2}}, \&\mbox{\hyperlink{if__iwm__7000_8c_abb44ceadb89b39f76daf281c786d1bc5}{iwm3165\_cfg}} \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05795}05795         \{ \mbox{\hyperlink{if__iwm_8c_af8637f97836a8bbfae16da11d4a51f62}{PCI\_PRODUCT\_INTEL\_WL\_3168\_1}}, \&\mbox{\hyperlink{if__iwm__7000_8c_a249163c88e3a1c84e9690c70cf9f63f8}{iwm3168\_cfg}} \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05796}05796         \{ \mbox{\hyperlink{if__iwm_8c_ad0d8e4c06f6841ff4cd8d626e9cd5b9e}{PCI\_PRODUCT\_INTEL\_WL\_7260\_1}}, \&\mbox{\hyperlink{if__iwm__7000_8c_adc0c232e1dd0bce78e94c26aedc4bd04}{iwm7260\_cfg}} \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05797}05797         \{ \mbox{\hyperlink{if__iwm_8c_a5ecb761908152c9ad8f9ec848d2d9b9c}{PCI\_PRODUCT\_INTEL\_WL\_7260\_2}}, \&\mbox{\hyperlink{if__iwm__7000_8c_adc0c232e1dd0bce78e94c26aedc4bd04}{iwm7260\_cfg}} \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05798}05798         \{ \mbox{\hyperlink{if__iwm_8c_a0f3414d00ee2121af01e5d0471ebee4a}{PCI\_PRODUCT\_INTEL\_WL\_7265\_1}}, \&\mbox{\hyperlink{if__iwm__7000_8c_a37496b7fc2d7cd39862b3877fbb9b576}{iwm7265\_cfg}} \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05799}05799         \{ \mbox{\hyperlink{if__iwm_8c_a0f0942072211660add993a0392ba6959}{PCI\_PRODUCT\_INTEL\_WL\_7265\_2}}, \&\mbox{\hyperlink{if__iwm__7000_8c_a37496b7fc2d7cd39862b3877fbb9b576}{iwm7265\_cfg}} \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05800}05800         \{ \mbox{\hyperlink{if__iwm_8c_ac4e0951f25986e9161b6554a82b755ac}{PCI\_PRODUCT\_INTEL\_WL\_8260\_1}}, \&\mbox{\hyperlink{if__iwm__8000_8c_a394608c77d6ec19145ca60975a565c7c}{iwm8260\_cfg}} \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05801}05801         \{ \mbox{\hyperlink{if__iwm_8c_aa5849cce5db57ff251f55b4e4067656b}{PCI\_PRODUCT\_INTEL\_WL\_8260\_2}}, \&\mbox{\hyperlink{if__iwm__8000_8c_a394608c77d6ec19145ca60975a565c7c}{iwm8260\_cfg}} \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05802}05802         \{ \mbox{\hyperlink{if__iwm_8c_a87628847bc4e43d0a2e88fd8b6884f6f}{PCI\_PRODUCT\_INTEL\_WL\_8265\_1}}, \&\mbox{\hyperlink{if__iwm__8000_8c_a826245ebcd43176b7ebd600c040914f0}{iwm8265\_cfg}} \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05803}05803         \{ \mbox{\hyperlink{if__iwm_8c_a637f0707ac82a309380431895a86396c}{PCI\_PRODUCT\_INTEL\_WL\_9560\_1}}, \&\mbox{\hyperlink{if__iwm__9000_8c_a576d06da8b8c0eb99ecd7ec572a05f3c}{iwm9560\_cfg}} \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05804}05804         \{ \mbox{\hyperlink{if__iwm_8c_a3da820dff5b2a8b290aaea034da9354c}{PCI\_PRODUCT\_INTEL\_WL\_9560\_2}}, \&\mbox{\hyperlink{if__iwm__9000_8c_a576d06da8b8c0eb99ecd7ec572a05f3c}{iwm9560\_cfg}} \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05805}05805         \{ \mbox{\hyperlink{if__iwm_8c_af0d2c9fe0cdbb15bed8ecdd8a1762787}{PCI\_PRODUCT\_INTEL\_WL\_9560\_3}}, \&\mbox{\hyperlink{if__iwm__9000_8c_a576d06da8b8c0eb99ecd7ec572a05f3c}{iwm9560\_cfg}} \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05806}05806         \{ \mbox{\hyperlink{if__iwm_8c_ab1b6abe6626275ed57e2d491c8b1d2cd}{PCI\_PRODUCT\_INTEL\_WL\_9260\_1}}, \&\mbox{\hyperlink{if__iwm__9260_8c_a17d5006d9b1bdb030eebc1247cad72d3}{iwm9260\_cfg}} \},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05807}\mbox{\hyperlink{if__iwm_8c_a5d8498ad3018d0c2f48b2bfd91cc6801}{05807}} \};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05808}05808 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05809}05809 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05810}\mbox{\hyperlink{if__iwm_8c_a8142adf6f311d5ff2d79605b8df168a2}{05810}} \mbox{\hyperlink{if__iwm_8c_a8142adf6f311d5ff2d79605b8df168a2}{iwm\_probe}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05811}05811 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05812}05812         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05813}05813 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05814}05814         \textcolor{keywordflow}{for} (i = 0; i < nitems(\mbox{\hyperlink{structiwm__devices}{iwm\_devices}}); i++) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05815}05815                 \textcolor{keywordflow}{if} (pci\_get\_vendor(dev) == \mbox{\hyperlink{if__iwm_8c_a18379ffbf8e989b867e86fda515d3eae}{PCI\_VENDOR\_INTEL}} \&\&}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05816}05816                     pci\_get\_device(dev) == \mbox{\hyperlink{structiwm__devices}{iwm\_devices}}[i].\mbox{\hyperlink{structiwm__devices_a880536fd59ed8962134ddc528c12c5b2}{device}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05817}05817                         device\_set\_desc(dev, \mbox{\hyperlink{structiwm__devices}{iwm\_devices}}[i].cfg-\/>name);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05818}05818                         \textcolor{keywordflow}{return} (BUS\_PROBE\_DEFAULT);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05819}05819                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05820}05820         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05821}05821 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05822}05822         \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05823}05823 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05824}05824 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05825}05825 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05826}\mbox{\hyperlink{if__iwm_8c_aba683f064e29a728bb4b5ee0261984ae}{05826}} \mbox{\hyperlink{if__iwm_8c_aba683f064e29a728bb4b5ee0261984ae}{iwm\_dev\_check}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05827}05827 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05828}05828         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05829}05829         uint16\_t devid;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05830}05830         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05831}05831 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05832}05832         sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05833}05833 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05834}05834         devid = pci\_get\_device(dev);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05835}05835         \textcolor{keywordflow}{for} (i = 0; i < nitems(\mbox{\hyperlink{structiwm__devices}{iwm\_devices}}); i++) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05836}05836                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structiwm__devices}{iwm\_devices}}[i].device == devid) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05837}05837                         sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}} = \mbox{\hyperlink{structiwm__devices}{iwm\_devices}}[i].\mbox{\hyperlink{structiwm__devices_a2bab3b2c24c27be18b2fa0985502b103}{cfg}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05838}05838                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05839}05839                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05840}05840         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05841}05841         device\_printf(dev, \textcolor{stringliteral}{"{}unknown adapter type\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05842}05842         \textcolor{keywordflow}{return} ENXIO;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05843}05843 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05844}05844 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05845}05845 \textcolor{comment}{/* PCI registers */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05846}\mbox{\hyperlink{if__iwm_8c_ac82851a410cab77b68871bfc4f676744}{05846}} \textcolor{preprocessor}{\#define PCI\_CFG\_RETRY\_TIMEOUT   0x041}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05847}05847 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05848}05848 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05849}\mbox{\hyperlink{if__iwm_8c_a3731caa474cb1beab8ba92535c4fc931}{05849}} \mbox{\hyperlink{if__iwm_8c_a3731caa474cb1beab8ba92535c4fc931}{iwm\_pci\_attach}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05850}05850 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05851}05851         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05852}05852         \textcolor{keywordtype}{int} count, error, rid;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05853}05853         uint16\_t reg;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05854}05854 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05855}05855         sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05856}05856 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05857}05857         \textcolor{comment}{/* We disable the RETRY\_TIMEOUT register (0x41) to keep}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05858}05858 \textcolor{comment}{         * PCI Tx retries from interfering with C3 CPU state */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05859}05859         pci\_write\_config(dev, \mbox{\hyperlink{if__iwm_8c_ac82851a410cab77b68871bfc4f676744}{PCI\_CFG\_RETRY\_TIMEOUT}}, 0x00, 1);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05860}05860 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05861}05861         \textcolor{comment}{/* Enable bus-\/mastering and hardware bug workaround. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05862}05862         pci\_enable\_busmaster(dev);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05863}05863         reg = pci\_read\_config(dev, PCIR\_STATUS, \textcolor{keyword}{sizeof}(reg));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05864}05864         \textcolor{comment}{/* if !MSI */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05865}05865         \textcolor{keywordflow}{if} (reg \& PCIM\_STATUS\_INTxSTATE) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05866}05866                 reg \&= \string~PCIM\_STATUS\_INTxSTATE;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05867}05867         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05868}05868         pci\_write\_config(dev, PCIR\_STATUS, reg, \textcolor{keyword}{sizeof}(reg));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05869}05869 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05870}05870         rid = PCIR\_BAR(0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05871}05871         sc-\/>\mbox{\hyperlink{structiwm__softc_a42da3e7e66985d8a7c84c8704d95955b}{sc\_mem}} = bus\_alloc\_resource\_any(dev, SYS\_RES\_MEMORY, \&rid,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05872}05872             RF\_ACTIVE);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05873}05873         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_a42da3e7e66985d8a7c84c8704d95955b}{sc\_mem}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05874}05874                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}can't map mem space\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05875}05875                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05876}05876         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05877}05877         sc-\/>\mbox{\hyperlink{structiwm__softc_a1756ef88459194f387079c4217884dd4}{sc\_st}} = rman\_get\_bustag(sc-\/>\mbox{\hyperlink{structiwm__softc_a42da3e7e66985d8a7c84c8704d95955b}{sc\_mem}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05878}05878         sc-\/>\mbox{\hyperlink{structiwm__softc_af173d7c92afef50f72c040b28b5f5eaa}{sc\_sh}} = rman\_get\_bushandle(sc-\/>\mbox{\hyperlink{structiwm__softc_a42da3e7e66985d8a7c84c8704d95955b}{sc\_mem}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05879}05879 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05880}05880         \textcolor{comment}{/* Install interrupt handler. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05881}05881         count = 1;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05882}05882         rid = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05883}05883         \textcolor{keywordflow}{if} (pci\_alloc\_msi(dev, \&count) == 0)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05884}05884                 rid = 1;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05885}05885         sc-\/>\mbox{\hyperlink{structiwm__softc_aa94a292be098c9aa5605cdfb9f14c8a1}{sc\_irq}} = bus\_alloc\_resource\_any(dev, SYS\_RES\_IRQ, \&rid, RF\_ACTIVE |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05886}05886             (rid != 0 ? 0 : RF\_SHAREABLE));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05887}05887         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_aa94a292be098c9aa5605cdfb9f14c8a1}{sc\_irq}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05888}05888                 device\_printf(dev, \textcolor{stringliteral}{"{}can't map interrupt\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05889}05889                         \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05890}05890         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05891}05891         error = bus\_setup\_intr(dev, sc-\/>\mbox{\hyperlink{structiwm__softc_aa94a292be098c9aa5605cdfb9f14c8a1}{sc\_irq}}, INTR\_TYPE\_NET | INTR\_MPSAFE,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05892}05892             NULL, \mbox{\hyperlink{if__iwm_8c_a4d392305ad6239312228b80f25991af1}{iwm\_intr}}, sc, \&sc-\/>\mbox{\hyperlink{structiwm__softc_a0e35801d91c7d65275bf1b17ebcec7bc}{sc\_ih}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05893}05893         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05894}05894                 device\_printf(dev, \textcolor{stringliteral}{"{}can't establish interrupt"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05895}05895                 \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05896}05896         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05897}05897         sc-\/>\mbox{\hyperlink{structiwm__softc_aae5e9b5552d1489062816eb7d7fb13f9}{sc\_dmat}} = bus\_get\_dma\_tag(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05898}05898 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05899}05899         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05900}05900 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05901}05901 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05902}05902 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05903}\mbox{\hyperlink{if__iwm_8c_a300f5313fcf1f064f1ceb2242664d32e}{05903}} \mbox{\hyperlink{if__iwm_8c_a300f5313fcf1f064f1ceb2242664d32e}{iwm\_pci\_detach}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05904}05904 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05905}05905         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05906}05906 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05907}05907         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_aa94a292be098c9aa5605cdfb9f14c8a1}{sc\_irq}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05908}05908                 bus\_teardown\_intr(dev, sc-\/>\mbox{\hyperlink{structiwm__softc_aa94a292be098c9aa5605cdfb9f14c8a1}{sc\_irq}}, sc-\/>\mbox{\hyperlink{structiwm__softc_a0e35801d91c7d65275bf1b17ebcec7bc}{sc\_ih}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05909}05909                 bus\_release\_resource(dev, SYS\_RES\_IRQ,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05910}05910                     rman\_get\_rid(sc-\/>\mbox{\hyperlink{structiwm__softc_aa94a292be098c9aa5605cdfb9f14c8a1}{sc\_irq}}), sc-\/>\mbox{\hyperlink{structiwm__softc_aa94a292be098c9aa5605cdfb9f14c8a1}{sc\_irq}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05911}05911                 pci\_release\_msi(dev);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05912}05912         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05913}05913         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_a42da3e7e66985d8a7c84c8704d95955b}{sc\_mem}} != NULL)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05914}05914                 bus\_release\_resource(dev, SYS\_RES\_MEMORY,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05915}05915                     rman\_get\_rid(sc-\/>\mbox{\hyperlink{structiwm__softc_a42da3e7e66985d8a7c84c8704d95955b}{sc\_mem}}), sc-\/>\mbox{\hyperlink{structiwm__softc_a42da3e7e66985d8a7c84c8704d95955b}{sc\_mem}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05916}05916 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05917}05917 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05918}05918 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05919}\mbox{\hyperlink{if__iwm_8c_a040a4326fcc1962a394f98c81b4030bc}{05919}} \mbox{\hyperlink{if__iwm_8c_a040a4326fcc1962a394f98c81b4030bc}{iwm\_attach}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05920}05920 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05921}05921         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05922}05922         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structiwm__softc_ada8054beb1d93be79364f98ff3bfbaf2}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05923}05923         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05924}05924         \textcolor{keywordtype}{int} txq\_i, i;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05925}05925 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05926}05926         sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}} = dev;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05927}05927         sc-\/>\mbox{\hyperlink{structiwm__softc_a7e78e57794efb601b6511067e5848350}{sc\_attached}} = 1;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05928}05928         \mbox{\hyperlink{if__iwmvar_8h_a797bd8b4b2561eac1b50b2e1b2da4c4a}{IWM\_LOCK\_INIT}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05929}05929         mbufq\_init(\&sc-\/>\mbox{\hyperlink{structiwm__softc_a135aafeef98b9fd92696efaa14730e5f}{sc\_snd}}, ifqmaxlen);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05930}05930         callout\_init\_mtx(\&sc-\/>\mbox{\hyperlink{structiwm__softc_aa23512c0249b8a3513d3ec43f828bd39}{sc\_watchdog\_to}}, \&sc-\/>\mbox{\hyperlink{structiwm__softc_a6a2cf8481612bafdb1f80b84a331488b}{sc\_mtx}}, 0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05931}05931         callout\_init\_mtx(\&sc-\/>\mbox{\hyperlink{structiwm__softc_af8c6fc922da0b733a0931a53adfeb6f1}{sc\_led\_blink\_to}}, \&sc-\/>\mbox{\hyperlink{structiwm__softc_a6a2cf8481612bafdb1f80b84a331488b}{sc\_mtx}}, 0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05932}05932         TASK\_INIT(\&sc-\/>\mbox{\hyperlink{structiwm__softc_ab07424b6011a1ca6f3a1723d2b7e6317}{sc\_es\_task}}, 0, \mbox{\hyperlink{if__iwm_8c_aaa155c13ec0523930d0be8f3cba9a9da}{iwm\_endscan\_cb}}, sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05933}05933         TASK\_INIT(\&sc-\/>\mbox{\hyperlink{structiwm__softc_a4ef4df195eaaa379d0de824dfde70a08}{sc\_rftoggle\_task}}, 0, \mbox{\hyperlink{if__iwm_8c_a542d77a26ef58febc71a7575d87f5e3c}{iwm\_rftoggle\_task}}, sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05934}05934 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05935}05935         sc-\/>\mbox{\hyperlink{structiwm__softc_a3e8d63b3935f7502ced829aaeafa4cf2}{sc\_tq}} = taskqueue\_create(\textcolor{stringliteral}{"{}iwm\_taskq"{}}, M\_WAITOK,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05936}05936             taskqueue\_thread\_enqueue, \&sc-\/>\mbox{\hyperlink{structiwm__softc_a3e8d63b3935f7502ced829aaeafa4cf2}{sc\_tq}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05937}05937         error = taskqueue\_start\_threads(\&sc-\/>\mbox{\hyperlink{structiwm__softc_a3e8d63b3935f7502ced829aaeafa4cf2}{sc\_tq}}, 1, 0, \textcolor{stringliteral}{"{}iwm\_taskq"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05938}05938         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05939}05939                 device\_printf(dev, \textcolor{stringliteral}{"{}can't start taskq thread, error \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05940}05940                     error);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05941}05941                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05942}05942         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05943}05943 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05944}05944         error = \mbox{\hyperlink{if__iwm_8c_aba683f064e29a728bb4b5ee0261984ae}{iwm\_dev\_check}}(dev);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05945}05945         \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05946}05946                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05947}05947 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05948}05948         sc-\/>\mbox{\hyperlink{structiwm__softc_ac9e8a0cb4380c845865cdd6eae7444aa}{sc\_notif\_wait}} = \mbox{\hyperlink{if__iwm__notif__wait_8c_ab24c229963d9ffdfb7cf0c644747bafd}{iwm\_notification\_wait\_init}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05949}05949         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_ac9e8a0cb4380c845865cdd6eae7444aa}{sc\_notif\_wait}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05950}05950                 device\_printf(dev, \textcolor{stringliteral}{"{}failed to init notification wait struct\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05951}05951                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05952}05952         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05953}05953 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05954}05954         sc-\/>\mbox{\hyperlink{structiwm__softc_a666b0d35ec5dff20dbfbcb51294dc0d1}{sf\_state}} = \mbox{\hyperlink{if__iwmreg_8h_ae0c4b2df21f4690048d8bb50d2a340c6a6533f48063182107c62ba6b80ded01e0}{IWM\_SF\_UNINIT}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05955}05955 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05956}05956         \textcolor{comment}{/* Init phy db */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05957}05957         sc-\/>\mbox{\hyperlink{structiwm__softc_ac6daddccbf33fd79ff087cb3a85b8d70}{sc\_phy\_db}} = \mbox{\hyperlink{if__iwm__phy__db_8c_ab5e3bc4faec266920a5c01a49c4be0ba}{iwm\_phy\_db\_init}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05958}05958         \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structiwm__softc_ac6daddccbf33fd79ff087cb3a85b8d70}{sc\_phy\_db}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05959}05959                 device\_printf(dev, \textcolor{stringliteral}{"{}Cannot init phy\_db\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05960}05960                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05961}05961         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05962}05962 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05963}05963         \textcolor{comment}{/* Set EBS as successful as long as not stated otherwise by the FW. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05964}05964         sc-\/>\mbox{\hyperlink{structiwm__softc_a818822ce44a62f90e3e43fbab1d7406a}{last\_ebs\_successful}} = TRUE;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05965}05965 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05966}05966         \textcolor{comment}{/* PCI attach */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05967}05967         error = \mbox{\hyperlink{if__iwm_8c_a3731caa474cb1beab8ba92535c4fc931}{iwm\_pci\_attach}}(dev);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05968}05968         \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05969}05969                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05970}05970 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05971}05971         sc-\/>\mbox{\hyperlink{structiwm__softc_a504d9e1f17037219000d3eb5cc66b2f6}{sc\_wantresp}} = -\/1;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05972}05972 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05973}05973         sc-\/>\mbox{\hyperlink{structiwm__softc_a3295cd838b011f3f4c2d3a202a822c2f}{sc\_hw\_rev}} = \mbox{\hyperlink{if__iwmreg_8h_a13e3589622c101bf4b40c82beccd732a}{IWM\_READ}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a7f3801f1261d3d609e1f76deaf2d80b6}{IWM\_CSR\_HW\_REV}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05974}05974         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05975}05975 \textcolor{comment}{         * In the 8000 HW family the format of the 4 bytes of CSR\_HW\_REV have}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05976}05976 \textcolor{comment}{         * changed, and now the revision step also includes bit 0-\/1 (no more}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05977}05977 \textcolor{comment}{         * "{}dash"{} value). To keep hw\_rev backwards compatible -\/ we'll store it}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05978}05978 \textcolor{comment}{         * in the old format.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05979}05979 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05980}05980         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}}-\/>\mbox{\hyperlink{structiwm__cfg_a9b399704eeb3c9299fe79ff7ebf0b3c3}{device\_family}} >= \mbox{\hyperlink{if__iwm__config_8h_a134dc690a22b13281e655ce3d4944141aece09942e3ab8587f2bbd9f34f47af41}{IWM\_DEVICE\_FAMILY\_8000}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05981}05981                 \textcolor{keywordtype}{int} ret;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05982}05982                 uint32\_t hw\_step;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05983}05983 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05984}05984                 sc-\/>\mbox{\hyperlink{structiwm__softc_a3295cd838b011f3f4c2d3a202a822c2f}{sc\_hw\_rev}} = (sc-\/>\mbox{\hyperlink{structiwm__softc_a3295cd838b011f3f4c2d3a202a822c2f}{sc\_hw\_rev}} \& 0xfff0) |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05985}05985                                 (\mbox{\hyperlink{if__iwmreg_8h_a2e2af463b48ba306a871ae832069379c}{IWM\_CSR\_HW\_REV\_STEP}}(sc-\/>\mbox{\hyperlink{structiwm__softc_a3295cd838b011f3f4c2d3a202a822c2f}{sc\_hw\_rev}} << 2) << 2);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05986}05986 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05987}05987                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__iwm__pcie__trans_8c_a8bc352da3a8f4e59a937ffedc4c9e447}{iwm\_prepare\_card\_hw}}(sc) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05988}05988                         device\_printf(dev, \textcolor{stringliteral}{"{}could not initialize hardware\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05989}05989                         \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05990}05990                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05991}05991 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05992}05992                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05993}05993 \textcolor{comment}{                 * In order to recognize C step the driver should read the}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05994}05994 \textcolor{comment}{                 * chip version id located at the AUX bus MISC address.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05995}05995 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05996}05996                 \mbox{\hyperlink{if__iwmreg_8h_a269244e193104ab3ba0e8de508ebfc8f}{IWM\_SETBITS}}(sc, \mbox{\hyperlink{if__iwmreg_8h_aa913001b33fb91b79d483dc53c1e3622}{IWM\_CSR\_GP\_CNTRL}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05997}05997                             \mbox{\hyperlink{if__iwmreg_8h_aaf220efd6b11003e0b994ec630c13b47}{IWM\_CSR\_GP\_CNTRL\_REG\_FLAG\_INIT\_DONE}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05998}05998                 DELAY(2);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l05999}05999 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06000}06000                 ret = \mbox{\hyperlink{if__iwm__pcie__trans_8c_ac603e187bd63c2957365392b9bb30f34}{iwm\_poll\_bit}}(sc, \mbox{\hyperlink{if__iwmreg_8h_aa913001b33fb91b79d483dc53c1e3622}{IWM\_CSR\_GP\_CNTRL}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06001}06001                                    \mbox{\hyperlink{if__iwmreg_8h_a30158d99ff2d74e8b78f2702a37209c1}{IWM\_CSR\_GP\_CNTRL\_REG\_FLAG\_MAC\_CLOCK\_READY}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06002}06002                                    \mbox{\hyperlink{if__iwmreg_8h_a30158d99ff2d74e8b78f2702a37209c1}{IWM\_CSR\_GP\_CNTRL\_REG\_FLAG\_MAC\_CLOCK\_READY}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06003}06003                                    25000);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06004}06004                 \textcolor{keywordflow}{if} (!ret) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06005}06005                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06006}06006                             \textcolor{stringliteral}{"{}Failed to wake up the nic\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06007}06007                         \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06008}06008                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06009}06009 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06010}06010                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__iwm__pcie__trans_8c_a895bbe6909b405cde9df9bd57ec51fdb}{iwm\_nic\_lock}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06011}06011                         hw\_step = \mbox{\hyperlink{if__iwm__pcie__trans_8c_a635add69da3722c9c5c8c8e88a910214}{iwm\_read\_prph}}(sc, \mbox{\hyperlink{if__iwmreg_8h_ad2d92b5493fb22b473da3b4c94903e0c}{IWM\_WFPM\_CTRL\_REG}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06012}06012                         hw\_step |= \mbox{\hyperlink{if__iwmreg_8h_af5421af937a5bd3d877536ce652a50ae}{IWM\_ENABLE\_WFPM}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06013}06013                         \mbox{\hyperlink{if__iwm__pcie__trans_8c_ae575f08e5baf2f0f63c629f690b03704}{iwm\_write\_prph}}(sc, \mbox{\hyperlink{if__iwmreg_8h_ad2d92b5493fb22b473da3b4c94903e0c}{IWM\_WFPM\_CTRL\_REG}}, hw\_step);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06014}06014                         hw\_step = \mbox{\hyperlink{if__iwm__pcie__trans_8c_a635add69da3722c9c5c8c8e88a910214}{iwm\_read\_prph}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a72566e63a7359393d1dc9bdf50e851f2}{IWM\_AUX\_MISC\_REG}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06015}06015                         hw\_step = (hw\_step >> \mbox{\hyperlink{if__iwmreg_8h_a5768338f972384e6506d4e44184a2ac9}{IWM\_HW\_STEP\_LOCATION\_BITS}}) \& 0xF;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06016}06016                         \textcolor{keywordflow}{if} (hw\_step == 0x3)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06017}06017                                 sc-\/>\mbox{\hyperlink{structiwm__softc_a3295cd838b011f3f4c2d3a202a822c2f}{sc\_hw\_rev}} = (sc-\/>\mbox{\hyperlink{structiwm__softc_a3295cd838b011f3f4c2d3a202a822c2f}{sc\_hw\_rev}} \& 0xFFFFFFF3) |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06018}06018                                                 (\mbox{\hyperlink{if__iwmreg_8h_adf764cbdea00d65edcd07bb9953ad2b7aa6cb913a7f8f9f74a6a1b1fb0212ea1d}{IWM\_SILICON\_C\_STEP}} << 2);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06019}06019                         \mbox{\hyperlink{if__iwm__pcie__trans_8c_a957b9219e85be1d4043332426844cb2f}{iwm\_nic\_unlock}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06020}06020                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06021}06021                         device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}Failed to lock the nic\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06022}06022                         \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06023}06023                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06024}06024         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06025}06025 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06026}06026         \textcolor{comment}{/* special-\/case 7265D, it has the same PCI IDs. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06027}06027         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}} == \&\mbox{\hyperlink{if__iwm__7000_8c_a37496b7fc2d7cd39862b3877fbb9b576}{iwm7265\_cfg}} \&\&}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06028}06028             (sc-\/>\mbox{\hyperlink{structiwm__softc_a3295cd838b011f3f4c2d3a202a822c2f}{sc\_hw\_rev}} \& \mbox{\hyperlink{if__iwmreg_8h_a22d3aef7039ba646fc1bf36de1358278}{IWM\_CSR\_HW\_REV\_TYPE\_MSK}}) == \mbox{\hyperlink{if__iwmreg_8h_ad2b390cb407774c4fca87854bf7e77b1}{IWM\_CSR\_HW\_REV\_TYPE\_7265D}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06029}06029                 sc-\/>\mbox{\hyperlink{structiwm__softc_abc5c2afc6712100ee1cd53db27be3d2e}{cfg}} = \&\mbox{\hyperlink{if__iwm__7000_8c_a562cebe310260fbc43889289832b264b}{iwm7265d\_cfg}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06030}06030         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06031}06031 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06032}06032         \textcolor{comment}{/* Allocate DMA memory for firmware transfers. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06033}06033         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{if__iwm_8c_abc6a2ead1ec4392eb977fc0527508c61}{iwm\_alloc\_fwmem}}(sc)) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06034}06034                 device\_printf(dev, \textcolor{stringliteral}{"{}could not allocate memory for firmware\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06035}06035                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06036}06036         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06037}06037 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06038}06038         \textcolor{comment}{/* Allocate "{}Keep Warm"{} page. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06039}06039         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{if__iwm_8c_a66531537a35a621f7fe512cba4fe8745}{iwm\_alloc\_kw}}(sc)) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06040}06040                 device\_printf(dev, \textcolor{stringliteral}{"{}could not allocate keep warm page\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06041}06041                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06042}06042         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06043}06043 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06044}06044         \textcolor{comment}{/* We use ICT interrupts */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06045}06045         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{if__iwm_8c_aadde24498e3d6555932cffc675f77dea}{iwm\_alloc\_ict}}(sc)) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06046}06046                 device\_printf(dev, \textcolor{stringliteral}{"{}could not allocate ICT table\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06047}06047                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06048}06048         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06049}06049 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06050}06050         \textcolor{comment}{/* Allocate TX scheduler "{}rings"{}. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06051}06051         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{if__iwm_8c_addf1dfe4ed569a7f6e99875488de7f59}{iwm\_alloc\_sched}}(sc)) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06052}06052                 device\_printf(dev, \textcolor{stringliteral}{"{}could not allocate TX scheduler rings\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06053}06053                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06054}06054         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06055}06055 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06056}06056         \textcolor{comment}{/* Allocate TX rings */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06057}06057         \textcolor{keywordflow}{for} (txq\_i = 0; txq\_i < nitems(sc-\/>\mbox{\hyperlink{structiwm__softc_a9580b1b4fe19ddaa7f8e8b987dc92f8b}{txq}}); txq\_i++) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06058}06058                 \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{if__iwm_8c_abaa72bdf83eb87f2a8bdecbc75936584}{iwm\_alloc\_tx\_ring}}(sc,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06059}06059                     \&sc-\/>\mbox{\hyperlink{structiwm__softc_a9580b1b4fe19ddaa7f8e8b987dc92f8b}{txq}}[txq\_i], txq\_i)) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06060}06060                         device\_printf(dev,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06061}06061                             \textcolor{stringliteral}{"{}could not allocate TX ring \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06062}06062                             txq\_i);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06063}06063                         \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06064}06064                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06065}06065         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06066}06066 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06067}06067         \textcolor{comment}{/* Allocate RX ring. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06068}06068         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{if__iwm_8c_a02cd867ea7efb2fbf81da7dd3dbe7b05}{iwm\_alloc\_rx\_ring}}(sc, \&sc-\/>\mbox{\hyperlink{structiwm__softc_a57cdc0da9cdb3a68e4f55cc47c3a3aed}{rxq}})) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06069}06069                 device\_printf(dev, \textcolor{stringliteral}{"{}could not allocate RX ring\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06070}06070                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06071}06071         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06072}06072 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06073}06073         \textcolor{comment}{/* Clear pending interrupts. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06074}06074         \mbox{\hyperlink{if__iwmreg_8h_a58035c794ff2fafcd25098a1359c0a87}{IWM\_WRITE}}(sc, \mbox{\hyperlink{if__iwmreg_8h_a12fe1fe92a4c101c7911cff12a0c08c6}{IWM\_CSR\_INT}}, 0xffffffff);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06075}06075 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06076}06076         ic-\/>ic\_softc = sc;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06077}06077         ic-\/>ic\_name = device\_get\_nameunit(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06078}06078         ic-\/>ic\_phytype = IEEE80211\_T\_OFDM;      \textcolor{comment}{/* not only, but not used */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06079}06079         ic-\/>ic\_opmode = IEEE80211\_M\_STA;        \textcolor{comment}{/* default to BSS mode */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06080}06080 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06081}06081         \textcolor{comment}{/* Set device capabilities. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06082}06082         ic-\/>ic\_caps =}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06083}06083             IEEE80211\_C\_STA |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06084}06084             IEEE80211\_C\_WPA |           \textcolor{comment}{/* WPA/RSN */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06085}06085             IEEE80211\_C\_WME |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06086}06086             IEEE80211\_C\_PMGT |}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06087}06087             IEEE80211\_C\_SHSLOT |        \textcolor{comment}{/* short slot time supported */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06088}06088             IEEE80211\_C\_SHPREAMBLE      \textcolor{comment}{/* short preamble supported */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06089}06089 \textcolor{comment}{//          IEEE80211\_C\_BGSCAN          /* capable of bg scanning */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06090}06090             ;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06091}06091         \textcolor{comment}{/* Advertise full-\/offload scanning */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06092}06092         ic-\/>ic\_flags\_ext = IEEE80211\_FEXT\_SCAN\_OFFLOAD;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06093}06093         \textcolor{keywordflow}{for} (i = 0; i < nitems(sc-\/>\mbox{\hyperlink{structiwm__softc_ab5b4db19ac74e24f6b96f22fb4fee594}{sc\_phyctxt}}); i++) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06094}06094                 sc-\/>\mbox{\hyperlink{structiwm__softc_ab5b4db19ac74e24f6b96f22fb4fee594}{sc\_phyctxt}}[i].\mbox{\hyperlink{structiwm__phy__ctxt_afc56bb654d1f6ab679d0a1b9e03ff7b2}{id}} = i;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06095}06095                 sc-\/>\mbox{\hyperlink{structiwm__softc_ab5b4db19ac74e24f6b96f22fb4fee594}{sc\_phyctxt}}[i].\mbox{\hyperlink{structiwm__phy__ctxt_ab6c61bac828cf7a77fcdc9c593c7d7f7}{color}} = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06096}06096                 sc-\/>\mbox{\hyperlink{structiwm__softc_ab5b4db19ac74e24f6b96f22fb4fee594}{sc\_phyctxt}}[i].\mbox{\hyperlink{structiwm__phy__ctxt_a529aa7853caa2bd2286c086dca31cbbc}{ref}} = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06097}06097                 sc-\/>\mbox{\hyperlink{structiwm__softc_ab5b4db19ac74e24f6b96f22fb4fee594}{sc\_phyctxt}}[i].\mbox{\hyperlink{structiwm__phy__ctxt_a4321c02af1bc00875a37ba2088193fe4}{channel}} = NULL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06098}06098         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06099}06099 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06100}06100         \textcolor{comment}{/* Default noise floor */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06101}06101         sc-\/>\mbox{\hyperlink{structiwm__softc_a520fec740062d903b9ab3ca21e420aa8}{sc\_noise}} = -\/96;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06102}06102 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06103}06103         \textcolor{comment}{/* Max RSSI */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06104}06104         sc-\/>\mbox{\hyperlink{structiwm__softc_a156773cfaeb56fa6fd5db1c88953b8c3}{sc\_max\_rssi}} = \mbox{\hyperlink{if__iwmreg_8h_a6ebe0051875d0b9784b18d843a91b1bf}{IWM\_MAX\_DBM}} -\/ \mbox{\hyperlink{if__iwmreg_8h_a98743e714d746ebf673e0aa6a3d20ab3}{IWM\_MIN\_DBM}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06105}06105 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06106}06106 \textcolor{preprocessor}{\#ifdef IWM\_DEBUG}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06107}06107         SYSCTL\_ADD\_INT(device\_get\_sysctl\_ctx(dev),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06108}06108             SYSCTL\_CHILDREN(device\_get\_sysctl\_tree(dev)), OID\_AUTO, \textcolor{stringliteral}{"{}debug"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06109}06109             CTLFLAG\_RW, \&sc-\/>\mbox{\hyperlink{structiwm__softc_afbff7bd86f31ce5fe7043c62d791cb48}{sc\_debug}}, 0, \textcolor{stringliteral}{"{}control debugging"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06110}06110 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06111}06111 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06112}06112         error = \mbox{\hyperlink{if__iwm_8c_ab18fcb1d8efa47c66392572d3aa6ccba}{iwm\_read\_firmware}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06113}06113         \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06114}06114                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06115}06115         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_a1028ec58bea1aeb56974087433df5092}{sc\_fw}}.\mbox{\hyperlink{structiwm__fw__info_a6e60199c0b9af7740442593ad3357e27}{fw\_fp}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06116}06116                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06117}06117 \textcolor{comment}{                 * XXX Add a solution for properly deferring firmware load}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06118}06118 \textcolor{comment}{                 *     during bootup.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06119}06119 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06120}06120                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06121}06121         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06122}06122                 sc-\/>\mbox{\hyperlink{structiwm__softc_ad88cc9e5ee0687f586d6c4760e015d83}{sc\_preinit\_hook}}.ich\_func = \mbox{\hyperlink{if__iwm_8c_ac3132cd5accd4c10b6f250884b8495dd}{iwm\_preinit}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06123}06123                 sc-\/>\mbox{\hyperlink{structiwm__softc_ad88cc9e5ee0687f586d6c4760e015d83}{sc\_preinit\_hook}}.ich\_arg = sc;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06124}06124                 \textcolor{keywordflow}{if} (config\_intrhook\_establish(\&sc-\/>\mbox{\hyperlink{structiwm__softc_ad88cc9e5ee0687f586d6c4760e015d83}{sc\_preinit\_hook}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06125}06125                         device\_printf(dev,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06126}06126                             \textcolor{stringliteral}{"{}config\_intrhook\_establish failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06127}06127                         \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06128}06128                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06129}06129         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06130}06130 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06131}06131         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_RESET | IWM\_DEBUG\_TRACE,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06132}06132             \textcolor{stringliteral}{"{}<-\/\%s\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06133}06133 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06134}06134         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06135}06135 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06136}06136         \textcolor{comment}{/* Free allocated memory if something failed during attachment. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06137}06137 fail:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06138}06138         \mbox{\hyperlink{if__iwm_8c_a7adce334c7f29c6e2de85ba57d1c804b}{iwm\_detach\_local}}(sc, 0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06139}06139 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06140}06140         \textcolor{keywordflow}{return} ENXIO;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06141}06141 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06142}06142 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06143}06143 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06144}\mbox{\hyperlink{if__iwm_8c_a94d559e1f6be77b9e5ff735e59ec57e3}{06144}} \mbox{\hyperlink{if__iwm_8c_a94d559e1f6be77b9e5ff735e59ec57e3}{iwm\_is\_valid\_ether\_addr}}(uint8\_t *addr)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06145}06145 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06146}06146         \textcolor{keywordtype}{char} zero\_addr[IEEE80211\_ADDR\_LEN] = \{ 0, 0, 0, 0, 0, 0 \};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06147}06147 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06148}06148         \textcolor{keywordflow}{if} ((addr[0] \& 1) || IEEE80211\_ADDR\_EQ(zero\_addr, addr))}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06149}06149                 \textcolor{keywordflow}{return} (FALSE);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06150}06150 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06151}06151         \textcolor{keywordflow}{return} (TRUE);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06152}06152 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06153}06153 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06154}06154 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06155}\mbox{\hyperlink{if__iwm_8c_a447ebecd9e8703857d53a2b672a74253}{06155}} \mbox{\hyperlink{if__iwm_8c_a447ebecd9e8703857d53a2b672a74253}{iwm\_wme\_update}}(\textcolor{keyword}{struct} ieee80211com *ic)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06156}06156 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06157}06157 \textcolor{preprocessor}{\#define IWM\_EXP2(x)     ((1 << (x)) -\/ 1)        }\textcolor{comment}{/* CWmin = 2\string^ECWmin -\/ 1 */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06158}06158         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06159}06159         \textcolor{keyword}{struct }chanAccParams chp;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06160}06160         \textcolor{keyword}{struct }ieee80211vap *vap = TAILQ\_FIRST(\&ic-\/>ic\_vaps);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06161}06161         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__vap}{iwm\_vap}} *ivp = \mbox{\hyperlink{if__iwmvar_8h_a411a4f289df166d363076401a075b455}{IWM\_VAP}}(vap);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06162}06162         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__node}{iwm\_node}} *in;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06163}06163         \textcolor{keyword}{struct }wmeParams tmp[WME\_NUM\_AC];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06164}06164         \textcolor{keywordtype}{int} aci, error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06165}06165 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06166}06166         \textcolor{keywordflow}{if} (vap == NULL)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06167}06167                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06168}06168 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06169}06169         ieee80211\_wme\_ic\_getparams(ic, \&chp);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06170}06170 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06171}06171         IEEE80211\_LOCK(ic);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06172}06172         \textcolor{keywordflow}{for} (aci = 0; aci < WME\_NUM\_AC; aci++)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06173}06173                 tmp[aci] = chp.cap\_wmeParams[aci];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06174}06174         IEEE80211\_UNLOCK(ic);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06175}06175 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06176}06176         \mbox{\hyperlink{if__iwmvar_8h_ac9f22c2982def9e764105396531c69be}{IWM\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06177}06177         \textcolor{keywordflow}{for} (aci = 0; aci < WME\_NUM\_AC; aci++) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06178}06178                 \textcolor{keyword}{const} \textcolor{keyword}{struct }wmeParams *ac = \&tmp[aci];}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06179}06179                 ivp-\/>\mbox{\hyperlink{structiwm__vap_acd6ca1de7c459528d271c717efcb60d2}{queue\_params}}[aci].\mbox{\hyperlink{structiwm__vap_a45f2be85339646edac801e7a60103b44}{aifsn}} = ac-\/>wmep\_aifsn;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06180}06180                 ivp-\/>\mbox{\hyperlink{structiwm__vap_acd6ca1de7c459528d271c717efcb60d2}{queue\_params}}[aci].\mbox{\hyperlink{structiwm__vap_a7deaa463218275a77848146b98d8840f}{cw\_min}} = \mbox{\hyperlink{if__iwm_8c_a499d1f1531f5e882e2028b49ccaaa112}{IWM\_EXP2}}(ac-\/>wmep\_logcwmin);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06181}06181                 ivp-\/>\mbox{\hyperlink{structiwm__vap_acd6ca1de7c459528d271c717efcb60d2}{queue\_params}}[aci].\mbox{\hyperlink{structiwm__vap_a761e6ac98d6c05a7115242c928fd3f79}{cw\_max}} = \mbox{\hyperlink{if__iwm_8c_a499d1f1531f5e882e2028b49ccaaa112}{IWM\_EXP2}}(ac-\/>wmep\_logcwmax);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06182}06182                 ivp-\/>\mbox{\hyperlink{structiwm__vap_acd6ca1de7c459528d271c717efcb60d2}{queue\_params}}[aci].\mbox{\hyperlink{structiwm__vap_a5fb8429dcf88988d8532761b727c6a64}{edca\_txop}} =}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06183}06183                     IEEE80211\_TXOP\_TO\_US(ac-\/>wmep\_txopLimit);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06184}06184         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06185}06185         ivp-\/>\mbox{\hyperlink{structiwm__vap_a3cdd99c17466991dee9a8b231879dfbb}{have\_wme}} = TRUE;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06186}06186         \textcolor{keywordflow}{if} (ivp-\/>\mbox{\hyperlink{structiwm__vap_acedd1a3b1b86b73619826502c2be182c}{is\_uploaded}} \&\& vap-\/>iv\_bss != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06187}06187                 in = \mbox{\hyperlink{if__iwmvar_8h_a371387d15226f5218ae8d2d2657934a5}{IWM\_NODE}}(vap-\/>iv\_bss);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06188}06188                 \textcolor{keywordflow}{if} (in-\/>\mbox{\hyperlink{structiwm__node_ab9c110e875f6b18efe62656d210592c0}{in\_assoc}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06189}06189                         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{if__iwm__mac__ctxt_8c_a881f62de0b699e2c3054da3e709f53a4}{iwm\_mac\_ctxt\_changed}}(sc, vap)) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06190}06190                                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06191}06191                                     \textcolor{stringliteral}{"{}\%s: failed to update MAC\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06192}06192                         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06193}06193                 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06194}06194         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06195}06195         \mbox{\hyperlink{if__iwmvar_8h_a2bc8b1196a564b1b70c11f96391760fa}{IWM\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06196}06196 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06197}06197         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06198}06198 \textcolor{preprocessor}{\#undef IWM\_EXP2}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06199}06199 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06200}06200 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06201}06201 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06202}\mbox{\hyperlink{if__iwm_8c_ac3132cd5accd4c10b6f250884b8495dd}{06202}} \mbox{\hyperlink{if__iwm_8c_ac3132cd5accd4c10b6f250884b8495dd}{iwm\_preinit}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06203}06203 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06204}06204         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc = arg;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06205}06205         device\_t dev = sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06206}06206         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structiwm__softc_ada8054beb1d93be79364f98ff3bfbaf2}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06207}06207         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06208}06208 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06209}06209         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_RESET | IWM\_DEBUG\_TRACE,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06210}06210             \textcolor{stringliteral}{"{}-\/>\%s\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06211}06211 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06212}06212         \mbox{\hyperlink{if__iwmvar_8h_ac9f22c2982def9e764105396531c69be}{IWM\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06213}06213         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{if__iwm__pcie__trans_8c_a7f32a846bb11060568ee96d3007ba18f}{iwm\_start\_hw}}(sc)) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06214}06214                 device\_printf(dev, \textcolor{stringliteral}{"{}could not initialize hardware\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06215}06215                 \mbox{\hyperlink{if__iwmvar_8h_a2bc8b1196a564b1b70c11f96391760fa}{IWM\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06216}06216                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06217}06217         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06218}06218 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06219}06219         error = \mbox{\hyperlink{if__iwm_8c_a11aec544b58ddec5ef1ca3278061f9c7}{iwm\_run\_init\_ucode}}(sc, 1);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06220}06220         \mbox{\hyperlink{if__iwm_8c_a0aac1aec10b3f7f3fdbec8d4252038c1}{iwm\_stop\_device}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06221}06221         \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06222}06222                 \mbox{\hyperlink{if__iwmvar_8h_a2bc8b1196a564b1b70c11f96391760fa}{IWM\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06223}06223                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06224}06224         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06225}06225         device\_printf(dev,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06226}06226             \textcolor{stringliteral}{"{}hw rev 0x\%x, fw ver \%s, address \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06227}06227             sc-\/>\mbox{\hyperlink{structiwm__softc_a3295cd838b011f3f4c2d3a202a822c2f}{sc\_hw\_rev}} \& \mbox{\hyperlink{if__iwmreg_8h_a22d3aef7039ba646fc1bf36de1358278}{IWM\_CSR\_HW\_REV\_TYPE\_MSK}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06228}06228             sc-\/>\mbox{\hyperlink{structiwm__softc_ac8f38643711c947e4ceeef62da6f8f63}{sc\_fwver}}, ether\_sprintf(sc-\/>\mbox{\hyperlink{structiwm__softc_ac65155777b4c999bcc3e2729733e3db8}{nvm\_data}}-\/>\mbox{\hyperlink{structiwm__nvm__data_ad38c6ea21c4bd56d1775ce7796d48699}{hw\_addr}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06229}06229 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06230}06230         \textcolor{comment}{/* not all hardware can do 5GHz band */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06231}06231         \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structiwm__softc_ac65155777b4c999bcc3e2729733e3db8}{nvm\_data}}-\/>\mbox{\hyperlink{structiwm__nvm__data_a6abdf11e5df91c715b86eb1c640185b0}{sku\_cap\_band\_52GHz\_enable}})}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06232}06232                 memset(\&ic-\/>ic\_sup\_rates[IEEE80211\_MODE\_11A], 0,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06233}06233                     \textcolor{keyword}{sizeof}(ic-\/>ic\_sup\_rates[IEEE80211\_MODE\_11A]));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06234}06234         \mbox{\hyperlink{if__iwmvar_8h_a2bc8b1196a564b1b70c11f96391760fa}{IWM\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06235}06235 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06236}06236         \mbox{\hyperlink{if__iwm_8c_adb1f59351443b35ffa01f4338a19f0e9}{iwm\_init\_channel\_map}}(ic, IEEE80211\_CHAN\_MAX, \&ic-\/>ic\_nchans,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06237}06237             ic-\/>ic\_channels);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06238}06238 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06239}06239         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06240}06240 \textcolor{comment}{         * At this point we've committed -\/ if we fail to do setup,}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06241}06241 \textcolor{comment}{         * we now also have to tear down the net80211 state.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06242}06242 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06243}06243         ieee80211\_ifattach(ic);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06244}06244         ic-\/>ic\_vap\_create = \mbox{\hyperlink{if__iwm_8c_abddc45cd91f738a92881c4653a237837}{iwm\_vap\_create}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06245}06245         ic-\/>ic\_vap\_delete = \mbox{\hyperlink{if__iwm_8c_a4de7dd4772edc03a630a592f2ae7faa6}{iwm\_vap\_delete}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06246}06246         ic-\/>ic\_raw\_xmit = \mbox{\hyperlink{if__iwm_8c_a0e58378103e84487e7ee8b5bc7f42f38}{iwm\_raw\_xmit}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06247}06247         ic-\/>ic\_node\_alloc = \mbox{\hyperlink{if__iwm_8c_a28d3e75328a677098089201db9922cd6}{iwm\_node\_alloc}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06248}06248         ic-\/>ic\_scan\_start = \mbox{\hyperlink{if__iwm_8c_a0717f67f8a510634dd723d9156e5c764}{iwm\_scan\_start}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06249}06249         ic-\/>ic\_scan\_end = \mbox{\hyperlink{if__iwm_8c_af93408767f794b4588c224c0cb086410}{iwm\_scan\_end}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06250}06250         ic-\/>ic\_update\_mcast = \mbox{\hyperlink{if__iwm_8c_ae40840b32f56ef4f02e75847f53f0052}{iwm\_update\_mcast}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06251}06251         ic-\/>ic\_getradiocaps = \mbox{\hyperlink{if__iwm_8c_adb1f59351443b35ffa01f4338a19f0e9}{iwm\_init\_channel\_map}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06252}06252         ic-\/>ic\_set\_channel = \mbox{\hyperlink{if__iwm_8c_ab3478e87ee460e350079b9aab948f128}{iwm\_set\_channel}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06253}06253         ic-\/>ic\_scan\_curchan = \mbox{\hyperlink{if__iwm_8c_a86f8ce5d67db48377a1afcbebbeba8ce}{iwm\_scan\_curchan}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06254}06254         ic-\/>ic\_scan\_mindwell = \mbox{\hyperlink{if__iwm_8c_a8684f7f9c2203601d0ce25c45ce61301}{iwm\_scan\_mindwell}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06255}06255         ic-\/>ic\_wme.wme\_update = \mbox{\hyperlink{if__iwm_8c_a447ebecd9e8703857d53a2b672a74253}{iwm\_wme\_update}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06256}06256         ic-\/>ic\_parent = \mbox{\hyperlink{if__iwm_8c_a72f5d3a3ce113c5610b38c9aa09232c9}{iwm\_parent}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06257}06257         ic-\/>ic\_transmit = \mbox{\hyperlink{if__iwm_8c_a0ab0f26da802dee19e492c3e0bca31e0}{iwm\_transmit}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06258}06258         \mbox{\hyperlink{if__iwm_8c_a7e13bcc1e97179f2592af29536f6cccb}{iwm\_radiotap\_attach}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06259}06259         \textcolor{keywordflow}{if} (bootverbose)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06260}06260                 ieee80211\_announce(ic);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06261}06261 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06262}06262         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_RESET | IWM\_DEBUG\_TRACE,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06263}06263             \textcolor{stringliteral}{"{}<-\/\%s\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06264}06264         config\_intrhook\_disestablish(\&sc-\/>\mbox{\hyperlink{structiwm__softc_ad88cc9e5ee0687f586d6c4760e015d83}{sc\_preinit\_hook}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06265}06265 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06266}06266         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06267}06267 fail:}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06268}06268         config\_intrhook\_disestablish(\&sc-\/>\mbox{\hyperlink{structiwm__softc_ad88cc9e5ee0687f586d6c4760e015d83}{sc\_preinit\_hook}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06269}06269         \mbox{\hyperlink{if__iwm_8c_a7adce334c7f29c6e2de85ba57d1c804b}{iwm\_detach\_local}}(sc, 0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06270}06270 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06271}06271 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06272}06272 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06273}06273 \textcolor{comment}{ * Attach the interface to 802.11 radiotap.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06274}06274 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06275}06275 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06276}\mbox{\hyperlink{if__iwm_8c_a7e13bcc1e97179f2592af29536f6cccb}{06276}} \mbox{\hyperlink{if__iwm_8c_a7e13bcc1e97179f2592af29536f6cccb}{iwm\_radiotap\_attach}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06277}06277 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06278}06278         \textcolor{keyword}{struct }ieee80211com *ic = \&sc-\/>\mbox{\hyperlink{structiwm__softc_ada8054beb1d93be79364f98ff3bfbaf2}{sc\_ic}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06279}06279 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06280}06280         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_RESET | IWM\_DEBUG\_TRACE,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06281}06281             \textcolor{stringliteral}{"{}-\/>\%s begin\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06282}06282         ieee80211\_radiotap\_attach(ic,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06283}06283             \&sc-\/>\mbox{\hyperlink{structiwm__softc_a0ec90ab0f4acd0aeb3ef0636b3ea6f94}{sc\_txtap}}.\mbox{\hyperlink{structiwm__tx__radiotap__header_ae421291ed5c57a73218608f9abaa8841}{wt\_ihdr}}, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structiwm__softc_a0ec90ab0f4acd0aeb3ef0636b3ea6f94}{sc\_txtap}}),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06284}06284                 \mbox{\hyperlink{if__iwmvar_8h_a124062eda6b2266b097c65f850445a2c}{IWM\_TX\_RADIOTAP\_PRESENT}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06285}06285             \&sc-\/>\mbox{\hyperlink{structiwm__softc_a9eaf3abdd84a4ff4dc3c8f2e92fc1d94}{sc\_rxtap}}.\mbox{\hyperlink{structiwm__rx__radiotap__header_ab9c192c47869bdca400bd6a4fbfd8da7}{wr\_ihdr}}, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structiwm__softc_a9eaf3abdd84a4ff4dc3c8f2e92fc1d94}{sc\_rxtap}}),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06286}06286                 \mbox{\hyperlink{if__iwmvar_8h_a058b2e272c484ec8dac31d8f1d6a14e6}{IWM\_RX\_RADIOTAP\_PRESENT}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06287}06287         \mbox{\hyperlink{if__iwm__debug_8h_a29c1a2fa126fde054bacb28c9a400b15}{IWM\_DPRINTF}}(sc, IWM\_DEBUG\_RESET | IWM\_DEBUG\_TRACE,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06288}06288             \textcolor{stringliteral}{"{}-\/>\%s end\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06289}06289 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06290}06290 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06291}06291 \textcolor{keyword}{static} \textcolor{keyword}{struct }ieee80211vap *}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06292}\mbox{\hyperlink{if__iwm_8c_abddc45cd91f738a92881c4653a237837}{06292}} \mbox{\hyperlink{if__iwm_8c_abddc45cd91f738a92881c4653a237837}{iwm\_vap\_create}}(\textcolor{keyword}{struct} ieee80211com *ic, \textcolor{keyword}{const} \textcolor{keywordtype}{char} name[IFNAMSIZ], \textcolor{keywordtype}{int} unit,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06293}06293     \textcolor{keyword}{enum} ieee80211\_opmode opmode, \textcolor{keywordtype}{int} flags,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06294}06294     \textcolor{keyword}{const} uint8\_t bssid[IEEE80211\_ADDR\_LEN],}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06295}06295     \textcolor{keyword}{const} uint8\_t mac[IEEE80211\_ADDR\_LEN])}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06296}06296 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06297}06297         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__vap}{iwm\_vap}} *ivp;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06298}06298         \textcolor{keyword}{struct }ieee80211vap *vap;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06299}06299 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06300}06300         \textcolor{keywordflow}{if} (!TAILQ\_EMPTY(\&ic-\/>ic\_vaps))         \textcolor{comment}{/* only one at a time */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06301}06301                 \textcolor{keywordflow}{return} NULL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06302}06302         ivp = malloc(\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__vap}{iwm\_vap}}), M\_80211\_VAP, M\_WAITOK | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06303}06303         vap = \&ivp-\/>\mbox{\hyperlink{structiwm__vap_a54967096ab20b2b8e2761265715b9ea3}{iv\_vap}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06304}06304         ieee80211\_vap\_setup(ic, vap, name, unit, opmode, flags, bssid);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06305}06305         vap-\/>iv\_bmissthreshold = 10;            \textcolor{comment}{/* override default */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06306}06306         \textcolor{comment}{/* Override with driver methods. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06307}06307         ivp-\/>\mbox{\hyperlink{structiwm__vap_ad2a4c767333707f044c9d4277a3f4720}{iv\_newstate}} = vap-\/>iv\_newstate;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06308}06308         vap-\/>iv\_newstate = \mbox{\hyperlink{if__iwm_8c_a2206679645aba97dcc6b5e5cec53c8b8}{iwm\_newstate}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06309}06309 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06310}06310         ivp-\/>\mbox{\hyperlink{structiwm__vap_a2234262ae3d82aa07e42e2ded7dd4b3d}{id}} = \mbox{\hyperlink{if__iwmvar_8h_a310800f909dbb0d9d56e902e802a91d2}{IWM\_DEFAULT\_MACID}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06311}06311         ivp-\/>\mbox{\hyperlink{structiwm__vap_a8fd08005daaeb6d3380e971641af3f21}{color}} = \mbox{\hyperlink{if__iwmvar_8h_a2e1be7a8dad45aa731cbf879da300d0a}{IWM\_DEFAULT\_COLOR}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06312}06312 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06313}06313         ivp-\/>\mbox{\hyperlink{structiwm__vap_a3cdd99c17466991dee9a8b231879dfbb}{have\_wme}} = FALSE;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06314}06314         ivp-\/>\mbox{\hyperlink{structiwm__vap_abb2b681c49dadd24f29fa56164fb79f0}{ps\_disabled}} = FALSE;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06315}06315 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06316}06316         ieee80211\_ratectl\_init(vap);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06317}06317         \textcolor{comment}{/* Complete setup. */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06318}06318         ieee80211\_vap\_attach(vap, ieee80211\_media\_change,}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06319}06319             ieee80211\_media\_status, mac);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06320}06320         ic-\/>ic\_opmode = opmode;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06321}06321 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06322}06322         \textcolor{keywordflow}{return} vap;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06323}06323 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06324}06324 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06325}06325 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06326}\mbox{\hyperlink{if__iwm_8c_a4de7dd4772edc03a630a592f2ae7faa6}{06326}} \mbox{\hyperlink{if__iwm_8c_a4de7dd4772edc03a630a592f2ae7faa6}{iwm\_vap\_delete}}(\textcolor{keyword}{struct} ieee80211vap *vap)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06327}06327 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06328}06328         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__vap}{iwm\_vap}} *ivp = \mbox{\hyperlink{if__iwmvar_8h_a411a4f289df166d363076401a075b455}{IWM\_VAP}}(vap);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06329}06329 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06330}06330         ieee80211\_ratectl\_deinit(vap);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06331}06331         ieee80211\_vap\_detach(vap);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06332}06332         free(ivp, M\_80211\_VAP);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06333}06333 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06334}06334 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06335}06335 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06336}\mbox{\hyperlink{if__iwm_8c_a7bae0f1004518a3ebc5c68b50a2e02b8}{06336}} \mbox{\hyperlink{if__iwm_8c_a7bae0f1004518a3ebc5c68b50a2e02b8}{iwm\_xmit\_queue\_drain}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06337}06337 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06338}06338         \textcolor{keyword}{struct }mbuf *m;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06339}06339         \textcolor{keyword}{struct }ieee80211\_node *ni;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06340}06340 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06341}06341         \textcolor{keywordflow}{while} ((m = mbufq\_dequeue(\&sc-\/>\mbox{\hyperlink{structiwm__softc_a135aafeef98b9fd92696efaa14730e5f}{sc\_snd}})) != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06342}06342                 ni = (\textcolor{keyword}{struct }ieee80211\_node *)m-\/>m\_pkthdr.rcvif;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06343}06343                 ieee80211\_free\_node(ni);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06344}06344                 m\_freem(m);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06345}06345         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06346}06346 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06347}06347 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06348}06348 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06349}\mbox{\hyperlink{if__iwm_8c_a0717f67f8a510634dd723d9156e5c764}{06349}} \mbox{\hyperlink{if__iwm_8c_a0717f67f8a510634dd723d9156e5c764}{iwm\_scan\_start}}(\textcolor{keyword}{struct} ieee80211com *ic)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06350}06350 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06351}06351         \textcolor{keyword}{struct }ieee80211vap *vap = TAILQ\_FIRST(\&ic-\/>ic\_vaps);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06352}06352         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06353}06353         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06354}06354 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06355}06355         \mbox{\hyperlink{if__iwmvar_8h_ac9f22c2982def9e764105396531c69be}{IWM\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06356}06356         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_a67d7ea2a1eef39c9ca65e86178e54766}{sc\_flags}} \& \mbox{\hyperlink{if__iwmvar_8h_ad21a28e9ab6945204f4b4ee7f9e1b0ac}{IWM\_FLAG\_SCAN\_RUNNING}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06357}06357                 \textcolor{comment}{/* This should not be possible */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06358}06358                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06359}06359                     \textcolor{stringliteral}{"{}\%s: Previous scan not completed yet\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06360}06360         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06361}06361         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__iwmvar_8h_a9d312dee2db5d5033a7d062bb001203b}{iwm\_fw\_has\_capa}}(sc, \mbox{\hyperlink{if__iwmreg_8h_aa724f16782d7772095512ce6f824caa1}{IWM\_UCODE\_TLV\_CAPA\_UMAC\_SCAN}}))}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06362}06362                 error = \mbox{\hyperlink{if__iwm__scan_8c_a450b6a6c3efcf315c043a7b7f1903bf1}{iwm\_umac\_scan}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06363}06363         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06364}06364                 error = \mbox{\hyperlink{if__iwm__scan_8c_adb51edcfdb9390303496050c133febbe}{iwm\_lmac\_scan}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06365}06365         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06366}06366                 device\_printf(sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}}, \textcolor{stringliteral}{"{}could not initiate scan\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06367}06367                 \mbox{\hyperlink{if__iwmvar_8h_a2bc8b1196a564b1b70c11f96391760fa}{IWM\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06368}06368                 ieee80211\_cancel\_scan(vap);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06369}06369         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06370}06370                 sc-\/>\mbox{\hyperlink{structiwm__softc_a67d7ea2a1eef39c9ca65e86178e54766}{sc\_flags}} |= \mbox{\hyperlink{if__iwmvar_8h_ad21a28e9ab6945204f4b4ee7f9e1b0ac}{IWM\_FLAG\_SCAN\_RUNNING}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06371}06371                 \mbox{\hyperlink{if__iwm__led_8c_ae3004b24eecb5d8ff4407ecafffa237d}{iwm\_led\_blink\_start}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06372}06372                 \mbox{\hyperlink{if__iwmvar_8h_a2bc8b1196a564b1b70c11f96391760fa}{IWM\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06373}06373         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06374}06374 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06375}06375 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06376}06376 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06377}\mbox{\hyperlink{if__iwm_8c_af93408767f794b4588c224c0cb086410}{06377}} \mbox{\hyperlink{if__iwm_8c_af93408767f794b4588c224c0cb086410}{iwm\_scan\_end}}(\textcolor{keyword}{struct} ieee80211com *ic)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06378}06378 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06379}06379         \textcolor{keyword}{struct }ieee80211vap *vap = TAILQ\_FIRST(\&ic-\/>ic\_vaps);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06380}06380         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc = ic-\/>ic\_softc;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06381}06381 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06382}06382         \mbox{\hyperlink{if__iwmvar_8h_ac9f22c2982def9e764105396531c69be}{IWM\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06383}06383         \mbox{\hyperlink{if__iwm__led_8c_a7090420ddea7b70667572a5fcf036268}{iwm\_led\_blink\_stop}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06384}06384         \textcolor{keywordflow}{if} (vap-\/>iv\_state == IEEE80211\_S\_RUN)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06385}06385                 \mbox{\hyperlink{if__iwm__led_8c_a2b23e16d04ca04e146af40e3742f8e1e}{iwm\_led\_enable}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06386}06386         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_a67d7ea2a1eef39c9ca65e86178e54766}{sc\_flags}} \& \mbox{\hyperlink{if__iwmvar_8h_ad21a28e9ab6945204f4b4ee7f9e1b0ac}{IWM\_FLAG\_SCAN\_RUNNING}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06387}06387                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06388}06388 \textcolor{comment}{                 * Removing IWM\_FLAG\_SCAN\_RUNNING now, is fine because}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06389}06389 \textcolor{comment}{                 * both iwm\_scan\_end and iwm\_scan\_start run in the ic-\/>ic\_tq}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06390}06390 \textcolor{comment}{                 * taskqueue.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06391}06391 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06392}06392                 sc-\/>\mbox{\hyperlink{structiwm__softc_a67d7ea2a1eef39c9ca65e86178e54766}{sc\_flags}} \&= \string~IWM\_FLAG\_SCAN\_RUNNING;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06393}06393                 \mbox{\hyperlink{if__iwm__scan_8c_af86d78c32083a282e41a3d34c88efa15}{iwm\_scan\_stop\_wait}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06394}06394         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06395}06395         \mbox{\hyperlink{if__iwmvar_8h_a2bc8b1196a564b1b70c11f96391760fa}{IWM\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06396}06396 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06397}06397         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06398}06398 \textcolor{comment}{         * Make sure we don't race, if sc\_es\_task is still enqueued here.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06399}06399 \textcolor{comment}{         * This is to make sure that it won't call ieee80211\_scan\_done}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06400}06400 \textcolor{comment}{         * when we have already started the next scan.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06401}06401 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06402}06402         taskqueue\_cancel(ic-\/>ic\_tq, \&sc-\/>\mbox{\hyperlink{structiwm__softc_ab07424b6011a1ca6f3a1723d2b7e6317}{sc\_es\_task}}, NULL);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06403}06403 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06404}06404 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06405}06405 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06406}\mbox{\hyperlink{if__iwm_8c_ae40840b32f56ef4f02e75847f53f0052}{06406}} \mbox{\hyperlink{if__iwm_8c_ae40840b32f56ef4f02e75847f53f0052}{iwm\_update\_mcast}}(\textcolor{keyword}{struct} ieee80211com *ic)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06407}06407 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06408}06408 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06409}06409 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06410}06410 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06411}\mbox{\hyperlink{if__iwm_8c_ab3478e87ee460e350079b9aab948f128}{06411}} \mbox{\hyperlink{if__iwm_8c_ab3478e87ee460e350079b9aab948f128}{iwm\_set\_channel}}(\textcolor{keyword}{struct} ieee80211com *ic)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06412}06412 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06413}06413 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06414}06414 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06415}06415 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06416}\mbox{\hyperlink{if__iwm_8c_a86f8ce5d67db48377a1afcbebbeba8ce}{06416}} \mbox{\hyperlink{if__iwm_8c_a86f8ce5d67db48377a1afcbebbeba8ce}{iwm\_scan\_curchan}}(\textcolor{keyword}{struct} ieee80211\_scan\_state *ss, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} maxdwell)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06417}06417 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06418}06418 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06419}06419 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06420}06420 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06421}\mbox{\hyperlink{if__iwm_8c_a8684f7f9c2203601d0ce25c45ce61301}{06421}} \mbox{\hyperlink{if__iwm_8c_a8684f7f9c2203601d0ce25c45ce61301}{iwm\_scan\_mindwell}}(\textcolor{keyword}{struct} ieee80211\_scan\_state *ss)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06422}06422 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06423}06423 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06424}06424 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06425}06425 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06426}\mbox{\hyperlink{if__iwm_8c_a944d38d5270267ff969a621263677959}{06426}} \mbox{\hyperlink{if__iwm_8c_a944d38d5270267ff969a621263677959}{iwm\_init\_task}}(\textcolor{keywordtype}{void} *arg1)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06427}06427 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06428}06428         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc = arg1;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06429}06429 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06430}06430         \mbox{\hyperlink{if__iwmvar_8h_ac9f22c2982def9e764105396531c69be}{IWM\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06431}06431         \textcolor{keywordflow}{while} (sc-\/>\mbox{\hyperlink{structiwm__softc_a67d7ea2a1eef39c9ca65e86178e54766}{sc\_flags}} \& \mbox{\hyperlink{if__iwmvar_8h_af8486cbfd793ce39dac4294380df3ec7}{IWM\_FLAG\_BUSY}})}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06432}06432                 msleep(\&sc-\/>\mbox{\hyperlink{structiwm__softc_a67d7ea2a1eef39c9ca65e86178e54766}{sc\_flags}}, \&sc-\/>\mbox{\hyperlink{structiwm__softc_a6a2cf8481612bafdb1f80b84a331488b}{sc\_mtx}}, 0, \textcolor{stringliteral}{"{}iwmpwr"{}}, 0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06433}06433         sc-\/>\mbox{\hyperlink{structiwm__softc_a67d7ea2a1eef39c9ca65e86178e54766}{sc\_flags}} |= \mbox{\hyperlink{if__iwmvar_8h_af8486cbfd793ce39dac4294380df3ec7}{IWM\_FLAG\_BUSY}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06434}06434         \mbox{\hyperlink{if__iwm_8c_a0825fe7959f3d4f96a3435079bd1b37d}{iwm\_stop}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06435}06435         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_ada8054beb1d93be79364f98ff3bfbaf2}{sc\_ic}}.ic\_nrunning > 0)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06436}06436                 \mbox{\hyperlink{if__iwm_8c_a2f1740409045c3379d208637e549985c}{iwm\_init}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06437}06437         sc-\/>\mbox{\hyperlink{structiwm__softc_a67d7ea2a1eef39c9ca65e86178e54766}{sc\_flags}} \&= \string~IWM\_FLAG\_BUSY;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06438}06438         wakeup(\&sc-\/>\mbox{\hyperlink{structiwm__softc_a67d7ea2a1eef39c9ca65e86178e54766}{sc\_flags}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06439}06439         \mbox{\hyperlink{if__iwmvar_8h_a2bc8b1196a564b1b70c11f96391760fa}{IWM\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06440}06440 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06441}06441 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06442}06442 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06443}\mbox{\hyperlink{if__iwm_8c_aced727b8b8ce817f845b39646def2c3c}{06443}} \mbox{\hyperlink{if__iwm_8c_aced727b8b8ce817f845b39646def2c3c}{iwm\_resume}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06444}06444 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06445}06445         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06446}06446         \textcolor{keywordtype}{int} do\_reinit = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06447}06447 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06448}06448         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06449}06449 \textcolor{comment}{         * We disable the RETRY\_TIMEOUT register (0x41) to keep}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06450}06450 \textcolor{comment}{         * PCI Tx retries from interfering with C3 CPU state.}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06451}06451 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06452}06452         pci\_write\_config(dev, \mbox{\hyperlink{if__iwm_8c_ac82851a410cab77b68871bfc4f676744}{PCI\_CFG\_RETRY\_TIMEOUT}}, 0x00, 1);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06453}06453 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06454}06454         \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structiwm__softc_a7e78e57794efb601b6511067e5848350}{sc\_attached}})}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06455}06455                 \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06456}06456 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06457}06457         \mbox{\hyperlink{if__iwm_8c_a944d38d5270267ff969a621263677959}{iwm\_init\_task}}(device\_get\_softc(dev));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06458}06458 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06459}06459         \mbox{\hyperlink{if__iwmvar_8h_ac9f22c2982def9e764105396531c69be}{IWM\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06460}06460         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_a67d7ea2a1eef39c9ca65e86178e54766}{sc\_flags}} \& \mbox{\hyperlink{if__iwmvar_8h_a1301d5d958e05b8a7338b3b2ff2da08c}{IWM\_FLAG\_SCANNING}}) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06461}06461                 sc-\/>\mbox{\hyperlink{structiwm__softc_a67d7ea2a1eef39c9ca65e86178e54766}{sc\_flags}} \&= \string~IWM\_FLAG\_SCANNING;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06462}06462                 do\_reinit = 1;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06463}06463         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06464}06464         \mbox{\hyperlink{if__iwmvar_8h_a2bc8b1196a564b1b70c11f96391760fa}{IWM\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06465}06465 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06466}06466         \textcolor{keywordflow}{if} (do\_reinit)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06467}06467                 ieee80211\_resume\_all(\&sc-\/>\mbox{\hyperlink{structiwm__softc_ada8054beb1d93be79364f98ff3bfbaf2}{sc\_ic}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06468}06468 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06469}06469         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06470}06470 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06471}06471 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06472}06472 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06473}\mbox{\hyperlink{if__iwm_8c_a4ae7b1f572c7172e724a7ea58bee8c52}{06473}} \mbox{\hyperlink{if__iwm_8c_a4ae7b1f572c7172e724a7ea58bee8c52}{iwm\_suspend}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06474}06474 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06475}06475         \textcolor{keywordtype}{int} do\_stop = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06476}06476         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06477}06477 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06478}06478         do\_stop = !! (sc-\/>\mbox{\hyperlink{structiwm__softc_ada8054beb1d93be79364f98ff3bfbaf2}{sc\_ic}}.ic\_nrunning > 0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06479}06479 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06480}06480         \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structiwm__softc_a7e78e57794efb601b6511067e5848350}{sc\_attached}})}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06481}06481                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06482}06482 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06483}06483         ieee80211\_suspend\_all(\&sc-\/>\mbox{\hyperlink{structiwm__softc_ada8054beb1d93be79364f98ff3bfbaf2}{sc\_ic}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06484}06484 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06485}06485         \textcolor{keywordflow}{if} (do\_stop) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06486}06486                 \mbox{\hyperlink{if__iwmvar_8h_ac9f22c2982def9e764105396531c69be}{IWM\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06487}06487                 \mbox{\hyperlink{if__iwm_8c_a0825fe7959f3d4f96a3435079bd1b37d}{iwm\_stop}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06488}06488                 sc-\/>\mbox{\hyperlink{structiwm__softc_a67d7ea2a1eef39c9ca65e86178e54766}{sc\_flags}} |= \mbox{\hyperlink{if__iwmvar_8h_a1301d5d958e05b8a7338b3b2ff2da08c}{IWM\_FLAG\_SCANNING}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06489}06489                 \mbox{\hyperlink{if__iwmvar_8h_a2bc8b1196a564b1b70c11f96391760fa}{IWM\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06490}06490         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06491}06491 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06492}06492         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06493}06493 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06494}06494 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06495}06495 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06496}\mbox{\hyperlink{if__iwm_8c_a7adce334c7f29c6e2de85ba57d1c804b}{06496}} \mbox{\hyperlink{if__iwm_8c_a7adce334c7f29c6e2de85ba57d1c804b}{iwm\_detach\_local}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc, \textcolor{keywordtype}{int} do\_net80211)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06497}06497 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06498}06498         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__fw__info}{iwm\_fw\_info}} *fw = \&sc-\/>\mbox{\hyperlink{structiwm__softc_a1028ec58bea1aeb56974087433df5092}{sc\_fw}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06499}06499         device\_t dev = sc-\/>\mbox{\hyperlink{structiwm__softc_a7eb6d9ddec0e257ff6ce27f3b61481cd}{sc\_dev}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06500}06500         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06501}06501 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06502}06502         \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structiwm__softc_a7e78e57794efb601b6511067e5848350}{sc\_attached}})}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06503}06503                 \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06504}06504         sc-\/>\mbox{\hyperlink{structiwm__softc_a7e78e57794efb601b6511067e5848350}{sc\_attached}} = 0;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06505}06505         \textcolor{keywordflow}{if} (do\_net80211) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06506}06506                 ieee80211\_draintask(\&sc-\/>\mbox{\hyperlink{structiwm__softc_ada8054beb1d93be79364f98ff3bfbaf2}{sc\_ic}}, \&sc-\/>\mbox{\hyperlink{structiwm__softc_ab07424b6011a1ca6f3a1723d2b7e6317}{sc\_es\_task}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06507}06507         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06508}06508         \mbox{\hyperlink{if__iwm_8c_a0aac1aec10b3f7f3fdbec8d4252038c1}{iwm\_stop\_device}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06509}06509         taskqueue\_drain\_all(sc-\/>\mbox{\hyperlink{structiwm__softc_a3e8d63b3935f7502ced829aaeafa4cf2}{sc\_tq}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06510}06510         taskqueue\_free(sc-\/>\mbox{\hyperlink{structiwm__softc_a3e8d63b3935f7502ced829aaeafa4cf2}{sc\_tq}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06511}06511         \textcolor{keywordflow}{if} (do\_net80211) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06512}06512                 \mbox{\hyperlink{if__iwmvar_8h_ac9f22c2982def9e764105396531c69be}{IWM\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06513}06513                 \mbox{\hyperlink{if__iwm_8c_a7bae0f1004518a3ebc5c68b50a2e02b8}{iwm\_xmit\_queue\_drain}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06514}06514                 \mbox{\hyperlink{if__iwmvar_8h_a2bc8b1196a564b1b70c11f96391760fa}{IWM\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06515}06515                 ieee80211\_ifdetach(\&sc-\/>\mbox{\hyperlink{structiwm__softc_ada8054beb1d93be79364f98ff3bfbaf2}{sc\_ic}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06516}06516         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06517}06517         callout\_drain(\&sc-\/>\mbox{\hyperlink{structiwm__softc_af8c6fc922da0b733a0931a53adfeb6f1}{sc\_led\_blink\_to}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06518}06518         callout\_drain(\&sc-\/>\mbox{\hyperlink{structiwm__softc_aa23512c0249b8a3513d3ec43f828bd39}{sc\_watchdog\_to}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06519}06519 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06520}06520         \mbox{\hyperlink{if__iwm__phy__db_8c_a4860ebe0d69ed68093f252488b26f3bb}{iwm\_phy\_db\_free}}(sc-\/>\mbox{\hyperlink{structiwm__softc_ac6daddccbf33fd79ff087cb3a85b8d70}{sc\_phy\_db}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06521}06521         sc-\/>\mbox{\hyperlink{structiwm__softc_ac6daddccbf33fd79ff087cb3a85b8d70}{sc\_phy\_db}} = NULL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06522}06522 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06523}06523         \mbox{\hyperlink{if__iwm_8c_a17cd82bde37907ca80043250f10ce685}{iwm\_free\_nvm\_data}}(sc-\/>\mbox{\hyperlink{structiwm__softc_ac65155777b4c999bcc3e2729733e3db8}{nvm\_data}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06524}06524 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06525}06525         \textcolor{comment}{/* Free descriptor rings */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06526}06526         \mbox{\hyperlink{if__iwm_8c_a7d14cc5376b851393a6a02fe72a4242f}{iwm\_free\_rx\_ring}}(sc, \&sc-\/>\mbox{\hyperlink{structiwm__softc_a57cdc0da9cdb3a68e4f55cc47c3a3aed}{rxq}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06527}06527         \textcolor{keywordflow}{for} (i = 0; i < nitems(sc-\/>\mbox{\hyperlink{structiwm__softc_a9580b1b4fe19ddaa7f8e8b987dc92f8b}{txq}}); i++)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06528}06528                 \mbox{\hyperlink{if__iwm_8c_a87305f86cad7c54e7d6d7fe33e5343eb}{iwm\_free\_tx\_ring}}(sc, \&sc-\/>\mbox{\hyperlink{structiwm__softc_a9580b1b4fe19ddaa7f8e8b987dc92f8b}{txq}}[i]);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06529}06529 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06530}06530         \textcolor{comment}{/* Free firmware */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06531}06531         \textcolor{keywordflow}{if} (fw-\/>\mbox{\hyperlink{structiwm__fw__info_a6e60199c0b9af7740442593ad3357e27}{fw\_fp}} != NULL)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06532}06532                 \mbox{\hyperlink{if__iwm_8c_aeb37ae4f615a7120e6e2ccde82cf03c5}{iwm\_fw\_info\_free}}(fw);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06533}06533 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06534}06534         \textcolor{comment}{/* Free scheduler */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06535}06535         \mbox{\hyperlink{if__iwm__util_8c_a628e0b20edea1c70fc1ff4c3730761aa}{iwm\_dma\_contig\_free}}(\&sc-\/>\mbox{\hyperlink{structiwm__softc_ab3ce0638afeea2b71cc357b0c968f4dd}{sched\_dma}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06536}06536         \mbox{\hyperlink{if__iwm__util_8c_a628e0b20edea1c70fc1ff4c3730761aa}{iwm\_dma\_contig\_free}}(\&sc-\/>\mbox{\hyperlink{structiwm__softc_aa0e657a2c5629c84832ec6e88ffcaeea}{ict\_dma}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06537}06537         \mbox{\hyperlink{if__iwm__util_8c_a628e0b20edea1c70fc1ff4c3730761aa}{iwm\_dma\_contig\_free}}(\&sc-\/>\mbox{\hyperlink{structiwm__softc_a6e03941dd4273f72ef91bbb054f284c9}{kw\_dma}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06538}06538         \mbox{\hyperlink{if__iwm__util_8c_a628e0b20edea1c70fc1ff4c3730761aa}{iwm\_dma\_contig\_free}}(\&sc-\/>\mbox{\hyperlink{structiwm__softc_abbfdd700f811040eb61ebaa9ef29d54d}{fw\_dma}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06539}06539 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06540}06540         \mbox{\hyperlink{if__iwm__fw_8c_ad76d99c89569a6db57c9819cc15299e5}{iwm\_free\_fw\_paging}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06541}06541 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06542}06542         \textcolor{comment}{/* Finished with the hardware -\/ detach things */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06543}06543         \mbox{\hyperlink{if__iwm_8c_a300f5313fcf1f064f1ceb2242664d32e}{iwm\_pci\_detach}}(dev);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06544}06544 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06545}06545         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structiwm__softc_ac9e8a0cb4380c845865cdd6eae7444aa}{sc\_notif\_wait}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06546}06546                 \mbox{\hyperlink{if__iwm__notif__wait_8c_a46a0b8d97726fe8c16fe60715add7e75}{iwm\_notification\_wait\_free}}(sc-\/>\mbox{\hyperlink{structiwm__softc_ac9e8a0cb4380c845865cdd6eae7444aa}{sc\_notif\_wait}});}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06547}06547                 sc-\/>\mbox{\hyperlink{structiwm__softc_ac9e8a0cb4380c845865cdd6eae7444aa}{sc\_notif\_wait}} = NULL;}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06548}06548         \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06549}06549 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06550}06550         \mbox{\hyperlink{if__iwmvar_8h_a1723364b56595c0c2112518bfe5155bd}{IWM\_LOCK\_DESTROY}}(sc);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06551}06551 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06552}06552         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06553}06553 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06554}06554 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06555}06555 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06556}\mbox{\hyperlink{if__iwm_8c_aa0ae987f67c7fddd1a419280b70a5599}{06556}} \mbox{\hyperlink{if__iwm_8c_aa0ae987f67c7fddd1a419280b70a5599}{iwm\_detach}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06557}06557 \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06558}06558         \textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__softc}{iwm\_softc}} *sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06559}06559 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06560}06560         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__iwm_8c_a7adce334c7f29c6e2de85ba57d1c804b}{iwm\_detach\_local}}(sc, 1));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06561}06561 \}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06562}06562 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06563}\mbox{\hyperlink{if__iwm_8c_a184a289f4e1d41c3e8694d3cea7e8f17}{06563}} \textcolor{keyword}{static} device\_method\_t \mbox{\hyperlink{if__iwm_8c_a184a289f4e1d41c3e8694d3cea7e8f17}{iwm\_pci\_methods}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06564}06564         \textcolor{comment}{/* Device interface */}}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06565}06565         DEVMETHOD(device\_probe,         \mbox{\hyperlink{if__iwm_8c_a8142adf6f311d5ff2d79605b8df168a2}{iwm\_probe}}),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06566}06566         DEVMETHOD(device\_attach,        \mbox{\hyperlink{if__iwm_8c_a040a4326fcc1962a394f98c81b4030bc}{iwm\_attach}}),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06567}06567         DEVMETHOD(device\_detach,        \mbox{\hyperlink{if__iwm_8c_aa0ae987f67c7fddd1a419280b70a5599}{iwm\_detach}}),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06568}06568         DEVMETHOD(device\_suspend,       \mbox{\hyperlink{if__iwm_8c_a4ae7b1f572c7172e724a7ea58bee8c52}{iwm\_suspend}}),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06569}06569         DEVMETHOD(device\_resume,        \mbox{\hyperlink{if__iwm_8c_aced727b8b8ce817f845b39646def2c3c}{iwm\_resume}}),}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06570}06570 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06571}06571         DEVMETHOD\_END}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06572}06572 \};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06573}06573 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06574}\mbox{\hyperlink{if__iwm_8c_a4a082093d91f74473f3984d6b092c348}{06574}} \textcolor{keyword}{static} driver\_t \mbox{\hyperlink{if__iwm_8c_a4a082093d91f74473f3984d6b092c348}{iwm\_pci\_driver}} = \{}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06575}06575         \textcolor{stringliteral}{"{}iwm"{}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06576}06576         \mbox{\hyperlink{if__iwm_8c_a184a289f4e1d41c3e8694d3cea7e8f17}{iwm\_pci\_methods}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06577}06577         \textcolor{keyword}{sizeof} (\textcolor{keyword}{struct }\mbox{\hyperlink{structiwm__softc}{iwm\_softc}})}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06578}06578 \};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06579}06579 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06580}\mbox{\hyperlink{if__iwm_8c_ab6985f90724d30a17b0c8706c96a4809}{06580}} \textcolor{keyword}{static} devclass\_t \mbox{\hyperlink{if__iwm_8c_ab6985f90724d30a17b0c8706c96a4809}{iwm\_devclass}};}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06581}06581 }
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06582}\mbox{\hyperlink{if__iwm_8c_aca9c7824aaa52be5ac1950dc7db19587}{06582}} \mbox{\hyperlink{if__iwm_8c_aca9c7824aaa52be5ac1950dc7db19587}{DRIVER\_MODULE}}(iwm, pci, \mbox{\hyperlink{if__iwm_8c_a4a082093d91f74473f3984d6b092c348}{iwm\_pci\_driver}}, \mbox{\hyperlink{if__iwm_8c_ab6985f90724d30a17b0c8706c96a4809}{iwm\_devclass}}, NULL, NULL);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06583}\mbox{\hyperlink{if__iwm_8c_a3efc529522e5e08b91ad09d1912cd5f8}{06583}} \mbox{\hyperlink{if__iwm_8c_a3efc529522e5e08b91ad09d1912cd5f8}{MODULE\_PNP\_INFO}}(\textcolor{stringliteral}{"{}U16:device;P:\#;T:vendor=0x8086"{}}, pci, \mbox{\hyperlink{if__iwm_8c_a4a082093d91f74473f3984d6b092c348}{iwm\_pci\_driver}},}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06584}06584     \mbox{\hyperlink{structiwm__devices}{iwm\_devices}}, nitems(\mbox{\hyperlink{structiwm__devices}{iwm\_devices}}));}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06585}\mbox{\hyperlink{if__iwm_8c_a33b52ad92b95d4a56ad6ae33d4d69dda}{06585}} \mbox{\hyperlink{if__iwm_8c_a33b52ad92b95d4a56ad6ae33d4d69dda}{MODULE\_DEPEND}}(iwm, firmware, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06586}\mbox{\hyperlink{if__iwm_8c_a0673609fb3502dc05e6bf32d5a2624e2}{06586}} \mbox{\hyperlink{if__iwm_8c_a33b52ad92b95d4a56ad6ae33d4d69dda}{MODULE\_DEPEND}}(iwm, pci, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{if__iwm_8c_source_l06587}\mbox{\hyperlink{if__iwm_8c_a956639b3cd62ce9a6f7a333ed2a2211a}{06587}} \mbox{\hyperlink{if__iwm_8c_a33b52ad92b95d4a56ad6ae33d4d69dda}{MODULE\_DEPEND}}(iwm, wlan, 1, 1, 1);}

\end{DoxyCode}
