Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

Conflicts:
drivers/net/bonding/bond_main.c
net/core/net-sysfs.c
net/ipv6/addrconf.c

+155 -54
+7
MAINTAINERS
··· 1829 1829 S: Supported 1830 1830 F: drivers/net/cxgb4vf/ 1831 1831 1832 + STMMAC ETHERNET DRIVER 1833 + M: Giuseppe Cavallaro <peppe.cavallaro@st.com> 1834 + L: netdev@vger.kernel.org 1835 + W: http://www.stlinux.com 1836 + S: Supported 1837 + F: drivers/net/stmmac/ 1838 + 1832 1839 CYBERPRO FB DRIVER 1833 1840 M: Russell King <linux@arm.linux.org.uk> 1834 1841 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
+4 -2
drivers/net/3c59x.c
··· 699 699 #define DEVICE_PCI(dev) NULL 700 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 705 #ifdef CONFIG_EISA 705 706 #define DEVICE_EISA(dev) (((dev)->bus == &eisa_bus_type) ? to_eisa_device((dev)) : NULL) ··· 708 707 #define DEVICE_EISA(dev) NULL 709 708 #endif 710 709 711 - #define VORTEX_EISA(vp) (((vp)->gendev) ? DEVICE_EISA((vp)->gendev) : NULL) 710 + #define VORTEX_EISA(vp) \ 711 + ((struct eisa_device *) (((vp)->gendev) ? DEVICE_EISA((vp)->gendev) : NULL)) 712 712 713 713 /* The action to take with a media selection timer tick. 714 714 Note that we deviate from the 3Com order by checking 10base2 before AUI.
+4 -6
drivers/net/8139cp.c
··· 490 490 { 491 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 495 return 1; 495 - else if ((protocol == RxProtoUDP) && (!(status & UDPFail))) 496 - return 1; 497 - else if ((protocol == RxProtoIP) && (!(status & IPFail))) 498 - return 1; 499 - return 0; 496 + else 497 + return 0; 500 498 } 501 499 502 500 static int cp_rx_poll(struct napi_struct *napi, int budget)
+6
drivers/net/benet/be_main.c
··· 2458 2458 int status, i = 0, num_imgs = 0; 2459 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 2467 strcpy(fw_file, func); 2462 2468 2463 2469 status = request_firmware(&fw, fw_file, &adapter->pdev->dev);
+1 -1
drivers/net/bnx2x/bnx2x_main.c
··· 9064 9064 default: 9065 9065 pr_err("Unknown board_type (%ld), aborting\n", 9066 9066 ent->driver_data); 9067 - return ENODEV; 9067 + return -ENODEV; 9068 9068 } 9069 9069 9070 9070 cid_count += CNIC_CONTEXT_USE;
+1 -1
drivers/net/bonding/bond_main.c
··· 877 877 rcu_read_lock(); 878 878 in_dev = __in_dev_get_rcu(dev); 879 879 if (in_dev) 880 - ip_mc_rejoin_groups(in_dev); 880 + ip_mc_rejoin_groups(in_dev); 881 881 rcu_read_unlock(); 882 882 } 883 883
+2 -2
drivers/net/caif/caif_spi.c
··· 635 635 636 636 ndev = alloc_netdev(sizeof(struct cfspi), 637 637 "cfspi%d", cfspi_setup); 638 - if (!dev) 639 - return -ENODEV; 638 + if (!ndev) 639 + return -ENOMEM; 640 640 641 641 cfspi = netdev_priv(ndev); 642 642 netif_stop_queue(ndev);
+3 -4
drivers/net/gianfar.c
··· 577 577 irq_of_parse_and_map(np, 1); 578 578 priv->gfargrp[priv->num_grps].interruptError = 579 579 irq_of_parse_and_map(np,2); 580 - if (priv->gfargrp[priv->num_grps].interruptTransmit < 0 || 581 - priv->gfargrp[priv->num_grps].interruptReceive < 0 || 582 - priv->gfargrp[priv->num_grps].interruptError < 0) { 580 + if (priv->gfargrp[priv->num_grps].interruptTransmit == NO_IRQ || 581 + priv->gfargrp[priv->num_grps].interruptReceive == NO_IRQ || 582 + priv->gfargrp[priv->num_grps].interruptError == NO_IRQ) 583 583 return -EINVAL; 584 - } 585 584 } 586 585 587 586 priv->gfargrp[priv->num_grps].grp_id = priv->num_grps;
+2 -4
drivers/net/ipg.c
··· 88 88 "IC PLUS IP1000 1000/100/10 based NIC", 89 89 "Sundance Technology ST2021 based NIC", 90 90 "Tamarack Microelectronics TC9020/9021 based NIC", 91 - "Tamarack Microelectronics TC9020/9021 based NIC", 92 91 "D-Link NIC IP1000A" 93 92 }; 94 93 95 94 static DEFINE_PCI_DEVICE_TABLE(ipg_pci_tbl) = { 96 95 { PCI_VDEVICE(SUNDANCE, 0x1023), 0 }, 97 96 { PCI_VDEVICE(SUNDANCE, 0x2021), 1 }, 98 - { PCI_VDEVICE(SUNDANCE, 0x1021), 2 }, 99 - { PCI_VDEVICE(DLINK, 0x9021), 3 }, 100 - { PCI_VDEVICE(DLINK, 0x4020), 4 }, 97 + { PCI_VDEVICE(DLINK, 0x9021), 2 }, 98 + { PCI_VDEVICE(DLINK, 0x4020), 3 }, 101 99 { 0, } 102 100 }; 103 101
+1 -2
drivers/net/r8169.c
··· 4440 4440 u32 status = opts1 & RxProtoMask; 4441 4441 4442 4442 if (((status == RxProtoTCP) && !(opts1 & TCPFail)) || 4443 - ((status == RxProtoUDP) && !(opts1 & UDPFail)) || 4444 - ((status == RxProtoIP) && !(opts1 & IPFail))) 4443 + ((status == RxProtoUDP) && !(opts1 & UDPFail))) 4445 4444 skb->ip_summed = CHECKSUM_UNNECESSARY; 4446 4445 else 4447 4446 skb_checksum_none_assert(skb);
+1 -1
drivers/net/wireless/ath/ath9k/eeprom_9287.c
··· 37 37 int addr, eep_start_loc; 38 38 eep_data = (u16 *)eep; 39 39 40 - if (ah->hw_version.devid == 0x7015) 40 + if (AR9287_HTC_DEVID(ah)) 41 41 eep_start_loc = AR9287_HTC_EEP_START_LOC; 42 42 else 43 43 eep_start_loc = AR9287_EEP_START_LOC;
+9
drivers/net/wireless/ath/ath9k/hif_usb.c
··· 36 36 { USB_DEVICE(0x13D3, 0x3327) }, /* Azurewave */ 37 37 { USB_DEVICE(0x13D3, 0x3328) }, /* Azurewave */ 38 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 42 { USB_DEVICE(0x04CA, 0x4605) }, /* Liteon */ 40 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 ··· 811 806 case 0x7010: 812 807 case 0x7015: 813 808 case 0x9018: 809 + case 0xA704: 810 + case 0x1200: 814 811 firm_offset = AR7010_FIRMWARE_TEXT; 815 812 break; 816 813 default: ··· 935 928 case 0x7010: 936 929 case 0x7015: 937 930 case 0x9018: 931 + case 0xA704: 932 + case 0x1200: 938 933 if (le16_to_cpu(udev->descriptor.bcdDevice) == 0x0202) 939 934 hif_dev->fw_name = FIRMWARE_AR7010_1_1; 940 935 else
+2
drivers/net/wireless/ath/ath9k/htc_drv_init.c
··· 249 249 case 0x7010: 250 250 case 0x7015: 251 251 case 0x9018: 252 + case 0xA704: 253 + case 0x1200: 252 254 priv->htc->credits = 45; 253 255 break; 254 256 default:
+1 -1
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
··· 128 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 132 qc = ieee80211_get_qos_ctl(hdr); 133 133 tx_hdr.tidno = qc[0] & IEEE80211_QOS_CTL_TID_MASK; 134 134 }
+1 -2
drivers/net/wireless/ath/ath9k/init.c
··· 811 811 812 812 ath9k_ps_wakeup(sc); 813 813 814 - pm_qos_remove_request(&ath9k_pm_qos_req); 815 - 816 814 wiphy_rfkill_stop_polling(sc->hw->wiphy); 817 815 ath_deinit_leds(sc); 818 816 ··· 824 826 } 825 827 826 828 ieee80211_unregister_hw(hw); 829 + pm_qos_remove_request(&ath9k_pm_qos_req); 827 830 ath_rx_cleanup(sc); 828 831 ath_tx_cleanup(sc); 829 832 ath9k_deinit_softc(sc);
+7 -1
drivers/net/wireless/ath/ath9k/reg.h
··· 866 866 #define AR_DEVID_7010(_ah) \ 867 867 (((_ah)->hw_version.devid == 0x7010) || \ 868 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 877 #define AR_RADIO_SREV_MAJOR 0xf0 872 878 #define AR_RAD5133_SREV_MAJOR 0xc0
+2 -2
drivers/net/wireless/ath/carl9170/usb.c
··· 553 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 557 if (ret == 0) 558 558 err = -ETIMEDOUT; 559 559 560 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 562 if (ret == 0) 563 563 err = -ETIMEDOUT; 564 564
+1 -1
include/linux/rtnetlink.h
··· 6 6 #include <linux/if_link.h> 7 7 #include <linux/if_addr.h> 8 8 #include <linux/neighbour.h> 9 - #include <linux/netdevice.h> 10 9 11 10 /* rtnetlink families. Values up to 127 are reserved for real address 12 11 * families, values above 128 may be used arbitrarily. ··· 605 606 #ifdef __KERNEL__ 606 607 607 608 #include <linux/mutex.h> 609 + #include <linux/netdevice.h> 608 610 609 611 static __inline__ int rtattr_strcmp(const struct rtattr *rta, const char *str) 610 612 {
+1 -1
include/net/cfg80211.h
··· 1356 1356 WIPHY_FLAG_4ADDR_AP = BIT(5), 1357 1357 WIPHY_FLAG_4ADDR_STATION = BIT(6), 1358 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 1362 1362 struct mac_address {
+1 -1
include/net/neighbour.h
··· 303 303 304 304 static 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 308 if (neigh->used != now) 309 309 neigh->used = now;
+1 -1
net/core/filter.c
··· 554 554 EXPORT_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 558 * @rcu: rcu_head that contains the sk_filter to free 559 559 */ 560 560 static void sk_filter_rcu_release(struct rcu_head *rcu)
+3
net/ipv4/icmp.c
··· 559 559 /* No need to clone since we're just using its address. */ 560 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 565 err = xfrm_lookup(net, (struct dst_entry **)&rt, &fl, NULL, 0); 563 566 switch (err) { 564 567 case 0:
+16 -12
net/ipv6/addrconf.c
··· 98 98 #endif 99 99 100 100 #define INFINITY_LIFE_TIME 0xFFFFFFFF 101 - #define TIME_DELTA(a, b) ((unsigned long)((long)(a) - (long)(b))) 101 + 102 + static inline u32 cstamp_delta(unsigned long cstamp) 103 + { 104 + return (cstamp - INITIAL_JIFFIES) * 100UL / HZ; 105 + } 102 106 103 107 #define ADDRCONF_TIMER_FUZZ_MINUS (HZ > 50 ? HZ/50 : 1) 104 108 #define ADDRCONF_TIMER_FUZZ (HZ / 4) ··· 3448 3444 { 3449 3445 struct ifa_cacheinfo ci; 3450 3446 3451 - ci.cstamp = (u32)(TIME_DELTA(cstamp, INITIAL_JIFFIES) / HZ * 100 3452 - + TIME_DELTA(cstamp, INITIAL_JIFFIES) % HZ * 100 / HZ); 3453 - ci.tstamp = (u32)(TIME_DELTA(tstamp, INITIAL_JIFFIES) / HZ * 100 3454 - + TIME_DELTA(tstamp, INITIAL_JIFFIES) % HZ * 100 / HZ); 3447 + ci.cstamp = cstamp_delta(cstamp); 3448 + ci.tstamp = cstamp_delta(tstamp); 3455 3449 ci.ifa_prefered = preferred; 3456 3450 ci.ifa_valid = valid; 3457 3451 ··· 3800 3798 array[DEVCONF_AUTOCONF] = cnf->autoconf; 3801 3799 array[DEVCONF_DAD_TRANSMITS] = cnf->dad_transmits; 3802 3800 array[DEVCONF_RTR_SOLICITS] = cnf->rtr_solicits; 3803 - array[DEVCONF_RTR_SOLICIT_INTERVAL] = cnf->rtr_solicit_interval; 3804 - array[DEVCONF_RTR_SOLICIT_DELAY] = cnf->rtr_solicit_delay; 3801 + array[DEVCONF_RTR_SOLICIT_INTERVAL] = 3802 + jiffies_to_msecs(cnf->rtr_solicit_interval); 3803 + array[DEVCONF_RTR_SOLICIT_DELAY] = 3804 + jiffies_to_msecs(cnf->rtr_solicit_delay); 3805 3805 array[DEVCONF_FORCE_MLD_VERSION] = cnf->force_mld_version; 3806 3806 #ifdef CONFIG_IPV6_PRIVACY 3807 3807 array[DEVCONF_USE_TEMPADDR] = cnf->use_tempaddr; ··· 3817 3813 array[DEVCONF_ACCEPT_RA_PINFO] = cnf->accept_ra_pinfo; 3818 3814 #ifdef CONFIG_IPV6_ROUTER_PREF 3819 3815 array[DEVCONF_ACCEPT_RA_RTR_PREF] = cnf->accept_ra_rtr_pref; 3820 - array[DEVCONF_RTR_PROBE_INTERVAL] = cnf->rtr_probe_interval; 3816 + array[DEVCONF_RTR_PROBE_INTERVAL] = 3817 + jiffies_to_msecs(cnf->rtr_probe_interval); 3821 3818 #ifdef CONFIG_IPV6_ROUTE_INFO 3822 3819 array[DEVCONF_ACCEPT_RA_RT_INFO_MAX_PLEN] = cnf->accept_ra_rt_info_max_plen; 3823 3820 #endif ··· 3907 3902 NLA_PUT_U32(skb, IFLA_INET6_FLAGS, idev->if_flags); 3908 3903 3909 3904 ci.max_reasm_len = IPV6_MAXPLEN; 3910 - ci.tstamp = (__u32)(TIME_DELTA(idev->tstamp, INITIAL_JIFFIES) / HZ * 100 3911 - + TIME_DELTA(idev->tstamp, INITIAL_JIFFIES) % HZ * 100 / HZ); 3912 - ci.reachable_time = idev->nd_parms->reachable_time; 3913 - ci.retrans_time = idev->nd_parms->retrans_time; 3905 + ci.tstamp = cstamp_delta(idev->tstamp); 3906 + ci.reachable_time = jiffies_to_msecs(idev->nd_parms->reachable_time); 3907 + ci.retrans_time = jiffies_to_msecs(idev->nd_parms->retrans_time); 3914 3908 NLA_PUT(skb, IFLA_INET6_CACHEINFO, sizeof(ci), &ci); 3915 3909 3916 3910 nla = nla_reserve(skb, IFLA_INET6_CONF, DEVCONF_MAX * sizeof(s32));
+22 -8
net/irda/irttp.c
··· 550 550 */ 551 551 int irttp_udata_request(struct tsap_cb *self, struct sk_buff *skb) 552 552 { 553 + int ret; 554 + 553 555 IRDA_ASSERT(self != NULL, return -1;); 554 556 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); 555 557 IRDA_ASSERT(skb != NULL, return -1;); 556 558 557 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 567 /* Check that nothing bad happens */ 560 - if ((skb->len == 0) || (!self->connected)) { 561 - IRDA_DEBUG(1, "%s(), No data, or not connected\n", 562 - __func__); 568 + if (!self->connected) { 569 + IRDA_WARNING("%s(), Not connected\n", __func__); 570 + ret = -ENOTCONN; 563 571 goto err; 564 572 } 565 573 566 574 if (skb->len > self->max_seg_size) { 567 - IRDA_DEBUG(1, "%s(), UData is too large for IrLAP!\n", 568 - __func__); 575 + IRDA_ERROR("%s(), UData is too large for IrLAP!\n", __func__); 576 + ret = -EMSGSIZE; 569 577 goto err; 570 578 } 571 579 ··· 584 576 585 577 err: 586 578 dev_kfree_skb(skb); 587 - return -1; 579 + return ret; 588 580 } 589 581 EXPORT_SYMBOL(irttp_udata_request); 590 582 ··· 607 599 IRDA_DEBUG(2, "%s() : queue len = %d\n", __func__, 608 600 skb_queue_len(&self->tx_queue)); 609 601 602 + /* Take shortcut on zero byte packets */ 603 + if (skb->len == 0) { 604 + ret = 0; 605 + goto err; 606 + } 607 + 610 608 /* Check that nothing bad happens */ 611 - if ((skb->len == 0) || (!self->connected)) { 612 - IRDA_WARNING("%s: No data, or not connected\n", __func__); 609 + if (!self->connected) { 610 + IRDA_WARNING("%s: Not connected\n", __func__); 613 611 ret = -ENOTCONN; 614 612 goto err; 615 613 }
+1
net/netfilter/ipvs/Kconfig
··· 4 4 menuconfig IP_VS 5 5 tristate "IP virtual server support" 6 6 depends on NET && INET && NETFILTER 7 + depends on (NF_CONNTRACK || NF_CONNTRACK=n) 7 8 ---help--- 8 9 IP Virtual Server support will let you build a high-performance 9 10 virtual server based on cluster of two or more real servers. This
+1 -1
net/rds/rdma.c
··· 567 567 goto out; 568 568 } 569 569 570 - if (args->nr_local > (u64)UINT_MAX) { 570 + if (args->nr_local > UIO_MAXIOV) { 571 571 ret = -EMSGSIZE; 572 572 goto out; 573 573 }
+54
net/wireless/chan.c
··· 44 44 return chan; 45 45 } 46 46 47 + static 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 + 47 79 int cfg80211_set_freq(struct cfg80211_registered_device *rdev, 48 80 struct wireless_dev *wdev, int freq, 49 81 enum nl80211_channel_type channel_type) ··· 99 67 chan = rdev_freq_to_chan(rdev, freq, channel_type); 100 68 if (!chan) 101 69 return -EINVAL; 70 + 71 + /* Both channels should be able to initiate communication */ 72 + if (wdev && (wdev->iftype == NL80211_IFTYPE_ADHOC || 73 + wdev->iftype == NL80211_IFTYPE_AP || 74 + wdev->iftype == NL80211_IFTYPE_AP_VLAN || 75 + wdev->iftype == NL80211_IFTYPE_MESH_POINT || 76 + wdev->iftype == NL80211_IFTYPE_P2P_GO)) { 77 + switch (channel_type) { 78 + case NL80211_CHAN_HT40PLUS: 79 + case NL80211_CHAN_HT40MINUS: 80 + if (!can_beacon_sec_chan(&rdev->wiphy, chan, 81 + channel_type)) { 82 + printk(KERN_DEBUG 83 + "cfg80211: Secondary channel not " 84 + "allowed to initiate communication\n"); 85 + return -EINVAL; 86 + } 87 + break; 88 + default: 89 + break; 90 + } 91 + } 102 92 103 93 result = rdev->ops->set_channel(&rdev->wiphy, 104 94 wdev ? wdev->netdev : NULL,