Lines Matching refs:sc
124 ath_led_config(struct ath_softc *sc)
127 ATH_LOCK(sc);
128 ath_power_set_power_state(sc, HAL_PM_AWAKE);
129 ATH_UNLOCK(sc);
132 if (sc->sc_softled) {
133 ath_hal_gpioCfgOutput(sc->sc_ah, sc->sc_ledpin,
135 ath_hal_gpioset(sc->sc_ah, sc->sc_ledpin, !sc->sc_ledon);
139 if (sc->sc_hardled) {
146 if (sc->sc_led_pwr_pin > 0)
147 ath_hal_gpioCfgOutput(sc->sc_ah, sc->sc_led_pwr_pin,
149 if (sc->sc_led_net_pin > 0)
150 ath_hal_gpioCfgOutput(sc->sc_ah, sc->sc_led_net_pin,
154 ATH_LOCK(sc);
155 ath_power_restore_power_state(sc);
156 ATH_UNLOCK(sc);
162 struct ath_softc *sc = arg;
164 sc->sc_blinking = 0;
174 struct ath_softc *sc = arg;
176 ath_hal_gpioset(sc->sc_ah, sc->sc_ledpin, !sc->sc_ledon);
177 callout_reset(&sc->sc_ledtimer, sc->sc_ledoff, ath_led_done, sc);
184 ath_led_blink(struct ath_softc *sc, int on, int off)
186 DPRINTF(sc, ATH_DEBUG_LED, "%s: on %u off %u\n", __func__, on, off);
187 ath_hal_gpioset(sc->sc_ah, sc->sc_ledpin, sc->sc_ledon);
188 sc->sc_blinking = 1;
189 sc->sc_ledoff = off;
190 callout_reset(&sc->sc_ledtimer, on, ath_led_off, sc);
194 ath_led_event(struct ath_softc *sc, int rix)
196 sc->sc_ledevent = ticks; /* time of last event */
197 if (sc->sc_blinking) /* don't interrupt active blink */
199 ath_led_blink(sc, sc->sc_hwmap[rix].ledon, sc->sc_hwmap[rix].ledoff);