equal
deleted
inserted
replaced
1 /****************************************************************************** |
1 /****************************************************************************** |
2 * |
2 * |
3 * $Id$ |
3 * $Id: 8139too-2.6.36-ethercat.c,v 4d8c9a441ef6 2011/05/12 14:38:48 fp $ |
4 * |
4 * |
5 * Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH |
5 * Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH |
6 * |
6 * |
7 * This file is part of the IgH EtherCAT Master. |
7 * This file is part of the IgH EtherCAT Master. |
8 * |
8 * |
1782 { |
1782 { |
1783 struct rtl8139_private *tp = netdev_priv(dev); |
1783 struct rtl8139_private *tp = netdev_priv(dev); |
1784 void __iomem *ioaddr = tp->mmio_addr; |
1784 void __iomem *ioaddr = tp->mmio_addr; |
1785 unsigned int entry; |
1785 unsigned int entry; |
1786 unsigned int len = skb->len; |
1786 unsigned int len = skb->len; |
1787 unsigned long flags; |
1787 unsigned long flags = 0; |
1788 |
1788 |
1789 /* Calculate the next Tx descriptor entry. */ |
1789 /* Calculate the next Tx descriptor entry. */ |
1790 entry = tp->cur_tx % NUM_TX_DESC; |
1790 entry = tp->cur_tx % NUM_TX_DESC; |
1791 |
1791 |
1792 /* Note: the chip doesn't have auto-pad! */ |
1792 /* Note: the chip doesn't have auto-pad! */ |
2659 if (dev->flags & IFF_PROMISC) { |
2659 if (dev->flags & IFF_PROMISC) { |
2660 rx_mode = |
2660 rx_mode = |
2661 AcceptBroadcast | AcceptMulticast | AcceptMyPhys | |
2661 AcceptBroadcast | AcceptMulticast | AcceptMyPhys | |
2662 AcceptAllPhys; |
2662 AcceptAllPhys; |
2663 mc_filter[1] = mc_filter[0] = 0xffffffff; |
2663 mc_filter[1] = mc_filter[0] = 0xffffffff; |
2664 } else if ((dev->mc_count > multicast_filter_limit) |
2664 } else if ((netdev_mc_count(dev) > multicast_filter_limit) || |
2665 || (dev->flags & IFF_ALLMULTI)) { |
2665 (dev->flags & IFF_ALLMULTI)) { |
2666 /* Too many to filter perfectly -- accept all multicasts. */ |
2666 /* Too many to filter perfectly -- accept all multicasts. */ |
2667 rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys; |
2667 rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys; |
2668 mc_filter[1] = mc_filter[0] = 0xffffffff; |
2668 mc_filter[1] = mc_filter[0] = 0xffffffff; |
2669 } else { |
2669 } else { |
2670 struct netdev_hw_addr *ha; |
2670 struct netdev_hw_addr *ha; |