if_ath_led.c (228892) | if_ath_led.c (237611) |
---|---|
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 228892 2011-12-26 07:48:29Z adrian $"); | 31__FBSDID("$FreeBSD: head/sys/dev/ath/if_ath_led.c 237611 2012-06-26 22:16:53Z 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 --- 80 unchanged lines hidden (view full) --- 120 * is called. 121 */ 122void 123ath_led_config(struct ath_softc *sc) 124{ 125 /* Software LED blinking - GPIO controlled LED */ 126 if (sc->sc_softled) { 127 ath_hal_gpioCfgOutput(sc->sc_ah, sc->sc_ledpin, | 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 --- 80 unchanged lines hidden (view full) --- 120 * is called. 121 */ 122void 123ath_led_config(struct ath_softc *sc) 124{ 125 /* Software LED blinking - GPIO controlled LED */ 126 if (sc->sc_softled) { 127 ath_hal_gpioCfgOutput(sc->sc_ah, sc->sc_ledpin, |
128 HAL_GPIO_MUX_OUTPUT); | 128 HAL_GPIO_OUTPUT_MUX_AS_OUTPUT); |
129 ath_hal_gpioset(sc->sc_ah, sc->sc_ledpin, !sc->sc_ledon); 130 } 131 132 /* Hardware LED blinking - MAC controlled LED */ 133 if (sc->sc_hardled) { 134 /* 135 * Only enable each LED if required. 136 * 137 * Some NICs only have one LED connected; others may 138 * have GPIO1/GPIO2 connected to other hardware. 139 */ 140 if (sc->sc_led_pwr_pin > 0) 141 ath_hal_gpioCfgOutput(sc->sc_ah, sc->sc_led_pwr_pin, | 129 ath_hal_gpioset(sc->sc_ah, sc->sc_ledpin, !sc->sc_ledon); 130 } 131 132 /* Hardware LED blinking - MAC controlled LED */ 133 if (sc->sc_hardled) { 134 /* 135 * Only enable each LED if required. 136 * 137 * Some NICs only have one LED connected; others may 138 * have GPIO1/GPIO2 connected to other hardware. 139 */ 140 if (sc->sc_led_pwr_pin > 0) 141 ath_hal_gpioCfgOutput(sc->sc_ah, sc->sc_led_pwr_pin, |
142 HAL_GPIO_MUX_MAC_POWER_LED); | 142 HAL_GPIO_OUTPUT_MUX_MAC_POWER_LED); |
143 if (sc->sc_led_net_pin > 0) 144 ath_hal_gpioCfgOutput(sc->sc_ah, sc->sc_led_net_pin, | 143 if (sc->sc_led_net_pin > 0) 144 ath_hal_gpioCfgOutput(sc->sc_ah, sc->sc_led_net_pin, |
145 HAL_GPIO_MUX_MAC_NETWORK_LED); | 145 HAL_GPIO_OUTPUT_MUX_MAC_NETWORK_LED); |
146 } 147} 148 149static void 150ath_led_done(void *arg) 151{ 152 struct ath_softc *sc = arg; 153 --- 37 unchanged lines hidden --- | 146 } 147} 148 149static void 150ath_led_done(void *arg) 151{ 152 struct ath_softc *sc = arg; 153 --- 37 unchanged lines hidden --- |