Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
authorJohn W. Linville <linville@tuxdriver.com>
Thu, 30 Jun 2011 17:34:06 +0000 (13:34 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 30 Jun 2011 17:34:06 +0000 (13:34 -0400)
1  2 
drivers/net/wireless/ath/ath9k/ath9k.h
drivers/net/wireless/ath/ath9k/beacon.c
drivers/net/wireless/ath/ath9k/init.c
drivers/net/wireless/ath/ath9k/xmit.c
drivers/net/wireless/libertas_tf/main.c
drivers/net/wireless/rtlwifi/wifi.h

@@@ -19,7 -19,6 +19,7 @@@
  
  #include <linux/etherdevice.h>
  #include <linux/device.h>
 +#include <linux/interrupt.h>
  #include <linux/leds.h>
  #include <linux/completion.h>
  
@@@ -101,6 -100,11 +101,11 @@@ enum buffer_type 
  
  #define ATH_TXSTATUS_RING_SIZE 64
  
+ #define       DS2PHYS(_dd, _ds)                                               \
+       ((_dd)->dd_desc_paddr + ((caddr_t)(_ds) - (caddr_t)(_dd)->dd_desc))
+ #define ATH_DESC_4KB_BOUND_CHECK(_daddr) ((((_daddr) & 0xFFF) > 0xF7F) ? 1 : 0)
+ #define ATH_DESC_4KB_BOUND_NUM_SKIPPED(_len) ((_len) / 4096)
  struct ath_descdma {
        void *dd_desc;
        dma_addr_t dd_desc_paddr;
@@@ -14,7 -14,6 +14,7 @@@
   * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
   */
  
 +#include <linux/dma-mapping.h>
  #include "ath9k.h"
  
  #define FUDGE 2
@@@ -361,6 -360,7 +361,7 @@@ void ath_beacon_tasklet(unsigned long d
        struct ath_common *common = ath9k_hw_common(ah);
        struct ath_buf *bf = NULL;
        struct ieee80211_vif *vif;
+       struct ath_tx_status ts;
        int slot;
        u32 bfaddr, bc = 0;
  
                        ath_dbg(common, ATH_DBG_BSTUCK,
                                "beacon is officially stuck\n");
                        sc->sc_flags |= SC_OP_TSF_RESET;
+                       spin_lock(&sc->sc_pcu_lock);
                        ath_reset(sc, true);
+                       spin_unlock(&sc->sc_pcu_lock);
                }
  
                return;
                ath9k_hw_txstart(ah, sc->beacon.beaconq);
  
                sc->beacon.ast_be_xmit += bc;     /* XXX per-vif? */
+               if (ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) {
+                       spin_lock_bh(&sc->sc_pcu_lock);
+                       ath9k_hw_txprocdesc(ah, bf->bf_desc, (void *)&ts);
+                       spin_unlock_bh(&sc->sc_pcu_lock);
+               }
        }
  }
  
@@@ -14,7 -14,6 +14,7 @@@
   * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
   */
  
 +#include <linux/dma-mapping.h>
  #include <linux/slab.h>
  #include <linux/ath9k_platform.h>
  
@@@ -299,10 -298,6 +299,6 @@@ int ath_descdma_setup(struct ath_softc 
                      struct list_head *head, const char *name,
                      int nbuf, int ndesc, bool is_tx)
  {
- #define       DS2PHYS(_dd, _ds)                                               \
-       ((_dd)->dd_desc_paddr + ((caddr_t)(_ds) - (caddr_t)(_dd)->dd_desc))
- #define ATH_DESC_4KB_BOUND_CHECK(_daddr) ((((_daddr) & 0xFFF) > 0xF7F) ? 1 : 0)
- #define ATH_DESC_4KB_BOUND_NUM_SKIPPED(_len) ((_len) / 4096)
        struct ath_common *common = ath9k_hw_common(sc->sc_ah);
        u8 *ds;
        struct ath_buf *bf;
@@@ -397,9 -392,6 +393,6 @@@ fail2
  fail:
        memset(dd, 0, sizeof(*dd));
        return error;
- #undef ATH_DESC_4KB_BOUND_CHECK
- #undef ATH_DESC_4KB_BOUND_NUM_SKIPPED
- #undef DS2PHYS
  }
  
  void ath9k_init_crypto(struct ath_softc *sc)
@@@ -14,7 -14,6 +14,7 @@@
   * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
   */
  
 +#include <linux/dma-mapping.h>
  #include "ath9k.h"
  #include "ar9003_mac.h"
  
@@@ -566,11 -565,8 +566,8 @@@ static void ath_tx_complete_aggr(struc
  
        rcu_read_unlock();
  
-       if (needreset) {
-               spin_unlock_bh(&sc->sc_pcu_lock);
+       if (needreset)
                ath_reset(sc, false);
-               spin_lock_bh(&sc->sc_pcu_lock);
-       }
  }
  
  static u32 ath_lookup_rate(struct ath_softc *sc, struct ath_buf *bf,
@@@ -2170,7 -2166,9 +2167,9 @@@ static void ath_tx_complete_poll_work(s
        if (needreset) {
                ath_dbg(ath9k_hw_common(sc->sc_ah), ATH_DBG_RESET,
                        "tx hung, resetting the chip\n");
+               spin_lock_bh(&sc->sc_pcu_lock);
                ath_reset(sc, true);
+               spin_unlock_bh(&sc->sc_pcu_lock);
        }
  
        ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work,
@@@ -9,7 -9,6 +9,7 @@@
   */
  #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
  
 +#include <linux/hardirq.h>
  #include <linux/slab.h>
  
  #include <linux/etherdevice.h>
@@@ -586,7 -585,7 +586,7 @@@ int lbtf_rx(struct lbtf_private *priv, 
        need_padding ^= ieee80211_has_a4(hdr->frame_control);
        need_padding ^= ieee80211_is_data_qos(hdr->frame_control) &&
                        (*ieee80211_get_qos_ctl(hdr) &
-                        IEEE80211_QOS_CONTROL_A_MSDU_PRESENT);
+                        IEEE80211_QOS_CTL_A_MSDU_PRESENT);
  
        if (need_padding) {
                memmove(skb->data + 2, skb->data, skb->len);
@@@ -32,6 -32,7 +32,6 @@@
  
  #include <linux/sched.h>
  #include <linux/firmware.h>
 -#include <linux/version.h>
  #include <linux/etherdevice.h>
  #include <linux/vmalloc.h>
  #include <linux/usb.h>
@@@ -302,9 -303,6 +302,6 @@@ enum hw_variables 
        HW_VAR_DATA_FILTER,
  };
  
- #define HWSET_MAX_SIZE                                128
- #define EFUSE_MAX_SECTION                     16
  enum _RT_MEDIA_STATUS {
        RT_MEDIA_DISCONNECT = 0,
        RT_MEDIA_CONNECT = 1