if_ath_led.c (228887) | if_ath_led.c (228888) |
---|---|
1/*- 2 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 14 unchanged lines hidden (view full) --- 23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 25 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 * THE POSSIBILITY OF SUCH DAMAGES. 28 */ 29 30#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 14 unchanged lines hidden (view full) --- 23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 25 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 * THE POSSIBILITY OF SUCH DAMAGES. 28 */ 29 30#include <sys/cdefs.h> |
31__FBSDID("$FreeBSD: head/sys/dev/ath/if_ath_led.c 228887 2011-12-26 05:37:09Z adrian $"); | 31__FBSDID("$FreeBSD: head/sys/dev/ath/if_ath_led.c 228888 2011-12-26 05:46:22Z adrian $"); |
32 33/* 34 * Driver for the Atheros Wireless LAN controller. 35 * 36 * This software is derived from work of Atsushi Onoe; his contribution 37 * is greatly appreciated. 38 */ 39 --- 65 unchanged lines hidden (view full) --- 105/* 106 * Software LED driver routines. 107 */ 108 109/* 110 * XXX TODO: move the LED sysctls here. 111 */ 112 | 32 33/* 34 * Driver for the Atheros Wireless LAN controller. 35 * 36 * This software is derived from work of Atsushi Onoe; his contribution 37 * is greatly appreciated. 38 */ 39 --- 65 unchanged lines hidden (view full) --- 105/* 106 * Software LED driver routines. 107 */ 108 109/* 110 * XXX TODO: move the LED sysctls here. 111 */ 112 |
113 114/* 115 * Configure the hardware for software and/or LED blinking. 116 * 117 * This requires the configuration to be set beforehand. 118 */ 119void 120ath_led_config(struct ath_softc *sc) 121{ 122 /* Software LED blinking - GPIO controlled LED */ 123 if (sc->sc_softled) { 124 ath_hal_gpioCfgOutput(sc->sc_ah, sc->sc_ledpin, 125 HAL_GPIO_MUX_MAC_NETWORK_LED); 126 ath_hal_gpioset(sc->sc_ah, sc->sc_ledpin, !sc->sc_ledon); 127 return; 128 } 129 130 /* Hardware LED blinking - MAC controlled LED */ 131} 132 |
|
113static void 114ath_led_done(void *arg) 115{ 116 struct ath_softc *sc = arg; 117 118 sc->sc_blinking = 0; 119} 120 --- 34 unchanged lines hidden --- | 133static void 134ath_led_done(void *arg) 135{ 136 struct ath_softc *sc = arg; 137 138 sc->sc_blinking = 0; 139} 140 --- 34 unchanged lines hidden --- |