]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
authorJohn W. Linville <linville@tuxdriver.com>
Fri, 10 May 2013 14:29:24 +0000 (10:29 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 10 May 2013 14:29:24 +0000 (10:29 -0400)
1  2 
drivers/net/wireless/b43/dma.c
drivers/net/wireless/iwlegacy/4965-mac.c
drivers/net/wireless/mwifiex/cfg80211.c

index 523355b876597f5d0db6e003f9230367c6777a86,ee3d6403c795dfaf73a628ea5123794e25c97a37..f7c70b3a6ea978883f67f1abe0983cf51a476ada
@@@ -419,6 -419,8 +419,6 @@@ static inlin
  
  static int alloc_ringmemory(struct b43_dmaring *ring)
  {
 -      gfp_t flags = GFP_KERNEL;
 -
        /* The specs call for 4K buffers for 30- and 32-bit DMA with 4K
         * alignment and 8K buffers for 64-bit DMA with 8K alignment.
         * In practice we could use smaller buffers for the latter, but the
  
        ring->descbase = dma_alloc_coherent(ring->dev->dev->dma_dev,
                                            ring_mem_size, &(ring->dmabase),
 -                                          flags);
 -      if (!ring->descbase) {
 -              b43err(ring->dev->wl, "DMA ringmemory allocation failed\n");
 +                                          GFP_KERNEL | __GFP_ZERO);
 +      if (!ring->descbase)
                return -ENOMEM;
 -      }
 -      memset(ring->descbase, 0, ring_mem_size);
  
        return 0;
  }
@@@ -1728,6 -1733,25 +1728,25 @@@ drop_recycle_buffer
        sync_descbuffer_for_device(ring, dmaaddr, ring->rx_buffersize);
  }
  
+ void b43_dma_handle_rx_overflow(struct b43_dmaring *ring)
+ {
+       int current_slot, previous_slot;
+       B43_WARN_ON(ring->tx);
+       /* Device has filled all buffers, drop all packets and let TCP
+        * decrease speed.
+        * Decrement RX index by one will let the device to see all slots
+        * as free again
+        */
+       /*
+       *TODO: How to increase rx_drop in mac80211?
+       */
+       current_slot = ring->ops->get_current_rxslot(ring);
+       previous_slot = prev_slot(ring, current_slot);
+       ring->ops->set_current_rxslot(ring, previous_slot);
+ }
  void b43_dma_rx(struct b43_dmaring *ring)
  {
        const struct b43_dma_ops *ops = ring->ops;
index b8f82e688c722457812840ed6cafb921da484980,289701e814c7b085933771c277ce89576ddb4614..9a95045c97b6b4fe6041f457a1999ecfb7926d12
@@@ -1921,8 -1921,8 +1921,8 @@@ drop_unlock
  static inline int
  il4965_alloc_dma_ptr(struct il_priv *il, struct il_dma_ptr *ptr, size_t size)
  {
 -      ptr->addr =
 -          dma_alloc_coherent(&il->pci_dev->dev, size, &ptr->dma, GFP_KERNEL);
 +      ptr->addr = dma_alloc_coherent(&il->pci_dev->dev, size, &ptr->dma,
 +                                     GFP_KERNEL);
        if (!ptr->addr)
                return -ENOMEM;
        ptr->size = size;
@@@ -5741,8 -5741,7 +5741,7 @@@ il4965_mac_setup_register(struct il_pri
        hw->flags =
            IEEE80211_HW_SIGNAL_DBM | IEEE80211_HW_AMPDU_AGGREGATION |
            IEEE80211_HW_NEED_DTIM_BEFORE_ASSOC | IEEE80211_HW_SPECTRUM_MGMT |
-           IEEE80211_HW_REPORTS_TX_ACK_STATUS | IEEE80211_HW_SUPPORTS_PS |
-           IEEE80211_HW_SUPPORTS_DYNAMIC_PS;
+           IEEE80211_HW_SUPPORTS_PS | IEEE80211_HW_SUPPORTS_DYNAMIC_PS;
        if (il->cfg->sku & IL_SKU_N)
                hw->flags |=
                    IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS |
index d3c8ece980d8aa2394439f84348af73ce7ab94ff,636145d1708bbd3f3ea6f474a74c1df3a82c87be..e42b266a023a2c0df18e7cd85fd7dbbb3cf07d45
@@@ -216,7 -216,7 +216,7 @@@ mwifiex_cfg80211_mgmt_tx(struct wiphy *
        mwifiex_form_mgmt_frame(skb, buf, len);
        mwifiex_queue_tx_pkt(priv, skb);
  
 -      *cookie = random32() | 1;
 +      *cookie = prandom_u32() | 1;
        cfg80211_mgmt_tx_status(wdev, *cookie, buf, len, true, GFP_ATOMIC);
  
        wiphy_dbg(wiphy, "info: management frame transmitted\n");
@@@ -271,7 -271,7 +271,7 @@@ mwifiex_cfg80211_remain_on_channel(stru
                                         duration);
  
        if (!ret) {
 -              *cookie = random32() | 1;
 +              *cookie = prandom_u32() | 1;
                priv->roc_cfg.cookie = *cookie;
                priv->roc_cfg.chan = *chan;
  
@@@ -2234,9 -2234,6 +2234,6 @@@ int mwifiex_del_virtual_intf(struct wip
        if (wdev->netdev->reg_state == NETREG_REGISTERED)
                unregister_netdevice(wdev->netdev);
  
-       if (wdev->netdev->reg_state == NETREG_UNREGISTERED)
-               free_netdev(wdev->netdev);
        /* Clear the priv in adapter */
        priv->netdev = NULL;