diff options
author | Ingo Molnar <mingo@elte.hu> | 2011-05-12 03:36:18 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-05-12 03:36:18 -0400 |
commit | 9cb5baba5e3acba0994ad899ee908799104c9965 (patch) | |
tree | d5ff16000256a0bf56279926e6114b4603ede2b4 /drivers/net/wireless/ath | |
parent | 7142d17e8f935fa842e9f6eece2281b6d41625d6 (diff) | |
parent | 693d92a1bbc9e42681c42ed190bd42b636ca876f (diff) |
Merge commit 'v2.6.39-rc7' into sched/core
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hif_usb.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/mac.c | 25 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/mac.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/recv.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/ath/regd_common.h | 1 |
7 files changed, 39 insertions, 20 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c index f1b8af64569c..2d10239ce829 100644 --- a/drivers/net/wireless/ath/ath9k/hif_usb.c +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c | |||
@@ -1040,7 +1040,7 @@ static int ath9k_hif_usb_probe(struct usb_interface *interface, | |||
1040 | } | 1040 | } |
1041 | 1041 | ||
1042 | ret = ath9k_htc_hw_init(hif_dev->htc_handle, | 1042 | ret = ath9k_htc_hw_init(hif_dev->htc_handle, |
1043 | &hif_dev->udev->dev, hif_dev->device_id, | 1043 | &interface->dev, hif_dev->device_id, |
1044 | hif_dev->udev->product, id->driver_info); | 1044 | hif_dev->udev->product, id->driver_info); |
1045 | if (ret) { | 1045 | if (ret) { |
1046 | ret = -EINVAL; | 1046 | ret = -EINVAL; |
@@ -1158,7 +1158,7 @@ fail_resume: | |||
1158 | #endif | 1158 | #endif |
1159 | 1159 | ||
1160 | static struct usb_driver ath9k_hif_usb_driver = { | 1160 | static struct usb_driver ath9k_hif_usb_driver = { |
1161 | .name = "ath9k_hif_usb", | 1161 | .name = KBUILD_MODNAME, |
1162 | .probe = ath9k_hif_usb_probe, | 1162 | .probe = ath9k_hif_usb_probe, |
1163 | .disconnect = ath9k_hif_usb_disconnect, | 1163 | .disconnect = ath9k_hif_usb_disconnect, |
1164 | #ifdef CONFIG_PM | 1164 | #ifdef CONFIG_PM |
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 1ec9bcd6b281..c95bc5cc1a1f 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -1254,15 +1254,6 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, | |||
1254 | ah->txchainmask = common->tx_chainmask; | 1254 | ah->txchainmask = common->tx_chainmask; |
1255 | ah->rxchainmask = common->rx_chainmask; | 1255 | ah->rxchainmask = common->rx_chainmask; |
1256 | 1256 | ||
1257 | if ((common->bus_ops->ath_bus_type != ATH_USB) && !ah->chip_fullsleep) { | ||
1258 | ath9k_hw_abortpcurecv(ah); | ||
1259 | if (!ath9k_hw_stopdmarecv(ah)) { | ||
1260 | ath_dbg(common, ATH_DBG_XMIT, | ||
1261 | "Failed to stop receive dma\n"); | ||
1262 | bChannelChange = false; | ||
1263 | } | ||
1264 | } | ||
1265 | |||
1266 | if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE)) | 1257 | if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE)) |
1267 | return -EIO; | 1258 | return -EIO; |
1268 | 1259 | ||
diff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c index 562257ac52cf..edc1cbbfecaf 100644 --- a/drivers/net/wireless/ath/ath9k/mac.c +++ b/drivers/net/wireless/ath/ath9k/mac.c | |||
@@ -751,28 +751,47 @@ void ath9k_hw_abortpcurecv(struct ath_hw *ah) | |||
751 | } | 751 | } |
752 | EXPORT_SYMBOL(ath9k_hw_abortpcurecv); | 752 | EXPORT_SYMBOL(ath9k_hw_abortpcurecv); |
753 | 753 | ||
754 | bool ath9k_hw_stopdmarecv(struct ath_hw *ah) | 754 | bool ath9k_hw_stopdmarecv(struct ath_hw *ah, bool *reset) |
755 | { | 755 | { |
756 | #define AH_RX_STOP_DMA_TIMEOUT 10000 /* usec */ | 756 | #define AH_RX_STOP_DMA_TIMEOUT 10000 /* usec */ |
757 | #define AH_RX_TIME_QUANTUM 100 /* usec */ | 757 | #define AH_RX_TIME_QUANTUM 100 /* usec */ |
758 | struct ath_common *common = ath9k_hw_common(ah); | 758 | struct ath_common *common = ath9k_hw_common(ah); |
759 | u32 mac_status, last_mac_status = 0; | ||
759 | int i; | 760 | int i; |
760 | 761 | ||
762 | /* Enable access to the DMA observation bus */ | ||
763 | REG_WRITE(ah, AR_MACMISC, | ||
764 | ((AR_MACMISC_DMA_OBS_LINE_8 << AR_MACMISC_DMA_OBS_S) | | ||
765 | (AR_MACMISC_MISC_OBS_BUS_1 << | ||
766 | AR_MACMISC_MISC_OBS_BUS_MSB_S))); | ||
767 | |||
761 | REG_WRITE(ah, AR_CR, AR_CR_RXD); | 768 | REG_WRITE(ah, AR_CR, AR_CR_RXD); |
762 | 769 | ||
763 | /* Wait for rx enable bit to go low */ | 770 | /* Wait for rx enable bit to go low */ |
764 | for (i = AH_RX_STOP_DMA_TIMEOUT / AH_TIME_QUANTUM; i != 0; i--) { | 771 | for (i = AH_RX_STOP_DMA_TIMEOUT / AH_TIME_QUANTUM; i != 0; i--) { |
765 | if ((REG_READ(ah, AR_CR) & AR_CR_RXE) == 0) | 772 | if ((REG_READ(ah, AR_CR) & AR_CR_RXE) == 0) |
766 | break; | 773 | break; |
774 | |||
775 | if (!AR_SREV_9300_20_OR_LATER(ah)) { | ||
776 | mac_status = REG_READ(ah, AR_DMADBG_7) & 0x7f0; | ||
777 | if (mac_status == 0x1c0 && mac_status == last_mac_status) { | ||
778 | *reset = true; | ||
779 | break; | ||
780 | } | ||
781 | |||
782 | last_mac_status = mac_status; | ||
783 | } | ||
784 | |||
767 | udelay(AH_TIME_QUANTUM); | 785 | udelay(AH_TIME_QUANTUM); |
768 | } | 786 | } |
769 | 787 | ||
770 | if (i == 0) { | 788 | if (i == 0) { |
771 | ath_err(common, | 789 | ath_err(common, |
772 | "DMA failed to stop in %d ms AR_CR=0x%08x AR_DIAG_SW=0x%08x\n", | 790 | "DMA failed to stop in %d ms AR_CR=0x%08x AR_DIAG_SW=0x%08x DMADBG_7=0x%08x\n", |
773 | AH_RX_STOP_DMA_TIMEOUT / 1000, | 791 | AH_RX_STOP_DMA_TIMEOUT / 1000, |
774 | REG_READ(ah, AR_CR), | 792 | REG_READ(ah, AR_CR), |
775 | REG_READ(ah, AR_DIAG_SW)); | 793 | REG_READ(ah, AR_DIAG_SW), |
794 | REG_READ(ah, AR_DMADBG_7)); | ||
776 | return false; | 795 | return false; |
777 | } else { | 796 | } else { |
778 | return true; | 797 | return true; |
diff --git a/drivers/net/wireless/ath/ath9k/mac.h b/drivers/net/wireless/ath/ath9k/mac.h index b2b2ff852c32..c2a59386fb9c 100644 --- a/drivers/net/wireless/ath/ath9k/mac.h +++ b/drivers/net/wireless/ath/ath9k/mac.h | |||
@@ -695,7 +695,7 @@ bool ath9k_hw_setrxabort(struct ath_hw *ah, bool set); | |||
695 | void ath9k_hw_putrxbuf(struct ath_hw *ah, u32 rxdp); | 695 | void ath9k_hw_putrxbuf(struct ath_hw *ah, u32 rxdp); |
696 | void ath9k_hw_startpcureceive(struct ath_hw *ah, bool is_scanning); | 696 | void ath9k_hw_startpcureceive(struct ath_hw *ah, bool is_scanning); |
697 | void ath9k_hw_abortpcurecv(struct ath_hw *ah); | 697 | void ath9k_hw_abortpcurecv(struct ath_hw *ah); |
698 | bool ath9k_hw_stopdmarecv(struct ath_hw *ah); | 698 | bool ath9k_hw_stopdmarecv(struct ath_hw *ah, bool *reset); |
699 | int ath9k_hw_beaconq_setup(struct ath_hw *ah); | 699 | int ath9k_hw_beaconq_setup(struct ath_hw *ah); |
700 | 700 | ||
701 | /* Interrupt Handling */ | 701 | /* Interrupt Handling */ |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index dddb85de622d..17d04ff8d678 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -1376,7 +1376,6 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw, | |||
1376 | 1376 | ||
1377 | ath9k_calculate_iter_data(hw, vif, &iter_data); | 1377 | ath9k_calculate_iter_data(hw, vif, &iter_data); |
1378 | 1378 | ||
1379 | ath9k_ps_wakeup(sc); | ||
1380 | /* Set BSSID mask. */ | 1379 | /* Set BSSID mask. */ |
1381 | memcpy(common->bssidmask, iter_data.mask, ETH_ALEN); | 1380 | memcpy(common->bssidmask, iter_data.mask, ETH_ALEN); |
1382 | ath_hw_setbssidmask(common); | 1381 | ath_hw_setbssidmask(common); |
@@ -1411,7 +1410,6 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw, | |||
1411 | } | 1410 | } |
1412 | 1411 | ||
1413 | ath9k_hw_set_interrupts(ah, ah->imask); | 1412 | ath9k_hw_set_interrupts(ah, ah->imask); |
1414 | ath9k_ps_restore(sc); | ||
1415 | 1413 | ||
1416 | /* Set up ANI */ | 1414 | /* Set up ANI */ |
1417 | if ((iter_data.naps + iter_data.nadhocs) > 0) { | 1415 | if ((iter_data.naps + iter_data.nadhocs) > 0) { |
@@ -1457,6 +1455,7 @@ static int ath9k_add_interface(struct ieee80211_hw *hw, | |||
1457 | struct ath_vif *avp = (void *)vif->drv_priv; | 1455 | struct ath_vif *avp = (void *)vif->drv_priv; |
1458 | int ret = 0; | 1456 | int ret = 0; |
1459 | 1457 | ||
1458 | ath9k_ps_wakeup(sc); | ||
1460 | mutex_lock(&sc->mutex); | 1459 | mutex_lock(&sc->mutex); |
1461 | 1460 | ||
1462 | switch (vif->type) { | 1461 | switch (vif->type) { |
@@ -1503,6 +1502,7 @@ static int ath9k_add_interface(struct ieee80211_hw *hw, | |||
1503 | ath9k_do_vif_add_setup(hw, vif); | 1502 | ath9k_do_vif_add_setup(hw, vif); |
1504 | out: | 1503 | out: |
1505 | mutex_unlock(&sc->mutex); | 1504 | mutex_unlock(&sc->mutex); |
1505 | ath9k_ps_restore(sc); | ||
1506 | return ret; | 1506 | return ret; |
1507 | } | 1507 | } |
1508 | 1508 | ||
@@ -1517,6 +1517,7 @@ static int ath9k_change_interface(struct ieee80211_hw *hw, | |||
1517 | 1517 | ||
1518 | ath_dbg(common, ATH_DBG_CONFIG, "Change Interface\n"); | 1518 | ath_dbg(common, ATH_DBG_CONFIG, "Change Interface\n"); |
1519 | mutex_lock(&sc->mutex); | 1519 | mutex_lock(&sc->mutex); |
1520 | ath9k_ps_wakeup(sc); | ||
1520 | 1521 | ||
1521 | /* See if new interface type is valid. */ | 1522 | /* See if new interface type is valid. */ |
1522 | if ((new_type == NL80211_IFTYPE_ADHOC) && | 1523 | if ((new_type == NL80211_IFTYPE_ADHOC) && |
@@ -1546,6 +1547,7 @@ static int ath9k_change_interface(struct ieee80211_hw *hw, | |||
1546 | 1547 | ||
1547 | ath9k_do_vif_add_setup(hw, vif); | 1548 | ath9k_do_vif_add_setup(hw, vif); |
1548 | out: | 1549 | out: |
1550 | ath9k_ps_restore(sc); | ||
1549 | mutex_unlock(&sc->mutex); | 1551 | mutex_unlock(&sc->mutex); |
1550 | return ret; | 1552 | return ret; |
1551 | } | 1553 | } |
@@ -1558,6 +1560,7 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw, | |||
1558 | 1560 | ||
1559 | ath_dbg(common, ATH_DBG_CONFIG, "Detach Interface\n"); | 1561 | ath_dbg(common, ATH_DBG_CONFIG, "Detach Interface\n"); |
1560 | 1562 | ||
1563 | ath9k_ps_wakeup(sc); | ||
1561 | mutex_lock(&sc->mutex); | 1564 | mutex_lock(&sc->mutex); |
1562 | 1565 | ||
1563 | sc->nvifs--; | 1566 | sc->nvifs--; |
@@ -1569,6 +1572,7 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw, | |||
1569 | ath9k_calculate_summary_state(hw, NULL); | 1572 | ath9k_calculate_summary_state(hw, NULL); |
1570 | 1573 | ||
1571 | mutex_unlock(&sc->mutex); | 1574 | mutex_unlock(&sc->mutex); |
1575 | ath9k_ps_restore(sc); | ||
1572 | } | 1576 | } |
1573 | 1577 | ||
1574 | static void ath9k_enable_ps(struct ath_softc *sc) | 1578 | static void ath9k_enable_ps(struct ath_softc *sc) |
@@ -1809,6 +1813,7 @@ static int ath9k_conf_tx(struct ieee80211_hw *hw, u16 queue, | |||
1809 | 1813 | ||
1810 | txq = sc->tx.txq_map[queue]; | 1814 | txq = sc->tx.txq_map[queue]; |
1811 | 1815 | ||
1816 | ath9k_ps_wakeup(sc); | ||
1812 | mutex_lock(&sc->mutex); | 1817 | mutex_lock(&sc->mutex); |
1813 | 1818 | ||
1814 | memset(&qi, 0, sizeof(struct ath9k_tx_queue_info)); | 1819 | memset(&qi, 0, sizeof(struct ath9k_tx_queue_info)); |
@@ -1832,6 +1837,7 @@ static int ath9k_conf_tx(struct ieee80211_hw *hw, u16 queue, | |||
1832 | ath_beaconq_config(sc); | 1837 | ath_beaconq_config(sc); |
1833 | 1838 | ||
1834 | mutex_unlock(&sc->mutex); | 1839 | mutex_unlock(&sc->mutex); |
1840 | ath9k_ps_restore(sc); | ||
1835 | 1841 | ||
1836 | return ret; | 1842 | return ret; |
1837 | } | 1843 | } |
@@ -1894,6 +1900,7 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw, | |||
1894 | int slottime; | 1900 | int slottime; |
1895 | int error; | 1901 | int error; |
1896 | 1902 | ||
1903 | ath9k_ps_wakeup(sc); | ||
1897 | mutex_lock(&sc->mutex); | 1904 | mutex_lock(&sc->mutex); |
1898 | 1905 | ||
1899 | if (changed & BSS_CHANGED_BSSID) { | 1906 | if (changed & BSS_CHANGED_BSSID) { |
@@ -1994,6 +2001,7 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw, | |||
1994 | } | 2001 | } |
1995 | 2002 | ||
1996 | mutex_unlock(&sc->mutex); | 2003 | mutex_unlock(&sc->mutex); |
2004 | ath9k_ps_restore(sc); | ||
1997 | } | 2005 | } |
1998 | 2006 | ||
1999 | static u64 ath9k_get_tsf(struct ieee80211_hw *hw) | 2007 | static u64 ath9k_get_tsf(struct ieee80211_hw *hw) |
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index a9c3f4672aa0..b29c80def35e 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c | |||
@@ -486,12 +486,12 @@ start_recv: | |||
486 | bool ath_stoprecv(struct ath_softc *sc) | 486 | bool ath_stoprecv(struct ath_softc *sc) |
487 | { | 487 | { |
488 | struct ath_hw *ah = sc->sc_ah; | 488 | struct ath_hw *ah = sc->sc_ah; |
489 | bool stopped; | 489 | bool stopped, reset = false; |
490 | 490 | ||
491 | spin_lock_bh(&sc->rx.rxbuflock); | 491 | spin_lock_bh(&sc->rx.rxbuflock); |
492 | ath9k_hw_abortpcurecv(ah); | 492 | ath9k_hw_abortpcurecv(ah); |
493 | ath9k_hw_setrxfilter(ah, 0); | 493 | ath9k_hw_setrxfilter(ah, 0); |
494 | stopped = ath9k_hw_stopdmarecv(ah); | 494 | stopped = ath9k_hw_stopdmarecv(ah, &reset); |
495 | 495 | ||
496 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) | 496 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) |
497 | ath_edma_stop_recv(sc); | 497 | ath_edma_stop_recv(sc); |
@@ -506,7 +506,7 @@ bool ath_stoprecv(struct ath_softc *sc) | |||
506 | "confusing the DMA engine when we start RX up\n"); | 506 | "confusing the DMA engine when we start RX up\n"); |
507 | ATH_DBG_WARN_ON_ONCE(!stopped); | 507 | ATH_DBG_WARN_ON_ONCE(!stopped); |
508 | } | 508 | } |
509 | return stopped; | 509 | return stopped && !reset; |
510 | } | 510 | } |
511 | 511 | ||
512 | void ath_flushrecv(struct ath_softc *sc) | 512 | void ath_flushrecv(struct ath_softc *sc) |
diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h index 248c670fdfbe..5c2cfe694152 100644 --- a/drivers/net/wireless/ath/regd_common.h +++ b/drivers/net/wireless/ath/regd_common.h | |||
@@ -195,6 +195,7 @@ static struct reg_dmn_pair_mapping regDomainPairs[] = { | |||
195 | {APL9_WORLD, CTL_ETSI, CTL_ETSI}, | 195 | {APL9_WORLD, CTL_ETSI, CTL_ETSI}, |
196 | 196 | ||
197 | {APL3_FCCA, CTL_FCC, CTL_FCC}, | 197 | {APL3_FCCA, CTL_FCC, CTL_FCC}, |
198 | {APL7_FCCA, CTL_FCC, CTL_FCC}, | ||
198 | {APL1_ETSIC, CTL_FCC, CTL_ETSI}, | 199 | {APL1_ETSIC, CTL_FCC, CTL_ETSI}, |
199 | {APL2_ETSIC, CTL_FCC, CTL_ETSI}, | 200 | {APL2_ETSIC, CTL_FCC, CTL_ETSI}, |
200 | {APL2_APLD, CTL_FCC, NO_CTL}, | 201 | {APL2_APLD, CTL_FCC, NO_CTL}, |