summaryrefslogtreecommitdiffstats
path: root/hw/ne2000.c
diff options
context:
space:
mode:
authorAnthony Liguori2012-04-10 15:21:58 +0200
committerAnthony Liguori2012-04-10 15:21:58 +0200
commit4e1957acc854b2f3f3068c75cef2a429f9b97011 (patch)
treecab3ca24ed0fc963cb693c0d440a9495a2cc47eb /hw/ne2000.c
parentMerge remote-tracking branch 'qmp/queue/qmp' into staging (diff)
parentrtl8139: do the network/host communication only in normal operating mode (diff)
downloadqemu-4e1957acc854b2f3f3068c75cef2a429f9b97011.tar.gz
qemu-4e1957acc854b2f3f3068c75cef2a429f9b97011.tar.xz
qemu-4e1957acc854b2f3f3068c75cef2a429f9b97011.zip
Merge commit 'ff71f2e8cacefae99179993204172bc65e4303df' into staging
* commit 'ff71f2e8cacefae99179993204172bc65e4303df': (21 commits) rtl8139: do the network/host communication only in normal operating mode rtl8139: correctly check the opmode net: move compute_mcast_idx() to net.h rtl8139: support byte read to TxStatus registers rtl8139: remove unused marco rtl8139: limit transmission buffer size in c+ mode pci_regs: Add PCI_EXP_TYPE_PCIE_BRIDGE virtio-net: add DATA_VALID flag pci_bridge: upper 32 bit are long registers pci: fix bridge IO/BASE pcie: drop functionality moved to core pci: set memory type for memory behind the bridge pci: add standard bridge device slotid: add slot id capability shpc: standard hot plug controller pci_bridge: user-friendly default bus name pci: make another unused extern function static pci: don't export an internal function pci_regs: Fix value of PCI_EXP_TYPE_RC_EC. pci: Do not check if a bus exist in pci_parse_devaddr. ...
Diffstat (limited to 'hw/ne2000.c')
-rw-r--r--hw/ne2000.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/hw/ne2000.c b/hw/ne2000.c
index 71452e1f2e..d02e60c4a6 100644
--- a/hw/ne2000.c
+++ b/hw/ne2000.c
@@ -150,30 +150,6 @@ static void ne2000_update_irq(NE2000State *s)
qemu_set_irq(s->irq, (isr != 0));
}
-#define POLYNOMIAL 0x04c11db6
-
-/* From FreeBSD */
-/* XXX: optimize */
-static int compute_mcast_idx(const uint8_t *ep)
-{
- uint32_t crc;
- int carry, i, j;
- uint8_t b;
-
- crc = 0xffffffff;
- for (i = 0; i < 6; i++) {
- b = *ep++;
- for (j = 0; j < 8; j++) {
- carry = ((crc & 0x80000000L) ? 1 : 0) ^ (b & 0x01);
- crc <<= 1;
- b >>= 1;
- if (carry)
- crc = ((crc ^ POLYNOMIAL) | carry);
- }
- }
- return (crc >> 26);
-}
-
static int ne2000_buffer_full(NE2000State *s)
{
int avail, index, boundary;