Loading drivers/net/wireless/ath/ath9k/hif_usb.c +2 −2 Original line number Diff line number Diff line Loading @@ -1178,7 +1178,7 @@ static int ath9k_hif_usb_probe(struct usb_interface *interface, } ret = ath9k_htc_hw_init(hif_dev->htc_handle, &hif_dev->udev->dev, hif_dev->device_id, &interface->dev, hif_dev->device_id, hif_dev->udev->product, id->driver_info); if (ret) { ret = -EINVAL; Loading Loading @@ -1296,7 +1296,7 @@ static int ath9k_hif_usb_resume(struct usb_interface *interface) #endif static struct usb_driver ath9k_hif_usb_driver = { .name = "ath9k_hif_usb", .name = KBUILD_MODNAME, .probe = ath9k_hif_usb_probe, .disconnect = ath9k_hif_usb_disconnect, #ifdef CONFIG_PM Loading drivers/net/wireless/ath/ath9k/hw.c +0 −9 Original line number Diff line number Diff line Loading @@ -1320,15 +1320,6 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, ah->txchainmask = common->tx_chainmask; ah->rxchainmask = common->rx_chainmask; if ((common->bus_ops->ath_bus_type != ATH_USB) && !ah->chip_fullsleep) { ath9k_hw_abortpcurecv(ah); if (!ath9k_hw_stopdmarecv(ah)) { ath_dbg(common, ATH_DBG_XMIT, "Failed to stop receive dma\n"); bChannelChange = false; } } if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE)) return -EIO; Loading drivers/net/wireless/ath/ath9k/mac.c +22 −3 Original line number Diff line number Diff line Loading @@ -710,27 +710,46 @@ void ath9k_hw_abortpcurecv(struct ath_hw *ah) } EXPORT_SYMBOL(ath9k_hw_abortpcurecv); bool ath9k_hw_stopdmarecv(struct ath_hw *ah) bool ath9k_hw_stopdmarecv(struct ath_hw *ah, bool *reset) { #define AH_RX_STOP_DMA_TIMEOUT 10000 /* usec */ struct ath_common *common = ath9k_hw_common(ah); u32 mac_status, last_mac_status = 0; int i; /* Enable access to the DMA observation bus */ REG_WRITE(ah, AR_MACMISC, ((AR_MACMISC_DMA_OBS_LINE_8 << AR_MACMISC_DMA_OBS_S) | (AR_MACMISC_MISC_OBS_BUS_1 << AR_MACMISC_MISC_OBS_BUS_MSB_S))); REG_WRITE(ah, AR_CR, AR_CR_RXD); /* Wait for rx enable bit to go low */ for (i = AH_RX_STOP_DMA_TIMEOUT / AH_TIME_QUANTUM; i != 0; i--) { if ((REG_READ(ah, AR_CR) & AR_CR_RXE) == 0) break; if (!AR_SREV_9300_20_OR_LATER(ah)) { mac_status = REG_READ(ah, AR_DMADBG_7) & 0x7f0; if (mac_status == 0x1c0 && mac_status == last_mac_status) { *reset = true; break; } last_mac_status = mac_status; } udelay(AH_TIME_QUANTUM); } if (i == 0) { ath_err(common, "DMA failed to stop in %d ms AR_CR=0x%08x AR_DIAG_SW=0x%08x\n", "DMA failed to stop in %d ms AR_CR=0x%08x AR_DIAG_SW=0x%08x DMADBG_7=0x%08x\n", AH_RX_STOP_DMA_TIMEOUT / 1000, REG_READ(ah, AR_CR), REG_READ(ah, AR_DIAG_SW)); REG_READ(ah, AR_DIAG_SW), REG_READ(ah, AR_DMADBG_7)); return false; } else { return true; Loading drivers/net/wireless/ath/ath9k/mac.h +1 −1 Original line number Diff line number Diff line Loading @@ -694,7 +694,7 @@ bool ath9k_hw_setrxabort(struct ath_hw *ah, bool set); void ath9k_hw_putrxbuf(struct ath_hw *ah, u32 rxdp); void ath9k_hw_startpcureceive(struct ath_hw *ah, bool is_scanning); void ath9k_hw_abortpcurecv(struct ath_hw *ah); bool ath9k_hw_stopdmarecv(struct ath_hw *ah); bool ath9k_hw_stopdmarecv(struct ath_hw *ah, bool *reset); int ath9k_hw_beaconq_setup(struct ath_hw *ah); /* Interrupt Handling */ Loading drivers/net/wireless/ath/ath9k/main.c +10 −2 Original line number Diff line number Diff line Loading @@ -1371,7 +1371,6 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw, ath9k_calculate_iter_data(hw, vif, &iter_data); ath9k_ps_wakeup(sc); /* Set BSSID mask. */ memcpy(common->bssidmask, iter_data.mask, ETH_ALEN); ath_hw_setbssidmask(common); Loading Loading @@ -1406,7 +1405,6 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw, } ath9k_hw_set_interrupts(ah, ah->imask); ath9k_ps_restore(sc); /* Set up ANI */ if ((iter_data.naps + iter_data.nadhocs) > 0) { Loading Loading @@ -1451,6 +1449,7 @@ static int ath9k_add_interface(struct ieee80211_hw *hw, struct ath_common *common = ath9k_hw_common(ah); int ret = 0; ath9k_ps_wakeup(sc); mutex_lock(&sc->mutex); switch (vif->type) { Loading Loading @@ -1494,6 +1493,7 @@ static int ath9k_add_interface(struct ieee80211_hw *hw, ath9k_do_vif_add_setup(hw, vif); out: mutex_unlock(&sc->mutex); ath9k_ps_restore(sc); return ret; } Loading @@ -1508,6 +1508,7 @@ static int ath9k_change_interface(struct ieee80211_hw *hw, ath_dbg(common, ATH_DBG_CONFIG, "Change Interface\n"); mutex_lock(&sc->mutex); ath9k_ps_wakeup(sc); /* See if new interface type is valid. */ if ((new_type == NL80211_IFTYPE_ADHOC) && Loading Loading @@ -1537,6 +1538,7 @@ static int ath9k_change_interface(struct ieee80211_hw *hw, ath9k_do_vif_add_setup(hw, vif); out: ath9k_ps_restore(sc); mutex_unlock(&sc->mutex); return ret; } Loading @@ -1549,6 +1551,7 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw, ath_dbg(common, ATH_DBG_CONFIG, "Detach Interface\n"); ath9k_ps_wakeup(sc); mutex_lock(&sc->mutex); sc->nvifs--; Loading @@ -1560,6 +1563,7 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw, ath9k_calculate_summary_state(hw, NULL); mutex_unlock(&sc->mutex); ath9k_ps_restore(sc); } static void ath9k_enable_ps(struct ath_softc *sc) Loading Loading @@ -1840,6 +1844,7 @@ static int ath9k_conf_tx(struct ieee80211_hw *hw, u16 queue, txq = sc->tx.txq_map[queue]; ath9k_ps_wakeup(sc); mutex_lock(&sc->mutex); memset(&qi, 0, sizeof(struct ath9k_tx_queue_info)); Loading @@ -1863,6 +1868,7 @@ static int ath9k_conf_tx(struct ieee80211_hw *hw, u16 queue, ath_beaconq_config(sc); mutex_unlock(&sc->mutex); ath9k_ps_restore(sc); return ret; } Loading Loading @@ -2021,6 +2027,7 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw, int slottime; int error; ath9k_ps_wakeup(sc); mutex_lock(&sc->mutex); if (changed & BSS_CHANGED_BSSID) { Loading Loading @@ -2106,6 +2113,7 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw, } mutex_unlock(&sc->mutex); ath9k_ps_restore(sc); } static u64 ath9k_get_tsf(struct ieee80211_hw *hw) Loading Loading
drivers/net/wireless/ath/ath9k/hif_usb.c +2 −2 Original line number Diff line number Diff line Loading @@ -1178,7 +1178,7 @@ static int ath9k_hif_usb_probe(struct usb_interface *interface, } ret = ath9k_htc_hw_init(hif_dev->htc_handle, &hif_dev->udev->dev, hif_dev->device_id, &interface->dev, hif_dev->device_id, hif_dev->udev->product, id->driver_info); if (ret) { ret = -EINVAL; Loading Loading @@ -1296,7 +1296,7 @@ static int ath9k_hif_usb_resume(struct usb_interface *interface) #endif static struct usb_driver ath9k_hif_usb_driver = { .name = "ath9k_hif_usb", .name = KBUILD_MODNAME, .probe = ath9k_hif_usb_probe, .disconnect = ath9k_hif_usb_disconnect, #ifdef CONFIG_PM Loading
drivers/net/wireless/ath/ath9k/hw.c +0 −9 Original line number Diff line number Diff line Loading @@ -1320,15 +1320,6 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, ah->txchainmask = common->tx_chainmask; ah->rxchainmask = common->rx_chainmask; if ((common->bus_ops->ath_bus_type != ATH_USB) && !ah->chip_fullsleep) { ath9k_hw_abortpcurecv(ah); if (!ath9k_hw_stopdmarecv(ah)) { ath_dbg(common, ATH_DBG_XMIT, "Failed to stop receive dma\n"); bChannelChange = false; } } if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE)) return -EIO; Loading
drivers/net/wireless/ath/ath9k/mac.c +22 −3 Original line number Diff line number Diff line Loading @@ -710,27 +710,46 @@ void ath9k_hw_abortpcurecv(struct ath_hw *ah) } EXPORT_SYMBOL(ath9k_hw_abortpcurecv); bool ath9k_hw_stopdmarecv(struct ath_hw *ah) bool ath9k_hw_stopdmarecv(struct ath_hw *ah, bool *reset) { #define AH_RX_STOP_DMA_TIMEOUT 10000 /* usec */ struct ath_common *common = ath9k_hw_common(ah); u32 mac_status, last_mac_status = 0; int i; /* Enable access to the DMA observation bus */ REG_WRITE(ah, AR_MACMISC, ((AR_MACMISC_DMA_OBS_LINE_8 << AR_MACMISC_DMA_OBS_S) | (AR_MACMISC_MISC_OBS_BUS_1 << AR_MACMISC_MISC_OBS_BUS_MSB_S))); REG_WRITE(ah, AR_CR, AR_CR_RXD); /* Wait for rx enable bit to go low */ for (i = AH_RX_STOP_DMA_TIMEOUT / AH_TIME_QUANTUM; i != 0; i--) { if ((REG_READ(ah, AR_CR) & AR_CR_RXE) == 0) break; if (!AR_SREV_9300_20_OR_LATER(ah)) { mac_status = REG_READ(ah, AR_DMADBG_7) & 0x7f0; if (mac_status == 0x1c0 && mac_status == last_mac_status) { *reset = true; break; } last_mac_status = mac_status; } udelay(AH_TIME_QUANTUM); } if (i == 0) { ath_err(common, "DMA failed to stop in %d ms AR_CR=0x%08x AR_DIAG_SW=0x%08x\n", "DMA failed to stop in %d ms AR_CR=0x%08x AR_DIAG_SW=0x%08x DMADBG_7=0x%08x\n", AH_RX_STOP_DMA_TIMEOUT / 1000, REG_READ(ah, AR_CR), REG_READ(ah, AR_DIAG_SW)); REG_READ(ah, AR_DIAG_SW), REG_READ(ah, AR_DMADBG_7)); return false; } else { return true; Loading
drivers/net/wireless/ath/ath9k/mac.h +1 −1 Original line number Diff line number Diff line Loading @@ -694,7 +694,7 @@ bool ath9k_hw_setrxabort(struct ath_hw *ah, bool set); void ath9k_hw_putrxbuf(struct ath_hw *ah, u32 rxdp); void ath9k_hw_startpcureceive(struct ath_hw *ah, bool is_scanning); void ath9k_hw_abortpcurecv(struct ath_hw *ah); bool ath9k_hw_stopdmarecv(struct ath_hw *ah); bool ath9k_hw_stopdmarecv(struct ath_hw *ah, bool *reset); int ath9k_hw_beaconq_setup(struct ath_hw *ah); /* Interrupt Handling */ Loading
drivers/net/wireless/ath/ath9k/main.c +10 −2 Original line number Diff line number Diff line Loading @@ -1371,7 +1371,6 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw, ath9k_calculate_iter_data(hw, vif, &iter_data); ath9k_ps_wakeup(sc); /* Set BSSID mask. */ memcpy(common->bssidmask, iter_data.mask, ETH_ALEN); ath_hw_setbssidmask(common); Loading Loading @@ -1406,7 +1405,6 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw, } ath9k_hw_set_interrupts(ah, ah->imask); ath9k_ps_restore(sc); /* Set up ANI */ if ((iter_data.naps + iter_data.nadhocs) > 0) { Loading Loading @@ -1451,6 +1449,7 @@ static int ath9k_add_interface(struct ieee80211_hw *hw, struct ath_common *common = ath9k_hw_common(ah); int ret = 0; ath9k_ps_wakeup(sc); mutex_lock(&sc->mutex); switch (vif->type) { Loading Loading @@ -1494,6 +1493,7 @@ static int ath9k_add_interface(struct ieee80211_hw *hw, ath9k_do_vif_add_setup(hw, vif); out: mutex_unlock(&sc->mutex); ath9k_ps_restore(sc); return ret; } Loading @@ -1508,6 +1508,7 @@ static int ath9k_change_interface(struct ieee80211_hw *hw, ath_dbg(common, ATH_DBG_CONFIG, "Change Interface\n"); mutex_lock(&sc->mutex); ath9k_ps_wakeup(sc); /* See if new interface type is valid. */ if ((new_type == NL80211_IFTYPE_ADHOC) && Loading Loading @@ -1537,6 +1538,7 @@ static int ath9k_change_interface(struct ieee80211_hw *hw, ath9k_do_vif_add_setup(hw, vif); out: ath9k_ps_restore(sc); mutex_unlock(&sc->mutex); return ret; } Loading @@ -1549,6 +1551,7 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw, ath_dbg(common, ATH_DBG_CONFIG, "Detach Interface\n"); ath9k_ps_wakeup(sc); mutex_lock(&sc->mutex); sc->nvifs--; Loading @@ -1560,6 +1563,7 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw, ath9k_calculate_summary_state(hw, NULL); mutex_unlock(&sc->mutex); ath9k_ps_restore(sc); } static void ath9k_enable_ps(struct ath_softc *sc) Loading Loading @@ -1840,6 +1844,7 @@ static int ath9k_conf_tx(struct ieee80211_hw *hw, u16 queue, txq = sc->tx.txq_map[queue]; ath9k_ps_wakeup(sc); mutex_lock(&sc->mutex); memset(&qi, 0, sizeof(struct ath9k_tx_queue_info)); Loading @@ -1863,6 +1868,7 @@ static int ath9k_conf_tx(struct ieee80211_hw *hw, u16 queue, ath_beaconq_config(sc); mutex_unlock(&sc->mutex); ath9k_ps_restore(sc); return ret; } Loading Loading @@ -2021,6 +2027,7 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw, int slottime; int error; ath9k_ps_wakeup(sc); mutex_lock(&sc->mutex); if (changed & BSS_CHANGED_BSSID) { Loading Loading @@ -2106,6 +2113,7 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw, } mutex_unlock(&sc->mutex); ath9k_ps_restore(sc); } static u64 ath9k_get_tsf(struct ieee80211_hw *hw) Loading