aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MAINTAINERS7
-rw-r--r--drivers/net/3c59x.c6
-rw-r--r--drivers/net/8139cp.c10
-rw-r--r--drivers/net/benet/be_main.c6
-rw-r--r--drivers/net/bnx2x/bnx2x_main.c2
-rw-r--r--drivers/net/bonding/bond_main.c2
-rw-r--r--drivers/net/caif/caif_spi.c4
-rw-r--r--drivers/net/gianfar.c7
-rw-r--r--drivers/net/ipg.c6
-rw-r--r--drivers/net/r8169.c3
-rw-r--r--drivers/net/wireless/ath/ath9k/eeprom_9287.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/hif_usb.c9
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_init.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_txrx.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/init.c3
-rw-r--r--drivers/net/wireless/ath/ath9k/reg.h8
-rw-r--r--drivers/net/wireless/ath/carl9170/usb.c4
-rw-r--r--include/linux/rtnetlink.h2
-rw-r--r--include/net/cfg80211.h2
-rw-r--r--include/net/neighbour.h2
-rw-r--r--net/core/filter.c2
-rw-r--r--net/ipv4/icmp.c3
-rw-r--r--net/ipv6/addrconf.c28
-rw-r--r--net/irda/irttp.c30
-rw-r--r--net/netfilter/ipvs/Kconfig1
-rw-r--r--net/rds/rdma.c2
-rw-r--r--net/wireless/chan.c54
27 files changed, 155 insertions, 54 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index 88b74a75d93..8b6ca96435e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1829,6 +1829,13 @@ W: http://www.chelsio.com
1829S: Supported 1829S: Supported
1830F: drivers/net/cxgb4vf/ 1830F: drivers/net/cxgb4vf/
1831 1831
1832STMMAC ETHERNET DRIVER
1833M: Giuseppe Cavallaro <peppe.cavallaro@st.com>
1834L: netdev@vger.kernel.org
1835W: http://www.stlinux.com
1836S: Supported
1837F: drivers/net/stmmac/
1838
1832CYBERPRO FB DRIVER 1839CYBERPRO FB DRIVER
1833M: Russell King <linux@arm.linux.org.uk> 1840M: Russell King <linux@arm.linux.org.uk>
1834L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) 1841L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c
index e1da258bbfb..0a92436f053 100644
--- a/drivers/net/3c59x.c
+++ b/drivers/net/3c59x.c
@@ -699,7 +699,8 @@ DEFINE_WINDOW_IO(32)
699#define DEVICE_PCI(dev) NULL 699#define DEVICE_PCI(dev) NULL
700#endif 700#endif
701 701
702#define VORTEX_PCI(vp) (((vp)->gendev) ? DEVICE_PCI((vp)->gendev) : NULL) 702#define VORTEX_PCI(vp) \
703 ((struct pci_dev *) (((vp)->gendev) ? DEVICE_PCI((vp)->gendev) : NULL))
703 704
704#ifdef CONFIG_EISA 705#ifdef CONFIG_EISA
705#define DEVICE_EISA(dev) (((dev)->bus == &eisa_bus_type) ? to_eisa_device((dev)) : NULL) 706#define DEVICE_EISA(dev) (((dev)->bus == &eisa_bus_type) ? to_eisa_device((dev)) : NULL)
@@ -707,7 +708,8 @@ DEFINE_WINDOW_IO(32)
707#define DEVICE_EISA(dev) NULL 708#define DEVICE_EISA(dev) NULL
708#endif 709#endif
709 710
710#define VORTEX_EISA(vp) (((vp)->gendev) ? DEVICE_EISA((vp)->gendev) : NULL) 711#define VORTEX_EISA(vp) \
712 ((struct eisa_device *) (((vp)->gendev) ? DEVICE_EISA((vp)->gendev) : NULL))
711 713
712/* The action to take with a media selection timer tick. 714/* The action to take with a media selection timer tick.
713 Note that we deviate from the 3Com order by checking 10base2 before AUI. 715 Note that we deviate from the 3Com order by checking 10base2 before AUI.
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c
index ac422cd332e..dd16e83933a 100644
--- a/drivers/net/8139cp.c
+++ b/drivers/net/8139cp.c
@@ -490,13 +490,11 @@ static inline unsigned int cp_rx_csum_ok (u32 status)
490{ 490{
491 unsigned int protocol = (status >> 16) & 0x3; 491 unsigned int protocol = (status >> 16) & 0x3;
492 492
493 if (likely((protocol == RxProtoTCP) && (!(status & TCPFail)))) 493 if (((protocol == RxProtoTCP) && !(status & TCPFail)) ||
494 ((protocol == RxProtoUDP) && !(status & UDPFail)))
494 return 1; 495 return 1;
495 else if ((protocol == RxProtoUDP) && (!(status & UDPFail))) 496 else
496 return 1; 497 return 0;
497 else if ((protocol == RxProtoIP) && (!(status & IPFail)))
498 return 1;
499 return 0;
500} 498}
501 499
502static int cp_rx_poll(struct napi_struct *napi, int budget) 500static int cp_rx_poll(struct napi_struct *napi, int budget)
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index c36cd2ffbad..93354eee2cf 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -2458,6 +2458,12 @@ int be_load_fw(struct be_adapter *adapter, u8 *func)
2458 int status, i = 0, num_imgs = 0; 2458 int status, i = 0, num_imgs = 0;
2459 const u8 *p; 2459 const u8 *p;
2460 2460
2461 if (!netif_running(adapter->netdev)) {
2462 dev_err(&adapter->pdev->dev,
2463 "Firmware load not allowed (interface is down)\n");
2464 return -EPERM;
2465 }
2466
2461 strcpy(fw_file, func); 2467 strcpy(fw_file, func);
2462 2468
2463 status = request_firmware(&fw, fw_file, &adapter->pdev->dev); 2469 status = request_firmware(&fw, fw_file, &adapter->pdev->dev);
diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c
index 7ffcb086cb6..92057d7058d 100644
--- a/drivers/net/bnx2x/bnx2x_main.c
+++ b/drivers/net/bnx2x/bnx2x_main.c
@@ -9064,7 +9064,7 @@ static int __devinit bnx2x_init_one(struct pci_dev *pdev,
9064 default: 9064 default:
9065 pr_err("Unknown board_type (%ld), aborting\n", 9065 pr_err("Unknown board_type (%ld), aborting\n",
9066 ent->driver_data); 9066 ent->driver_data);
9067 return ENODEV; 9067 return -ENODEV;
9068 } 9068 }
9069 9069
9070 cid_count += CNIC_CONTEXT_USE; 9070 cid_count += CNIC_CONTEXT_USE;
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index e588b2e1c3b..0273ad0b57b 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -877,7 +877,7 @@ static void __bond_resend_igmp_join_requests(struct net_device *dev)
877 rcu_read_lock(); 877 rcu_read_lock();
878 in_dev = __in_dev_get_rcu(dev); 878 in_dev = __in_dev_get_rcu(dev);
879 if (in_dev) 879 if (in_dev)
880 ip_mc_rejoin_groups(in_dev); 880 ip_mc_rejoin_groups(in_dev);
881 rcu_read_unlock(); 881 rcu_read_unlock();
882} 882}
883 883
diff --git a/drivers/net/caif/caif_spi.c b/drivers/net/caif/caif_spi.c
index 8b4cea57a6c..20da1996d35 100644
--- a/drivers/net/caif/caif_spi.c
+++ b/drivers/net/caif/caif_spi.c
@@ -635,8 +635,8 @@ int cfspi_spi_probe(struct platform_device *pdev)
635 635
636 ndev = alloc_netdev(sizeof(struct cfspi), 636 ndev = alloc_netdev(sizeof(struct cfspi),
637 "cfspi%d", cfspi_setup); 637 "cfspi%d", cfspi_setup);
638 if (!dev) 638 if (!ndev)
639 return -ENODEV; 639 return -ENOMEM;
640 640
641 cfspi = netdev_priv(ndev); 641 cfspi = netdev_priv(ndev);
642 netif_stop_queue(ndev); 642 netif_stop_queue(ndev);
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 49e4ce1246a..d1bec626917 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -577,11 +577,10 @@ static int gfar_parse_group(struct device_node *np,
577 irq_of_parse_and_map(np, 1); 577 irq_of_parse_and_map(np, 1);
578 priv->gfargrp[priv->num_grps].interruptError = 578 priv->gfargrp[priv->num_grps].interruptError =
579 irq_of_parse_and_map(np,2); 579 irq_of_parse_and_map(np,2);
580 if (priv->gfargrp[priv->num_grps].interruptTransmit < 0 || 580 if (priv->gfargrp[priv->num_grps].interruptTransmit == NO_IRQ ||
581 priv->gfargrp[priv->num_grps].interruptReceive < 0 || 581 priv->gfargrp[priv->num_grps].interruptReceive == NO_IRQ ||
582 priv->gfargrp[priv->num_grps].interruptError < 0) { 582 priv->gfargrp[priv->num_grps].interruptError == NO_IRQ)
583 return -EINVAL; 583 return -EINVAL;
584 }
585 } 584 }
586 585
587 priv->gfargrp[priv->num_grps].grp_id = priv->num_grps; 586 priv->gfargrp[priv->num_grps].grp_id = priv->num_grps;
diff --git a/drivers/net/ipg.c b/drivers/net/ipg.c
index dc019809234..aa93655c3aa 100644
--- a/drivers/net/ipg.c
+++ b/drivers/net/ipg.c
@@ -88,16 +88,14 @@ static const char *ipg_brand_name[] = {
88 "IC PLUS IP1000 1000/100/10 based NIC", 88 "IC PLUS IP1000 1000/100/10 based NIC",
89 "Sundance Technology ST2021 based NIC", 89 "Sundance Technology ST2021 based NIC",
90 "Tamarack Microelectronics TC9020/9021 based NIC", 90 "Tamarack Microelectronics TC9020/9021 based NIC",
91 "Tamarack Microelectronics TC9020/9021 based NIC",
92 "D-Link NIC IP1000A" 91 "D-Link NIC IP1000A"
93}; 92};
94 93
95static DEFINE_PCI_DEVICE_TABLE(ipg_pci_tbl) = { 94static DEFINE_PCI_DEVICE_TABLE(ipg_pci_tbl) = {
96 { PCI_VDEVICE(SUNDANCE, 0x1023), 0 }, 95 { PCI_VDEVICE(SUNDANCE, 0x1023), 0 },
97 { PCI_VDEVICE(SUNDANCE, 0x2021), 1 }, 96 { PCI_VDEVICE(SUNDANCE, 0x2021), 1 },
98 { PCI_VDEVICE(SUNDANCE, 0x1021), 2 }, 97 { PCI_VDEVICE(DLINK, 0x9021), 2 },
99 { PCI_VDEVICE(DLINK, 0x9021), 3 }, 98 { PCI_VDEVICE(DLINK, 0x4020), 3 },
100 { PCI_VDEVICE(DLINK, 0x4020), 4 },
101 { 0, } 99 { 0, }
102}; 100};
103 101
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 4c4d16905ef..7d33ef4bcb4 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -4440,8 +4440,7 @@ static inline void rtl8169_rx_csum(struct sk_buff *skb, u32 opts1)
4440 u32 status = opts1 & RxProtoMask; 4440 u32 status = opts1 & RxProtoMask;
4441 4441
4442 if (((status == RxProtoTCP) && !(opts1 & TCPFail)) || 4442 if (((status == RxProtoTCP) && !(opts1 & TCPFail)) ||
4443 ((status == RxProtoUDP) && !(opts1 & UDPFail)) || 4443 ((status == RxProtoUDP) && !(opts1 & UDPFail)))
4444 ((status == RxProtoIP) && !(opts1 & IPFail)))
4445 skb->ip_summed = CHECKSUM_UNNECESSARY; 4444 skb->ip_summed = CHECKSUM_UNNECESSARY;
4446 else 4445 else
4447 skb_checksum_none_assert(skb); 4446 skb_checksum_none_assert(skb);
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_9287.c b/drivers/net/wireless/ath/ath9k/eeprom_9287.c
index ebf7a89f547..3ad1de253c8 100644
--- a/drivers/net/wireless/ath/ath9k/eeprom_9287.c
+++ b/drivers/net/wireless/ath/ath9k/eeprom_9287.c
@@ -37,7 +37,7 @@ static bool ath9k_hw_ar9287_fill_eeprom(struct ath_hw *ah)
37 int addr, eep_start_loc; 37 int addr, eep_start_loc;
38 eep_data = (u16 *)eep; 38 eep_data = (u16 *)eep;
39 39
40 if (ah->hw_version.devid == 0x7015) 40 if (AR9287_HTC_DEVID(ah))
41 eep_start_loc = AR9287_HTC_EEP_START_LOC; 41 eep_start_loc = AR9287_HTC_EEP_START_LOC;
42 else 42 else
43 eep_start_loc = AR9287_EEP_START_LOC; 43 eep_start_loc = AR9287_EEP_START_LOC;
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
index f7ec31b4ddd..dfb6560dab9 100644
--- a/drivers/net/wireless/ath/ath9k/hif_usb.c
+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
@@ -36,8 +36,13 @@ static struct usb_device_id ath9k_hif_usb_ids[] = {
36 { USB_DEVICE(0x13D3, 0x3327) }, /* Azurewave */ 36 { USB_DEVICE(0x13D3, 0x3327) }, /* Azurewave */
37 { USB_DEVICE(0x13D3, 0x3328) }, /* Azurewave */ 37 { USB_DEVICE(0x13D3, 0x3328) }, /* Azurewave */
38 { USB_DEVICE(0x13D3, 0x3346) }, /* IMC Networks */ 38 { USB_DEVICE(0x13D3, 0x3346) }, /* IMC Networks */
39 { USB_DEVICE(0x13D3, 0x3348) }, /* Azurewave */
40 { USB_DEVICE(0x13D3, 0x3349) }, /* Azurewave */
41 { USB_DEVICE(0x13D3, 0x3350) }, /* Azurewave */
39 { USB_DEVICE(0x04CA, 0x4605) }, /* Liteon */ 42 { USB_DEVICE(0x04CA, 0x4605) }, /* Liteon */
40 { USB_DEVICE(0x083A, 0xA704) }, /* SMC Networks */ 43 { USB_DEVICE(0x083A, 0xA704) }, /* SMC Networks */
44 { USB_DEVICE(0x040D, 0x3801) }, /* VIA */
45 { USB_DEVICE(0x1668, 0x1200) }, /* Verizon */
41 { }, 46 { },
42}; 47};
43 48
@@ -806,6 +811,8 @@ static int ath9k_hif_usb_download_fw(struct hif_device_usb *hif_dev)
806 case 0x7010: 811 case 0x7010:
807 case 0x7015: 812 case 0x7015:
808 case 0x9018: 813 case 0x9018:
814 case 0xA704:
815 case 0x1200:
809 firm_offset = AR7010_FIRMWARE_TEXT; 816 firm_offset = AR7010_FIRMWARE_TEXT;
810 break; 817 break;
811 default: 818 default:
@@ -928,6 +935,8 @@ static int ath9k_hif_usb_probe(struct usb_interface *interface,
928 case 0x7010: 935 case 0x7010:
929 case 0x7015: 936 case 0x7015:
930 case 0x9018: 937 case 0x9018:
938 case 0xA704:
939 case 0x1200:
931 if (le16_to_cpu(udev->descriptor.bcdDevice) == 0x0202) 940 if (le16_to_cpu(udev->descriptor.bcdDevice) == 0x0202)
932 hif_dev->fw_name = FIRMWARE_AR7010_1_1; 941 hif_dev->fw_name = FIRMWARE_AR7010_1_1;
933 else 942 else
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
index 3d7b97f1b3a..7c8a38d0456 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
@@ -249,6 +249,8 @@ static int ath9k_init_htc_services(struct ath9k_htc_priv *priv, u16 devid)
249 case 0x7010: 249 case 0x7010:
250 case 0x7015: 250 case 0x7015:
251 case 0x9018: 251 case 0x9018:
252 case 0xA704:
253 case 0x1200:
252 priv->htc->credits = 45; 254 priv->htc->credits = 45;
253 break; 255 break;
254 default: 256 default:
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
index 5324ffd96ec..77958675b55 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
@@ -128,7 +128,7 @@ int ath9k_htc_tx_start(struct ath9k_htc_priv *priv, struct sk_buff *skb)
128 tx_hdr.data_type = ATH9K_HTC_NORMAL; 128 tx_hdr.data_type = ATH9K_HTC_NORMAL;
129 } 129 }
130 130
131 if (ieee80211_is_data(fc)) { 131 if (ieee80211_is_data_qos(fc)) {
132 qc = ieee80211_get_qos_ctl(hdr); 132 qc = ieee80211_get_qos_ctl(hdr);
133 tx_hdr.tidno = qc[0] & IEEE80211_QOS_CTL_TID_MASK; 133 tx_hdr.tidno = qc[0] & IEEE80211_QOS_CTL_TID_MASK;
134 } 134 }
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index d28e580bb48..5c26818d79e 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -811,8 +811,6 @@ void ath9k_deinit_device(struct ath_softc *sc)
811 811
812 ath9k_ps_wakeup(sc); 812 ath9k_ps_wakeup(sc);
813 813
814 pm_qos_remove_request(&ath9k_pm_qos_req);
815
816 wiphy_rfkill_stop_polling(sc->hw->wiphy); 814 wiphy_rfkill_stop_polling(sc->hw->wiphy);
817 ath_deinit_leds(sc); 815 ath_deinit_leds(sc);
818 816
@@ -826,6 +824,7 @@ void ath9k_deinit_device(struct ath_softc *sc)
826 } 824 }
827 825
828 ieee80211_unregister_hw(hw); 826 ieee80211_unregister_hw(hw);
827 pm_qos_remove_request(&ath9k_pm_qos_req);
829 ath_rx_cleanup(sc); 828 ath_rx_cleanup(sc);
830 ath_tx_cleanup(sc); 829 ath_tx_cleanup(sc);
831 ath9k_deinit_softc(sc); 830 ath9k_deinit_softc(sc);
diff --git a/drivers/net/wireless/ath/ath9k/reg.h b/drivers/net/wireless/ath/ath9k/reg.h
index fa05b711e5c..dddf579aacf 100644
--- a/drivers/net/wireless/ath/ath9k/reg.h
+++ b/drivers/net/wireless/ath/ath9k/reg.h
@@ -866,7 +866,13 @@
866#define AR_DEVID_7010(_ah) \ 866#define AR_DEVID_7010(_ah) \
867 (((_ah)->hw_version.devid == 0x7010) || \ 867 (((_ah)->hw_version.devid == 0x7010) || \
868 ((_ah)->hw_version.devid == 0x7015) || \ 868 ((_ah)->hw_version.devid == 0x7015) || \
869 ((_ah)->hw_version.devid == 0x9018)) 869 ((_ah)->hw_version.devid == 0x9018) || \
870 ((_ah)->hw_version.devid == 0xA704) || \
871 ((_ah)->hw_version.devid == 0x1200))
872
873#define AR9287_HTC_DEVID(_ah) \
874 (((_ah)->hw_version.devid == 0x7015) || \
875 ((_ah)->hw_version.devid == 0x1200))
870 876
871#define AR_RADIO_SREV_MAJOR 0xf0 877#define AR_RADIO_SREV_MAJOR 0xf0
872#define AR_RAD5133_SREV_MAJOR 0xc0 878#define AR_RAD5133_SREV_MAJOR 0xc0
diff --git a/drivers/net/wireless/ath/carl9170/usb.c b/drivers/net/wireless/ath/carl9170/usb.c
index 82c5f1c5065..a268053e18e 100644
--- a/drivers/net/wireless/ath/carl9170/usb.c
+++ b/drivers/net/wireless/ath/carl9170/usb.c
@@ -553,12 +553,12 @@ static int carl9170_usb_flush(struct ar9170 *ar)
553 usb_free_urb(urb); 553 usb_free_urb(urb);
554 } 554 }
555 555
556 ret = usb_wait_anchor_empty_timeout(&ar->tx_cmd, HZ); 556 ret = usb_wait_anchor_empty_timeout(&ar->tx_cmd, 1000);
557 if (ret == 0) 557 if (ret == 0)
558 err = -ETIMEDOUT; 558 err = -ETIMEDOUT;
559 559
560 /* lets wait a while until the tx - queues are dried out */ 560 /* lets wait a while until the tx - queues are dried out */
561 ret = usb_wait_anchor_empty_timeout(&ar->tx_anch, HZ); 561 ret = usb_wait_anchor_empty_timeout(&ar->tx_anch, 1000);
562 if (ret == 0) 562 if (ret == 0)
563 err = -ETIMEDOUT; 563 err = -ETIMEDOUT;
564 564
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index d42f274418b..bbad657a372 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -6,7 +6,6 @@
6#include <linux/if_link.h> 6#include <linux/if_link.h>
7#include <linux/if_addr.h> 7#include <linux/if_addr.h>
8#include <linux/neighbour.h> 8#include <linux/neighbour.h>
9#include <linux/netdevice.h>
10 9
11/* rtnetlink families. Values up to 127 are reserved for real address 10/* rtnetlink families. Values up to 127 are reserved for real address
12 * families, values above 128 may be used arbitrarily. 11 * families, values above 128 may be used arbitrarily.
@@ -606,6 +605,7 @@ struct tcamsg {
606#ifdef __KERNEL__ 605#ifdef __KERNEL__
607 606
608#include <linux/mutex.h> 607#include <linux/mutex.h>
608#include <linux/netdevice.h>
609 609
610static __inline__ int rtattr_strcmp(const struct rtattr *rta, const char *str) 610static __inline__ int rtattr_strcmp(const struct rtattr *rta, const char *str)
611{ 611{
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index e5702f5ac57..772dea243e5 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1356,7 +1356,7 @@ enum wiphy_flags {
1356 WIPHY_FLAG_4ADDR_AP = BIT(5), 1356 WIPHY_FLAG_4ADDR_AP = BIT(5),
1357 WIPHY_FLAG_4ADDR_STATION = BIT(6), 1357 WIPHY_FLAG_4ADDR_STATION = BIT(6),
1358 WIPHY_FLAG_CONTROL_PORT_PROTOCOL = BIT(7), 1358 WIPHY_FLAG_CONTROL_PORT_PROTOCOL = BIT(7),
1359 WIPHY_FLAG_IBSS_RSN = BIT(7), 1359 WIPHY_FLAG_IBSS_RSN = BIT(8),
1360}; 1360};
1361 1361
1362struct mac_address { 1362struct mac_address {
diff --git a/include/net/neighbour.h b/include/net/neighbour.h
index 815b2ce9f4a..4014b623880 100644
--- a/include/net/neighbour.h
+++ b/include/net/neighbour.h
@@ -303,7 +303,7 @@ static inline void neigh_confirm(struct neighbour *neigh)
303 303
304static inline int neigh_event_send(struct neighbour *neigh, struct sk_buff *skb) 304static inline int neigh_event_send(struct neighbour *neigh, struct sk_buff *skb)
305{ 305{
306 unsigned long now = ACCESS_ONCE(jiffies); 306 unsigned long now = jiffies;
307 307
308 if (neigh->used != now) 308 if (neigh->used != now)
309 neigh->used = now; 309 neigh->used = now;
diff --git a/net/core/filter.c b/net/core/filter.c
index 23e0a2a9a4d..a44d27f9f0f 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -554,7 +554,7 @@ int sk_chk_filter(struct sock_filter *filter, int flen)
554EXPORT_SYMBOL(sk_chk_filter); 554EXPORT_SYMBOL(sk_chk_filter);
555 555
556/** 556/**
557 * sk_filter_rcu_release: Release a socket filter by rcu_head 557 * sk_filter_rcu_release - Release a socket filter by rcu_head
558 * @rcu: rcu_head that contains the sk_filter to free 558 * @rcu: rcu_head that contains the sk_filter to free
559 */ 559 */
560static void sk_filter_rcu_release(struct rcu_head *rcu) 560static void sk_filter_rcu_release(struct rcu_head *rcu)
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index 4daebd17b6e..4aa1b7f01ea 100644
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -559,6 +559,9 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info)
559 /* No need to clone since we're just using its address. */ 559 /* No need to clone since we're just using its address. */
560 rt2 = rt; 560 rt2 = rt;
561 561
562 if (!fl.nl_u.ip4_u.saddr)
563 fl.nl_u.ip4_u.saddr = rt->rt_src;
564
562 err = xfrm_lookup(net, (struct dst_entry **)&rt, &fl, NULL, 0); 565 err = xfrm_lookup(net, (struct dst_entry **)&rt, &fl, NULL, 0);
563 switch (err) { 566 switch (err) {
564 case 0: 567 case 0:
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 470e7acb91d..4cf760598c2 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -98,7 +98,11 @@
98#endif 98#endif
99 99
100#define INFINITY_LIFE_TIME 0xFFFFFFFF 100#define INFINITY_LIFE_TIME 0xFFFFFFFF
101#define TIME_DELTA(a, b) ((unsigned long)((long)(a) - (long)(b))) 101
102static inline u32 cstamp_delta(unsigned long cstamp)
103{
104 return (cstamp - INITIAL_JIFFIES) * 100UL / HZ;
105}
102 106
103#define ADDRCONF_TIMER_FUZZ_MINUS (HZ > 50 ? HZ/50 : 1) 107#define ADDRCONF_TIMER_FUZZ_MINUS (HZ > 50 ? HZ/50 : 1)
104#define ADDRCONF_TIMER_FUZZ (HZ / 4) 108#define ADDRCONF_TIMER_FUZZ (HZ / 4)
@@ -3444,10 +3448,8 @@ static int put_cacheinfo(struct sk_buff *skb, unsigned long cstamp,
3444{ 3448{
3445 struct ifa_cacheinfo ci; 3449 struct ifa_cacheinfo ci;
3446 3450
3447 ci.cstamp = (u32)(TIME_DELTA(cstamp, INITIAL_JIFFIES) / HZ * 100 3451 ci.cstamp = cstamp_delta(cstamp);
3448 + TIME_DELTA(cstamp, INITIAL_JIFFIES) % HZ * 100 / HZ); 3452 ci.tstamp = cstamp_delta(tstamp);
3449 ci.tstamp = (u32)(TIME_DELTA(tstamp, INITIAL_JIFFIES) / HZ * 100
3450 + TIME_DELTA(tstamp, INITIAL_JIFFIES) % HZ * 100 / HZ);
3451 ci.ifa_prefered = preferred; 3453 ci.ifa_prefered = preferred;
3452 ci.ifa_valid = valid; 3454 ci.ifa_valid = valid;
3453 3455
@@ -3798,8 +3800,10 @@ static inline void ipv6_store_devconf(struct ipv6_devconf *cnf,
3798 array[DEVCONF_AUTOCONF] = cnf->autoconf; 3800 array[DEVCONF_AUTOCONF] = cnf->autoconf;
3799 array[DEVCONF_DAD_TRANSMITS] = cnf->dad_transmits; 3801 array[DEVCONF_DAD_TRANSMITS] = cnf->dad_transmits;
3800 array[DEVCONF_RTR_SOLICITS] = cnf->rtr_solicits; 3802 array[DEVCONF_RTR_SOLICITS] = cnf->rtr_solicits;
3801 array[DEVCONF_RTR_SOLICIT_INTERVAL] = cnf->rtr_solicit_interval; 3803 array[DEVCONF_RTR_SOLICIT_INTERVAL] =
3802 array[DEVCONF_RTR_SOLICIT_DELAY] = cnf->rtr_solicit_delay; 3804 jiffies_to_msecs(cnf->rtr_solicit_interval);
3805 array[DEVCONF_RTR_SOLICIT_DELAY] =
3806 jiffies_to_msecs(cnf->rtr_solicit_delay);
3803 array[DEVCONF_FORCE_MLD_VERSION] = cnf->force_mld_version; 3807 array[DEVCONF_FORCE_MLD_VERSION] = cnf->force_mld_version;
3804#ifdef CONFIG_IPV6_PRIVACY 3808#ifdef CONFIG_IPV6_PRIVACY
3805 array[DEVCONF_USE_TEMPADDR] = cnf->use_tempaddr; 3809 array[DEVCONF_USE_TEMPADDR] = cnf->use_tempaddr;
@@ -3813,7 +3817,8 @@ static inline void ipv6_store_devconf(struct ipv6_devconf *cnf,
3813 array[DEVCONF_ACCEPT_RA_PINFO] = cnf->accept_ra_pinfo; 3817 array[DEVCONF_ACCEPT_RA_PINFO] = cnf->accept_ra_pinfo;
3814#ifdef CONFIG_IPV6_ROUTER_PREF 3818#ifdef CONFIG_IPV6_ROUTER_PREF
3815 array[DEVCONF_ACCEPT_RA_RTR_PREF] = cnf->accept_ra_rtr_pref; 3819 array[DEVCONF_ACCEPT_RA_RTR_PREF] = cnf->accept_ra_rtr_pref;
3816 array[DEVCONF_RTR_PROBE_INTERVAL] = cnf->rtr_probe_interval; 3820 array[DEVCONF_RTR_PROBE_INTERVAL] =
3821 jiffies_to_msecs(cnf->rtr_probe_interval);
3817#ifdef CONFIG_IPV6_ROUTE_INFO 3822#ifdef CONFIG_IPV6_ROUTE_INFO
3818 array[DEVCONF_ACCEPT_RA_RT_INFO_MAX_PLEN] = cnf->accept_ra_rt_info_max_plen; 3823 array[DEVCONF_ACCEPT_RA_RT_INFO_MAX_PLEN] = cnf->accept_ra_rt_info_max_plen;
3819#endif 3824#endif
@@ -3902,10 +3907,9 @@ static int inet6_fill_ifla6_attrs(struct sk_buff *skb, struct inet6_dev *idev)
3902 NLA_PUT_U32(skb, IFLA_INET6_FLAGS, idev->if_flags); 3907 NLA_PUT_U32(skb, IFLA_INET6_FLAGS, idev->if_flags);
3903 3908
3904 ci.max_reasm_len = IPV6_MAXPLEN; 3909 ci.max_reasm_len = IPV6_MAXPLEN;
3905 ci.tstamp = (__u32)(TIME_DELTA(idev->tstamp, INITIAL_JIFFIES) / HZ * 100 3910 ci.tstamp = cstamp_delta(idev->tstamp);
3906 + TIME_DELTA(idev->tstamp, INITIAL_JIFFIES) % HZ * 100 / HZ); 3911 ci.reachable_time = jiffies_to_msecs(idev->nd_parms->reachable_time);
3907 ci.reachable_time = idev->nd_parms->reachable_time; 3912 ci.retrans_time = jiffies_to_msecs(idev->nd_parms->retrans_time);
3908 ci.retrans_time = idev->nd_parms->retrans_time;
3909 NLA_PUT(skb, IFLA_INET6_CACHEINFO, sizeof(ci), &ci); 3913 NLA_PUT(skb, IFLA_INET6_CACHEINFO, sizeof(ci), &ci);
3910 3914
3911 nla = nla_reserve(skb, IFLA_INET6_CONF, DEVCONF_MAX * sizeof(s32)); 3915 nla = nla_reserve(skb, IFLA_INET6_CONF, DEVCONF_MAX * sizeof(s32));
diff --git a/net/irda/irttp.c b/net/irda/irttp.c
index 285761e77d9..f6054f9ccbe 100644
--- a/net/irda/irttp.c
+++ b/net/irda/irttp.c
@@ -550,22 +550,30 @@ EXPORT_SYMBOL(irttp_close_tsap);
550 */ 550 */
551int irttp_udata_request(struct tsap_cb *self, struct sk_buff *skb) 551int irttp_udata_request(struct tsap_cb *self, struct sk_buff *skb)
552{ 552{
553 int ret;
554
553 IRDA_ASSERT(self != NULL, return -1;); 555 IRDA_ASSERT(self != NULL, return -1;);
554 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); 556 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;);
555 IRDA_ASSERT(skb != NULL, return -1;); 557 IRDA_ASSERT(skb != NULL, return -1;);
556 558
557 IRDA_DEBUG(4, "%s()\n", __func__); 559 IRDA_DEBUG(4, "%s()\n", __func__);
558 560
561 /* Take shortcut on zero byte packets */
562 if (skb->len == 0) {
563 ret = 0;
564 goto err;
565 }
566
559 /* Check that nothing bad happens */ 567 /* Check that nothing bad happens */
560 if ((skb->len == 0) || (!self->connected)) { 568 if (!self->connected) {
561 IRDA_DEBUG(1, "%s(), No data, or not connected\n", 569 IRDA_WARNING("%s(), Not connected\n", __func__);
562 __func__); 570 ret = -ENOTCONN;
563 goto err; 571 goto err;
564 } 572 }
565 573
566 if (skb->len > self->max_seg_size) { 574 if (skb->len > self->max_seg_size) {
567 IRDA_DEBUG(1, "%s(), UData is too large for IrLAP!\n", 575 IRDA_ERROR("%s(), UData is too large for IrLAP!\n", __func__);
568 __func__); 576 ret = -EMSGSIZE;
569 goto err; 577 goto err;
570 } 578 }
571 579
@@ -576,7 +584,7 @@ int irttp_udata_request(struct tsap_cb *self, struct sk_buff *skb)
576 584
577err: 585err:
578 dev_kfree_skb(skb); 586 dev_kfree_skb(skb);
579 return -1; 587 return ret;
580} 588}
581EXPORT_SYMBOL(irttp_udata_request); 589EXPORT_SYMBOL(irttp_udata_request);
582 590
@@ -599,9 +607,15 @@ int irttp_data_request(struct tsap_cb *self, struct sk_buff *skb)
599 IRDA_DEBUG(2, "%s() : queue len = %d\n", __func__, 607 IRDA_DEBUG(2, "%s() : queue len = %d\n", __func__,
600 skb_queue_len(&self->tx_queue)); 608 skb_queue_len(&self->tx_queue));
601 609
610 /* Take shortcut on zero byte packets */
611 if (skb->len == 0) {
612 ret = 0;
613 goto err;
614 }
615
602 /* Check that nothing bad happens */ 616 /* Check that nothing bad happens */
603 if ((skb->len == 0) || (!self->connected)) { 617 if (!self->connected) {
604 IRDA_WARNING("%s: No data, or not connected\n", __func__); 618 IRDA_WARNING("%s: Not connected\n", __func__);
605 ret = -ENOTCONN; 619 ret = -ENOTCONN;
606 goto err; 620 goto err;
607 } 621 }
diff --git a/net/netfilter/ipvs/Kconfig b/net/netfilter/ipvs/Kconfig
index a22dac22705..70bd1d0774c 100644
--- a/net/netfilter/ipvs/Kconfig
+++ b/net/netfilter/ipvs/Kconfig
@@ -4,6 +4,7 @@
4menuconfig IP_VS 4menuconfig IP_VS
5 tristate "IP virtual server support" 5 tristate "IP virtual server support"
6 depends on NET && INET && NETFILTER 6 depends on NET && INET && NETFILTER
7 depends on (NF_CONNTRACK || NF_CONNTRACK=n)
7 ---help--- 8 ---help---
8 IP Virtual Server support will let you build a high-performance 9 IP Virtual Server support will let you build a high-performance
9 virtual server based on cluster of two or more real servers. This 10 virtual server based on cluster of two or more real servers. This
diff --git a/net/rds/rdma.c b/net/rds/rdma.c
index 8920f2a8332..4e37c1cbe8b 100644
--- a/net/rds/rdma.c
+++ b/net/rds/rdma.c
@@ -567,7 +567,7 @@ int rds_cmsg_rdma_args(struct rds_sock *rs, struct rds_message *rm,
567 goto out; 567 goto out;
568 } 568 }
569 569
570 if (args->nr_local > (u64)UINT_MAX) { 570 if (args->nr_local > UIO_MAXIOV) {
571 ret = -EMSGSIZE; 571 ret = -EMSGSIZE;
572 goto out; 572 goto out;
573 } 573 }
diff --git a/net/wireless/chan.c b/net/wireless/chan.c
index d0c92dddb26..17cd0c04d13 100644
--- a/net/wireless/chan.c
+++ b/net/wireless/chan.c
@@ -44,6 +44,38 @@ rdev_freq_to_chan(struct cfg80211_registered_device *rdev,
44 return chan; 44 return chan;
45} 45}
46 46
47static bool can_beacon_sec_chan(struct wiphy *wiphy,
48 struct ieee80211_channel *chan,
49 enum nl80211_channel_type channel_type)
50{
51 struct ieee80211_channel *sec_chan;
52 int diff;
53
54 switch (channel_type) {
55 case NL80211_CHAN_HT40PLUS:
56 diff = 20;
57 break;
58 case NL80211_CHAN_HT40MINUS:
59 diff = -20;
60 break;
61 default:
62 return false;
63 }
64
65 sec_chan = ieee80211_get_channel(wiphy, chan->center_freq + diff);
66 if (!sec_chan)
67 return false;
68
69 /* we'll need a DFS capability later */
70 if (sec_chan->flags & (IEEE80211_CHAN_DISABLED |
71 IEEE80211_CHAN_PASSIVE_SCAN |
72 IEEE80211_CHAN_NO_IBSS |
73 IEEE80211_CHAN_RADAR))
74 return false;
75
76 return true;
77}
78
47int cfg80211_set_freq(struct cfg80211_registered_device *rdev, 79int cfg80211_set_freq(struct cfg80211_registered_device *rdev,
48 struct wireless_dev *wdev, int freq, 80 struct wireless_dev *wdev, int freq,
49 enum nl80211_channel_type channel_type) 81 enum nl80211_channel_type channel_type)
@@ -68,6 +100,28 @@ int cfg80211_set_freq(struct cfg80211_registered_device *rdev,
68 if (!chan) 100 if (!chan)
69 return -EINVAL; 101 return -EINVAL;
70 102
103 /* Both channels should be able to initiate communication */
104 if (wdev && (wdev->iftype == NL80211_IFTYPE_ADHOC ||
105 wdev->iftype == NL80211_IFTYPE_AP ||
106 wdev->iftype == NL80211_IFTYPE_AP_VLAN ||
107 wdev->iftype == NL80211_IFTYPE_MESH_POINT ||
108 wdev->iftype == NL80211_IFTYPE_P2P_GO)) {
109 switch (channel_type) {
110 case NL80211_CHAN_HT40PLUS:
111 case NL80211_CHAN_HT40MINUS:
112 if (!can_beacon_sec_chan(&rdev->wiphy, chan,
113 channel_type)) {
114 printk(KERN_DEBUG
115 "cfg80211: Secondary channel not "
116 "allowed to initiate communication\n");
117 return -EINVAL;
118 }
119 break;
120 default:
121 break;
122 }
123 }
124
71 result = rdev->ops->set_channel(&rdev->wiphy, 125 result = rdev->ops->set_channel(&rdev->wiphy,
72 wdev ? wdev->netdev : NULL, 126 wdev ? wdev->netdev : NULL,
73 chan, channel_type); 127 chan, channel_type);