Skip to content

Commit

Permalink
ath9k: Build RFKILL feature even when RFKILL subsystem is a MODULE
Browse files Browse the repository at this point in the history
Currently, ath9k builds RFKILL feature only when the RFKILL subsystem
is built part of the kernel. Build RFKILL feature regardless of whether
RFKILL subsystem is built as a MODULE or part of the kernel.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Senthil Balasubramanian authored and John W. Linville committed Nov 25, 2008
1 parent f9bbf43 commit e97275c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath9k/ath9k.h
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,7 @@ u32 ath9k_hw_gpio_get(struct ath_hal *ah, u32 gpio);
void ath9k_hw_cfg_output(struct ath_hal *ah, u32 gpio,
u32 ah_signal_type);
void ath9k_hw_set_gpio(struct ath_hal *ah, u32 gpio, u32 val);
#ifdef CONFIG_RFKILL
#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
void ath9k_enable_rfkill(struct ath_hal *ah);
#endif
int ath9k_hw_select_antconfig(struct ath_hal *ah, u32 cfg);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath9k/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ void ath_stop(struct ath_softc *sc)
} else
sc->sc_rxlink = NULL;

#ifdef CONFIG_RFKILL
#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
if (sc->sc_ah->ah_caps.hw_caps & ATH9K_HW_CAP_RFSILENT)
cancel_delayed_work_sync(&sc->rf_kill.rfkill_poll);
#endif
Expand Down
6 changes: 3 additions & 3 deletions drivers/net/wireless/ath9k/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -2340,7 +2340,7 @@ bool ath9k_hw_reset(struct ath_hal *ah, struct ath9k_channel *chan,
ath9k_hw_init_interrupt_masks(ah, ah->ah_opmode);
ath9k_hw_init_qos(ah);

#ifdef CONFIG_RFKILL
#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
if (ah->ah_caps.hw_caps & ATH9K_HW_CAP_RFSILENT)
ath9k_enable_rfkill(ah);
#endif
Expand Down Expand Up @@ -3515,7 +3515,7 @@ bool ath9k_hw_fill_cap_info(struct ath_hal *ah)

pCap->hw_caps |= ATH9K_HW_CAP_ENHANCEDPM;

#ifdef CONFIG_RFKILL
#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
ah->ah_rfsilent = ath9k_hw_get_eeprom(ah, EEP_RF_SILENT);
if (ah->ah_rfsilent & EEP_RFSILENT_ENABLED) {
ah->ah_rfkill_gpio =
Expand Down Expand Up @@ -3772,7 +3772,7 @@ void ath9k_hw_set_gpio(struct ath_hal *ah, u32 gpio, u32 val)
AR_GPIO_BIT(gpio));
}

#ifdef CONFIG_RFKILL
#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
void ath9k_enable_rfkill(struct ath_hal *ah)
{
REG_SET_BIT(ah, AR_GPIO_INPUT_EN_VAL,
Expand Down
12 changes: 6 additions & 6 deletions drivers/net/wireless/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ static void ath_init_leds(struct ath_softc *sc)
ath_deinit_leds(sc);
}

#ifdef CONFIG_RFKILL
#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)

/*******************/
/* Rfkill */
Expand Down Expand Up @@ -838,7 +838,7 @@ static void ath_detach(struct ath_softc *sc)

ath_deinit_leds(sc);

#ifdef CONFIG_RFKILL
#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
ath_deinit_rfkill(sc);
#endif
ath_rate_control_unregister();
Expand Down Expand Up @@ -921,7 +921,7 @@ static int ath_attach(u16 devid, struct ath_softc *sc)
/* Initialize LED control */
ath_init_leds(sc);

#ifdef CONFIG_RFKILL
#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
/* Initialze h/w Rfkill */
if (sc->sc_ah->ah_caps.hw_caps & ATH9K_HW_CAP_RFSILENT)
INIT_DELAYED_WORK(&sc->rf_kill.rfkill_poll, ath_rfkill_poll);
Expand Down Expand Up @@ -978,7 +978,7 @@ static int ath9k_start(struct ieee80211_hw *hw)
goto exit;
}

#ifdef CONFIG_RFKILL
#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
error = ath_start_rfkill_poll(sc);
#endif

Expand Down Expand Up @@ -1722,7 +1722,7 @@ static int ath_pci_suspend(struct pci_dev *pdev, pm_message_t state)

ath9k_hw_set_gpio(sc->sc_ah, ATH_LED_PIN, 1);

#ifdef CONFIG_RFKILL
#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
if (sc->sc_ah->ah_caps.hw_caps & ATH9K_HW_CAP_RFSILENT)
cancel_delayed_work_sync(&sc->rf_kill.rfkill_poll);
#endif
Expand Down Expand Up @@ -1759,7 +1759,7 @@ static int ath_pci_resume(struct pci_dev *pdev)
AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
ath9k_hw_set_gpio(sc->sc_ah, ATH_LED_PIN, 1);

#ifdef CONFIG_RFKILL
#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
/*
* check the h/w rfkill state on resume
* and start the rfkill poll timer
Expand Down

0 comments on commit e97275c

Please sign in to comment.