diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath5k')
-rw-r--r-- | drivers/net/wireless/ath/ath5k/base.c | 29 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath5k/phy.c | 7 |
2 files changed, 17 insertions, 19 deletions
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index cc6d41dec332..648972df369d 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c | |||
@@ -195,7 +195,7 @@ static const struct ieee80211_rate ath5k_rates[] = { | |||
195 | static int __devinit ath5k_pci_probe(struct pci_dev *pdev, | 195 | static int __devinit ath5k_pci_probe(struct pci_dev *pdev, |
196 | const struct pci_device_id *id); | 196 | const struct pci_device_id *id); |
197 | static void __devexit ath5k_pci_remove(struct pci_dev *pdev); | 197 | static void __devexit ath5k_pci_remove(struct pci_dev *pdev); |
198 | #ifdef CONFIG_PM | 198 | #ifdef CONFIG_PM_SLEEP |
199 | static int ath5k_pci_suspend(struct device *dev); | 199 | static int ath5k_pci_suspend(struct device *dev); |
200 | static int ath5k_pci_resume(struct device *dev); | 200 | static int ath5k_pci_resume(struct device *dev); |
201 | 201 | ||
@@ -203,7 +203,7 @@ static SIMPLE_DEV_PM_OPS(ath5k_pm_ops, ath5k_pci_suspend, ath5k_pci_resume); | |||
203 | #define ATH5K_PM_OPS (&ath5k_pm_ops) | 203 | #define ATH5K_PM_OPS (&ath5k_pm_ops) |
204 | #else | 204 | #else |
205 | #define ATH5K_PM_OPS NULL | 205 | #define ATH5K_PM_OPS NULL |
206 | #endif /* CONFIG_PM */ | 206 | #endif /* CONFIG_PM_SLEEP */ |
207 | 207 | ||
208 | static struct pci_driver ath5k_pci_driver = { | 208 | static struct pci_driver ath5k_pci_driver = { |
209 | .name = KBUILD_MODNAME, | 209 | .name = KBUILD_MODNAME, |
@@ -222,7 +222,6 @@ static int ath5k_tx(struct ieee80211_hw *hw, struct sk_buff *skb); | |||
222 | static int ath5k_tx_queue(struct ieee80211_hw *hw, struct sk_buff *skb, | 222 | static int ath5k_tx_queue(struct ieee80211_hw *hw, struct sk_buff *skb, |
223 | struct ath5k_txq *txq); | 223 | struct ath5k_txq *txq); |
224 | static int ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan); | 224 | static int ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan); |
225 | static int ath5k_reset_wake(struct ath5k_softc *sc); | ||
226 | static int ath5k_start(struct ieee80211_hw *hw); | 225 | static int ath5k_start(struct ieee80211_hw *hw); |
227 | static void ath5k_stop(struct ieee80211_hw *hw); | 226 | static void ath5k_stop(struct ieee80211_hw *hw); |
228 | static int ath5k_add_interface(struct ieee80211_hw *hw, | 227 | static int ath5k_add_interface(struct ieee80211_hw *hw, |
@@ -709,7 +708,7 @@ ath5k_pci_remove(struct pci_dev *pdev) | |||
709 | ieee80211_free_hw(hw); | 708 | ieee80211_free_hw(hw); |
710 | } | 709 | } |
711 | 710 | ||
712 | #ifdef CONFIG_PM | 711 | #ifdef CONFIG_PM_SLEEP |
713 | static int ath5k_pci_suspend(struct device *dev) | 712 | static int ath5k_pci_suspend(struct device *dev) |
714 | { | 713 | { |
715 | struct ieee80211_hw *hw = pci_get_drvdata(to_pci_dev(dev)); | 714 | struct ieee80211_hw *hw = pci_get_drvdata(to_pci_dev(dev)); |
@@ -735,7 +734,7 @@ static int ath5k_pci_resume(struct device *dev) | |||
735 | ath5k_led_enable(sc); | 734 | ath5k_led_enable(sc); |
736 | return 0; | 735 | return 0; |
737 | } | 736 | } |
738 | #endif /* CONFIG_PM */ | 737 | #endif /* CONFIG_PM_SLEEP */ |
739 | 738 | ||
740 | 739 | ||
741 | /***********************\ | 740 | /***********************\ |
@@ -2770,7 +2769,7 @@ ath5k_tasklet_reset(unsigned long data) | |||
2770 | { | 2769 | { |
2771 | struct ath5k_softc *sc = (void *)data; | 2770 | struct ath5k_softc *sc = (void *)data; |
2772 | 2771 | ||
2773 | ath5k_reset_wake(sc); | 2772 | ath5k_reset(sc, sc->curchan); |
2774 | } | 2773 | } |
2775 | 2774 | ||
2776 | /* | 2775 | /* |
@@ -2941,23 +2940,13 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan) | |||
2941 | ath5k_beacon_config(sc); | 2940 | ath5k_beacon_config(sc); |
2942 | /* intrs are enabled by ath5k_beacon_config */ | 2941 | /* intrs are enabled by ath5k_beacon_config */ |
2943 | 2942 | ||
2943 | ieee80211_wake_queues(sc->hw); | ||
2944 | |||
2944 | return 0; | 2945 | return 0; |
2945 | err: | 2946 | err: |
2946 | return ret; | 2947 | return ret; |
2947 | } | 2948 | } |
2948 | 2949 | ||
2949 | static int | ||
2950 | ath5k_reset_wake(struct ath5k_softc *sc) | ||
2951 | { | ||
2952 | int ret; | ||
2953 | |||
2954 | ret = ath5k_reset(sc, sc->curchan); | ||
2955 | if (!ret) | ||
2956 | ieee80211_wake_queues(sc->hw); | ||
2957 | |||
2958 | return ret; | ||
2959 | } | ||
2960 | |||
2961 | static int ath5k_start(struct ieee80211_hw *hw) | 2950 | static int ath5k_start(struct ieee80211_hw *hw) |
2962 | { | 2951 | { |
2963 | return ath5k_init(hw->priv); | 2952 | return ath5k_init(hw->priv); |
@@ -3151,13 +3140,15 @@ static void ath5k_configure_filter(struct ieee80211_hw *hw, | |||
3151 | 3140 | ||
3152 | if (changed_flags & (FIF_PROMISC_IN_BSS | FIF_OTHER_BSS)) { | 3141 | if (changed_flags & (FIF_PROMISC_IN_BSS | FIF_OTHER_BSS)) { |
3153 | if (*new_flags & FIF_PROMISC_IN_BSS) { | 3142 | if (*new_flags & FIF_PROMISC_IN_BSS) { |
3154 | rfilt |= AR5K_RX_FILTER_PROM; | ||
3155 | __set_bit(ATH_STAT_PROMISC, sc->status); | 3143 | __set_bit(ATH_STAT_PROMISC, sc->status); |
3156 | } else { | 3144 | } else { |
3157 | __clear_bit(ATH_STAT_PROMISC, sc->status); | 3145 | __clear_bit(ATH_STAT_PROMISC, sc->status); |
3158 | } | 3146 | } |
3159 | } | 3147 | } |
3160 | 3148 | ||
3149 | if (test_bit(ATH_STAT_PROMISC, sc->status)) | ||
3150 | rfilt |= AR5K_RX_FILTER_PROM; | ||
3151 | |||
3161 | /* Note, AR5K_RX_FILTER_MCAST is already enabled */ | 3152 | /* Note, AR5K_RX_FILTER_MCAST is already enabled */ |
3162 | if (*new_flags & FIF_ALLMULTI) { | 3153 | if (*new_flags & FIF_ALLMULTI) { |
3163 | mfilt[0] = ~0; | 3154 | mfilt[0] = ~0; |
diff --git a/drivers/net/wireless/ath/ath5k/phy.c b/drivers/net/wireless/ath/ath5k/phy.c index 1b81c4778800..492cbb15720d 100644 --- a/drivers/net/wireless/ath/ath5k/phy.c +++ b/drivers/net/wireless/ath/ath5k/phy.c | |||
@@ -1814,6 +1814,13 @@ ath5k_hw_set_antenna_mode(struct ath5k_hw *ah, u8 ant_mode) | |||
1814 | u8 def_ant, tx_ant, ee_mode; | 1814 | u8 def_ant, tx_ant, ee_mode; |
1815 | u32 sta_id1 = 0; | 1815 | u32 sta_id1 = 0; |
1816 | 1816 | ||
1817 | /* if channel is not initialized yet we can't set the antennas | ||
1818 | * so just store the mode. it will be set on the next reset */ | ||
1819 | if (channel == NULL) { | ||
1820 | ah->ah_ant_mode = ant_mode; | ||
1821 | return; | ||
1822 | } | ||
1823 | |||
1817 | def_ant = ah->ah_def_ant; | 1824 | def_ant = ah->ah_def_ant; |
1818 | 1825 | ||
1819 | ATH5K_TRACE(ah->ah_sc); | 1826 | ATH5K_TRACE(ah->ah_sc); |