diff options
Diffstat (limited to 'drivers/net/wireless/ath5k/base.c')
-rw-r--r-- | drivers/net/wireless/ath5k/base.c | 37 |
1 files changed, 12 insertions, 25 deletions
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c index 0f1d6bdd51a2..9e47d727e220 100644 --- a/drivers/net/wireless/ath5k/base.c +++ b/drivers/net/wireless/ath5k/base.c | |||
@@ -661,8 +661,7 @@ ath5k_pci_resume(struct pci_dev *pdev) | |||
661 | { | 661 | { |
662 | struct ieee80211_hw *hw = pci_get_drvdata(pdev); | 662 | struct ieee80211_hw *hw = pci_get_drvdata(pdev); |
663 | struct ath5k_softc *sc = hw->priv; | 663 | struct ath5k_softc *sc = hw->priv; |
664 | struct ath5k_hw *ah = sc->ah; | 664 | int err; |
665 | int i, err; | ||
666 | 665 | ||
667 | pci_restore_state(pdev); | 666 | pci_restore_state(pdev); |
668 | 667 | ||
@@ -688,16 +687,6 @@ ath5k_pci_resume(struct pci_dev *pdev) | |||
688 | goto err_irq; | 687 | goto err_irq; |
689 | ath5k_led_enable(sc); | 688 | ath5k_led_enable(sc); |
690 | 689 | ||
691 | /* | ||
692 | * Reset the key cache since some parts do not | ||
693 | * reset the contents on initial power up or resume. | ||
694 | * | ||
695 | * FIXME: This may need to be revisited when mac80211 becomes | ||
696 | * aware of suspend/resume. | ||
697 | */ | ||
698 | for (i = 0; i < AR5K_KEYTABLE_SIZE; i++) | ||
699 | ath5k_hw_reset_key(ah, i); | ||
700 | |||
701 | return 0; | 690 | return 0; |
702 | err_irq: | 691 | err_irq: |
703 | free_irq(pdev->irq, sc); | 692 | free_irq(pdev->irq, sc); |
@@ -718,7 +707,6 @@ ath5k_attach(struct pci_dev *pdev, struct ieee80211_hw *hw) | |||
718 | struct ath5k_softc *sc = hw->priv; | 707 | struct ath5k_softc *sc = hw->priv; |
719 | struct ath5k_hw *ah = sc->ah; | 708 | struct ath5k_hw *ah = sc->ah; |
720 | u8 mac[ETH_ALEN]; | 709 | u8 mac[ETH_ALEN]; |
721 | unsigned int i; | ||
722 | int ret; | 710 | int ret; |
723 | 711 | ||
724 | ATH5K_DBG(sc, ATH5K_DEBUG_ANY, "devid 0x%x\n", pdev->device); | 712 | ATH5K_DBG(sc, ATH5K_DEBUG_ANY, "devid 0x%x\n", pdev->device); |
@@ -737,13 +725,6 @@ ath5k_attach(struct pci_dev *pdev, struct ieee80211_hw *hw) | |||
737 | __set_bit(ATH_STAT_MRRETRY, sc->status); | 725 | __set_bit(ATH_STAT_MRRETRY, sc->status); |
738 | 726 | ||
739 | /* | 727 | /* |
740 | * Reset the key cache since some parts do not | ||
741 | * reset the contents on initial power up. | ||
742 | */ | ||
743 | for (i = 0; i < AR5K_KEYTABLE_SIZE; i++) | ||
744 | ath5k_hw_reset_key(ah, i); | ||
745 | |||
746 | /* | ||
747 | * Collect the channel list. The 802.11 layer | 728 | * Collect the channel list. The 802.11 layer |
748 | * is resposible for filtering this list based | 729 | * is resposible for filtering this list based |
749 | * on settings like the phy mode and regulatory | 730 | * on settings like the phy mode and regulatory |
@@ -2202,7 +2183,8 @@ ath5k_beacon_config(struct ath5k_softc *sc) | |||
2202 | static int | 2183 | static int |
2203 | ath5k_init(struct ath5k_softc *sc, bool is_resume) | 2184 | ath5k_init(struct ath5k_softc *sc, bool is_resume) |
2204 | { | 2185 | { |
2205 | int ret; | 2186 | struct ath5k_hw *ah = sc->ah; |
2187 | int ret, i; | ||
2206 | 2188 | ||
2207 | mutex_lock(&sc->lock); | 2189 | mutex_lock(&sc->lock); |
2208 | 2190 | ||
@@ -2235,10 +2217,17 @@ ath5k_init(struct ath5k_softc *sc, bool is_resume) | |||
2235 | if (ret) | 2217 | if (ret) |
2236 | goto done; | 2218 | goto done; |
2237 | 2219 | ||
2220 | /* | ||
2221 | * Reset the key cache since some parts do not reset the | ||
2222 | * contents on initial power up or resume from suspend. | ||
2223 | */ | ||
2224 | for (i = 0; i < AR5K_KEYTABLE_SIZE; i++) | ||
2225 | ath5k_hw_reset_key(ah, i); | ||
2226 | |||
2238 | __set_bit(ATH_STAT_STARTED, sc->status); | 2227 | __set_bit(ATH_STAT_STARTED, sc->status); |
2239 | 2228 | ||
2240 | /* Set ack to be sent at low bit-rates */ | 2229 | /* Set ack to be sent at low bit-rates */ |
2241 | ath5k_hw_set_ack_bitrate_high(sc->ah, false); | 2230 | ath5k_hw_set_ack_bitrate_high(ah, false); |
2242 | 2231 | ||
2243 | mod_timer(&sc->calib_tim, round_jiffies(jiffies + | 2232 | mod_timer(&sc->calib_tim, round_jiffies(jiffies + |
2244 | msecs_to_jiffies(ath5k_calinterval * 1000))); | 2233 | msecs_to_jiffies(ath5k_calinterval * 1000))); |
@@ -2953,10 +2942,8 @@ static void ath5k_configure_filter(struct ieee80211_hw *hw, | |||
2953 | sc->opmode != NL80211_IFTYPE_MESH_POINT && | 2942 | sc->opmode != NL80211_IFTYPE_MESH_POINT && |
2954 | test_bit(ATH_STAT_PROMISC, sc->status)) | 2943 | test_bit(ATH_STAT_PROMISC, sc->status)) |
2955 | rfilt |= AR5K_RX_FILTER_PROM; | 2944 | rfilt |= AR5K_RX_FILTER_PROM; |
2956 | if (sc->opmode == NL80211_IFTYPE_STATION || | 2945 | if (sc->opmode == NL80211_IFTYPE_ADHOC) |
2957 | sc->opmode == NL80211_IFTYPE_ADHOC) { | ||
2958 | rfilt |= AR5K_RX_FILTER_BEACON; | 2946 | rfilt |= AR5K_RX_FILTER_BEACON; |
2959 | } | ||
2960 | 2947 | ||
2961 | /* Set filters */ | 2948 | /* Set filters */ |
2962 | ath5k_hw_set_rx_filter(ah,rfilt); | 2949 | ath5k_hw_set_rx_filter(ah,rfilt); |