Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150822
b: refs/heads/master
c: a6ae071
h: refs/heads/master
v: v3
  • Loading branch information
Bob Copeland authored and John W. Linville committed Jun 10, 2009
1 parent e44d5a6 commit a5005c1
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 27 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 27004b10ce56985d8a010ce966af179f1b34193f
refs/heads/master: a6ae0716e5c3b5f9dbe5ed8f473a6c7b89692365
8 changes: 0 additions & 8 deletions trunk/drivers/net/wireless/ath/ath5k/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,3 @@ config ATH5K_DEBUG

modprobe ath5k debug=0x00000400

config ATH5K_RFKILL
bool "Atheros 5xxx rfkill support"
depends on ATH5K
default y
---help---
Include support for enabling/disabling WiFi via rfkill switch
with Atheros 5xxx cards

2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/ath/ath5k/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ ath5k-y += reset.o
ath5k-y += attach.o
ath5k-y += base.o
ath5k-y += led.o
ath5k-y += rfkill.o
ath5k-$(CONFIG_ATH5K_DEBUG) += debug.o
ath5k-$(CONFIG_ATH5K_RFKILL) += rfkill.o
obj-$(CONFIG_ATH5K) += ath5k.o
5 changes: 0 additions & 5 deletions trunk/drivers/net/wireless/ath/ath5k/ath5k.h
Original file line number Diff line number Diff line change
Expand Up @@ -1257,13 +1257,8 @@ extern int ath5k_hw_set_gpio(struct ath5k_hw *ah, u32 gpio, u32 val);
extern void ath5k_hw_set_gpio_intr(struct ath5k_hw *ah, unsigned int gpio, u32 interrupt_level);

/* rfkill Functions */
#ifdef CONFIG_ATH5K_RFKILL
extern void ath5k_rfkill_hw_start(struct ath5k_hw *ah);
extern void ath5k_rfkill_hw_stop(struct ath5k_hw *ah);
#else
static inline void ath5k_rfkill_hw_start(struct ath5k_hw *ah) {}
static inline void ath5k_rfkill_hw_stop(struct ath5k_hw *ah) {}
#endif

/* Misc functions */
int ath5k_hw_set_capabilities(struct ath5k_hw *ah);
Expand Down
5 changes: 1 addition & 4 deletions trunk/drivers/net/wireless/ath/ath5k/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -2530,12 +2530,9 @@ ath5k_intr(int irq, void *dev_id)
*/
ath5k_hw_update_mib_counters(ah, &sc->ll_stats);
}
#ifdef CONFIG_ATH5K_RFKILL
if (status & AR5K_INT_GPIO)
{
tasklet_schedule(&sc->rf_kill.toggleq);
}
#endif

}
} while (ath5k_hw_is_intr_pending(ah) && --counter > 0);

Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/net/wireless/ath/ath5k/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,7 @@ struct ath5k_softc {
struct tasklet_struct txtq; /* tx intr tasklet */
struct ath5k_led tx_led; /* tx led */

#ifdef CONFIG_ATH5K_RFKILL
struct ath5k_rfkill rf_kill;
#endif

spinlock_t block; /* protects beacon */
struct tasklet_struct beacontq; /* beacon intr tasklet */
Expand Down
12 changes: 6 additions & 6 deletions trunk/drivers/net/wireless/ath/ath5k/rfkill.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,12 @@ static inline void ath5k_rfkill_enable(struct ath5k_softc *sc)
static inline void ath5k_rfkill_set_intr(struct ath5k_softc *sc, bool enable)
{
struct ath5k_hw *ah = sc->ah;
u32 curval;

ath5k_hw_set_gpio_input(ah, sc->rf_kill.gpio);
ah->ah_gpio[0] = ath5k_hw_get_gpio(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 ?
!!ah->ah_gpio[0] : !ah->ah_gpio[0]);
!!curval : !curval);
}

static bool
Expand Down Expand Up @@ -97,9 +99,8 @@ ath5k_rfkill_hw_start(struct ath5k_hw *ah)
ath5k_rfkill_disable(sc);

/* enable interrupt for rfkill switch */
if (AR5K_EEPROM_HDR_RFKILL(ah->ah_capabilities.cap_eeprom.ee_header)) {
if (AR5K_EEPROM_HDR_RFKILL(ah->ah_capabilities.cap_eeprom.ee_header))
ath5k_rfkill_set_intr(sc, true);
}
}


Expand All @@ -109,9 +110,8 @@ ath5k_rfkill_hw_stop(struct ath5k_hw *ah)
struct ath5k_softc *sc = ah->ah_sc;

/* disable interrupt for rfkill switch */
if (AR5K_EEPROM_HDR_RFKILL(ah->ah_capabilities.cap_eeprom.ee_header)) {
if (AR5K_EEPROM_HDR_RFKILL(ah->ah_capabilities.cap_eeprom.ee_header))
ath5k_rfkill_set_intr(sc, false);
}

tasklet_kill(&sc->rf_kill.toggleq);

Expand Down

0 comments on commit a5005c1

Please sign in to comment.