aboutsummaryrefslogtreecommitdiffstats
path: root/net/irda
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-07-18 23:08:47 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-18 23:08:47 -0400
commitecb2cf1a6b63825a258ff4fe0d7f3070fbe4676b (patch)
tree4b03d332066d148f0d6c416528c6ba5e874d466a /net/irda
parentee114b97e67b2a572f94982567a21ac4ee17c133 (diff)
parent3e3aac497513c669e1c62c71e1d552ea85c1d974 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: "A couple interesting SKB fragment handling fixes, plus the usual small bits here and there: 1) Fix 64-bit divide build failure on 32-bit platforms in mlx5, from Tim Gardner. 2) Get rid of a stupid reimplementation on "%*phC" in our sysfs MAC address printing helper. 3) Fix NETIF_F_SG capability advertisement in hyperv driver, if the device can't do checksumming offloads then it shouldn't say it can do SG either. From Haiyang Zhang. 4) bgmac needs to depend on PHYLIB, from Hauke Mehrtens. 5) Don't leak DMA mappings on mapping failures, from Neil Horman. 6) We need to reset the transport header of SKBs in ipv4 before we attempt to perform early socket demux, just like ipv6 does. From Eric Dumazet. 7) Add missing locking on vxlan device removal, from Stephen Hemminger. 8) xen-netfront has to make two passes over an SKB to prepare it for transfer. One pass calculates the number of slots needed, the second massages the SKB and fills the slots. Unfortunately, the first pass doesn't calculate the number of slots properly so we can end up trying to build a MAX_SKB_FRAGS + 1 SKB which doesn't work out so well. Fix from Jan Beulich with help and discussion with several others. 9) Fix a similar problem in tun and macvtap, which have to split up scatter-gather elements at PAGE_SIZE boundaries. Don't do zerocopy if it would result in a > MAX_SKB_FRAGS skb. Fixes from Jason Wang. 10) On receive, once we've decoded the VLAN state completely, clear skb->vlan_tci. Otherwise demuxed tunnels underneath can trigger the VLAN code again, corrupting the packet. Fix from Eric Dumazet" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: vlan: fix a race in egress prio management vlan: mask vlan prio bits macvtap: do not zerocopy if iov needs more pages than MAX_SKB_FRAGS tuntap: do not zerocopy if iov needs more pages than MAX_SKB_FRAGS pkt_sched: sch_qfq: remove a source of high packet delay/jitter xen-netfront: pull on receive skb may need to happen earlier vxlan: add necessary locking on device removal hyperv: Fix the NETIF_F_SG flag setting in netvsc net: Fix sysfs_format_mac() code duplication. be2net: Fix to avoid hardware workaround when not needed macvtap: do not assume 802.1Q when send vlan packets macvtap: fix the missing ret value of TUNSETQUEUE ipv4: set transport header earlier mlx5 core: Fix __udivdi3 when compiling for 32 bit arches bgmac: add dependency to phylib net/irda: fixed style issues in irlan_eth ethtool: fixed trailing statements in ethtool ndisc: bool initializations should use true and false atl1e: unmap partially mapped skb on dma error and free skb
Diffstat (limited to 'net/irda')
-rw-r--r--net/irda/irlan/irlan_eth.c31
1 files changed, 14 insertions, 17 deletions
diff --git a/net/irda/irlan/irlan_eth.c b/net/irda/irlan/irlan_eth.c
index d14152e866d9..ffcec225b5d9 100644
--- a/net/irda/irlan/irlan_eth.c
+++ b/net/irda/irlan/irlan_eth.c
@@ -44,12 +44,12 @@ static int irlan_eth_open(struct net_device *dev);
44static int irlan_eth_close(struct net_device *dev); 44static int irlan_eth_close(struct net_device *dev);
45static netdev_tx_t irlan_eth_xmit(struct sk_buff *skb, 45static netdev_tx_t irlan_eth_xmit(struct sk_buff *skb,
46 struct net_device *dev); 46 struct net_device *dev);
47static void irlan_eth_set_multicast_list( struct net_device *dev); 47static void irlan_eth_set_multicast_list(struct net_device *dev);
48 48
49static const struct net_device_ops irlan_eth_netdev_ops = { 49static const struct net_device_ops irlan_eth_netdev_ops = {
50 .ndo_open = irlan_eth_open, 50 .ndo_open = irlan_eth_open,
51 .ndo_stop = irlan_eth_close, 51 .ndo_stop = irlan_eth_close,
52 .ndo_start_xmit = irlan_eth_xmit, 52 .ndo_start_xmit = irlan_eth_xmit,
53 .ndo_set_rx_mode = irlan_eth_set_multicast_list, 53 .ndo_set_rx_mode = irlan_eth_set_multicast_list,
54 .ndo_change_mtu = eth_change_mtu, 54 .ndo_change_mtu = eth_change_mtu,
55 .ndo_validate_addr = eth_validate_addr, 55 .ndo_validate_addr = eth_validate_addr,
@@ -110,7 +110,7 @@ static int irlan_eth_open(struct net_device *dev)
110{ 110{
111 struct irlan_cb *self = netdev_priv(dev); 111 struct irlan_cb *self = netdev_priv(dev);
112 112
113 IRDA_DEBUG(2, "%s()\n", __func__ ); 113 IRDA_DEBUG(2, "%s()\n", __func__);
114 114
115 /* Ready to play! */ 115 /* Ready to play! */
116 netif_stop_queue(dev); /* Wait until data link is ready */ 116 netif_stop_queue(dev); /* Wait until data link is ready */
@@ -137,7 +137,7 @@ static int irlan_eth_close(struct net_device *dev)
137{ 137{
138 struct irlan_cb *self = netdev_priv(dev); 138 struct irlan_cb *self = netdev_priv(dev);
139 139
140 IRDA_DEBUG(2, "%s()\n", __func__ ); 140 IRDA_DEBUG(2, "%s()\n", __func__);
141 141
142 /* Stop device */ 142 /* Stop device */
143 netif_stop_queue(dev); 143 netif_stop_queue(dev);
@@ -310,35 +310,32 @@ static void irlan_eth_set_multicast_list(struct net_device *dev)
310{ 310{
311 struct irlan_cb *self = netdev_priv(dev); 311 struct irlan_cb *self = netdev_priv(dev);
312 312
313 IRDA_DEBUG(2, "%s()\n", __func__ ); 313 IRDA_DEBUG(2, "%s()\n", __func__);
314 314
315 /* Check if data channel has been connected yet */ 315 /* Check if data channel has been connected yet */
316 if (self->client.state != IRLAN_DATA) { 316 if (self->client.state != IRLAN_DATA) {
317 IRDA_DEBUG(1, "%s(), delaying!\n", __func__ ); 317 IRDA_DEBUG(1, "%s(), delaying!\n", __func__);
318 return; 318 return;
319 } 319 }
320 320
321 if (dev->flags & IFF_PROMISC) { 321 if (dev->flags & IFF_PROMISC) {
322 /* Enable promiscuous mode */ 322 /* Enable promiscuous mode */
323 IRDA_WARNING("Promiscuous mode not implemented by IrLAN!\n"); 323 IRDA_WARNING("Promiscuous mode not implemented by IrLAN!\n");
324 } 324 } else if ((dev->flags & IFF_ALLMULTI) ||
325 else if ((dev->flags & IFF_ALLMULTI) ||
326 netdev_mc_count(dev) > HW_MAX_ADDRS) { 325 netdev_mc_count(dev) > HW_MAX_ADDRS) {
327 /* Disable promiscuous mode, use normal mode. */ 326 /* Disable promiscuous mode, use normal mode. */
328 IRDA_DEBUG(4, "%s(), Setting multicast filter\n", __func__ ); 327 IRDA_DEBUG(4, "%s(), Setting multicast filter\n", __func__);
329 /* hardware_set_filter(NULL); */ 328 /* hardware_set_filter(NULL); */
330 329
331 irlan_set_multicast_filter(self, TRUE); 330 irlan_set_multicast_filter(self, TRUE);
332 } 331 } else if (!netdev_mc_empty(dev)) {
333 else if (!netdev_mc_empty(dev)) { 332 IRDA_DEBUG(4, "%s(), Setting multicast filter\n", __func__);
334 IRDA_DEBUG(4, "%s(), Setting multicast filter\n", __func__ );
335 /* Walk the address list, and load the filter */ 333 /* Walk the address list, and load the filter */
336 /* hardware_set_filter(dev->mc_list); */ 334 /* hardware_set_filter(dev->mc_list); */
337 335
338 irlan_set_multicast_filter(self, TRUE); 336 irlan_set_multicast_filter(self, TRUE);
339 } 337 } else {
340 else { 338 IRDA_DEBUG(4, "%s(), Clearing multicast filter\n", __func__);
341 IRDA_DEBUG(4, "%s(), Clearing multicast filter\n", __func__ );
342 irlan_set_multicast_filter(self, FALSE); 339 irlan_set_multicast_filter(self, FALSE);
343 } 340 }
344 341