Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
authorDavid S. Miller <davem@davemloft.net>
Thu, 6 Mar 2014 01:32:02 +0000 (20:32 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 6 Mar 2014 01:32:02 +0000 (20:32 -0500)
Conflicts:
drivers/net/wireless/ath/ath9k/recv.c
drivers/net/wireless/mwifiex/pcie.c
net/ipv6/sit.c

The SIT driver conflict consists of a bug fix being done by hand
in 'net' (missing u64_stats_init()) whilst in 'net-next' a helper
was created (netdev_alloc_pcpu_stats()) which takes care of this.

The two wireless conflicts were overlapping changes.

Signed-off-by: David S. Miller <davem@davemloft.net>
59 files changed:
1  2 
MAINTAINERS
drivers/net/bonding/bond_3ad.c
drivers/net/bonding/bond_main.c
drivers/net/bonding/bonding.h
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
drivers/net/ethernet/broadcom/tg3.c
drivers/net/ethernet/brocade/bna/bnad.c
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
drivers/net/ethernet/emulex/benet/be.h
drivers/net/ethernet/emulex/benet/be_main.c
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
drivers/net/ethernet/mellanox/mlx5/core/main.c
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c
drivers/net/ethernet/sfc/ptp.c
drivers/net/ethernet/ti/cpsw.c
drivers/net/macvlan.c
drivers/net/phy/phy_device.c
drivers/net/veth.c
drivers/net/wireless/ath/ath9k/hw.c
drivers/net/wireless/ath/ath9k/recv.c
drivers/net/wireless/ath/ath9k/xmit.c
drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
drivers/net/wireless/iwlwifi/mvm/mvm.h
drivers/net/wireless/iwlwifi/mvm/tx.c
drivers/net/wireless/libertas/cfg.c
drivers/net/wireless/mwifiex/pcie.c
drivers/net/wireless/mwifiex/wmm.c
drivers/net/xen-netfront.c
include/linux/skbuff.h
include/net/tcp.h
include/net/xfrm.h
net/core/neighbour.c
net/core/skbuff.c
net/hsr/hsr_framereg.c
net/ipv4/ip_output.c
net/ipv4/ip_tunnel.c
net/ipv4/tcp.c
net/ipv4/tcp_cong.c
net/ipv4/tcp_input.c
net/ipv4/tcp_output.c
net/ipv6/ip6_output.c
net/ipv6/sit.c
net/mac80211/ieee80211_i.h
net/mac80211/mlme.c
net/mac80211/rx.c
net/mac80211/sta_info.h
net/mac80211/tx.c
net/mac80211/util.c
net/netlink/af_netlink.c
net/sched/sch_tbf.c
net/tipc/bearer.c
net/tipc/core.c
net/tipc/socket.c
net/wireless/reg.c
net/xfrm/xfrm_policy.c
net/xfrm/xfrm_state.c
net/xfrm/xfrm_user.c

diff --cc MAINTAINERS
Simple merge
Simple merge
index 12861e37d526a4af9b44411e86be6728d887ae26,e5628fc725c3fc3885b7deac79074caa41edbae4..730d72c706c94b6e71992d100d020121885ad477
@@@ -2668,9 -2679,10 +2670,10 @@@ static bool bond_ab_arp_probe(struct bo
                        if (slave->link_failure_count < UINT_MAX)
                                slave->link_failure_count++;
  
-                       bond_set_slave_inactive_flags(slave);
+                       bond_set_slave_inactive_flags(slave,
+                                                     BOND_SLAVE_NOTIFY_LATER);
  
 -                      pr_info("%s: backup interface %s is now down.\n",
 +                      pr_info("%s: backup interface %s is now down\n",
                                bond->dev->name, slave->dev->name);
                }
                if (slave == curr_arp_slave)
        if (!new_slave && before)
                new_slave = before;
  
-       if (!new_slave) {
-               rtnl_unlock();
-               return true;
-       }
+       if (!new_slave)
+               goto check_state;
  
        new_slave->link = BOND_LINK_BACK;
-       bond_set_slave_active_flags(new_slave);
+       bond_set_slave_active_flags(new_slave, BOND_SLAVE_NOTIFY_LATER);
        bond_arp_send_all(bond, new_slave);
 -      new_slave->jiffies = jiffies;
 +      new_slave->last_link_up = jiffies;
        rcu_assign_pointer(bond->current_arp_slave, new_slave);
-       rtnl_unlock();
  
-       return true;
+ check_state:
+       bond_for_each_slave_rcu(bond, slave, iter) {
+               if (slave->should_notify) {
+                       should_notify_rtnl = BOND_SLAVE_NOTIFY_NOW;
+                       break;
+               }
+       }
+       return should_notify_rtnl;
  }
  
  static void bond_activebackup_arp_mon(struct work_struct *work)
index 430362891d0d16dd072f558b6bb368cf140e3256,2b0fdec695f78fbf77d9cb7c9cd43cb5b7adb30b..b7127a1ba2c9570224a04c0bd93afd273c4b9013
@@@ -343,12 -374,10 +375,15 @@@ static inline bool bond_is_active_slave
  #define BOND_ARP_VALIDATE_BACKUP      (1 << BOND_STATE_BACKUP)
  #define BOND_ARP_VALIDATE_ALL         (BOND_ARP_VALIDATE_ACTIVE | \
                                         BOND_ARP_VALIDATE_BACKUP)
 +#define BOND_ARP_FILTER                       (BOND_ARP_VALIDATE_ALL + 1)
 +#define BOND_ARP_FILTER_ACTIVE                (BOND_ARP_VALIDATE_ACTIVE | \
 +                                       BOND_ARP_FILTER)
 +#define BOND_ARP_FILTER_BACKUP                (BOND_ARP_VALIDATE_BACKUP | \
 +                                       BOND_ARP_FILTER)
  
+ #define BOND_SLAVE_NOTIFY_NOW         true
+ #define BOND_SLAVE_NOTIFY_LATER               false
  static inline int slave_do_arp_validate(struct bonding *bond,
                                        struct slave *slave)
  {
Simple merge
index a28460cf873d3414b1a645f925325ab99d7cfffe,e5277a632671a1ca23877fb5ca46ab1397ca3cc2..14f748cbf0deeb8cd4c6ccfa3039d08764ee1142
  #define QLC_VF_MIN_TX_RATE    100
  #define QLC_VF_MAX_TX_RATE    9999
  #define QLC_MAC_OPCODE_MASK   0x7
- #define QLC_MAC_STAR_ADD      6
- #define QLC_MAC_STAR_DEL      7
  #define QLC_VF_FLOOD_BIT      BIT_16
  #define QLC_FLOOD_MODE                0x5
 +#define QLC_SRIOV_ALLOW_VLAN0 BIT_19
  
  static int qlcnic_sriov_pf_get_vport_handle(struct qlcnic_adapter *, u8);
  
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 076dae1e5ab7f6de22bfdf5c179b6bd4bb09ba1b,82e340d3ec60a81cc83d2427bd9280e55ca3af3a..425e34f94af4ca833266f438b928aef4966e753e
@@@ -853,10 -1055,8 +857,8 @@@ static int ath9k_rx_skb_preprocess(stru
         * everything but the rate is checked here, the rate check is done
         * separately to avoid doing two lookups for a rate for each frame.
         */
-       if (!ath9k_cmn_rx_accept(common, hdr, rx_status, rx_stats, decrypt_error, sc->rx.rxfilter)) {
-               ret = -EINVAL;
-               goto exit;
-       }
 -      if (!ath9k_rx_accept(common, hdr, rx_status, rx_stats, decrypt_error))
++      if (!ath9k_cmn_rx_accept(common, hdr, rx_status, rx_stats, decrypt_error, sc->rx.rxfilter))
+               return -EINVAL;
  
        if (ath_is_mybeacon(common, hdr)) {
                RX_STAT_INC(rx_beacons);
        /*
         * This shouldn't happen, but have a safety check anyway.
         */
-       if (WARN_ON(!ah->curchan)) {
-               ret = -EINVAL;
-               goto exit;
-       }
+       if (WARN_ON(!ah->curchan))
+               return -EINVAL;
  
-       if (ath9k_cmn_process_rate(common, hw, rx_stats, rx_status)) {
-               /*
-                * No valid hardware bitrate found -- we should not get here
-                * because hardware has already validated this frame as OK.
-                */
-               ath_dbg(common, ANY, "unsupported hw bitrate detected 0x%02x using 1 Mbit\n",
-                       rx_stats->rs_rate);
-               RX_STAT_INC(rx_rate_err);
-               ret =-EINVAL;
-               goto exit;
-       }
 -      if (ath9k_process_rate(common, hw, rx_stats, rx_status))
++      if (ath9k_cmn_process_rate(common, hw, rx_stats, rx_status))
+               return -EINVAL;
  
 -      ath9k_process_rssi(common, hw, rx_stats, rx_status);
 +      ath9k_cmn_process_rssi(common, hw, rx_stats, rx_status);
  
        rx_status->band = ah->curchan->chan->band;
        rx_status->freq = ah->curchan->chan->center_freq;
                sc->rx.num_pkts++;
  #endif
  
- exit:
-       sc->rx.discard_next = false;
-       return ret;
+       return 0;
+ corrupt:
+       sc->rx.discard_next = rx_stats->rs_more;
+       return -EINVAL;
  }
  
 -static void ath9k_rx_skb_postprocess(struct ath_common *common,
 -                                   struct sk_buff *skb,
 -                                   struct ath_rx_status *rx_stats,
 -                                   struct ieee80211_rx_status *rxs,
 -                                   bool decrypt_error)
 -{
 -      struct ath_hw *ah = common->ah;
 -      struct ieee80211_hdr *hdr;
 -      int hdrlen, padpos, padsize;
 -      u8 keyix;
 -      __le16 fc;
 -
 -      /* see if any padding is done by the hw and remove it */
 -      hdr = (struct ieee80211_hdr *) skb->data;
 -      hdrlen = ieee80211_get_hdrlen_from_skb(skb);
 -      fc = hdr->frame_control;
 -      padpos = ieee80211_hdrlen(fc);
 -
 -      /* The MAC header is padded to have 32-bit boundary if the
 -       * packet payload is non-zero. The general calculation for
 -       * padsize would take into account odd header lengths:
 -       * padsize = (4 - padpos % 4) % 4; However, since only
 -       * even-length headers are used, padding can only be 0 or 2
 -       * bytes and we can optimize this a bit. In addition, we must
 -       * not try to remove padding from short control frames that do
 -       * not have payload. */
 -      padsize = padpos & 3;
 -      if (padsize && skb->len>=padpos+padsize+FCS_LEN) {
 -              memmove(skb->data + padsize, skb->data, padpos);
 -              skb_pull(skb, padsize);
 -      }
 -
 -      keyix = rx_stats->rs_keyix;
 -
 -      if (!(keyix == ATH9K_RXKEYIX_INVALID) && !decrypt_error &&
 -          ieee80211_has_protected(fc)) {
 -              rxs->flag |= RX_FLAG_DECRYPTED;
 -      } else if (ieee80211_has_protected(fc)
 -                 && !decrypt_error && skb->len >= hdrlen + 4) {
 -              keyix = skb->data[hdrlen + 3] >> 6;
 -
 -              if (test_bit(keyix, common->keymap))
 -                      rxs->flag |= RX_FLAG_DECRYPTED;
 -      }
 -      if (ah->sw_mgmt_crypto &&
 -          (rxs->flag & RX_FLAG_DECRYPTED) &&
 -          ieee80211_is_mgmt(fc))
 -              /* Use software decrypt for management frames. */
 -              rxs->flag &= ~RX_FLAG_DECRYPTED;
 -}
 -
  /*
   * Run the LNA combining algorithm only in these cases:
   *
Simple merge
index 631d5dc5b6d52c8dc13c7602e976d8fb9f85a475,119ee6eaf1c3df944b6482957be5350220433753..49d4196ef9d26367c0606a7667366d4f59a8ef3c
@@@ -4250,10 -4045,9 +4245,9 @@@ void brcmf_sdio_remove(struct brcmf_sdi
                                brcmf_sdio_clkctl(bus, CLK_NONE, false);
                                sdio_release_host(bus->sdiodev->func[1]);
                        }
 -                      brcmf_sdio_chip_detach(&bus->ci);
 +                      brcmf_chip_detach(bus->ci);
                }
  
-               brcmu_pkt_buf_free_skb(bus->txglom_sgpad);
                kfree(bus->rxbuf);
                kfree(bus->hdrbuf);
                kfree(bus);
Simple merge
Simple merge
index d11d4acf089022888f8996381c38bd452ae0691f,7fe7b53fb17a28d75cb7fa9a6fc315c9f0ddd937..31d8a9df133167192727566e7a9cac5c939085cd
@@@ -1217,7 -1211,15 +1217,13 @@@ static int mwifiex_pcie_process_recv_da
                rd_index = card->rxbd_rdptr & reg->rx_mask;
                skb_data = card->rx_buf_list[rd_index];
  
 -              MWIFIEX_SKB_PACB(skb_data, &buf_pa);
 -              pci_unmap_single(card->dev, buf_pa, MWIFIEX_RX_DATA_BUF_SIZE,
 -                               PCI_DMA_FROMDEVICE);
+               /* If skb allocation was failed earlier for Rx packet,
+                * rx_buf_list[rd_index] would have been left with a NULL.
+                */
+               if (!skb_data)
+                       return -ENOMEM;
 +              mwifiex_unmap_pci_memory(adapter, skb_data, PCI_DMA_FROMDEVICE);
                card->rx_buf_list[rd_index] = NULL;
  
                /* Get data length from interface header -
index e0ba0115e5aefcb79690559ee1b953ab58f52290,981cf6e7c73be5b65f4a90bb05ef0e9023c592f4..1c5f2b66f0578304f1613eb2df49cd6fe30f151d
@@@ -554,12 -559,10 +554,13 @@@ mwifiex_clean_txrx(struct mwifiex_priva
        mwifiex_wmm_delete_all_ralist(priv);
        memcpy(tos_to_tid, ac_to_tid, sizeof(tos_to_tid));
  
-       if (priv->adapter->if_ops.clean_pcie_ring)
+       if (priv->adapter->if_ops.clean_pcie_ring &&
+           !priv->adapter->surprise_removed)
                priv->adapter->if_ops.clean_pcie_ring(priv->adapter);
        spin_unlock_irqrestore(&priv->wmm.ra_list_spinlock, flags);
 +
 +      skb_queue_walk_safe(&priv->tdls_txq, skb, tmp)
 +              mwifiex_write_data_complete(priv->adapter, skb, 0, -1);
  }
  
  /*
Simple merge
Simple merge
Simple merge
index 8b925288a8bc0064d46f2d053c1923d3f29bb3f7,fb5654a8ca3cee1c65923c105f3760d607eaa1de..23bfd4591e8b1a299cf74447d9d8db0d349044e0
@@@ -1668,22 -1646,13 +1668,27 @@@ static inline int xfrm_aevent_is_on(str
        rcu_read_unlock();
        return ret;
  }
 +
 +static inline int xfrm_acquire_is_on(struct net *net)
 +{
 +      struct sock *nlsk;
 +      int ret = 0;
 +
 +      rcu_read_lock();
 +      nlsk = rcu_dereference(net->xfrm.nlsk);
 +      if (nlsk)
 +              ret = netlink_has_listeners(nlsk, XFRMNLGRP_ACQUIRE);
 +      rcu_read_unlock();
 +
 +      return ret;
 +}
  #endif
  
+ static inline int aead_len(struct xfrm_algo_aead *alg)
+ {
+       return sizeof(*alg) + ((alg->alg_key_len + 7) / 8);
+ }
  static inline int xfrm_alg_len(const struct xfrm_algo *alg)
  {
        return sizeof(*alg) + ((alg->alg_key_len + 7) / 8);
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc net/ipv4/tcp.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc net/ipv6/sit.c
index 958027be0e941f50853f865b006ad121aa5025d2,b4d74c86586cd1a0256afb59870e32ebbebd56e8..1693c8d885f081e153e115bec78cb2f29a79a6ff
@@@ -1368,6 -1376,18 +1375,12 @@@ static int ipip6_tunnel_init(struct net
        if (!dev->tstats)
                return -ENOMEM;
  
 -      for_each_possible_cpu(i) {
 -              struct pcpu_sw_netstats *ipip6_tunnel_stats;
 -              ipip6_tunnel_stats = per_cpu_ptr(dev->tstats, i);
 -              u64_stats_init(&ipip6_tunnel_stats->syncp);
 -      }
 -
+       tunnel->dst_cache = alloc_percpu(struct ip_tunnel_dst);
+       if (!tunnel->dst_cache) {
+               free_percpu(dev->tstats);
+               return -ENOMEM;
+       }
        return 0;
  }
  
@@@ -1391,6 -1412,18 +1404,12 @@@ static int __net_init ipip6_fb_tunnel_i
        if (!dev->tstats)
                return -ENOMEM;
  
 -      for_each_possible_cpu(i) {
 -              struct pcpu_sw_netstats *ipip6_fb_stats;
 -              ipip6_fb_stats = per_cpu_ptr(dev->tstats, i);
 -              u64_stats_init(&ipip6_fb_stats->syncp);
 -      }
 -
+       tunnel->dst_cache = alloc_percpu(struct ip_tunnel_dst);
+       if (!tunnel->dst_cache) {
+               free_percpu(dev->tstats);
+               return -ENOMEM;
+       }
        dev_hold(dev);
        rcu_assign_pointer(sitn->tunnels_wc[0], tunnel);
        return 0;
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc net/tipc/core.c
Simple merge
Simple merge
index 27c5253e7a610b706ac99402727eda9bc66de755,f0541370e68eb9071caa429772a0a55d952c27d4..24c257cd706ba211329e6362f22ee24c7a266df9
@@@ -1788,15 -1700,12 +1788,15 @@@ static void reg_process_hint(struct reg
                return;
        case NL80211_REGDOM_SET_BY_USER:
                treatment = reg_process_hint_user(reg_request);
-               if (treatment == REG_REQ_OK ||
+               if (treatment == REG_REQ_IGNORE ||
                    treatment == REG_REQ_ALREADY_SET)
                        return;
 -              schedule_delayed_work(&reg_timeout, msecs_to_jiffies(3142));
 +              queue_delayed_work(system_power_efficient_wq,
 +                                 &reg_timeout, msecs_to_jiffies(3142));
                return;
        case NL80211_REGDOM_SET_BY_DRIVER:
 +              if (!wiphy)
 +                      goto out_free;
                treatment = reg_process_hint_driver(wiphy, reg_request);
                break;
        case NL80211_REGDOM_SET_BY_COUNTRY_IE:
Simple merge
Simple merge
Simple merge