Warning clean up
[akaros.git] / kern / drivers / net / ether8139.c
index 5cc149a..7b8beb8 100644 (file)
@@ -17,6 +17,7 @@
 #include <pmap.h>
 #include <smp.h>
 #include <ip.h>
+#include <arch/io.h>
 
 enum {                                                 /* registers */
        Idr0 = 0x0000,                          /* MAC address */
@@ -749,9 +750,10 @@ static int rtl8139pnp(struct ether *edev)
                edev->ea[4] = i;
                edev->ea[5] = i >> 8;
        }
+       edev->tbdf = MKBUS(BusPCI, ctlr->pcidev->bus, ctlr->pcidev->dev,
+                          ctlr->pcidev->func);
        edev->attach = rtl8139attach;
        edev->transmit = rtl8139transmit;
-       edev->interrupt = rtl8139interrupt;
        edev->ifstat = rtl8139ifstat;
 
        edev->netif.arg = edev;
@@ -763,6 +765,7 @@ static int rtl8139pnp(struct ether *edev)
        if ((csr8r(ctlr, Msr) & (Speed10 | Linkb)) == 0)
                edev->netif.mbps = 100;
 
+       register_irq(edev->irq, rtl8139interrupt, edev, edev->tbdf);
        return 0;
 }