pci.c (bb803cfbecb03a0cf8dc7e1864f18dda6631af00) pci.c (19d337dff95cbf76edd3ad95c0cee2732c3e1ec5)
1/*
2 * Copyright (c) 2008-2009 Atheros Communications Inc.
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES

--- 213 unchanged lines hidden (view full) ---

222static int ath_pci_suspend(struct pci_dev *pdev, pm_message_t state)
223{
224 struct ieee80211_hw *hw = pci_get_drvdata(pdev);
225 struct ath_wiphy *aphy = hw->priv;
226 struct ath_softc *sc = aphy->sc;
227
228 ath9k_hw_set_gpio(sc->sc_ah, ATH_LED_PIN, 1);
229
1/*
2 * Copyright (c) 2008-2009 Atheros Communications Inc.
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES

--- 213 unchanged lines hidden (view full) ---

222static int ath_pci_suspend(struct pci_dev *pdev, pm_message_t state)
223{
224 struct ieee80211_hw *hw = pci_get_drvdata(pdev);
225 struct ath_wiphy *aphy = hw->priv;
226 struct ath_softc *sc = aphy->sc;
227
228 ath9k_hw_set_gpio(sc->sc_ah, ATH_LED_PIN, 1);
229
230#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
231 if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_RFSILENT)
232 cancel_delayed_work_sync(&sc->rf_kill.rfkill_poll);
233#endif
234
235 pci_save_state(pdev);
236 pci_disable_device(pdev);
237 pci_set_power_state(pdev, PCI_D3hot);
238
239 return 0;
240}
241
242static int ath_pci_resume(struct pci_dev *pdev)

--- 8 unchanged lines hidden (view full) ---

251 return err;
252 pci_restore_state(pdev);
253
254 /* Enable LED */
255 ath9k_hw_cfg_output(sc->sc_ah, ATH_LED_PIN,
256 AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
257 ath9k_hw_set_gpio(sc->sc_ah, ATH_LED_PIN, 1);
258
230 pci_save_state(pdev);
231 pci_disable_device(pdev);
232 pci_set_power_state(pdev, PCI_D3hot);
233
234 return 0;
235}
236
237static int ath_pci_resume(struct pci_dev *pdev)

--- 8 unchanged lines hidden (view full) ---

246 return err;
247 pci_restore_state(pdev);
248
249 /* Enable LED */
250 ath9k_hw_cfg_output(sc->sc_ah, ATH_LED_PIN,
251 AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
252 ath9k_hw_set_gpio(sc->sc_ah, ATH_LED_PIN, 1);
253
259#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
260 /*
261 * check the h/w rfkill state on resume
262 * and start the rfkill poll timer
263 */
264 if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_RFSILENT)
265 queue_delayed_work(sc->hw->workqueue,
266 &sc->rf_kill.rfkill_poll, 0);
267#endif
268
269 return 0;
270}
271
272#endif /* CONFIG_PM */
273
274MODULE_DEVICE_TABLE(pci, ath_pci_id_table);
275
276static struct pci_driver ath_pci_driver = {

--- 19 unchanged lines hidden ---
254 return 0;
255}
256
257#endif /* CONFIG_PM */
258
259MODULE_DEVICE_TABLE(pci, ath_pci_id_table);
260
261static struct pci_driver ath_pci_driver = {

--- 19 unchanged lines hidden ---