\hypertarget{if__ath__led_8c_source}{}\doxysection{if\+\_\+ath\+\_\+led.\+c}
\label{if__ath__led_8c_source}\index{dev/ath/if\_ath\_led.c@{dev/ath/if\_ath\_led.c}}
\mbox{\hyperlink{if__ath__led_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2002-\/2009 Sam Leffler, Errno Consulting}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00005}00005 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00007}00007 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00008}00008 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00009}00009 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00010}00010 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00011}00011 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer,}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00012}00012 \textcolor{comment}{ *    without modification.}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00013}00013 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce at minimum a disclaimer}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00014}00014 \textcolor{comment}{ *    similar to the "{}NO WARRANTY"{} disclaimer below ("{}Disclaimer"{}) and any}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00015}00015 \textcolor{comment}{ *    redistribution must be conditioned upon including a substantially}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00016}00016 \textcolor{comment}{ *    similar Disclaimer requirement for further binary redistribution.}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00017}00017 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00018}00018 \textcolor{comment}{ * NO WARRANTY}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00019}00019 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00020}00020 \textcolor{comment}{ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00021}00021 \textcolor{comment}{ * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00022}00022 \textcolor{comment}{ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00023}00023 \textcolor{comment}{ * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00024}00024 \textcolor{comment}{ * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00025}00025 \textcolor{comment}{ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00026}00026 \textcolor{comment}{ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00027}00027 \textcolor{comment}{ * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00028}00028 \textcolor{comment}{ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00029}00029 \textcolor{comment}{ * THE POSSIBILITY OF SUCH DAMAGES.}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00030}00030 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00031}00031 }
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00032}00032 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00033}\mbox{\hyperlink{if__ath__led_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00033}} \mbox{\hyperlink{if__ath__led_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00034}00034 }
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00035}00035 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00036}00036 \textcolor{comment}{ * Driver for the Atheros Wireless LAN controller.}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00037}00037 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00038}00038 \textcolor{comment}{ * This software is derived from work of Atsushi Onoe; his contribution}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00039}00039 \textcolor{comment}{ * is greatly appreciated.}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00040}00040 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00041}00041 }
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00042}00042 \textcolor{preprocessor}{\#include "{}opt\_inet.h"{}}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00043}00043 \textcolor{preprocessor}{\#include "{}opt\_ath.h"{}}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00044}00044 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00045}00045 \textcolor{comment}{ * This is needed for register operations which are performed}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00046}00046 \textcolor{comment}{ * by the driver -\/ eg, calls to ath\_hal\_gettsf32().}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00047}00047 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00048}00048 \textcolor{preprocessor}{\#include "{}opt\_ah.h"{}}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00049}00049 \textcolor{preprocessor}{\#include "{}opt\_wlan.h"{}}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00050}00050 }
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00051}00051 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00052}00052 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00053}00053 \textcolor{preprocessor}{\#include <sys/sysctl.h>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00054}00054 \textcolor{preprocessor}{\#include <sys/mbuf.h>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00055}00055 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00056}00056 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00057}00057 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00058}00058 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00059}00059 \textcolor{preprocessor}{\#include <sys/socket.h>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00060}00060 \textcolor{preprocessor}{\#include <sys/sockio.h>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00061}00061 \textcolor{preprocessor}{\#include <sys/errno.h>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00062}00062 \textcolor{preprocessor}{\#include <sys/callout.h>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00063}00063 \textcolor{preprocessor}{\#include <sys/bus.h>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00064}00064 \textcolor{preprocessor}{\#include <sys/endian.h>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00065}00065 \textcolor{preprocessor}{\#include <sys/kthread.h>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00066}00066 \textcolor{preprocessor}{\#include <sys/taskqueue.h>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00067}00067 \textcolor{preprocessor}{\#include <sys/priv.h>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00068}00068 \textcolor{preprocessor}{\#include <sys/module.h>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00069}00069 \textcolor{preprocessor}{\#include <sys/ktr.h>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00070}00070 \textcolor{preprocessor}{\#include <sys/smp.h>}    \textcolor{comment}{/* for mp\_ncpus */}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00071}00071 }
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00072}00072 \textcolor{preprocessor}{\#include <machine/bus.h>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00073}00073 }
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00074}00074 \textcolor{preprocessor}{\#include <net/if.h>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00075}00075 \textcolor{preprocessor}{\#include <net/if\_dl.h>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00076}00076 \textcolor{preprocessor}{\#include <net/if\_media.h>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00077}00077 \textcolor{preprocessor}{\#include <net/if\_types.h>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00078}00078 \textcolor{preprocessor}{\#include <net/if\_arp.h>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00079}00079 \textcolor{preprocessor}{\#include <net/ethernet.h>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00080}00080 \textcolor{preprocessor}{\#include <net/if\_llc.h>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00081}00081 }
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00082}00082 \textcolor{preprocessor}{\#include <net80211/ieee80211\_var.h>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00083}00083 \textcolor{preprocessor}{\#include <net80211/ieee80211\_regdomain.h>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00084}00084 \textcolor{preprocessor}{\#ifdef IEEE80211\_SUPPORT\_SUPERG}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00085}00085 \textcolor{preprocessor}{\#include <net80211/ieee80211\_superg.h>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00086}00086 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00087}00087 \textcolor{preprocessor}{\#ifdef IEEE80211\_SUPPORT\_TDMA}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00088}00088 \textcolor{preprocessor}{\#include <net80211/ieee80211\_tdma.h>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00089}00089 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00090}00090 }
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00091}00091 \textcolor{preprocessor}{\#include <net/bpf.h>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00092}00092 }
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00093}00093 \textcolor{preprocessor}{\#ifdef INET}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00094}00094 \textcolor{preprocessor}{\#include <netinet/in.h>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00095}00095 \textcolor{preprocessor}{\#include <netinet/if\_ether.h>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00096}00096 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00097}00097 }
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00098}00098 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{if__athvar_8h}{dev/ath/if\_athvar.h}}>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00099}00099 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{ah__devid_8h}{dev/ath/ath\_hal/ah\_devid.h}}>}         \textcolor{comment}{/* XXX for softled */}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00100}00100 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{ah__diagcodes_8h}{dev/ath/ath\_hal/ah\_diagcodes.h}}>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00101}00101 }
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00102}00102 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{if__ath__debug_8h}{dev/ath/if\_ath\_debug.h}}>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00103}00103 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{if__ath__misc_8h}{dev/ath/if\_ath\_misc.h}}>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00104}00104 }
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00105}00105 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{if__ath__led_8h}{dev/ath/if\_ath\_led.h}}>}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00106}00106 }
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00107}00107 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00108}00108 \textcolor{comment}{ * Software LED driver routines.}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00109}00109 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00110}00110 }
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00111}00111 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00112}00112 \textcolor{comment}{ * XXX TODO: move the LED sysctls here.}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00113}00113 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00114}00114 }
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00115}00115 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00116}00116 \textcolor{comment}{ * Configure the hardware for software and LED blinking.}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00117}00117 \textcolor{comment}{ * The user may choose to configure part of each, depending upon the}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00118}00118 \textcolor{comment}{ * NIC being used.}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00119}00119 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00120}00120 \textcolor{comment}{ * This requires the configuration to be set before this function}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00121}00121 \textcolor{comment}{ * is called.}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00122}00122 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00123}00123 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00124}\mbox{\hyperlink{if__ath__led_8c_a06c6dad43b5bb1417f7697947654a1c3}{00124}} \mbox{\hyperlink{if__ath__led_8c_a06c6dad43b5bb1417f7697947654a1c3}{ath\_led\_config}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__softc}{ath\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00125}00125 \{}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00126}00126 }
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00127}00127         \mbox{\hyperlink{if__athvar_8h_a9ce606e349854e86f4bf5d2ba4abcf30}{ATH\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00128}00128         \mbox{\hyperlink{if__ath__misc_8h_a6e2b354d0ea6885769e6717a86fe15fb}{ath\_power\_set\_power\_state}}(sc, \mbox{\hyperlink{ah_8h_a48c3115e12caf57353013063438be679a75d316373c0af3b3d0192bb3fe44fc7c}{HAL\_PM\_AWAKE}});}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00129}00129         \mbox{\hyperlink{if__athvar_8h_adc3b0834e092d0eb3d84a5a5884b019a}{ATH\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00130}00130 }
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00131}00131         \textcolor{comment}{/* Software LED blinking -\/ GPIO controlled LED */}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00132}00132         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structath__softc_aebc23fda4a815bba621cdc170fd9f637}{sc\_softled}}) \{}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00133}00133                 \mbox{\hyperlink{ah__internal_8h_ad2a935eb65758cfd06709d1c6e4a8c18}{ath\_hal\_gpioCfgOutput}}(sc-\/>\mbox{\hyperlink{structath__softc_ac4ce6c93e1bf68e072a91ade0cd0ad38}{sc\_ah}}, sc-\/>\mbox{\hyperlink{structath__softc_ae3c225d9736e319869877ecad49a3c07}{sc\_ledpin}},}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00134}00134                     \mbox{\hyperlink{ah_8h_aa77f21fdb008bc6896aea1706227134ca031edeaa2d6a80210ca820a3e2af89a6}{HAL\_GPIO\_OUTPUT\_MUX\_AS\_OUTPUT}});}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00135}00135                 \mbox{\hyperlink{if__athvar_8h_a081be28ea9f877c5ab5b555c38f50a33}{ath\_hal\_gpioset}}(sc-\/>\mbox{\hyperlink{structath__softc_ac4ce6c93e1bf68e072a91ade0cd0ad38}{sc\_ah}}, sc-\/>\mbox{\hyperlink{structath__softc_ae3c225d9736e319869877ecad49a3c07}{sc\_ledpin}}, !sc-\/>\mbox{\hyperlink{structath__softc_a78e3561e71bb93de96c6d863bd9e7d75}{sc\_ledon}});}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00136}00136         \}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00137}00137 }
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00138}00138         \textcolor{comment}{/* Hardware LED blinking -\/ MAC controlled LED */}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00139}00139         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structath__softc_a9774d27cb8f80e7f0e4778e0d0f42116}{sc\_hardled}}) \{}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00140}00140                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00141}00141 \textcolor{comment}{                 * Only enable each LED if required.}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00142}00142 \textcolor{comment}{                 *}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00143}00143 \textcolor{comment}{                 * Some NICs only have one LED connected; others may}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00144}00144 \textcolor{comment}{                 * have GPIO1/GPIO2 connected to other hardware.}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00145}00145 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00146}00146                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structath__softc_aad17f19809dfad5208f8566f6749fc21}{sc\_led\_pwr\_pin}} > 0)}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00147}00147                         \mbox{\hyperlink{ah__internal_8h_ad2a935eb65758cfd06709d1c6e4a8c18}{ath\_hal\_gpioCfgOutput}}(sc-\/>\mbox{\hyperlink{structath__softc_ac4ce6c93e1bf68e072a91ade0cd0ad38}{sc\_ah}}, sc-\/>\mbox{\hyperlink{structath__softc_aad17f19809dfad5208f8566f6749fc21}{sc\_led\_pwr\_pin}},}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00148}00148                             \mbox{\hyperlink{ah_8h_aa77f21fdb008bc6896aea1706227134cabb84cbe44236a02ac58e9c2f683ce815}{HAL\_GPIO\_OUTPUT\_MUX\_MAC\_POWER\_LED}});}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00149}00149                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structath__softc_aab27635e1d54e4695809f87a61126fea}{sc\_led\_net\_pin}} > 0)}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00150}00150                         \mbox{\hyperlink{ah__internal_8h_ad2a935eb65758cfd06709d1c6e4a8c18}{ath\_hal\_gpioCfgOutput}}(sc-\/>\mbox{\hyperlink{structath__softc_ac4ce6c93e1bf68e072a91ade0cd0ad38}{sc\_ah}}, sc-\/>\mbox{\hyperlink{structath__softc_aab27635e1d54e4695809f87a61126fea}{sc\_led\_net\_pin}},}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00151}00151                             \mbox{\hyperlink{ah_8h_aa77f21fdb008bc6896aea1706227134caf6eb220e312c573f7798ae30131f59dd}{HAL\_GPIO\_OUTPUT\_MUX\_MAC\_NETWORK\_LED}});}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00152}00152         \}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00153}00153 }
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00154}00154         \mbox{\hyperlink{if__athvar_8h_a9ce606e349854e86f4bf5d2ba4abcf30}{ATH\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00155}00155         \mbox{\hyperlink{if__ath__misc_8h_a320edecb4a40eeb53eb18a0c47376ba7}{ath\_power\_restore\_power\_state}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00156}00156         \mbox{\hyperlink{if__athvar_8h_adc3b0834e092d0eb3d84a5a5884b019a}{ATH\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00157}00157 \}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00158}00158 }
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00159}00159 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00160}\mbox{\hyperlink{if__ath__led_8c_a40d947420181491f78eadd19e64428b8}{00160}} \mbox{\hyperlink{if__ath__led_8c_a40d947420181491f78eadd19e64428b8}{ath\_led\_done}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00161}00161 \{}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00162}00162         \textcolor{keyword}{struct }\mbox{\hyperlink{structath__softc}{ath\_softc}} *sc = arg;}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00163}00163 }
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00164}00164         sc-\/>\mbox{\hyperlink{structath__softc_ac5ae89c285fe3fe41082e40c4d911a92}{sc\_blinking}} = 0;}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00165}00165 \}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00166}00166 }
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00167}00167 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00168}00168 \textcolor{comment}{ * Turn the LED off: flip the pin and then set a timer so no}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00169}00169 \textcolor{comment}{ * update will happen for the specified duration.}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00170}00170 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00171}00171 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00172}\mbox{\hyperlink{if__ath__led_8c_a16816181f3df5ee72eb2e40071e9a7d6}{00172}} \mbox{\hyperlink{if__ath__led_8c_a16816181f3df5ee72eb2e40071e9a7d6}{ath\_led\_off}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00173}00173 \{}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00174}00174         \textcolor{keyword}{struct }\mbox{\hyperlink{structath__softc}{ath\_softc}} *sc = arg;}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00175}00175 }
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00176}00176         \mbox{\hyperlink{if__athvar_8h_a081be28ea9f877c5ab5b555c38f50a33}{ath\_hal\_gpioset}}(sc-\/>\mbox{\hyperlink{structath__softc_ac4ce6c93e1bf68e072a91ade0cd0ad38}{sc\_ah}}, sc-\/>\mbox{\hyperlink{structath__softc_ae3c225d9736e319869877ecad49a3c07}{sc\_ledpin}}, !sc-\/>\mbox{\hyperlink{structath__softc_a78e3561e71bb93de96c6d863bd9e7d75}{sc\_ledon}});}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00177}00177         callout\_reset(\&sc-\/>\mbox{\hyperlink{structath__softc_a16b0f915be004bd34f8200917445686b}{sc\_ledtimer}}, sc-\/>\mbox{\hyperlink{structath__softc_ac1615ae9a2cddcab0d7e9139eb37fc81}{sc\_ledoff}}, \mbox{\hyperlink{if__ath__led_8c_a40d947420181491f78eadd19e64428b8}{ath\_led\_done}}, sc);}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00178}00178 \}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00179}00179 }
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00180}00180 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00181}00181 \textcolor{comment}{ * Blink the LED according to the specified on/off times.}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00182}00182 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00183}00183 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00184}\mbox{\hyperlink{if__ath__led_8c_ac2ad173c240efe13e80946df963eb194}{00184}} \mbox{\hyperlink{if__ath__led_8c_ac2ad173c240efe13e80946df963eb194}{ath\_led\_blink}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__softc}{ath\_softc}} *sc, \textcolor{keywordtype}{int} on, \textcolor{keywordtype}{int} off)}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00185}00185 \{}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00186}00186         \mbox{\hyperlink{if__ath__debug_8h_a8f3cb9c69cf684badf6c665802ffd1a3}{DPRINTF}}(sc, ATH\_DEBUG\_LED, \textcolor{stringliteral}{"{}\%s: on \%u off \%u\(\backslash\)n"{}}, \_\_func\_\_, on, off);}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00187}00187         \mbox{\hyperlink{if__athvar_8h_a081be28ea9f877c5ab5b555c38f50a33}{ath\_hal\_gpioset}}(sc-\/>\mbox{\hyperlink{structath__softc_ac4ce6c93e1bf68e072a91ade0cd0ad38}{sc\_ah}}, sc-\/>\mbox{\hyperlink{structath__softc_ae3c225d9736e319869877ecad49a3c07}{sc\_ledpin}}, sc-\/>\mbox{\hyperlink{structath__softc_a78e3561e71bb93de96c6d863bd9e7d75}{sc\_ledon}});}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00188}00188         sc-\/>\mbox{\hyperlink{structath__softc_ac5ae89c285fe3fe41082e40c4d911a92}{sc\_blinking}} = 1;}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00189}00189         sc-\/>\mbox{\hyperlink{structath__softc_ac1615ae9a2cddcab0d7e9139eb37fc81}{sc\_ledoff}} = off;}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00190}00190         callout\_reset(\&sc-\/>\mbox{\hyperlink{structath__softc_a16b0f915be004bd34f8200917445686b}{sc\_ledtimer}}, on, \mbox{\hyperlink{if__ath__led_8c_a16816181f3df5ee72eb2e40071e9a7d6}{ath\_led\_off}}, sc);}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00191}00191 \}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00192}00192 }
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00193}00193 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00194}\mbox{\hyperlink{if__ath__led_8c_aded6c9130108550d9d990da3c053e809}{00194}} \mbox{\hyperlink{if__ath__led_8c_aded6c9130108550d9d990da3c053e809}{ath\_led\_event}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structath__softc}{ath\_softc}} *sc, \textcolor{keywordtype}{int} rix)}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00195}00195 \{}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00196}00196         sc-\/>\mbox{\hyperlink{structath__softc_a33c19e5c07b1dd697616b0537bf6ae29}{sc\_ledevent}} = ticks;     \textcolor{comment}{/* time of last event */}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00197}00197         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structath__softc_ac5ae89c285fe3fe41082e40c4d911a92}{sc\_blinking}})         \textcolor{comment}{/* don't interrupt active blink */}}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00198}00198                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00199}00199         \mbox{\hyperlink{if__ath__led_8c_ac2ad173c240efe13e80946df963eb194}{ath\_led\_blink}}(sc, sc-\/>\mbox{\hyperlink{structath__softc_abda1d03f14ffb0e885e797790283d6f1}{sc\_hwmap}}[rix].\mbox{\hyperlink{structath__softc_ad454cd25b786614b76b5e6f8fe704fb8}{ledon}}, sc-\/>\mbox{\hyperlink{structath__softc_abda1d03f14ffb0e885e797790283d6f1}{sc\_hwmap}}[rix].\mbox{\hyperlink{structath__softc_ab3edd93d203decdc2f6a20b899ad803c}{ledoff}});}
\DoxyCodeLine{\Hypertarget{if__ath__led_8c_source_l00200}00200 \}}

\end{DoxyCode}
