diff -u -r linux-2400test10p5/drivers/net/3c59x.c linux-2400test10p5vl/drivers/net/3c59x.c --- linux-2400test10p5/drivers/net/3c59x.c Wed Oct 25 23:49:45 2000 +++ linux-2400test10p5vl/drivers/net/3c59x.c Wed Oct 25 22:50:21 2000 @@ -1226,8 +1226,7 @@ } /* Set the full-duplex bit. */ - outw( ((vp->info1 & 0x8000) || vp->full_duplex ? 0x20 : 0) | - (dev->mtu > 1500 ? 0x40 : 0) | + outw( ((vp->info1 & 0x8000) || vp->full_duplex ? 0x20 : 0) | 0x40 | ((vp->full_duplex && vp->flow_ctrl && vp->partner_flow_ctrl) ? 0x100 : 0), ioaddr + Wn3_MAC_Ctrl); @@ -1442,13 +1441,15 @@ vp->phys[0], mii_reg5); /* Set the full-duplex bit. */ EL3WINDOW(3); /* AKPM: this was missing from 2.3.99 3c59x.c! */ - outw( (vp->full_duplex ? 0x20 : 0) | - (dev->mtu > 1500 ? 0x40 : 0) | + outw( (vp->full_duplex ? 0x20 : 0) | 0x40 | ((vp->full_duplex && vp->flow_ctrl && vp->partner_flow_ctrl) ? 0x100 : 0), ioaddr + Wn3_MAC_Ctrl); if (vortex_debug > 1) printk(KERN_DEBUG "Setting duplex in Wn3_MAC_Ctrl\n"); /* AKPM: bug: should reset Tx and Rx after setting Duplex. Page 180 */ + + wait_for_completion(dev, TxReset); + wait_for_completion(dev, RxReset); } } } @@ -2053,10 +2054,19 @@ (pkt_len + 3) >> 2); } outw(RxDiscard, ioaddr + EL3_CMD); /* Pop top Rx packet. */ + + if (skb->data[0] & 1) { + /* Destination MAC address has at its first octet + the lowest bit set -> multicast or broadcast.. */ + if (memcmp(skb->data, dev->broadcast, ETH_ALEN) != 0) + /* Multicast! */ + vp->stats.multicast++; + } + skb->protocol = eth_type_trans(skb, dev); - netif_rx(skb); dev->last_rx = jiffies; vp->stats.rx_packets++; + netif_rx(skb); /* Wait a limited time to go to next packet. */ for (i = 200; i >= 0; i--) if ( ! (inw(ioaddr + EL3_STATUS) & CmdInProgress)) @@ -2128,6 +2138,15 @@ pci_unmap_single(vp->pdev, dma, PKT_BUF_SZ, PCI_DMA_FROMDEVICE); rx_nocopy++; } + + if (skb->data[0] & 1) { + /* Destination MAC address has at its first octet + the lowest bit set -> multicast or broadcast.. */ + if (memcmp(skb->data, dev->broadcast, ETH_ALEN) != 0) + /* Multicast! */ + vp->stats.multicast++; + } + skb->protocol = eth_type_trans(skb, dev); { /* Use hardware checksum info. */ int csum_bits = rx_status & 0xee000000; @@ -2138,9 +2157,9 @@ rx_csumhits++; } } - netif_rx(skb); dev->last_rx = jiffies; vp->stats.rx_packets++; + netif_rx(skb); } entry = (++vp->cur_rx) % RX_RING_SIZE; }