iPXE
|
#include "base.h"
Go to the source code of this file.
Functions | |
FILE_LICENCE (MIT) | |
static void | ath5k_rfkill_disable (struct ath5k_softc *sc) |
static void | ath5k_rfkill_enable (struct ath5k_softc *sc) |
static void | ath5k_rfkill_set_intr (struct ath5k_softc *sc, int enable) |
static int __unused | ath5k_is_rfkill_set (struct ath5k_softc *sc) |
void | ath5k_rfkill_hw_start (struct ath5k_hw *ah) |
void | ath5k_rfkill_hw_stop (struct ath5k_hw *ah) |
FILE_LICENCE | ( | MIT | ) |
static void ath5k_rfkill_disable | ( | struct ath5k_softc * | sc | ) | [inline, static] |
Definition at line 42 of file ath5k_rfkill.c.
References ath5k_softc::ah, ath5k_hw_set_gpio(), ath5k_hw_set_gpio_output(), DBG, ath5k_softc::gpio, ath5k_softc::polarity, and ath5k_softc::rf_kill.
Referenced by ath5k_rfkill_hw_start().
static void ath5k_rfkill_enable | ( | struct ath5k_softc * | sc | ) | [inline, static] |
Definition at line 51 of file ath5k_rfkill.c.
References ath5k_softc::ah, ath5k_hw_set_gpio(), ath5k_hw_set_gpio_output(), DBG, ath5k_softc::gpio, ath5k_softc::polarity, and ath5k_softc::rf_kill.
Referenced by ath5k_rfkill_hw_stop().
static void ath5k_rfkill_set_intr | ( | struct ath5k_softc * | sc, |
int | enable | ||
) | [inline, static] |
Definition at line 59 of file ath5k_rfkill.c.
References ath5k_softc::ah, ah, ath5k_hw_get_gpio(), ath5k_hw_set_gpio_input(), ath5k_hw_set_gpio_intr(), ath5k_softc::gpio, and ath5k_softc::rf_kill.
Referenced by ath5k_rfkill_hw_start(), and ath5k_rfkill_hw_stop().
{ struct ath5k_hw *ah = sc->ah; u32 curval; ath5k_hw_set_gpio_input(ah, sc->rf_kill.gpio); curval = ath5k_hw_get_gpio(ah, sc->rf_kill.gpio); ath5k_hw_set_gpio_intr(ah, sc->rf_kill.gpio, enable ? !!curval : !curval); }
static int __unused ath5k_is_rfkill_set | ( | struct ath5k_softc * | sc | ) | [static] |
Definition at line 71 of file ath5k_rfkill.c.
References ath5k_softc::ah, ath5k_hw_get_gpio(), ath5k_softc::gpio, ath5k_softc::polarity, and ath5k_softc::rf_kill.
void ath5k_rfkill_hw_start | ( | struct ath5k_hw * | ah | ) |
Definition at line 80 of file ath5k_rfkill.c.
References ath5k_hw::ah_capabilities, ath5k_hw::ah_sc, AR5K_EEPROM_HDR_RFKILL, ath5k_rfkill_disable(), ath5k_rfkill_set_intr(), ath5k_capabilities::cap_eeprom, ath5k_eeprom_info::ee_header, ath5k_eeprom_info::ee_rfkill_pin, ath5k_eeprom_info::ee_rfkill_pol, ath5k_softc::gpio, ath5k_softc::polarity, and ath5k_softc::rf_kill.
Referenced by ath5k_init().
{ struct ath5k_softc *sc = ah->ah_sc; /* read rfkill GPIO configuration from EEPROM header */ sc->rf_kill.gpio = ah->ah_capabilities.cap_eeprom.ee_rfkill_pin; sc->rf_kill.polarity = ah->ah_capabilities.cap_eeprom.ee_rfkill_pol; ath5k_rfkill_disable(sc); /* enable interrupt for rfkill switch */ if (AR5K_EEPROM_HDR_RFKILL(ah->ah_capabilities.cap_eeprom.ee_header)) ath5k_rfkill_set_intr(sc, 1); }
void ath5k_rfkill_hw_stop | ( | struct ath5k_hw * | ah | ) |
Definition at line 97 of file ath5k_rfkill.c.
References ath5k_hw::ah_capabilities, ath5k_hw::ah_sc, AR5K_EEPROM_HDR_RFKILL, ath5k_rfkill_enable(), ath5k_rfkill_set_intr(), ath5k_capabilities::cap_eeprom, and ath5k_eeprom_info::ee_header.
Referenced by ath5k_stop_hw().
{ struct ath5k_softc *sc = ah->ah_sc; /* disable interrupt for rfkill switch */ if (AR5K_EEPROM_HDR_RFKILL(ah->ah_capabilities.cap_eeprom.ee_header)) ath5k_rfkill_set_intr(sc, 0); /* enable RFKILL when stopping HW so Wifi LED is turned off */ ath5k_rfkill_enable(sc); }