Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
authorJohn W. Linville <linville@tuxdriver.com>
Wed, 8 Dec 2010 21:23:31 +0000 (16:23 -0500)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 8 Dec 2010 21:23:31 +0000 (16:23 -0500)
Conflicts:
drivers/net/wireless/ath/ath9k/ath9k.h
drivers/net/wireless/ath/ath9k/main.c
drivers/net/wireless/ath/ath9k/xmit.c

13 files changed:
1  2 
drivers/net/wireless/ath/ath5k/base.c
drivers/net/wireless/ath/ath9k/ath9k.h
drivers/net/wireless/ath/ath9k/eeprom_def.c
drivers/net/wireless/ath/ath9k/hif_usb.c
drivers/net/wireless/ath/ath9k/htc.h
drivers/net/wireless/ath/ath9k/htc_drv_init.c
drivers/net/wireless/ath/ath9k/htc_drv_main.c
drivers/net/wireless/ath/ath9k/mac.c
drivers/net/wireless/ath/ath9k/main.c
drivers/net/wireless/ath/ath9k/recv.c
drivers/net/wireless/ath/ath9k/xmit.c
drivers/net/wireless/orinoco/wext.c
net/mac80211/tx.c

Simple merge
@@@ -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);
@@@ -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;
@@@ -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
@@@ -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;
  
Simple merge
@@@ -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);
  
Simple merge
@@@ -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))
Simple merge
Simple merge