aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-07-28 08:58:19 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-07-28 08:58:19 -0400
commitd5eab9152a3b4ce962c02ad0a0e4d0ec94aadd92 (patch)
tree3147f8de2805da0f026ea18103a9be46f3bc2a18 /net
parent6140333d3656f62ac7e6a5af87e7fe92cfb8d655 (diff)
parenta051294423b015c5c89f2ed78f7fe0893b775098 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (32 commits) tg3: Remove 5719 jumbo frames and TSO blocks tg3: Break larger frags into 4k chunks for 5719 tg3: Add tx BD budgeting code tg3: Consolidate code that calls tg3_tx_set_bd() tg3: Add partial fragment unmapping code tg3: Generalize tg3_skb_error_unmap() tg3: Remove short DMA check for 1st fragment tg3: Simplify tx bd assignments tg3: Reintroduce tg3_tx_ring_info ASIX: Use only 11 bits of header for data size ASIX: Simplify condition in rx_fixup() Fix cdc-phonet build bonding: reduce noise during init bonding: fix string comparison errors net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared net: add IFF_SKB_TX_SHARED flag to priv_flags net: sock_sendmsg_nosec() is static forcedeth: fix vlans gianfar: fix bug caused by 87c288c6e9aa31720b72e2bc2d665e24e1653c3e gro: Only reset frag0 when skb can be pulled ...
Diffstat (limited to 'net')
-rw-r--r--net/8021q/vlan_dev.c2
-rw-r--r--net/bluetooth/bnep/netdev.c1
-rw-r--r--net/core/dev.c4
-rw-r--r--net/core/pktgen.c8
-rw-r--r--net/ethernet/eth.c2
-rw-r--r--net/ipv4/devinet.c16
-rw-r--r--net/ipv6/addrconf.c2
-rw-r--r--net/l2tp/l2tp_eth.c2
-rw-r--r--net/mac80211/iface.c1
-rw-r--r--net/socket.c2
-rw-r--r--net/wireless/reg.c7
11 files changed, 28 insertions, 19 deletions
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 934e221c1d07..9d40a071d038 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -695,7 +695,7 @@ void vlan_setup(struct net_device *dev)
695 ether_setup(dev); 695 ether_setup(dev);
696 696
697 dev->priv_flags |= IFF_802_1Q_VLAN; 697 dev->priv_flags |= IFF_802_1Q_VLAN;
698 dev->priv_flags &= ~IFF_XMIT_DST_RELEASE; 698 dev->priv_flags &= ~(IFF_XMIT_DST_RELEASE | IFF_TX_SKB_SHARING);
699 dev->tx_queue_len = 0; 699 dev->tx_queue_len = 0;
700 700
701 dev->netdev_ops = &vlan_netdev_ops; 701 dev->netdev_ops = &vlan_netdev_ops;
diff --git a/net/bluetooth/bnep/netdev.c b/net/bluetooth/bnep/netdev.c
index 8c100c9dae28..d4f5dff7c955 100644
--- a/net/bluetooth/bnep/netdev.c
+++ b/net/bluetooth/bnep/netdev.c
@@ -231,6 +231,7 @@ void bnep_net_setup(struct net_device *dev)
231 dev->addr_len = ETH_ALEN; 231 dev->addr_len = ETH_ALEN;
232 232
233 ether_setup(dev); 233 ether_setup(dev);
234 dev->priv_flags &= ~IFF_TX_SKB_SHARING;
234 dev->netdev_ops = &bnep_netdev_ops; 235 dev->netdev_ops = &bnep_netdev_ops;
235 236
236 dev->watchdog_timeo = HZ * 2; 237 dev->watchdog_timeo = HZ * 2;
diff --git a/net/core/dev.c b/net/core/dev.c
index 9444c5cb4137..17d67b579beb 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4497,10 +4497,10 @@ void __dev_set_rx_mode(struct net_device *dev)
4497 */ 4497 */
4498 if (!netdev_uc_empty(dev) && !dev->uc_promisc) { 4498 if (!netdev_uc_empty(dev) && !dev->uc_promisc) {
4499 __dev_set_promiscuity(dev, 1); 4499 __dev_set_promiscuity(dev, 1);
4500 dev->uc_promisc = 1; 4500 dev->uc_promisc = true;
4501 } else if (netdev_uc_empty(dev) && dev->uc_promisc) { 4501 } else if (netdev_uc_empty(dev) && dev->uc_promisc) {
4502 __dev_set_promiscuity(dev, -1); 4502 __dev_set_promiscuity(dev, -1);
4503 dev->uc_promisc = 0; 4503 dev->uc_promisc = false;
4504 } 4504 }
4505 4505
4506 if (ops->ndo_set_multicast_list) 4506 if (ops->ndo_set_multicast_list)
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index f76079cd750c..e35a6fbb8110 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -1070,7 +1070,9 @@ static ssize_t pktgen_if_write(struct file *file,
1070 len = num_arg(&user_buffer[i], 10, &value); 1070 len = num_arg(&user_buffer[i], 10, &value);
1071 if (len < 0) 1071 if (len < 0)
1072 return len; 1072 return len;
1073 1073 if ((value > 0) &&
1074 (!(pkt_dev->odev->priv_flags & IFF_TX_SKB_SHARING)))
1075 return -ENOTSUPP;
1074 i += len; 1076 i += len;
1075 pkt_dev->clone_skb = value; 1077 pkt_dev->clone_skb = value;
1076 1078
@@ -3555,7 +3557,6 @@ static int pktgen_add_device(struct pktgen_thread *t, const char *ifname)
3555 pkt_dev->min_pkt_size = ETH_ZLEN; 3557 pkt_dev->min_pkt_size = ETH_ZLEN;
3556 pkt_dev->max_pkt_size = ETH_ZLEN; 3558 pkt_dev->max_pkt_size = ETH_ZLEN;
3557 pkt_dev->nfrags = 0; 3559 pkt_dev->nfrags = 0;
3558 pkt_dev->clone_skb = pg_clone_skb_d;
3559 pkt_dev->delay = pg_delay_d; 3560 pkt_dev->delay = pg_delay_d;
3560 pkt_dev->count = pg_count_d; 3561 pkt_dev->count = pg_count_d;
3561 pkt_dev->sofar = 0; 3562 pkt_dev->sofar = 0;
@@ -3563,7 +3564,6 @@ static int pktgen_add_device(struct pktgen_thread *t, const char *ifname)
3563 pkt_dev->udp_src_max = 9; 3564 pkt_dev->udp_src_max = 9;
3564 pkt_dev->udp_dst_min = 9; 3565 pkt_dev->udp_dst_min = 9;
3565 pkt_dev->udp_dst_max = 9; 3566 pkt_dev->udp_dst_max = 9;
3566
3567 pkt_dev->vlan_p = 0; 3567 pkt_dev->vlan_p = 0;
3568 pkt_dev->vlan_cfi = 0; 3568 pkt_dev->vlan_cfi = 0;
3569 pkt_dev->vlan_id = 0xffff; 3569 pkt_dev->vlan_id = 0xffff;
@@ -3575,6 +3575,8 @@ static int pktgen_add_device(struct pktgen_thread *t, const char *ifname)
3575 err = pktgen_setup_dev(pkt_dev, ifname); 3575 err = pktgen_setup_dev(pkt_dev, ifname);
3576 if (err) 3576 if (err)
3577 goto out1; 3577 goto out1;
3578 if (pkt_dev->odev->priv_flags & IFF_TX_SKB_SHARING)
3579 pkt_dev->clone_skb = pg_clone_skb_d;
3578 3580
3579 pkt_dev->entry = proc_create_data(ifname, 0600, pg_proc_dir, 3581 pkt_dev->entry = proc_create_data(ifname, 0600, pg_proc_dir,
3580 &pktgen_if_fops, pkt_dev); 3582 &pktgen_if_fops, pkt_dev);
diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c
index 5cffb63f481a..27997d35ebd3 100644
--- a/net/ethernet/eth.c
+++ b/net/ethernet/eth.c
@@ -231,6 +231,7 @@ EXPORT_SYMBOL(eth_header_parse);
231 * eth_header_cache - fill cache entry from neighbour 231 * eth_header_cache - fill cache entry from neighbour
232 * @neigh: source neighbour 232 * @neigh: source neighbour
233 * @hh: destination cache entry 233 * @hh: destination cache entry
234 * @type: Ethernet type field
234 * Create an Ethernet header template from the neighbour. 235 * Create an Ethernet header template from the neighbour.
235 */ 236 */
236int eth_header_cache(const struct neighbour *neigh, struct hh_cache *hh, __be16 type) 237int eth_header_cache(const struct neighbour *neigh, struct hh_cache *hh, __be16 type)
@@ -339,6 +340,7 @@ void ether_setup(struct net_device *dev)
339 dev->addr_len = ETH_ALEN; 340 dev->addr_len = ETH_ALEN;
340 dev->tx_queue_len = 1000; /* Ethernet wants good queues */ 341 dev->tx_queue_len = 1000; /* Ethernet wants good queues */
341 dev->flags = IFF_BROADCAST|IFF_MULTICAST; 342 dev->flags = IFF_BROADCAST|IFF_MULTICAST;
343 dev->priv_flags = IFF_TX_SKB_SHARING;
342 344
343 memset(dev->broadcast, 0xFF, ETH_ALEN); 345 memset(dev->broadcast, 0xFF, ETH_ALEN);
344 346
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 37b3c188d8b3..bc19bd06dd00 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1134,15 +1134,15 @@ static void inetdev_send_gratuitous_arp(struct net_device *dev,
1134 struct in_device *in_dev) 1134 struct in_device *in_dev)
1135 1135
1136{ 1136{
1137 struct in_ifaddr *ifa = in_dev->ifa_list; 1137 struct in_ifaddr *ifa;
1138
1139 if (!ifa)
1140 return;
1141 1138
1142 arp_send(ARPOP_REQUEST, ETH_P_ARP, 1139 for (ifa = in_dev->ifa_list; ifa;
1143 ifa->ifa_local, dev, 1140 ifa = ifa->ifa_next) {
1144 ifa->ifa_local, NULL, 1141 arp_send(ARPOP_REQUEST, ETH_P_ARP,
1145 dev->dev_addr, NULL); 1142 ifa->ifa_local, dev,
1143 ifa->ifa_local, NULL,
1144 dev->dev_addr, NULL);
1145 }
1146} 1146}
1147 1147
1148/* Called only under RTNL semaphore */ 1148/* Called only under RTNL semaphore */
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index a06c53c14d84..a55500cc0b29 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -1481,6 +1481,8 @@ static void addrconf_join_anycast(struct inet6_ifaddr *ifp)
1481static void addrconf_leave_anycast(struct inet6_ifaddr *ifp) 1481static void addrconf_leave_anycast(struct inet6_ifaddr *ifp)
1482{ 1482{
1483 struct in6_addr addr; 1483 struct in6_addr addr;
1484 if (ifp->prefix_len == 127) /* RFC 6164 */
1485 return;
1484 ipv6_addr_prefix(&addr, &ifp->addr, ifp->prefix_len); 1486 ipv6_addr_prefix(&addr, &ifp->addr, ifp->prefix_len);
1485 if (ipv6_addr_any(&addr)) 1487 if (ipv6_addr_any(&addr))
1486 return; 1488 return;
diff --git a/net/l2tp/l2tp_eth.c b/net/l2tp/l2tp_eth.c
index a8193f52c13c..d2726a74597d 100644
--- a/net/l2tp/l2tp_eth.c
+++ b/net/l2tp/l2tp_eth.c
@@ -103,7 +103,7 @@ static struct net_device_ops l2tp_eth_netdev_ops = {
103static void l2tp_eth_dev_setup(struct net_device *dev) 103static void l2tp_eth_dev_setup(struct net_device *dev)
104{ 104{
105 ether_setup(dev); 105 ether_setup(dev);
106 106 dev->priv_flags &= ~IFF_TX_SKB_SHARING;
107 dev->netdev_ops = &l2tp_eth_netdev_ops; 107 dev->netdev_ops = &l2tp_eth_netdev_ops;
108 dev->destructor = free_netdev; 108 dev->destructor = free_netdev;
109} 109}
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index cd5fb40d3fd4..556e7e6ddf0a 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -698,6 +698,7 @@ static const struct net_device_ops ieee80211_monitorif_ops = {
698static void ieee80211_if_setup(struct net_device *dev) 698static void ieee80211_if_setup(struct net_device *dev)
699{ 699{
700 ether_setup(dev); 700 ether_setup(dev);
701 dev->priv_flags &= ~IFF_TX_SKB_SHARING;
701 dev->netdev_ops = &ieee80211_dataif_ops; 702 dev->netdev_ops = &ieee80211_dataif_ops;
702 dev->destructor = free_netdev; 703 dev->destructor = free_netdev;
703} 704}
diff --git a/net/socket.c b/net/socket.c
index 26ed35c7751e..b1cbbcd92558 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -580,7 +580,7 @@ int sock_sendmsg(struct socket *sock, struct msghdr *msg, size_t size)
580} 580}
581EXPORT_SYMBOL(sock_sendmsg); 581EXPORT_SYMBOL(sock_sendmsg);
582 582
583int sock_sendmsg_nosec(struct socket *sock, struct msghdr *msg, size_t size) 583static int sock_sendmsg_nosec(struct socket *sock, struct msghdr *msg, size_t size)
584{ 584{
585 struct kiocb iocb; 585 struct kiocb iocb;
586 struct sock_iocb siocb; 586 struct sock_iocb siocb;
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 1ad0f39fe091..02751dbc5a97 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -903,7 +903,7 @@ static bool ignore_reg_update(struct wiphy *wiphy,
903 initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE && 903 initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE &&
904 !is_world_regdom(last_request->alpha2)) { 904 !is_world_regdom(last_request->alpha2)) {
905 REG_DBG_PRINT("Ignoring regulatory request %s " 905 REG_DBG_PRINT("Ignoring regulatory request %s "
906 "since the driver requires its own regulaotry " 906 "since the driver requires its own regulatory "
907 "domain to be set first", 907 "domain to be set first",
908 reg_initiator_name(initiator)); 908 reg_initiator_name(initiator));
909 return true; 909 return true;
@@ -1125,12 +1125,13 @@ void wiphy_update_regulatory(struct wiphy *wiphy,
1125 enum ieee80211_band band; 1125 enum ieee80211_band band;
1126 1126
1127 if (ignore_reg_update(wiphy, initiator)) 1127 if (ignore_reg_update(wiphy, initiator))
1128 goto out; 1128 return;
1129
1129 for (band = 0; band < IEEE80211_NUM_BANDS; band++) { 1130 for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
1130 if (wiphy->bands[band]) 1131 if (wiphy->bands[band])
1131 handle_band(wiphy, band, initiator); 1132 handle_band(wiphy, band, initiator);
1132 } 1133 }
1133out: 1134
1134 reg_process_beacons(wiphy); 1135 reg_process_beacons(wiphy);
1135 reg_process_ht_flags(wiphy); 1136 reg_process_ht_flags(wiphy);
1136 if (wiphy->reg_notifier) 1137 if (wiphy->reg_notifier)