|
@@ -661,8 +661,7 @@ ath5k_pci_resume(struct pci_dev *pdev)
|
|
{
|
|
{
|
|
struct ieee80211_hw *hw = pci_get_drvdata(pdev);
|
|
struct ieee80211_hw *hw = pci_get_drvdata(pdev);
|
|
struct ath5k_softc *sc = hw->priv;
|
|
struct ath5k_softc *sc = hw->priv;
|
|
- struct ath5k_hw *ah = sc->ah;
|
|
|
|
- int i, err;
|
|
|
|
|
|
+ int err;
|
|
|
|
|
|
pci_restore_state(pdev);
|
|
pci_restore_state(pdev);
|
|
|
|
|
|
@@ -688,16 +687,6 @@ ath5k_pci_resume(struct pci_dev *pdev)
|
|
goto err_irq;
|
|
goto err_irq;
|
|
ath5k_led_enable(sc);
|
|
ath5k_led_enable(sc);
|
|
|
|
|
|
- /*
|
|
|
|
- * Reset the key cache since some parts do not
|
|
|
|
- * reset the contents on initial power up or resume.
|
|
|
|
- *
|
|
|
|
- * FIXME: This may need to be revisited when mac80211 becomes
|
|
|
|
- * aware of suspend/resume.
|
|
|
|
- */
|
|
|
|
- for (i = 0; i < AR5K_KEYTABLE_SIZE; i++)
|
|
|
|
- ath5k_hw_reset_key(ah, i);
|
|
|
|
-
|
|
|
|
return 0;
|
|
return 0;
|
|
err_irq:
|
|
err_irq:
|
|
free_irq(pdev->irq, sc);
|
|
free_irq(pdev->irq, sc);
|
|
@@ -718,7 +707,6 @@ ath5k_attach(struct pci_dev *pdev, struct ieee80211_hw *hw)
|
|
struct ath5k_softc *sc = hw->priv;
|
|
struct ath5k_softc *sc = hw->priv;
|
|
struct ath5k_hw *ah = sc->ah;
|
|
struct ath5k_hw *ah = sc->ah;
|
|
u8 mac[ETH_ALEN];
|
|
u8 mac[ETH_ALEN];
|
|
- unsigned int i;
|
|
|
|
int ret;
|
|
int ret;
|
|
|
|
|
|
ATH5K_DBG(sc, ATH5K_DEBUG_ANY, "devid 0x%x\n", pdev->device);
|
|
ATH5K_DBG(sc, ATH5K_DEBUG_ANY, "devid 0x%x\n", pdev->device);
|
|
@@ -736,13 +724,6 @@ ath5k_attach(struct pci_dev *pdev, struct ieee80211_hw *hw)
|
|
if (ret > 0)
|
|
if (ret > 0)
|
|
__set_bit(ATH_STAT_MRRETRY, sc->status);
|
|
__set_bit(ATH_STAT_MRRETRY, sc->status);
|
|
|
|
|
|
- /*
|
|
|
|
- * Reset the key cache since some parts do not
|
|
|
|
- * reset the contents on initial power up.
|
|
|
|
- */
|
|
|
|
- for (i = 0; i < AR5K_KEYTABLE_SIZE; i++)
|
|
|
|
- ath5k_hw_reset_key(ah, i);
|
|
|
|
-
|
|
|
|
/*
|
|
/*
|
|
* Collect the channel list. The 802.11 layer
|
|
* Collect the channel list. The 802.11 layer
|
|
* is resposible for filtering this list based
|
|
* is resposible for filtering this list based
|
|
@@ -2202,7 +2183,8 @@ ath5k_beacon_config(struct ath5k_softc *sc)
|
|
static int
|
|
static int
|
|
ath5k_init(struct ath5k_softc *sc, bool is_resume)
|
|
ath5k_init(struct ath5k_softc *sc, bool is_resume)
|
|
{
|
|
{
|
|
- int ret;
|
|
|
|
|
|
+ struct ath5k_hw *ah = sc->ah;
|
|
|
|
+ int ret, i;
|
|
|
|
|
|
mutex_lock(&sc->lock);
|
|
mutex_lock(&sc->lock);
|
|
|
|
|
|
@@ -2235,10 +2217,17 @@ ath5k_init(struct ath5k_softc *sc, bool is_resume)
|
|
if (ret)
|
|
if (ret)
|
|
goto done;
|
|
goto done;
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * Reset the key cache since some parts do not reset the
|
|
|
|
+ * contents on initial power up or resume from suspend.
|
|
|
|
+ */
|
|
|
|
+ for (i = 0; i < AR5K_KEYTABLE_SIZE; i++)
|
|
|
|
+ ath5k_hw_reset_key(ah, i);
|
|
|
|
+
|
|
__set_bit(ATH_STAT_STARTED, sc->status);
|
|
__set_bit(ATH_STAT_STARTED, sc->status);
|
|
|
|
|
|
/* Set ack to be sent at low bit-rates */
|
|
/* Set ack to be sent at low bit-rates */
|
|
- ath5k_hw_set_ack_bitrate_high(sc->ah, false);
|
|
|
|
|
|
+ ath5k_hw_set_ack_bitrate_high(ah, false);
|
|
|
|
|
|
mod_timer(&sc->calib_tim, round_jiffies(jiffies +
|
|
mod_timer(&sc->calib_tim, round_jiffies(jiffies +
|
|
msecs_to_jiffies(ath5k_calinterval * 1000)));
|
|
msecs_to_jiffies(ath5k_calinterval * 1000)));
|