aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-27 19:52:32 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-27 19:52:32 -0400
commitde8856d2c11f562c60ed9340a83db4a4f829a6e6 (patch)
tree0b871e5f4cf3204c4c6243c7622c4787d56d48ee /drivers/net
parent66f03c614c0902ccf7d6160459362a9352f33271 (diff)
parent94f826b8076e2cb92242061e92f21b5baa3eccc2 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Name string overrun fix in gianfar driver from Joe Perches. 2) VHOST bug fixes from Michael S. Tsirkin and Nadav Har'El 3) Fix dependencies on xt_LOG netfilter module, from Pablo Neira Ayuso. 4) Fix RCU locking in xt_CT, also from Pablo Neira Ayuso. 5) Add a parameter to skb_add_rx_frag() so we can fix the truesize adjustments in the drivers that use it. The individual drivers aren't fixed by this commit, but will be dealt with using follow-on commits. From Eric Dumazet. 6) Add some device IDs to qmi_wwan driver, from Andrew Bird. 7) Fix a potential rcu_read_lock() imbalancein rt6_fill_node(). From Eric Dumazet. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: net: fix a potential rcu_read_lock() imbalance in rt6_fill_node() net: add a truesize parameter to skb_add_rx_frag() gianfar: Fix possible overrun and simplify interrupt name field creation USB: qmi_wwan: Add ZTE (Vodafone) K3570-Z and K3571-Z net interfaces USB: option: Ignore ZTE (Vodafone) K3570/71 net interfaces USB: qmi_wwan: Add ZTE (Vodafone) K3565-Z and K4505-Z net interfaces qlcnic: Bug fix for LRO netfilter: nf_conntrack: permanently attach timeout policy to conntrack netfilter: xt_CT: fix assignation of the generic protocol tracker netfilter: xt_CT: missing rcu_read_lock section in timeout assignment netfilter: cttimeout: fix dependency with l4protocol conntrack module netfilter: xt_LOG: use CONFIG_IP6_NF_IPTABLES instead of CONFIG_IPV6 vhost: fix release path lockdep checks vhost: don't forget to schedule() tools/virtio: stub out strong barriers tools/virtio: add linux/hrtimer.h stub tools/virtio: add linux/module.h stub
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/freescale/gianfar.c39
-rw-r--r--drivers/net/ethernet/freescale/gianfar.h2
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic.h4
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c4
-rw-r--r--drivers/net/usb/cdc-phonet.c6
-rw-r--r--drivers/net/usb/qmi_wwan.c36
-rw-r--r--drivers/net/wireless/iwlegacy/3945.c3
-rw-r--r--drivers/net/wireless/iwlegacy/4965-mac.c3
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rx.c2
9 files changed, 58 insertions, 41 deletions
diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c
index d9428f0e738a..e7bed5303997 100644
--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
@@ -968,7 +968,6 @@ static int gfar_probe(struct platform_device *ofdev)
968 struct gfar_private *priv = NULL; 968 struct gfar_private *priv = NULL;
969 struct gfar __iomem *regs = NULL; 969 struct gfar __iomem *regs = NULL;
970 int err = 0, i, grp_idx = 0; 970 int err = 0, i, grp_idx = 0;
971 int len_devname;
972 u32 rstat = 0, tstat = 0, rqueue = 0, tqueue = 0; 971 u32 rstat = 0, tstat = 0, rqueue = 0, tqueue = 0;
973 u32 isrg = 0; 972 u32 isrg = 0;
974 u32 __iomem *baddr; 973 u32 __iomem *baddr;
@@ -1169,40 +1168,16 @@ static int gfar_probe(struct platform_device *ofdev)
1169 priv->device_flags & FSL_GIANFAR_DEV_HAS_MAGIC_PACKET); 1168 priv->device_flags & FSL_GIANFAR_DEV_HAS_MAGIC_PACKET);
1170 1169
1171 /* fill out IRQ number and name fields */ 1170 /* fill out IRQ number and name fields */
1172 len_devname = strlen(dev->name);
1173 for (i = 0; i < priv->num_grps; i++) { 1171 for (i = 0; i < priv->num_grps; i++) {
1174 strncpy(&priv->gfargrp[i].int_name_tx[0], dev->name,
1175 len_devname);
1176 if (priv->device_flags & FSL_GIANFAR_DEV_HAS_MULTI_INTR) { 1172 if (priv->device_flags & FSL_GIANFAR_DEV_HAS_MULTI_INTR) {
1177 strncpy(&priv->gfargrp[i].int_name_tx[len_devname], 1173 sprintf(priv->gfargrp[i].int_name_tx, "%s%s%c%s",
1178 "_g", sizeof("_g")); 1174 dev->name, "_g", '0' + i, "_tx");
1179 priv->gfargrp[i].int_name_tx[ 1175 sprintf(priv->gfargrp[i].int_name_rx, "%s%s%c%s",
1180 strlen(priv->gfargrp[i].int_name_tx)] = i+48; 1176 dev->name, "_g", '0' + i, "_rx");
1181 strncpy(&priv->gfargrp[i].int_name_tx[strlen( 1177 sprintf(priv->gfargrp[i].int_name_er, "%s%s%c%s",
1182 priv->gfargrp[i].int_name_tx)], 1178 dev->name, "_g", '0' + i, "_er");
1183 "_tx", sizeof("_tx") + 1);
1184
1185 strncpy(&priv->gfargrp[i].int_name_rx[0], dev->name,
1186 len_devname);
1187 strncpy(&priv->gfargrp[i].int_name_rx[len_devname],
1188 "_g", sizeof("_g"));
1189 priv->gfargrp[i].int_name_rx[
1190 strlen(priv->gfargrp[i].int_name_rx)] = i+48;
1191 strncpy(&priv->gfargrp[i].int_name_rx[strlen(
1192 priv->gfargrp[i].int_name_rx)],
1193 "_rx", sizeof("_rx") + 1);
1194
1195 strncpy(&priv->gfargrp[i].int_name_er[0], dev->name,
1196 len_devname);
1197 strncpy(&priv->gfargrp[i].int_name_er[len_devname],
1198 "_g", sizeof("_g"));
1199 priv->gfargrp[i].int_name_er[strlen(
1200 priv->gfargrp[i].int_name_er)] = i+48;
1201 strncpy(&priv->gfargrp[i].int_name_er[strlen(\
1202 priv->gfargrp[i].int_name_er)],
1203 "_er", sizeof("_er") + 1);
1204 } else 1179 } else
1205 priv->gfargrp[i].int_name_tx[len_devname] = '\0'; 1180 strcpy(priv->gfargrp[i].int_name_tx, dev->name);
1206 } 1181 }
1207 1182
1208 /* Initialize the filer table */ 1183 /* Initialize the filer table */
diff --git a/drivers/net/ethernet/freescale/gianfar.h b/drivers/net/ethernet/freescale/gianfar.h
index fc2488adca36..4c9f8d487dbb 100644
--- a/drivers/net/ethernet/freescale/gianfar.h
+++ b/drivers/net/ethernet/freescale/gianfar.h
@@ -517,7 +517,7 @@ extern const char gfar_driver_version[];
517#define RXFCB_PERR_MASK 0x000c 517#define RXFCB_PERR_MASK 0x000c
518#define RXFCB_PERR_BADL3 0x0008 518#define RXFCB_PERR_BADL3 0x0008
519 519
520#define GFAR_INT_NAME_MAX IFNAMSIZ + 4 520#define GFAR_INT_NAME_MAX (IFNAMSIZ + 6) /* '_g#_xx' */
521 521
522struct txbd8 522struct txbd8
523{ 523{
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
index 2b5af22419a5..385a4d5c7c25 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
@@ -36,8 +36,8 @@
36 36
37#define _QLCNIC_LINUX_MAJOR 5 37#define _QLCNIC_LINUX_MAJOR 5
38#define _QLCNIC_LINUX_MINOR 0 38#define _QLCNIC_LINUX_MINOR 0
39#define _QLCNIC_LINUX_SUBVERSION 25 39#define _QLCNIC_LINUX_SUBVERSION 27
40#define QLCNIC_LINUX_VERSIONID "5.0.26" 40#define QLCNIC_LINUX_VERSIONID "5.0.27"
41#define QLCNIC_DRV_IDC_VER 0x01 41#define QLCNIC_DRV_IDC_VER 0x01
42#define QLCNIC_DRIVER_VERSION ((_QLCNIC_LINUX_MAJOR << 16) |\ 42#define QLCNIC_DRIVER_VERSION ((_QLCNIC_LINUX_MAJOR << 16) |\
43 (_QLCNIC_LINUX_MINOR << 8) | (_QLCNIC_LINUX_SUBVERSION)) 43 (_QLCNIC_LINUX_MINOR << 8) | (_QLCNIC_LINUX_SUBVERSION))
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index 81bb1a69e69f..75c32e875fef 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -1458,8 +1458,10 @@ qlcnic_reset_context(struct qlcnic_adapter *adapter)
1458 1458
1459 if (netif_running(netdev)) { 1459 if (netif_running(netdev)) {
1460 err = qlcnic_attach(adapter); 1460 err = qlcnic_attach(adapter);
1461 if (!err) 1461 if (!err) {
1462 __qlcnic_up(adapter, netdev); 1462 __qlcnic_up(adapter, netdev);
1463 qlcnic_restore_indev_addr(netdev, NETDEV_UP);
1464 }
1463 } 1465 }
1464 1466
1465 netif_device_attach(netdev); 1467 netif_device_attach(netdev);
diff --git a/drivers/net/usb/cdc-phonet.c b/drivers/net/usb/cdc-phonet.c
index 790cbdea7392..3886b30ed373 100644
--- a/drivers/net/usb/cdc-phonet.c
+++ b/drivers/net/usb/cdc-phonet.c
@@ -164,12 +164,14 @@ static void rx_complete(struct urb *req)
164 /* Can't use pskb_pull() on page in IRQ */ 164 /* Can't use pskb_pull() on page in IRQ */
165 memcpy(skb_put(skb, 1), page_address(page), 1); 165 memcpy(skb_put(skb, 1), page_address(page), 1);
166 skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags, 166 skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
167 page, 1, req->actual_length); 167 page, 1, req->actual_length,
168 req->actual_length);
168 page = NULL; 169 page = NULL;
169 } 170 }
170 } else { 171 } else {
171 skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags, 172 skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
172 page, 0, req->actual_length); 173 page, 0, req->actual_length,
174 req->actual_length);
173 page = NULL; 175 page = NULL;
174 } 176 }
175 if (req->actual_length < PAGE_SIZE) 177 if (req->actual_length < PAGE_SIZE)
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
index aac68f5195c0..552d24bf862e 100644
--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
@@ -409,6 +409,42 @@ static const struct usb_device_id products[] = {
409 .bInterfaceProtocol = 0xff, 409 .bInterfaceProtocol = 0xff,
410 .driver_info = (unsigned long)&qmi_wwan_force_int4, 410 .driver_info = (unsigned long)&qmi_wwan_force_int4,
411 }, 411 },
412 { /* ZTE (Vodafone) K3565-Z */
413 .match_flags = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_INFO,
414 .idVendor = 0x19d2,
415 .idProduct = 0x0063,
416 .bInterfaceClass = 0xff,
417 .bInterfaceSubClass = 0xff,
418 .bInterfaceProtocol = 0xff,
419 .driver_info = (unsigned long)&qmi_wwan_force_int4,
420 },
421 { /* ZTE (Vodafone) K3570-Z */
422 .match_flags = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_INFO,
423 .idVendor = 0x19d2,
424 .idProduct = 0x1008,
425 .bInterfaceClass = 0xff,
426 .bInterfaceSubClass = 0xff,
427 .bInterfaceProtocol = 0xff,
428 .driver_info = (unsigned long)&qmi_wwan_force_int4,
429 },
430 { /* ZTE (Vodafone) K3571-Z */
431 .match_flags = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_INFO,
432 .idVendor = 0x19d2,
433 .idProduct = 0x1010,
434 .bInterfaceClass = 0xff,
435 .bInterfaceSubClass = 0xff,
436 .bInterfaceProtocol = 0xff,
437 .driver_info = (unsigned long)&qmi_wwan_force_int4,
438 },
439 { /* ZTE (Vodafone) K4505-Z */
440 .match_flags = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_INFO,
441 .idVendor = 0x19d2,
442 .idProduct = 0x0104,
443 .bInterfaceClass = 0xff,
444 .bInterfaceSubClass = 0xff,
445 .bInterfaceProtocol = 0xff,
446 .driver_info = (unsigned long)&qmi_wwan_force_int4,
447 },
412 {QMI_GOBI_DEVICE(0x05c6, 0x9212)}, /* Acer Gobi Modem Device */ 448 {QMI_GOBI_DEVICE(0x05c6, 0x9212)}, /* Acer Gobi Modem Device */
413 {QMI_GOBI_DEVICE(0x03f0, 0x1f1d)}, /* HP un2400 Gobi Modem Device */ 449 {QMI_GOBI_DEVICE(0x03f0, 0x1f1d)}, /* HP un2400 Gobi Modem Device */
414 {QMI_GOBI_DEVICE(0x03f0, 0x371d)}, /* HP un2430 Mobile Broadband Module */ 450 {QMI_GOBI_DEVICE(0x03f0, 0x371d)}, /* HP un2430 Mobile Broadband Module */
diff --git a/drivers/net/wireless/iwlegacy/3945.c b/drivers/net/wireless/iwlegacy/3945.c
index c5b1d199e0bc..b25c01be0d90 100644
--- a/drivers/net/wireless/iwlegacy/3945.c
+++ b/drivers/net/wireless/iwlegacy/3945.c
@@ -499,7 +499,8 @@ il3945_pass_packet_to_mac80211(struct il_priv *il, struct il_rx_buf *rxb,
499 le32_to_cpu(rx_end->status), stats); 499 le32_to_cpu(rx_end->status), stats);
500 500
501 skb_add_rx_frag(skb, 0, rxb->page, 501 skb_add_rx_frag(skb, 0, rxb->page,
502 (void *)rx_hdr->payload - (void *)pkt, len); 502 (void *)rx_hdr->payload - (void *)pkt, len,
503 len);
503 504
504 il_update_stats(il, false, fc, len); 505 il_update_stats(il, false, fc, len);
505 memcpy(IEEE80211_SKB_RXCB(skb), stats, sizeof(*stats)); 506 memcpy(IEEE80211_SKB_RXCB(skb), stats, sizeof(*stats));
diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c
index 7b54dbb338be..17f1c6853182 100644
--- a/drivers/net/wireless/iwlegacy/4965-mac.c
+++ b/drivers/net/wireless/iwlegacy/4965-mac.c
@@ -596,7 +596,8 @@ il4965_pass_packet_to_mac80211(struct il_priv *il, struct ieee80211_hdr *hdr,
596 return; 596 return;
597 } 597 }
598 598
599 skb_add_rx_frag(skb, 0, rxb->page, (void *)hdr - rxb_addr(rxb), len); 599 skb_add_rx_frag(skb, 0, rxb->page, (void *)hdr - rxb_addr(rxb), len,
600 len);
600 601
601 il_update_stats(il, false, fc, len); 602 il_update_stats(il, false, fc, len);
602 memcpy(IEEE80211_SKB_RXCB(skb), stats, sizeof(*stats)); 603 memcpy(IEEE80211_SKB_RXCB(skb), stats, sizeof(*stats));
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rx.c b/drivers/net/wireless/iwlwifi/iwl-agn-rx.c
index 44c6f712b77d..f4b84d1596e3 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rx.c
@@ -796,7 +796,7 @@ static void iwlagn_pass_packet_to_mac80211(struct iwl_priv *priv,
796 796
797 offset = (void *)hdr - rxb_addr(rxb); 797 offset = (void *)hdr - rxb_addr(rxb);
798 p = rxb_steal_page(rxb); 798 p = rxb_steal_page(rxb);
799 skb_add_rx_frag(skb, 0, p, offset, len); 799 skb_add_rx_frag(skb, 0, p, offset, len, len);
800 800
801 iwl_update_stats(priv, false, fc, len); 801 iwl_update_stats(priv, false, fc, len);
802 802