diff options
author | David S. Miller <davem@davemloft.net> | 2009-05-19 00:08:20 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-19 00:08:20 -0400 |
commit | bb803cfbecb03a0cf8dc7e1864f18dda6631af00 (patch) | |
tree | 6c0989693bea6f50cfa5c6bb14f52ec19668def3 /drivers/net/wireless/ath | |
parent | 3878fb6fdbceecca20b15748f807340854220f06 (diff) | |
parent | 511e11e396dc596825ce04d53d7f6d579404bc01 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/scsi/fcoe/fcoe.c
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r-- | drivers/net/wireless/ath/ath5k/base.c | 22 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/pci.c | 4 |
2 files changed, 15 insertions, 11 deletions
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index 6789c5dfcc76..dbfe9f45050e 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c | |||
@@ -218,7 +218,7 @@ static struct pci_driver ath5k_pci_driver = { | |||
218 | * Prototypes - MAC 802.11 stack related functions | 218 | * Prototypes - MAC 802.11 stack related functions |
219 | */ | 219 | */ |
220 | static int ath5k_tx(struct ieee80211_hw *hw, struct sk_buff *skb); | 220 | static int ath5k_tx(struct ieee80211_hw *hw, struct sk_buff *skb); |
221 | static int ath5k_reset(struct ath5k_softc *sc, bool stop, bool change_channel); | 221 | static int ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan); |
222 | static int ath5k_reset_wake(struct ath5k_softc *sc); | 222 | static int ath5k_reset_wake(struct ath5k_softc *sc); |
223 | static int ath5k_start(struct ieee80211_hw *hw); | 223 | static int ath5k_start(struct ieee80211_hw *hw); |
224 | static void ath5k_stop(struct ieee80211_hw *hw); | 224 | static void ath5k_stop(struct ieee80211_hw *hw); |
@@ -1076,16 +1076,13 @@ ath5k_chan_set(struct ath5k_softc *sc, struct ieee80211_channel *chan) | |||
1076 | if (chan->center_freq != sc->curchan->center_freq || | 1076 | if (chan->center_freq != sc->curchan->center_freq || |
1077 | chan->hw_value != sc->curchan->hw_value) { | 1077 | chan->hw_value != sc->curchan->hw_value) { |
1078 | 1078 | ||
1079 | sc->curchan = chan; | ||
1080 | sc->curband = &sc->sbands[chan->band]; | ||
1081 | |||
1082 | /* | 1079 | /* |
1083 | * To switch channels clear any pending DMA operations; | 1080 | * To switch channels clear any pending DMA operations; |
1084 | * wait long enough for the RX fifo to drain, reset the | 1081 | * wait long enough for the RX fifo to drain, reset the |
1085 | * hardware at the new frequency, and then re-enable | 1082 | * hardware at the new frequency, and then re-enable |
1086 | * the relevant bits of the h/w. | 1083 | * the relevant bits of the h/w. |
1087 | */ | 1084 | */ |
1088 | return ath5k_reset(sc, true, true); | 1085 | return ath5k_reset(sc, chan); |
1089 | } | 1086 | } |
1090 | 1087 | ||
1091 | return 0; | 1088 | return 0; |
@@ -2350,7 +2347,7 @@ ath5k_init(struct ath5k_softc *sc) | |||
2350 | sc->imask = AR5K_INT_RXOK | AR5K_INT_RXERR | AR5K_INT_RXEOL | | 2347 | sc->imask = AR5K_INT_RXOK | AR5K_INT_RXERR | AR5K_INT_RXEOL | |
2351 | AR5K_INT_RXORN | AR5K_INT_TXDESC | AR5K_INT_TXEOL | | 2348 | AR5K_INT_RXORN | AR5K_INT_TXDESC | AR5K_INT_TXEOL | |
2352 | AR5K_INT_FATAL | AR5K_INT_GLOBAL; | 2349 | AR5K_INT_FATAL | AR5K_INT_GLOBAL; |
2353 | ret = ath5k_reset(sc, false, false); | 2350 | ret = ath5k_reset(sc, NULL); |
2354 | if (ret) | 2351 | if (ret) |
2355 | goto done; | 2352 | goto done; |
2356 | 2353 | ||
@@ -2635,18 +2632,25 @@ drop_packet: | |||
2635 | return NETDEV_TX_OK; | 2632 | return NETDEV_TX_OK; |
2636 | } | 2633 | } |
2637 | 2634 | ||
2635 | /* | ||
2636 | * Reset the hardware. If chan is not NULL, then also pause rx/tx | ||
2637 | * and change to the given channel. | ||
2638 | */ | ||
2638 | static int | 2639 | static int |
2639 | ath5k_reset(struct ath5k_softc *sc, bool stop, bool change_channel) | 2640 | ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan) |
2640 | { | 2641 | { |
2641 | struct ath5k_hw *ah = sc->ah; | 2642 | struct ath5k_hw *ah = sc->ah; |
2642 | int ret; | 2643 | int ret; |
2643 | 2644 | ||
2644 | ATH5K_DBG(sc, ATH5K_DEBUG_RESET, "resetting\n"); | 2645 | ATH5K_DBG(sc, ATH5K_DEBUG_RESET, "resetting\n"); |
2645 | 2646 | ||
2646 | if (stop) { | 2647 | if (chan) { |
2647 | ath5k_hw_set_imr(ah, 0); | 2648 | ath5k_hw_set_imr(ah, 0); |
2648 | ath5k_txq_cleanup(sc); | 2649 | ath5k_txq_cleanup(sc); |
2649 | ath5k_rx_stop(sc); | 2650 | ath5k_rx_stop(sc); |
2651 | |||
2652 | sc->curchan = chan; | ||
2653 | sc->curband = &sc->sbands[chan->band]; | ||
2650 | } | 2654 | } |
2651 | ret = ath5k_hw_reset(ah, sc->opmode, sc->curchan, true); | 2655 | ret = ath5k_hw_reset(ah, sc->opmode, sc->curchan, true); |
2652 | if (ret) { | 2656 | if (ret) { |
@@ -2684,7 +2688,7 @@ ath5k_reset_wake(struct ath5k_softc *sc) | |||
2684 | { | 2688 | { |
2685 | int ret; | 2689 | int ret; |
2686 | 2690 | ||
2687 | ret = ath5k_reset(sc, true, true); | 2691 | ret = ath5k_reset(sc, sc->curchan); |
2688 | if (!ret) | 2692 | if (!ret) |
2689 | ieee80211_wake_queues(sc->hw); | 2693 | ieee80211_wake_queues(sc->hw); |
2690 | 2694 | ||
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c index 6dbc58580abb..168411d322a2 100644 --- a/drivers/net/wireless/ath/ath9k/pci.c +++ b/drivers/net/wireless/ath/ath9k/pci.c | |||
@@ -93,14 +93,14 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
93 | if (pci_enable_device(pdev)) | 93 | if (pci_enable_device(pdev)) |
94 | return -EIO; | 94 | return -EIO; |
95 | 95 | ||
96 | ret = pci_set_dma_mask(pdev, DMA_32BIT_MASK); | 96 | ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); |
97 | 97 | ||
98 | if (ret) { | 98 | if (ret) { |
99 | printk(KERN_ERR "ath9k: 32-bit DMA not available\n"); | 99 | printk(KERN_ERR "ath9k: 32-bit DMA not available\n"); |
100 | goto bad; | 100 | goto bad; |
101 | } | 101 | } |
102 | 102 | ||
103 | ret = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); | 103 | ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)); |
104 | 104 | ||
105 | if (ret) { | 105 | if (ret) { |
106 | printk(KERN_ERR "ath9k: 32-bit DMA consistent " | 106 | printk(KERN_ERR "ath9k: 32-bit DMA consistent " |