From: John W. Linville Date: Wed, 8 Dec 2010 21:23:31 +0000 (-0500) Subject: Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel... X-Git-Tag: v2.6.38-rc1~476^2~169^2^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=393934c6b5c8d00f9d1ae20670d4a770f07a418a;p=platform%2Fkernel%2Flinux-3.10.git Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6 Conflicts: drivers/net/wireless/ath/ath9k/ath9k.h drivers/net/wireless/ath/ath9k/main.c drivers/net/wireless/ath/ath9k/xmit.c --- 393934c6b5c8d00f9d1ae20670d4a770f07a418a diff --cc drivers/net/wireless/ath/ath9k/ath9k.h index 4210a930,0963071..9b5501f9 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h @@@ -311,7 -328,8 +311,7 @@@ void ath_rx_cleanup(struct ath_softc *s int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp); struct ath_txq *ath_txq_setup(struct ath_softc *sc, int qtype, int subtype); void ath_tx_cleanupq(struct ath_softc *sc, struct ath_txq *txq); - void ath_drain_all_txq(struct ath_softc *sc, bool retry_tx); -int ath_tx_setup(struct ath_softc *sc, int haltype); + bool ath_drain_all_txq(struct ath_softc *sc, bool retry_tx); void ath_draintxq(struct ath_softc *sc, struct ath_txq *txq, bool retry_tx); void ath_tx_node_init(struct ath_softc *sc, struct ath_node *an); diff --cc drivers/net/wireless/ath/ath9k/hif_usb.c index 45d4b24,0de3c3d..d0918bd --- a/drivers/net/wireless/ath/ath9k/hif_usb.c +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c @@@ -1013,8 -1021,16 +1013,15 @@@ static void ath9k_hif_usb_disconnect(st static int ath9k_hif_usb_suspend(struct usb_interface *interface, pm_message_t message) { - struct hif_device_usb *hif_dev = - (struct hif_device_usb *) usb_get_intfdata(interface); + struct hif_device_usb *hif_dev = usb_get_intfdata(interface); + /* + * The device has to be set to FULLSLEEP mode in case no + * interface is up. + */ + if (!(hif_dev->flags & HIF_USB_START)) + ath9k_htc_suspend(hif_dev->htc_handle); + ath9k_hif_usb_dealloc_urbs(hif_dev); return 0; diff --cc drivers/net/wireless/ath/ath9k/htc.h index afe39a9,c3b561d..fdf9d5f --- a/drivers/net/wireless/ath/ath9k/htc.h +++ b/drivers/net/wireless/ath/ath9k/htc.h @@@ -461,9 -463,10 +463,10 @@@ void ath9k_init_leds(struct ath9k_htc_p void ath9k_deinit_leds(struct ath9k_htc_priv *priv); int ath9k_htc_probe_device(struct htc_target *htc_handle, struct device *dev, - u16 devid, char *product); + u16 devid, char *product, u32 drv_info); void ath9k_htc_disconnect_device(struct htc_target *htc_handle, bool hotunplug); #ifdef CONFIG_PM + void ath9k_htc_suspend(struct htc_target *htc_handle); int ath9k_htc_resume(struct htc_target *htc_handle); #endif #ifdef CONFIG_ATH9K_HTC_DEBUGFS diff --cc drivers/net/wireless/ath/ath9k/htc_drv_init.c index 93f3f61,8776f49..0f6be35 --- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c @@@ -882,12 -891,17 +882,18 @@@ void ath9k_htc_disconnect_device(struc } #ifdef CONFIG_PM + + void ath9k_htc_suspend(struct htc_target *htc_handle) + { + ath9k_htc_setpower(htc_handle->drv_priv, ATH9K_PM_FULL_SLEEP); + } + int ath9k_htc_resume(struct htc_target *htc_handle) { + struct ath9k_htc_priv *priv = htc_handle->drv_priv; int ret; - ret = ath9k_htc_wait_for_target(htc_handle->drv_priv); + ret = ath9k_htc_wait_for_target(priv); if (ret) return ret; diff --cc drivers/net/wireless/ath/ath9k/main.c index 41a312a,c0c3464..daa3c9f --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c @@@ -245,10 -243,13 +245,11 @@@ int ath_set_channel(struct ath_softc *s * hardware at the new frequency, and then re-enable * the relevant bits of the h/w. */ - ath9k_hw_set_interrupts(ah, 0); + ath9k_hw_disable_interrupts(ah); - ath_drain_all_txq(sc, false); + stopped = ath_drain_all_txq(sc, false); - stopped = ath_stoprecv(sc); - spin_lock_bh(&sc->rx.pcu_lock); - + if (!ath_stoprecv(sc)) + stopped = false; /* XXX: do not flush receive queue here. We don't want * to flush data frames already in queue because of @@@ -1434,10 -1520,8 +1435,8 @@@ static void ath9k_remove_interface(stru struct ath_softc *sc = aphy->sc; struct ath_common *common = ath9k_hw_common(sc->sc_ah); struct ath_vif *avp = (void *)vif->drv_priv; - bool bs_valid = false; - int i; - ath_print(common, ATH_DBG_CONFIG, "Detach Interface\n"); + ath_dbg(common, ATH_DBG_CONFIG, "Detach Interface\n"); mutex_lock(&sc->mutex); diff --cc drivers/net/wireless/ath/ath9k/xmit.c index bce313e,aff0478..43c0109 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c @@@ -1193,17 -1142,8 +1193,8 @@@ bool ath_drain_all_txq(struct ath_soft } } - if (npend) { - int r; - - ath_err(common, "Failed to stop TX DMA. Resetting hardware!\n"); - - r = ath9k_hw_reset(ah, sc->sc_ah->curchan, ah->caldata, false); - if (r) - ath_err(common, - "Unable to reset hardware; reset status %d\n", - r); - } + if (npend) - ath_print(common, ATH_DBG_FATAL, "Failed to stop TX DMA!\n"); ++ ath_err(common, "Failed to stop TX DMA!\n"); for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++) { if (ATH_TXQ_SETUP(sc, i))