Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
authorJohn W. Linville <linville@tuxdriver.com>
Fri, 9 Dec 2011 19:07:12 +0000 (14:07 -0500)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 9 Dec 2011 19:07:12 +0000 (14:07 -0500)
1  2 
drivers/bluetooth/btmrvl_sdio.c
drivers/ssb/driver_pcicore.c
net/mac80211/agg-tx.c

@@@ -23,7 -23,6 +23,7 @@@
  
  #include <linux/mmc/sdio_ids.h>
  #include <linux/mmc/sdio_func.h>
 +#include <linux/module.h>
  
  #include <net/bluetooth/bluetooth.h>
  #include <net/bluetooth/hci_core.h>
@@@ -65,7 -64,7 +65,7 @@@ static const struct btmrvl_sdio_card_re
        .io_port_1 = 0x01,
        .io_port_2 = 0x02,
  };
- static const struct btmrvl_sdio_card_reg btmrvl_reg_8787 = {
+ static const struct btmrvl_sdio_card_reg btmrvl_reg_87xx = {
        .cfg = 0x00,
        .host_int_mask = 0x02,
        .host_intstatus = 0x03,
@@@ -92,7 -91,14 +92,14 @@@ static const struct btmrvl_sdio_device 
  static const struct btmrvl_sdio_device btmrvl_sdio_sd8787 = {
        .helper         = NULL,
        .firmware       = "mrvl/sd8787_uapsta.bin",
-       .reg            = &btmrvl_reg_8787,
+       .reg            = &btmrvl_reg_87xx,
+       .sd_blksz_fw_dl = 256,
+ };
+ static const struct btmrvl_sdio_device btmrvl_sdio_sd8797 = {
+       .helper         = NULL,
+       .firmware       = "mrvl/sd8797_uapsta.bin",
+       .reg            = &btmrvl_reg_87xx,
        .sd_blksz_fw_dl = 256,
  };
  
@@@ -103,6 -109,9 +110,9 @@@ static const struct sdio_device_id btmr
        /* Marvell SD8787 Bluetooth device */
        { SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, 0x911A),
                        .driver_data = (unsigned long) &btmrvl_sdio_sd8787 },
+       /* Marvell SD8797 Bluetooth device */
+       { SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, 0x912A),
+                       .driver_data = (unsigned long) &btmrvl_sdio_sd8797 },
  
        { }     /* Terminating entry */
  };
@@@ -1076,3 -1085,4 +1086,4 @@@ MODULE_LICENSE("GPL v2")
  MODULE_FIRMWARE("sd8688_helper.bin");
  MODULE_FIRMWARE("sd8688.bin");
  MODULE_FIRMWARE("mrvl/sd8787_uapsta.bin");
+ MODULE_FIRMWARE("mrvl/sd8797_uapsta.bin");
@@@ -10,7 -10,6 +10,7 @@@
  
  #include <linux/ssb/ssb.h>
  #include <linux/pci.h>
 +#include <linux/export.h>
  #include <linux/delay.h>
  #include <linux/ssb/ssb_embedded.h>
  
@@@ -517,10 -516,14 +517,14 @@@ static void ssb_pcicore_pcie_setup_work
  
  static void __devinit ssb_pcicore_init_clientmode(struct ssb_pcicore *pc)
  {
-       ssb_pcicore_fix_sprom_core_index(pc);
+       struct ssb_device *pdev = pc->dev;
+       struct ssb_bus *bus = pdev->bus;
+       if (bus->bustype == SSB_BUSTYPE_PCI)
+               ssb_pcicore_fix_sprom_core_index(pc);
  
        /* Disable PCI interrupts. */
-       ssb_write32(pc->dev, SSB_INTVEC, 0);
+       ssb_write32(pdev, SSB_INTVEC, 0);
  
        /* Additional PCIe always once-executed workarounds */
        if (pc->dev->id.coreid == SSB_DEV_PCIE) {
diff --combined net/mac80211/agg-tx.c
@@@ -15,7 -15,6 +15,7 @@@
  
  #include <linux/ieee80211.h>
  #include <linux/slab.h>
 +#include <linux/export.h>
  #include <net/mac80211.h>
  #include "ieee80211_i.h"
  #include "driver-ops.h"
@@@ -303,6 -302,38 +303,38 @@@ ieee80211_wake_queue_agg(struct ieee802
        __release(agg_queue);
  }
  
+ /*
+  * splice packets from the STA's pending to the local pending,
+  * requires a call to ieee80211_agg_splice_finish later
+  */
+ static void __acquires(agg_queue)
+ ieee80211_agg_splice_packets(struct ieee80211_local *local,
+                            struct tid_ampdu_tx *tid_tx, u16 tid)
+ {
+       int queue = ieee80211_ac_from_tid(tid);
+       unsigned long flags;
+       ieee80211_stop_queue_agg(local, tid);
+       if (WARN(!tid_tx, "TID %d gone but expected when splicing aggregates"
+                         " from the pending queue\n", tid))
+               return;
+       if (!skb_queue_empty(&tid_tx->pending)) {
+               spin_lock_irqsave(&local->queue_stop_reason_lock, flags);
+               /* copy over remaining packets */
+               skb_queue_splice_tail_init(&tid_tx->pending,
+                                          &local->pending[queue]);
+               spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
+       }
+ }
+ static void __releases(agg_queue)
+ ieee80211_agg_splice_finish(struct ieee80211_local *local, u16 tid)
+ {
+       ieee80211_wake_queue_agg(local, tid);
+ }
  void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid)
  {
        struct tid_ampdu_tx *tid_tx;
        tid_tx = rcu_dereference_protected_tid_tx(sta, tid);
  
        /*
-        * While we're asking the driver about the aggregation,
-        * stop the AC queue so that we don't have to worry
-        * about frames that came in while we were doing that,
-        * which would require us to put them to the AC pending
-        * afterwards which just makes the code more complex.
+        * Start queuing up packets for this aggregation session.
+        * We're going to release them once the driver is OK with
+        * that.
         */
-       ieee80211_stop_queue_agg(local, tid);
        clear_bit(HT_AGG_STATE_WANT_START, &tid_tx->state);
  
        /*
-        * make sure no packets are being processed to get
-        * valid starting sequence number
+        * Make sure no packets are being processed. This ensures that
+        * we have a valid starting sequence number and that in-flight
+        * packets have been flushed out and no packets for this TID
+        * will go into the driver during the ampdu_action call.
         */
        synchronize_net();
  
                                        " tid %d\n", tid);
  #endif
                spin_lock_bh(&sta->lock);
+               ieee80211_agg_splice_packets(local, tid_tx, tid);
                ieee80211_assign_tid_tx(sta, tid, NULL);
+               ieee80211_agg_splice_finish(local, tid);
                spin_unlock_bh(&sta->lock);
  
-               ieee80211_wake_queue_agg(local, tid);
                kfree_rcu(tid_tx, rcu_head);
                return;
        }
  
-       /* we can take packets again now */
-       ieee80211_wake_queue_agg(local, tid);
        /* activate the timer for the recipient's addBA response */
        mod_timer(&tid_tx->addba_resp_timer, jiffies + ADDBA_RESP_INTERVAL);
  #ifdef CONFIG_MAC80211_HT_DEBUG
@@@ -466,38 -493,6 +494,6 @@@ int ieee80211_start_tx_ba_session(struc
  }
  EXPORT_SYMBOL(ieee80211_start_tx_ba_session);
  
- /*
-  * splice packets from the STA's pending to the local pending,
-  * requires a call to ieee80211_agg_splice_finish later
-  */
- static void __acquires(agg_queue)
- ieee80211_agg_splice_packets(struct ieee80211_local *local,
-                            struct tid_ampdu_tx *tid_tx, u16 tid)
- {
-       int queue = ieee80211_ac_from_tid(tid);
-       unsigned long flags;
-       ieee80211_stop_queue_agg(local, tid);
-       if (WARN(!tid_tx, "TID %d gone but expected when splicing aggregates"
-                         " from the pending queue\n", tid))
-               return;
-       if (!skb_queue_empty(&tid_tx->pending)) {
-               spin_lock_irqsave(&local->queue_stop_reason_lock, flags);
-               /* copy over remaining packets */
-               skb_queue_splice_tail_init(&tid_tx->pending,
-                                          &local->pending[queue]);
-               spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
-       }
- }
- static void __releases(agg_queue)
- ieee80211_agg_splice_finish(struct ieee80211_local *local, u16 tid)
- {
-       ieee80211_wake_queue_agg(local, tid);
- }
  static void ieee80211_agg_tx_operational(struct ieee80211_local *local,
                                         struct sta_info *sta, u16 tid)
  {