History

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Pull networking fixes from David Miller: "Famouse last words: "final pull request" :-) I'm sending this because Jason Wang's fixes are pretty important 1) Add missing per-cpu stats initialization to ip6_vti. Otherwise lockdep spits out a call trace. From Li RongQing. 2) Fix NULL oops in wireless hwsim, from Javier Lopez 3) TIPC deferred packet queue unlink must NULL out skb->next to avoid crashes. From Erik Hugne 4) Fix access to uninitialized buffer in nf_nat netfilter code, from Daniel Borkmann 5) Fix lifetime of ipv6 loopback and SIT tunnel addresses, otherwise they basically timeout immediately. From Hannes Frederic Sowa 6) Fix DMA unmapping of TSO packets in bnx2x driver, from Michal Schmidt 7) Do not allow L2 forwarding offload via macvtap device, the way things are now it will not end up being forwaded at all. From Jason Wang 8) Fix transmit queue selection via ndo_dfwd_start_xmit(), fixing things like applying NETIF_F_LLTX to the wrong device (!!) and eliding the proper transmit watchdog handling 9) qlcnic driver was not updating tx statistics at all, from Manish Chopra" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: qlcnic: Fix ethtool statistics length calculation qlcnic: Fix bug in TX statistics net: core: explicitly select a txq before doing l2 forwarding macvlan: forbid L2 fowarding offload for macvtap bnx2x: fix DMA unmapping of TSO split BDs ipv6: add link-local, sit and loopback address with INFINITY_LIFE_TIME bnx2x: prevent WARN during driver unload tipc: correctly unlink packets from deferred packet queue ipv6: pcpu_tstats.syncp should be initialised in ip6_vti.c netfilter: only warn once on wrong seqadj usage netfilter: nf_nat: fix access to uninitialized buffer in IRC NAT helper NFC: Fix target mode p2p link establishment iwlwifi: add new devices for 7265 series mac80211: move "bufferable MMPDU" check to fix AP mode scan mac80211_hwsim: Fix NULL pointer dereference

Linus Torvalds committed 12 years ago

Commit 228fdc02 parents e2bc447 d6e9c8934 files · +219 −126Browse files

Unified · Split

34 files
  1. drivers/net/bonding/bond_main.c +2 −1
  2. drivers/net/ethernet/broadcom/bnx2x/bnx2x.h +34 −10
  3. drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +15 −13
  4. drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h +2 −1
  5. drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +13 −20
  6. drivers/net/ethernet/lantiq_etop.c +2 −1
  7. drivers/net/ethernet/mellanox/mlx4/en_tx.c +2 −1
  8. drivers/net/ethernet/mellanox/mlx4/mlx4_en.h +2 −1
  9. drivers/net/ethernet/qlogic/qlcnic/qlcnic.h +1 −0
  10. drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c +22 −19
  11. drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +3 −0
  12. drivers/net/ethernet/tile/tilegx.c +2 −1
  13. drivers/net/macvlan.c +7 −7
  14. drivers/net/team/team.c +2 −1
  15. drivers/net/tun.c +2 −1
  16. drivers/net/wireless/iwlwifi/pcie/drv.c +8 −2
  17. drivers/net/wireless/mac80211_hwsim.c +1 −1
  18. drivers/net/wireless/mwifiex/main.c +2 −1
  19. drivers/staging/bcm/Bcmnet.c +2 −1
  20. drivers/staging/netlogic/xlr_net.c +2 −1
  21. drivers/staging/rtl8188eu/os_dep/os_intfs.c +2 −1
  22. include/linux/netdevice.h +8 −4
  23. net/core/dev.c +17 −12
  24. net/core/flow_dissector.c +7 −3
  25. net/core/netpoll.c +1 −1
  26. net/ipv6/addrconf.c +4 −2
  27. net/ipv6/ip6_vti.c +6 −0
  28. net/mac80211/iface.c +4 −2
  29. net/mac80211/tx.c +13 −10
  30. net/netfilter/nf_conntrack_seqadj.c +1 −1
  31. net/netfilter/nf_nat_irc.c +27 −5
  32. net/nfc/core.c +1 −1
  33. net/sched/sch_generic.c +1 −1
  34. net/tipc/link.c +1 −0
drivers/net/bonding/bond_main.c+2−1
@@ -3732,7 +3732,8 @@ static inline int bond_slave_override(struct bonding *bond, · 3731 unmodified lines
37323732 }
37333733
37343734
3735−static u16 bond_select_queue(struct net_device *dev, struct sk_buff *skb)
3735+static u16 bond_select_queue(struct net_device *dev, struct sk_buff *skb,
3736+ void *accel_priv)
37363737 {
37373738 /*
37383739 * This helper function exists to help dev_pick_tx get the correct
drivers/net/ethernet/broadcom/bnx2x/bnx2x.h+34−10
@@ -520,10 +520,12 @@ struct bnx2x_fastpath { · 519 unmodified lines
520520 #define BNX2X_FP_STATE_IDLE 0
521521 #define BNX2X_FP_STATE_NAPI (1 << 0) /* NAPI owns this FP */
522522 #define BNX2X_FP_STATE_POLL (1 << 1) /* poll owns this FP */
523−#define BNX2X_FP_STATE_NAPI_YIELD (1 << 2) /* NAPI yielded this FP */
524−#define BNX2X_FP_STATE_POLL_YIELD (1 << 3) /* poll yielded this FP */
523+#define BNX2X_FP_STATE_DISABLED (1 << 2)
524+#define BNX2X_FP_STATE_NAPI_YIELD (1 << 3) /* NAPI yielded this FP */
525+#define BNX2X_FP_STATE_POLL_YIELD (1 << 4) /* poll yielded this FP */
526+#define BNX2X_FP_OWNED (BNX2X_FP_STATE_NAPI | BNX2X_FP_STATE_POLL)
525527 #define BNX2X_FP_YIELD (BNX2X_FP_STATE_NAPI_YIELD | BNX2X_FP_STATE_POLL_YIELD)
526−#define BNX2X_FP_LOCKED (BNX2X_FP_STATE_NAPI | BNX2X_FP_STATE_POLL)
528+#define BNX2X_FP_LOCKED (BNX2X_FP_OWNED | BNX2X_FP_STATE_DISABLED)
527529 #define BNX2X_FP_USER_PEND (BNX2X_FP_STATE_POLL | BNX2X_FP_STATE_POLL_YIELD)
528530 /* protect state */
529531 spinlock_t lock;
@@ -613,7 +615,7 @@ static inline bool bnx2x_fp_lock_napi(struct bnx2x_fastpath *fp) · 83 unmodified lines
613615 {
614616 bool rc = true;
615617
616− spin_lock(&fp->lock);
618+ spin_lock_bh(&fp->lock);
617619 if (fp->state & BNX2X_FP_LOCKED) {
618620 WARN_ON(fp->state & BNX2X_FP_STATE_NAPI);
619621 fp->state |= BNX2X_FP_STATE_NAPI_YIELD;
@@ -622,7 +624,7 @@ static inline bool bnx2x_fp_lock_napi(struct bnx2x_fastpath *fp) · 2 unmodified lines
622624 /* we don't care if someone yielded */
623625 fp->state = BNX2X_FP_STATE_NAPI;
624626 }
625− spin_unlock(&fp->lock);
627+ spin_unlock_bh(&fp->lock);
626628 return rc;
627629 }
628630
@@ -631,14 +633,16 @@ static inline bool bnx2x_fp_unlock_napi(struct bnx2x_fastpath *fp) · 2 unmodified lines
631633 {
632634 bool rc = false;
633635
634− spin_lock(&fp->lock);
636+ spin_lock_bh(&fp->lock);
635637 WARN_ON(fp->state &
636638 (BNX2X_FP_STATE_POLL | BNX2X_FP_STATE_NAPI_YIELD));
637639
638640 if (fp->state & BNX2X_FP_STATE_POLL_YIELD)
639641 rc = true;
640− fp->state = BNX2X_FP_STATE_IDLE;
641− spin_unlock(&fp->lock);
642+
643+ /* state ==> idle, unless currently disabled */
644+ fp->state &= BNX2X_FP_STATE_DISABLED;
645+ spin_unlock_bh(&fp->lock);
642646 return rc;
643647 }
644648
@@ -669,7 +673,9 @@ static inline bool bnx2x_fp_unlock_poll(struct bnx2x_fastpath *fp) · 24 unmodified lines
669673
670674 if (fp->state & BNX2X_FP_STATE_POLL_YIELD)
671675 rc = true;
672− fp->state = BNX2X_FP_STATE_IDLE;
676+
677+ /* state ==> idle, unless currently disabled */
678+ fp->state &= BNX2X_FP_STATE_DISABLED;
673679 spin_unlock_bh(&fp->lock);
674680 return rc;
675681 }
@@ -677,9 +683,23 @@ static inline bool bnx2x_fp_unlock_poll(struct bnx2x_fastpath *fp) · 1 unmodified line
677683 /* true if a socket is polling, even if it did not get the lock */
678684 static inline bool bnx2x_fp_ll_polling(struct bnx2x_fastpath *fp)
679685 {
680− WARN_ON(!(fp->state & BNX2X_FP_LOCKED));
686+ WARN_ON(!(fp->state & BNX2X_FP_OWNED));
681687 return fp->state & BNX2X_FP_USER_PEND;
682688 }
689+
690+/* false if fp is currently owned */
691+static inline bool bnx2x_fp_ll_disable(struct bnx2x_fastpath *fp)
692+{
693+ int rc = true;
694+
695+ spin_lock_bh(&fp->lock);
696+ if (fp->state & BNX2X_FP_OWNED)
697+ rc = false;
698+ fp->state |= BNX2X_FP_STATE_DISABLED;
699+ spin_unlock_bh(&fp->lock);
700+
701+ return rc;
702+}
683703 #else
684704 static inline void bnx2x_fp_init_lock(struct bnx2x_fastpath *fp)
685705 {
@@ -709,6 +729,10 @@ static inline bool bnx2x_fp_ll_polling(struct bnx2x_fastpath *fp) · 23 unmodified lines
709729 {
710730 return false;
711731 }
732+static inline bool bnx2x_fp_ll_disable(struct bnx2x_fastpath *fp)
733+{
734+ return true;
735+}
712736 #endif /* CONFIG_NET_RX_BUSY_POLL */
713737
714738 /* Use 2500 as a mini-jumbo MTU for FCoE */
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c+15−13
@@ -160,6 +160,7 @@ static u16 bnx2x_free_tx_pkt(struct bnx2x *bp, struct bnx2x_fp_txdata *txdata, · 159 unmodified lines
160160 struct sk_buff *skb = tx_buf->skb;
161161 u16 bd_idx = TX_BD(tx_buf->first_bd), new_cons;
162162 int nbd;
163+ u16 split_bd_len = 0;
163164
164165 /* prefetch skb end pointer to speedup dev_kfree_skb() */
165166 prefetch(&skb->end);
@@ -167,10 +168,7 @@ static u16 bnx2x_free_tx_pkt(struct bnx2x *bp, struct bnx2x_fp_txdata *txdata, · 1 unmodified line
167168 DP(NETIF_MSG_TX_DONE, "fp[%d]: pkt_idx %d buff @(%p)->skb %p\n",
168169 txdata->txq_index, idx, tx_buf, skb);
169170
170− /* unmap first bd */
171171 tx_start_bd = &txdata->tx_desc_ring[bd_idx].start_bd;
172− dma_unmap_single(&bp->pdev->dev, BD_UNMAP_ADDR(tx_start_bd),
173− BD_UNMAP_LEN(tx_start_bd), DMA_TO_DEVICE);
174172
175173 nbd = le16_to_cpu(tx_start_bd->nbd) - 1;
176174 #ifdef BNX2X_STOP_ON_ERROR
@@ -188,12 +186,19 @@ static u16 bnx2x_free_tx_pkt(struct bnx2x *bp, struct bnx2x_fp_txdata *txdata, · 11 unmodified lines
188186 --nbd;
189187 bd_idx = TX_BD(NEXT_TX_IDX(bd_idx));
190188
191− /* ...and the TSO split header bd since they have no mapping */
189+ /* TSO headers+data bds share a common mapping. See bnx2x_tx_split() */
192190 if (tx_buf->flags & BNX2X_TSO_SPLIT_BD) {
191+ tx_data_bd = &txdata->tx_desc_ring[bd_idx].reg_bd;
192+ split_bd_len = BD_UNMAP_LEN(tx_data_bd);
193193 --nbd;
194194 bd_idx = TX_BD(NEXT_TX_IDX(bd_idx));
195195 }
196196
197+ /* unmap first bd */
198+ dma_unmap_single(&bp->pdev->dev, BD_UNMAP_ADDR(tx_start_bd),
199+ BD_UNMAP_LEN(tx_start_bd) + split_bd_len,
200+ DMA_TO_DEVICE);
201+
197202 /* now free frags */
198203 while (nbd > 0) {
199204
@@ -1790,26 +1795,22 @@ static void bnx2x_napi_disable_cnic(struct bnx2x *bp) · 1590 unmodified lines
17901795 {
17911796 int i;
17921797
1793− local_bh_disable();
17941798 for_each_rx_queue_cnic(bp, i) {
17951799 napi_disable(&bnx2x_fp(bp, i, napi));
1796− while (!bnx2x_fp_lock_napi(&bp->fp[i]))
1797− mdelay(1);
1800+ while (!bnx2x_fp_ll_disable(&bp->fp[i]))
1801+ usleep_range(1000, 2000);
17981802 }
1799− local_bh_enable();
18001803 }
18011804
18021805 static void bnx2x_napi_disable(struct bnx2x *bp)
18031806 {
18041807 int i;
18051808
1806− local_bh_disable();
18071809 for_each_eth_queue(bp, i) {
18081810 napi_disable(&bnx2x_fp(bp, i, napi));
1809− while (!bnx2x_fp_lock_napi(&bp->fp[i]))
1810− mdelay(1);
1811+ while (!bnx2x_fp_ll_disable(&bp->fp[i]))
1812+ usleep_range(1000, 2000);
18111813 }
1812− local_bh_enable();
18131814 }
18141815
18151816 void bnx2x_netif_start(struct bnx2x *bp)
@@ -1832,7 +1833,8 @@ void bnx2x_netif_stop(struct bnx2x *bp, int disable_hw) · 16 unmodified lines
18321833 bnx2x_napi_disable_cnic(bp);
18331834 }
18341835
1835−u16 bnx2x_select_queue(struct net_device *dev, struct sk_buff *skb)
1836+u16 bnx2x_select_queue(struct net_device *dev, struct sk_buff *skb,
1837+ void *accel_priv)
18361838 {
18371839 struct bnx2x *bp = netdev_priv(dev);
18381840
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h+2−1
@@ -524,7 +524,8 @@ int bnx2x_set_vf_mac(struct net_device *dev, int queue, u8 *mac); · 523 unmodified lines
524524 int bnx2x_set_vf_vlan(struct net_device *netdev, int vf, u16 vlan, u8 qos);
525525
526526 /* select_queue callback */
527−u16 bnx2x_select_queue(struct net_device *dev, struct sk_buff *skb);
527+u16 bnx2x_select_queue(struct net_device *dev, struct sk_buff *skb,
528+ void *accel_priv);
528529
529530 static inline void bnx2x_update_rx_prod(struct bnx2x *bp,
530531 struct bnx2x_fastpath *fp,
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c+13−20
@@ -6827,12 +6827,20 @@ static inline int ixgbe_maybe_stop_tx(struct ixgbe_ring *tx_ring, u16 size) · 6826 unmodified lines
68276827 return __ixgbe_maybe_stop_tx(tx_ring, size);
68286828 }
68296829
6830−#ifdef IXGBE_FCOE
6831−static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb)
6830+static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb,
6831+ void *accel_priv)
68326832 {
6833+ struct ixgbe_fwd_adapter *fwd_adapter = accel_priv;
6834+#ifdef IXGBE_FCOE
68336835 struct ixgbe_adapter *adapter;
68346836 struct ixgbe_ring_feature *f;
68356837 int txq;
6838+#endif
6839+
6840+ if (fwd_adapter)
6841+ return skb->queue_mapping + fwd_adapter->tx_base_queue;
6842+
6843+#ifdef IXGBE_FCOE
68366844
68376845 /*
68386846 * only execute the code below if protocol is FCoE
@@ -6858,9 +6866,11 @@ static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb) · 19 unmodified lines
68586866 txq -= f->indices;
68596867
68606868 return txq + f->offset;
6869+#else
6870+ return __netdev_pick_tx(dev, skb);
6871+#endif
68616872 }
68626873
6863−#endif
68646874 netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb,
68656875 struct ixgbe_adapter *adapter,
68666876 struct ixgbe_ring *tx_ring)
@@ -7629,27 +7639,11 @@ static void ixgbe_fwd_del(struct net_device *pdev, void *priv) · 762 unmodified lines
76297639 kfree(fwd_adapter);
76307640 }
76317641
7632−static netdev_tx_t ixgbe_fwd_xmit(struct sk_buff *skb,
7633− struct net_device *dev,
7634− void *priv)
7635−{
7636− struct ixgbe_fwd_adapter *fwd_adapter = priv;
7637− unsigned int queue;
7638− struct ixgbe_ring *tx_ring;
7639−
7640− queue = skb->queue_mapping + fwd_adapter->tx_base_queue;
7641− tx_ring = fwd_adapter->real_adapter->tx_ring[queue];
7642−
7643− return __ixgbe_xmit_frame(skb, dev, tx_ring);
7644−}
7645−
76467642 static const struct net_device_ops ixgbe_netdev_ops = {
76477643 .ndo_open = ixgbe_open,
76487644 .ndo_stop = ixgbe_close,
76497645 .ndo_start_xmit = ixgbe_xmit_frame,
7650−#ifdef IXGBE_FCOE
76517646 .ndo_select_queue = ixgbe_select_queue,
7652−#endif
76537647 .ndo_set_rx_mode = ixgbe_set_rx_mode,
76547648 .ndo_validate_addr = eth_validate_addr,
76557649 .ndo_set_mac_address = ixgbe_set_mac,
@@ -7689,7 +7683,6 @@ static const struct net_device_ops ixgbe_netdev_ops = { · 33 unmodified lines
76897683 .ndo_bridge_getlink = ixgbe_ndo_bridge_getlink,
76907684 .ndo_dfwd_add_station = ixgbe_fwd_add,
76917685 .ndo_dfwd_del_station = ixgbe_fwd_del,
7692− .ndo_dfwd_start_xmit = ixgbe_fwd_xmit,
76937686 };
76947687
76957688 /**
drivers/net/ethernet/lantiq_etop.c+2−1
@@ -619,7 +619,8 @@ ltq_etop_set_multicast_list(struct net_device *dev) · 618 unmodified lines
619619 }
620620
621621 static u16
622−ltq_etop_select_queue(struct net_device *dev, struct sk_buff *skb)
622+ltq_etop_select_queue(struct net_device *dev, struct sk_buff *skb,
623+ void *accel_priv)
623624 {
624625 /* we are currently only using the first queue */
625626 return 0;
drivers/net/ethernet/mellanox/mlx4/en_tx.c+2−1
@@ -592,7 +592,8 @@ static void build_inline_wqe(struct mlx4_en_tx_desc *tx_desc, struct sk_buff *sk · 591 unmodified lines
592592 }
593593 }
594594
595−u16 mlx4_en_select_queue(struct net_device *dev, struct sk_buff *skb)
595+u16 mlx4_en_select_queue(struct net_device *dev, struct sk_buff *skb,
596+ void *accel_priv)
596597 {
597598 struct mlx4_en_priv *priv = netdev_priv(dev);
598599 u16 rings_p_up = priv->num_tx_rings_p_up;
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h+2−1
@@ -714,7 +714,8 @@ int mlx4_en_set_cq_moder(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq); · 713 unmodified lines
714714 int mlx4_en_arm_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq);
715715
716716 void mlx4_en_tx_irq(struct mlx4_cq *mcq);
717−u16 mlx4_en_select_queue(struct net_device *dev, struct sk_buff *skb);
717+u16 mlx4_en_select_queue(struct net_device *dev, struct sk_buff *skb,
718+ void *accel_priv);
718719 netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev);
719720
720721 int mlx4_en_create_tx_ring(struct mlx4_en_priv *priv,
drivers/net/ethernet/qlogic/qlcnic/qlcnic.h+1−0
@@ -1711,6 +1711,7 @@ int qlcnic_83xx_init_mailbox_work(struct qlcnic_adapter *); · 1710 unmodified lines
17111711 void qlcnic_83xx_detach_mailbox_work(struct qlcnic_adapter *);
17121712 void qlcnic_83xx_reinit_mbx_work(struct qlcnic_mailbox *mbx);
17131713 void qlcnic_83xx_free_mailbox(struct qlcnic_mailbox *mbx);
1714+void qlcnic_update_stats(struct qlcnic_adapter *);
17141715
17151716 /* Adapter hardware abstraction */
17161717 struct qlcnic_hardware_ops {
drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c+22−19
@@ -167,27 +167,35 @@ static const char qlcnic_gstrings_test[][ETH_GSTRING_LEN] = { · 166 unmodified lines
167167
168168 #define QLCNIC_TEST_LEN ARRAY_SIZE(qlcnic_gstrings_test)
169169
170−static inline int qlcnic_82xx_statistics(void)
170+static inline int qlcnic_82xx_statistics(struct qlcnic_adapter *adapter)
171171 {
172− return ARRAY_SIZE(qlcnic_device_gstrings_stats) +
173− ARRAY_SIZE(qlcnic_83xx_mac_stats_strings);
172+ return ARRAY_SIZE(qlcnic_gstrings_stats) +
173+ ARRAY_SIZE(qlcnic_83xx_mac_stats_strings) +
174+ QLCNIC_TX_STATS_LEN * adapter->drv_tx_rings;
174175 }
175176
176−static inline int qlcnic_83xx_statistics(void)
177+static inline int qlcnic_83xx_statistics(struct qlcnic_adapter *adapter)
177178 {
178− return ARRAY_SIZE(qlcnic_83xx_tx_stats_strings) +
179+ return ARRAY_SIZE(qlcnic_gstrings_stats) +
180+ ARRAY_SIZE(qlcnic_83xx_tx_stats_strings) +
179181 ARRAY_SIZE(qlcnic_83xx_mac_stats_strings) +
180− ARRAY_SIZE(qlcnic_83xx_rx_stats_strings);
182+ ARRAY_SIZE(qlcnic_83xx_rx_stats_strings) +
183+ QLCNIC_TX_STATS_LEN * adapter->drv_tx_rings;
181184 }
182185
183186 static int qlcnic_dev_statistics_len(struct qlcnic_adapter *adapter)
184187 {
185− if (qlcnic_82xx_check(adapter))
186− return qlcnic_82xx_statistics();
187− else if (qlcnic_83xx_check(adapter))
188− return qlcnic_83xx_statistics();
189− else
190− return -1;
188+ int len = -1;
189+
190+ if (qlcnic_82xx_check(adapter)) {
191+ len = qlcnic_82xx_statistics(adapter);
192+ if (adapter->flags & QLCNIC_ESWITCH_ENABLED)
193+ len += ARRAY_SIZE(qlcnic_device_gstrings_stats);
194+ } else if (qlcnic_83xx_check(adapter)) {
195+ len = qlcnic_83xx_statistics(adapter);
196+ }
197+
198+ return len;
191199 }
192200
193201 #define QLCNIC_TX_INTR_NOT_CONFIGURED 0X78563412
@@ -920,18 +928,13 @@ static int qlcnic_eeprom_test(struct net_device *dev) · 726 unmodified lines
920928
921929 static int qlcnic_get_sset_count(struct net_device *dev, int sset)
922930 {
923− int len;
924931
925932 struct qlcnic_adapter *adapter = netdev_priv(dev);
926933 switch (sset) {
927934 case ETH_SS_TEST:
928935 return QLCNIC_TEST_LEN;
929936 case ETH_SS_STATS:
930− len = qlcnic_dev_statistics_len(adapter) + QLCNIC_STATS_LEN;
931− if ((adapter->flags & QLCNIC_ESWITCH_ENABLED) ||
932− qlcnic_83xx_check(adapter))
933− return len;
934− return qlcnic_82xx_statistics();
937+ return qlcnic_dev_statistics_len(adapter);
935938 default:
936939 return -EOPNOTSUPP;
937940 }
@@ -1267,7 +1270,7 @@ static u64 *qlcnic_fill_stats(u64 *data, void *stats, int type) · 329 unmodified lines
12671270 return data;
12681271 }
12691272
1270−static void qlcnic_update_stats(struct qlcnic_adapter *adapter)
1273+void qlcnic_update_stats(struct qlcnic_adapter *adapter)
12711274 {
12721275 struct qlcnic_host_tx_ring *tx_ring;
12731276 int ring;
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c+3−0
@@ -2780,6 +2780,9 @@ static struct net_device_stats *qlcnic_get_stats(struct net_device *netdev) · 2779 unmodified lines
27802780 struct qlcnic_adapter *adapter = netdev_priv(netdev);
27812781 struct net_device_stats *stats = &netdev->stats;
27822782
2783+ if (test_bit(__QLCNIC_DEV_UP, &adapter->state))
2784+ qlcnic_update_stats(adapter);
2785+
27832786 stats->rx_packets = adapter->stats.rx_pkts + adapter->stats.lro_pkts;
27842787 stats->tx_packets = adapter->stats.xmitfinished;
27852788 stats->rx_bytes = adapter->stats.rxbytes + adapter->stats.lrobytes;
drivers/net/ethernet/tile/tilegx.c+2−1
@@ -2080,7 +2080,8 @@ static int tile_net_tx(struct sk_buff *skb, struct net_device *dev) · 2079 unmodified lines
20802080 }
20812081
20822082 /* Return subqueue id on this core (one per core). */
2083−static u16 tile_net_select_queue(struct net_device *dev, struct sk_buff *skb)
2083+static u16 tile_net_select_queue(struct net_device *dev, struct sk_buff *skb,
2084+ void *accel_priv)
20842085 {
20852086 return smp_processor_id();
20862087 }
drivers/net/macvlan.c+7−7
@@ -299,7 +299,7 @@ netdev_tx_t macvlan_start_xmit(struct sk_buff *skb, · 298 unmodified lines
299299
300300 if (vlan->fwd_priv) {
301301 skb->dev = vlan->lowerdev;
302− ret = dev_hard_start_xmit(skb, skb->dev, NULL, vlan->fwd_priv);
302+ ret = dev_queue_xmit_accel(skb, vlan->fwd_priv);
303303 } else {
304304 ret = macvlan_queue_xmit(skb, dev);
305305 }
@@ -338,6 +338,8 @@ static const struct header_ops macvlan_hard_header_ops = { · 32 unmodified lines
338338 .cache_update = eth_header_cache_update,
339339 };
340340
341+static struct rtnl_link_ops macvlan_link_ops;
342+
341343 static int macvlan_open(struct net_device *dev)
342344 {
343345 struct macvlan_dev *vlan = netdev_priv(dev);
@@ -353,7 +355,8 @@ static int macvlan_open(struct net_device *dev) · 9 unmodified lines
353355 goto hash_add;
354356 }
355357
356− if (lowerdev->features & NETIF_F_HW_L2FW_DOFFLOAD) {
358+ if (lowerdev->features & NETIF_F_HW_L2FW_DOFFLOAD &&
359+ dev->rtnl_link_ops == &macvlan_link_ops) {
357360 vlan->fwd_priv =
358361 lowerdev->netdev_ops->ndo_dfwd_add_station(lowerdev, dev);
359362
@@ -362,10 +365,8 @@ static int macvlan_open(struct net_device *dev) · 2 unmodified lines
362365 */
363366 if (IS_ERR_OR_NULL(vlan->fwd_priv)) {
364367 vlan->fwd_priv = NULL;
365− } else {
366− dev->features &= ~NETIF_F_LLTX;
368+ } else
367369 return 0;
368− }
369370 }
370371
371372 err = -EBUSY;
@@ -699,8 +700,7 @@ static netdev_features_t macvlan_fix_features(struct net_device *dev, · 327 unmodified lines
699700 features = netdev_increment_features(vlan->lowerdev->features,
700701 features,
701702 mask);
702− if (!vlan->fwd_priv)
703− features |= NETIF_F_LLTX;
703+ features |= NETIF_F_LLTX;
704704
705705 return features;
706706 }
drivers/net/team/team.c+2−1
@@ -1647,7 +1647,8 @@ static netdev_tx_t team_xmit(struct sk_buff *skb, struct net_device *dev) · 1646 unmodified lines
16471647 return NETDEV_TX_OK;
16481648 }
16491649
1650−static u16 team_select_queue(struct net_device *dev, struct sk_buff *skb)
1650+static u16 team_select_queue(struct net_device *dev, struct sk_buff *skb,
1651+ void *accel_priv)
16511652 {
16521653 /*
16531654 * This helper function exists to help dev_pick_tx get the correct
drivers/net/tun.c+2−1
@@ -348,7 +348,8 @@ unlock: · 347 unmodified lines
348348 * different rxq no. here. If we could not get rxhash, then we would
349349 * hope the rxq no. may help here.
350350 */
351−static u16 tun_select_queue(struct net_device *dev, struct sk_buff *skb)
351+static u16 tun_select_queue(struct net_device *dev, struct sk_buff *skb,
352+ void *accel_priv)
352353 {
353354 struct tun_struct *tun = netdev_priv(dev);
354355 struct tun_flow_entry *e;
drivers/net/wireless/iwlwifi/pcie/drv.c+8−2
@@ -357,21 +357,27 @@ static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = { · 356 unmodified lines
357357 {IWL_PCI_DEVICE(0x095B, 0x5310, iwl7265_2ac_cfg)},
358358 {IWL_PCI_DEVICE(0x095B, 0x5302, iwl7265_2ac_cfg)},
359359 {IWL_PCI_DEVICE(0x095B, 0x5210, iwl7265_2ac_cfg)},
360− {IWL_PCI_DEVICE(0x095B, 0x5012, iwl7265_2ac_cfg)},
361− {IWL_PCI_DEVICE(0x095B, 0x500A, iwl7265_2ac_cfg)},
360+ {IWL_PCI_DEVICE(0x095A, 0x5012, iwl7265_2ac_cfg)},
361+ {IWL_PCI_DEVICE(0x095A, 0x500A, iwl7265_2ac_cfg)},
362362 {IWL_PCI_DEVICE(0x095A, 0x5410, iwl7265_2ac_cfg)},
363+ {IWL_PCI_DEVICE(0x095A, 0x5400, iwl7265_2ac_cfg)},
363364 {IWL_PCI_DEVICE(0x095A, 0x1010, iwl7265_2ac_cfg)},
364365 {IWL_PCI_DEVICE(0x095A, 0x5000, iwl7265_2n_cfg)},
365366 {IWL_PCI_DEVICE(0x095B, 0x5200, iwl7265_2n_cfg)},
366367 {IWL_PCI_DEVICE(0x095A, 0x5002, iwl7265_n_cfg)},
367368 {IWL_PCI_DEVICE(0x095B, 0x5202, iwl7265_n_cfg)},
368369 {IWL_PCI_DEVICE(0x095A, 0x9010, iwl7265_2ac_cfg)},
370+ {IWL_PCI_DEVICE(0x095A, 0x9110, iwl7265_2ac_cfg)},
369371 {IWL_PCI_DEVICE(0x095A, 0x9210, iwl7265_2ac_cfg)},
372+ {IWL_PCI_DEVICE(0x095A, 0x9510, iwl7265_2ac_cfg)},
373+ {IWL_PCI_DEVICE(0x095A, 0x9310, iwl7265_2ac_cfg)},
370374 {IWL_PCI_DEVICE(0x095A, 0x9410, iwl7265_2ac_cfg)},
371375 {IWL_PCI_DEVICE(0x095A, 0x5020, iwl7265_2n_cfg)},
372376 {IWL_PCI_DEVICE(0x095A, 0x502A, iwl7265_2n_cfg)},
373377 {IWL_PCI_DEVICE(0x095A, 0x5420, iwl7265_2n_cfg)},
374378 {IWL_PCI_DEVICE(0x095A, 0x5090, iwl7265_2ac_cfg)},
379+ {IWL_PCI_DEVICE(0x095A, 0x5190, iwl7265_2ac_cfg)},
380+ {IWL_PCI_DEVICE(0x095A, 0x5590, iwl7265_2ac_cfg)},
375381 {IWL_PCI_DEVICE(0x095B, 0x5290, iwl7265_2ac_cfg)},
376382 {IWL_PCI_DEVICE(0x095A, 0x5490, iwl7265_2ac_cfg)},
377383 #endif /* CONFIG_IWLMVM */
drivers/net/wireless/mac80211_hwsim.c+1−1
@@ -2011,7 +2011,7 @@ static int hwsim_tx_info_frame_received_nl(struct sk_buff *skb_2, · 2010 unmodified lines
20112011 (hwsim_flags & HWSIM_TX_STAT_ACK)) {
20122012 if (skb->len >= 16) {
20132013 hdr = (struct ieee80211_hdr *) skb->data;
2014− mac80211_hwsim_monitor_ack(txi->rate_driver_data[0],
2014+ mac80211_hwsim_monitor_ack(data2->channel,
20152015 hdr->addr2);
20162016 }
20172017 txi->flags |= IEEE80211_TX_STAT_ACK;
drivers/net/wireless/mwifiex/main.c+2−1
@@ -746,7 +746,8 @@ static struct net_device_stats *mwifiex_get_stats(struct net_device *dev) · 745 unmodified lines
746746 }
747747
748748 static u16
749−mwifiex_netdev_select_wmm_queue(struct net_device *dev, struct sk_buff *skb)
749+mwifiex_netdev_select_wmm_queue(struct net_device *dev, struct sk_buff *skb,
750+ void *accel_priv)
750751 {
751752 skb->priority = cfg80211_classify8021d(skb);
752753 return mwifiex_1d_to_wmm_queue[skb->priority];
drivers/staging/bcm/Bcmnet.c+2−1
@@ -39,7 +39,8 @@ static INT bcm_close(struct net_device *dev) · 38 unmodified lines
3939 return 0;
4040 }
4141
42−static u16 bcm_select_queue(struct net_device *dev, struct sk_buff *skb)
42+static u16 bcm_select_queue(struct net_device *dev, struct sk_buff *skb,
43+ void *accel_priv)
4344 {
4445 return ClassifyPacket(netdev_priv(dev), skb);
4546 }
drivers/staging/netlogic/xlr_net.c+2−1
@@ -306,7 +306,8 @@ static netdev_tx_t xlr_net_start_xmit(struct sk_buff *skb, · 305 unmodified lines
306306 return NETDEV_TX_OK;
307307 }
308308
309−static u16 xlr_net_select_queue(struct net_device *ndev, struct sk_buff *skb)
309+static u16 xlr_net_select_queue(struct net_device *ndev, struct sk_buff *skb,
310+ void *accel_priv)
310311 {
311312 return (u16)smp_processor_id();
312313 }
drivers/staging/rtl8188eu/os_dep/os_intfs.c+2−1
@@ -652,7 +652,8 @@ static unsigned int rtw_classify8021d(struct sk_buff *skb) · 651 unmodified lines
652652 return dscp >> 5;
653653 }
654654
655−static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb)
655+static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb,
656+ void *accel_priv)
656657 {
657658 struct adapter *padapter = rtw_netdev_priv(dev);
658659 struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
include/linux/netdevice.h+8−4
@@ -769,7 +769,8 @@ struct netdev_phys_port_id { · 768 unmodified lines
769769 * (can also return NETDEV_TX_LOCKED iff NETIF_F_LLTX)
770770 * Required can not be NULL.
771771 *
772− * u16 (*ndo_select_queue)(struct net_device *dev, struct sk_buff *skb);
772+ * u16 (*ndo_select_queue)(struct net_device *dev, struct sk_buff *skb,
773+ * void *accel_priv);
773774 * Called to decide which queue to when device supports multiple
774775 * transmit queues.
775776 *
@@ -990,7 +991,8 @@ struct net_device_ops { · 214 unmodified lines
990991 netdev_tx_t (*ndo_start_xmit) (struct sk_buff *skb,
991992 struct net_device *dev);
992993 u16 (*ndo_select_queue)(struct net_device *dev,
993− struct sk_buff *skb);
994+ struct sk_buff *skb,
995+ void *accel_priv);
994996 void (*ndo_change_rx_flags)(struct net_device *dev,
995997 int flags);
996998 void (*ndo_set_rx_mode)(struct net_device *dev);
@@ -1529,7 +1531,8 @@ static inline void netdev_for_each_tx_queue(struct net_device *dev, · 532 unmodified lines
15291531 }
15301532
15311533 struct netdev_queue *netdev_pick_tx(struct net_device *dev,
1532− struct sk_buff *skb);
1534+ struct sk_buff *skb,
1535+ void *accel_priv);
15331536 u16 __netdev_pick_tx(struct net_device *dev, struct sk_buff *skb);
15341537
15351538 /*
@@ -1819,6 +1822,7 @@ int dev_close(struct net_device *dev); · 283 unmodified lines
18191822 void dev_disable_lro(struct net_device *dev);
18201823 int dev_loopback_xmit(struct sk_buff *newskb);
18211824 int dev_queue_xmit(struct sk_buff *skb);
1825+int dev_queue_xmit_accel(struct sk_buff *skb, void *accel_priv);
18221826 int register_netdevice(struct net_device *dev);
18231827 void unregister_netdevice_queue(struct net_device *dev, struct list_head *head);
18241828 void unregister_netdevice_many(struct list_head *head);
@@ -2426,7 +2430,7 @@ int dev_change_carrier(struct net_device *, bool new_carrier); · 601 unmodified lines
24262430 int dev_get_phys_port_id(struct net_device *dev,
24272431 struct netdev_phys_port_id *ppid);
24282432 int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
2429− struct netdev_queue *txq, void *accel_priv);
2433+ struct netdev_queue *txq);
24302434 int dev_forward_skb(struct net_device *dev, struct sk_buff *skb);
24312435
24322436 extern int netdev_budget;
net/core/dev.c+17−12
@@ -2539,7 +2539,7 @@ static inline int skb_needs_linearize(struct sk_buff *skb, · 2538 unmodified lines
25392539 }
25402540
25412541 int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
2542− struct netdev_queue *txq, void *accel_priv)
2542+ struct netdev_queue *txq)
25432543 {
25442544 const struct net_device_ops *ops = dev->netdev_ops;
25452545 int rc = NETDEV_TX_OK;
@@ -2605,13 +2605,10 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev, · 59 unmodified lines
26052605 dev_queue_xmit_nit(skb, dev);
26062606
26072607 skb_len = skb->len;
2608− if (accel_priv)
2609− rc = ops->ndo_dfwd_start_xmit(skb, dev, accel_priv);
2610− else
26112608 rc = ops->ndo_start_xmit(skb, dev);
26122609
26132610 trace_net_dev_xmit(skb, rc, dev, skb_len);
2614− if (rc == NETDEV_TX_OK && txq)
2611+ if (rc == NETDEV_TX_OK)
26152612 txq_trans_update(txq);
26162613 return rc;
26172614 }
@@ -2627,10 +2624,7 @@ gso: · 9 unmodified lines
26272624 dev_queue_xmit_nit(nskb, dev);
26282625
26292626 skb_len = nskb->len;
2630− if (accel_priv)
2631− rc = ops->ndo_dfwd_start_xmit(nskb, dev, accel_priv);
2632− else
2633− rc = ops->ndo_start_xmit(nskb, dev);
2627+ rc = ops->ndo_start_xmit(nskb, dev);
26342628 trace_net_dev_xmit(nskb, rc, dev, skb_len);
26352629 if (unlikely(rc != NETDEV_TX_OK)) {
26362630 if (rc & ~NETDEV_TX_MASK)
@@ -2811,7 +2805,7 @@ EXPORT_SYMBOL(dev_loopback_xmit); · 174 unmodified lines
28112805 * the BH enable code must have IRQs enabled so that it will not deadlock.
28122806 * --BLG
28132807 */
2814−int dev_queue_xmit(struct sk_buff *skb)
2808+int __dev_queue_xmit(struct sk_buff *skb, void *accel_priv)
28152809 {
28162810 struct net_device *dev = skb->dev;
28172811 struct netdev_queue *txq;
@@ -2827,7 +2821,7 @@ int dev_queue_xmit(struct sk_buff *skb) · 9 unmodified lines
28272821
28282822 skb_update_prio(skb);
28292823
2830− txq = netdev_pick_tx(dev, skb);
2824+ txq = netdev_pick_tx(dev, skb, accel_priv);
28312825 q = rcu_dereference_bh(txq->qdisc);
28322826
28332827 #ifdef CONFIG_NET_CLS_ACT
@@ -2863,7 +2857,7 @@ int dev_queue_xmit(struct sk_buff *skb) · 29 unmodified lines
28632857
28642858 if (!netif_xmit_stopped(txq)) {
28652859 __this_cpu_inc(xmit_recursion);
2866− rc = dev_hard_start_xmit(skb, dev, txq, NULL);
2860+ rc = dev_hard_start_xmit(skb, dev, txq);
28672861 __this_cpu_dec(xmit_recursion);
28682862 if (dev_xmit_complete(rc)) {
28692863 HARD_TX_UNLOCK(dev, txq);
@@ -2892,8 +2886,19 @@ out: · 22 unmodified lines
28922886 rcu_read_unlock_bh();
28932887 return rc;
28942888 }
2889+
2890+int dev_queue_xmit(struct sk_buff *skb)
2891+{
2892+ return __dev_queue_xmit(skb, NULL);
2893+}
28952894 EXPORT_SYMBOL(dev_queue_xmit);
28962895
2896+int dev_queue_xmit_accel(struct sk_buff *skb, void *accel_priv)
2897+{
2898+ return __dev_queue_xmit(skb, accel_priv);
2899+}
2900+EXPORT_SYMBOL(dev_queue_xmit_accel);
2901+
28972902
28982903 /*=======================================================================
28992904 Receiver routines
net/core/flow_dissector.c+7−3
@@ -395,17 +395,21 @@ u16 __netdev_pick_tx(struct net_device *dev, struct sk_buff *skb) · 394 unmodified lines
395395 EXPORT_SYMBOL(__netdev_pick_tx);
396396
397397 struct netdev_queue *netdev_pick_tx(struct net_device *dev,
398− struct sk_buff *skb)
398+ struct sk_buff *skb,
399+ void *accel_priv)
399400 {
400401 int queue_index = 0;
401402
402403 if (dev->real_num_tx_queues != 1) {
403404 const struct net_device_ops *ops = dev->netdev_ops;
404405 if (ops->ndo_select_queue)
405− queue_index = ops->ndo_select_queue(dev, skb);
406+ queue_index = ops->ndo_select_queue(dev, skb,
407+ accel_priv);
406408 else
407409 queue_index = __netdev_pick_tx(dev, skb);
408− queue_index = dev_cap_txqueue(dev, queue_index);
410+
411+ if (!accel_priv)
412+ queue_index = dev_cap_txqueue(dev, queue_index);
409413 }
410414
411415 skb_set_queue_mapping(skb, queue_index);
net/core/netpoll.c+1−1
@@ -375,7 +375,7 @@ void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb, · 374 unmodified lines
375375 if (skb_queue_len(&npinfo->txq) == 0 && !netpoll_owner_active(dev)) {
376376 struct netdev_queue *txq;
377377
378− txq = netdev_pick_tx(dev, skb);
378+ txq = netdev_pick_tx(dev, skb, NULL);
379379
380380 /* try until next clock tick */
381381 for (tries = jiffies_to_usecs(1)/USEC_PER_POLL;
net/ipv6/addrconf.c+4−2
@@ -2509,7 +2509,8 @@ static void add_addr(struct inet6_dev *idev, const struct in6_addr *addr, · 2508 unmodified lines
25092509 struct inet6_ifaddr *ifp;
25102510
25112511 ifp = ipv6_add_addr(idev, addr, NULL, plen,
2512− scope, IFA_F_PERMANENT, 0, 0);
2512+ scope, IFA_F_PERMANENT,
2513+ INFINITY_LIFE_TIME, INFINITY_LIFE_TIME);
25132514 if (!IS_ERR(ifp)) {
25142515 spin_lock_bh(&ifp->lock);
25152516 ifp->flags &= ~IFA_F_TENTATIVE;
@@ -2637,7 +2638,8 @@ static void addrconf_add_linklocal(struct inet6_dev *idev, const struct in6_addr · 121 unmodified lines
26372638 #endif
26382639
26392640
2640− ifp = ipv6_add_addr(idev, addr, NULL, 64, IFA_LINK, addr_flags, 0, 0);
2641+ ifp = ipv6_add_addr(idev, addr, NULL, 64, IFA_LINK, addr_flags,
2642+ INFINITY_LIFE_TIME, INFINITY_LIFE_TIME);
26412643 if (!IS_ERR(ifp)) {
26422644 addrconf_prefix_route(&ifp->addr, ifp->prefix_len, idev->dev, 0, 0);
26432645 addrconf_dad_start(ifp);
net/ipv6/ip6_vti.c+6−0
@@ -732,12 +732,18 @@ static void vti6_dev_setup(struct net_device *dev) · 731 unmodified lines
732732 static inline int vti6_dev_init_gen(struct net_device *dev)
733733 {
734734 struct ip6_tnl *t = netdev_priv(dev);
735+ int i;
735736
736737 t->dev = dev;
737738 t->net = dev_net(dev);
738739 dev->tstats = alloc_percpu(struct pcpu_tstats);
739740 if (!dev->tstats)
740741 return -ENOMEM;
742+ for_each_possible_cpu(i) {
743+ struct pcpu_tstats *stats;
744+ stats = per_cpu_ptr(dev->tstats, i);
745+ u64_stats_init(&stats->syncp);
746+ }
741747 return 0;
742748 }
743749
net/mac80211/iface.c+4−2
@@ -1061,7 +1061,8 @@ static void ieee80211_uninit(struct net_device *dev) · 1060 unmodified lines
10611061 }
10621062
10631063 static u16 ieee80211_netdev_select_queue(struct net_device *dev,
1064− struct sk_buff *skb)
1064+ struct sk_buff *skb,
1065+ void *accel_priv)
10651066 {
10661067 return ieee80211_select_queue(IEEE80211_DEV_TO_SUB_IF(dev), skb);
10671068 }
@@ -1078,7 +1079,8 @@ static const struct net_device_ops ieee80211_dataif_ops = { · 10 unmodified lines
10781079 };
10791080
10801081 static u16 ieee80211_monitor_select_queue(struct net_device *dev,
1081− struct sk_buff *skb)
1082+ struct sk_buff *skb,
1083+ void *accel_priv)
10821084 {
10831085 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
10841086 struct ieee80211_local *local = sdata->local;
net/mac80211/tx.c+13−10
@@ -463,7 +463,6 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx) · 462 unmodified lines
463463 {
464464 struct sta_info *sta = tx->sta;
465465 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
466− struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data;
467466 struct ieee80211_local *local = tx->local;
468467
469468 if (unlikely(!sta))
@@ -474,15 +473,6 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx) · 4 unmodified lines
474473 !(info->flags & IEEE80211_TX_CTL_NO_PS_BUFFER))) {
475474 int ac = skb_get_queue_mapping(tx->skb);
476475
477− /* only deauth, disassoc and action are bufferable MMPDUs */
478− if (ieee80211_is_mgmt(hdr->frame_control) &&
479− !ieee80211_is_deauth(hdr->frame_control) &&
480− !ieee80211_is_disassoc(hdr->frame_control) &&
481− !ieee80211_is_action(hdr->frame_control)) {
482− info->flags |= IEEE80211_TX_CTL_NO_PS_BUFFER;
483− return TX_CONTINUE;
484− }
485−
486476 ps_dbg(sta->sdata, "STA %pM aid %d: PS buffer for AC %d\n",
487477 sta->sta.addr, sta->sta.aid, ac);
488478 if (tx->local->total_ps_buffered >= TOTAL_MAX_TX_BUFFER)
@@ -525,9 +515,22 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx) · 36 unmodified lines
525515 static ieee80211_tx_result debug_noinline
526516 ieee80211_tx_h_ps_buf(struct ieee80211_tx_data *tx)
527517 {
518+ struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
519+ struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data;
520+
528521 if (unlikely(tx->flags & IEEE80211_TX_PS_BUFFERED))
529522 return TX_CONTINUE;
530523
524+ /* only deauth, disassoc and action are bufferable MMPDUs */
525+ if (ieee80211_is_mgmt(hdr->frame_control) &&
526+ !ieee80211_is_deauth(hdr->frame_control) &&
527+ !ieee80211_is_disassoc(hdr->frame_control) &&
528+ !ieee80211_is_action(hdr->frame_control)) {
529+ if (tx->flags & IEEE80211_TX_UNICAST)
530+ info->flags |= IEEE80211_TX_CTL_NO_PS_BUFFER;
531+ return TX_CONTINUE;
532+ }
533+
531534 if (tx->flags & IEEE80211_TX_UNICAST)
532535 return ieee80211_tx_h_unicast_ps_buf(tx);
533536 else
net/netfilter/nf_conntrack_seqadj.c+1−1
@@ -37,7 +37,7 @@ int nf_ct_seqadj_set(struct nf_conn *ct, enum ip_conntrack_info ctinfo, · 36 unmodified lines
3737 return 0;
3838
3939 if (unlikely(!seqadj)) {
40− WARN(1, "Wrong seqadj usage, missing nfct_seqadj_ext_add()\n");
40+ WARN_ONCE(1, "Missing nfct_seqadj_ext_add() setup call\n");
4141 return 0;
4242 }
4343
net/netfilter/nf_nat_irc.c+27−5
@@ -34,10 +34,14 @@ static unsigned int help(struct sk_buff *skb, · 33 unmodified lines
3434 struct nf_conntrack_expect *exp)
3535 {
3636 char buffer[sizeof("4294967296 65635")];
37+ struct nf_conn *ct = exp->master;
38+ union nf_inet_addr newaddr;
3739 u_int16_t port;
3840 unsigned int ret;
3941
4042 /* Reply comes from server. */
43+ newaddr = ct->tuplehash[IP_CT_DIR_REPLY].tuple.dst.u3;
44+
4145 exp->saved_proto.tcp.port = exp->tuple.dst.u.tcp.port;
4246 exp->dir = IP_CT_DIR_REPLY;
4347 exp->expectfn = nf_nat_follow_master;
@@ -57,17 +61,35 @@ static unsigned int help(struct sk_buff *skb, · 13 unmodified lines
5761 }
5862
5963 if (port == 0) {
60− nf_ct_helper_log(skb, exp->master, "all ports in use");
64+ nf_ct_helper_log(skb, ct, "all ports in use");
6165 return NF_DROP;
6266 }
6367
64− ret = nf_nat_mangle_tcp_packet(skb, exp->master, ctinfo,
65− protoff, matchoff, matchlen, buffer,
66− strlen(buffer));
68+ /* strlen("\1DCC CHAT chat AAAAAAAA P\1\n")=27
69+ * strlen("\1DCC SCHAT chat AAAAAAAA P\1\n")=28
70+ * strlen("\1DCC SEND F AAAAAAAA P S\1\n")=26
71+ * strlen("\1DCC MOVE F AAAAAAAA P S\1\n")=26
72+ * strlen("\1DCC TSEND F AAAAAAAA P S\1\n")=27
73+ *
74+ * AAAAAAAAA: bound addr (1.0.0.0==16777216, min 8 digits,
75+ * 255.255.255.255==4294967296, 10 digits)
76+ * P: bound port (min 1 d, max 5d (65635))
77+ * F: filename (min 1 d )
78+ * S: size (min 1 d )
79+ * 0x01, \n: terminators
80+ */
81+ /* AAA = "us", ie. where server normally talks to. */
82+ snprintf(buffer, sizeof(buffer), "%u %u", ntohl(newaddr.ip), port);
83+ pr_debug("nf_nat_irc: inserting '%s' == %pI4, port %u\n",
84+ buffer, &newaddr.ip, port);
85+
86+ ret = nf_nat_mangle_tcp_packet(skb, ct, ctinfo, protoff, matchoff,
87+ matchlen, buffer, strlen(buffer));
6788 if (ret != NF_ACCEPT) {
68− nf_ct_helper_log(skb, exp->master, "cannot mangle packet");
89+ nf_ct_helper_log(skb, ct, "cannot mangle packet");
6990 nf_ct_unexpect_related(exp);
7091 }
92+
7193 return ret;
7294 }
7395
net/nfc/core.c+1−1
@@ -384,7 +384,7 @@ int nfc_dep_link_is_up(struct nfc_dev *dev, u32 target_idx, · 383 unmodified lines
384384 {
385385 dev->dep_link_up = true;
386386
387− if (!dev->active_target) {
387+ if (!dev->active_target && rf_mode == NFC_RF_INITIATOR) {
388388 struct nfc_target *target;
389389
390390 target = nfc_find_target(dev, target_idx);
net/sched/sch_generic.c+1−1
@@ -126,7 +126,7 @@ int sch_direct_xmit(struct sk_buff *skb, struct Qdisc *q, · 125 unmodified lines
126126
127127 HARD_TX_LOCK(dev, txq, smp_processor_id());
128128 if (!netif_xmit_frozen_or_stopped(txq))
129− ret = dev_hard_start_xmit(skb, dev, txq, NULL);
129+ ret = dev_hard_start_xmit(skb, dev, txq);
130130
131131 HARD_TX_UNLOCK(dev, txq);
132132
net/tipc/link.c+1−0
@@ -1498,6 +1498,7 @@ void tipc_recv_msg(struct sk_buff *head, struct tipc_bearer *b_ptr) · 1497 unmodified lines
14981498 int type;
14991499
15001500 head = head->next;
1501+ buf->next = NULL;
15011502
15021503 /* Ensure bearer is still enabled */
15031504 if (unlikely(!b_ptr->active))