Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/nic/virtio-net/virtio-net.c

    re55d2c1 r60744cb  
    4343
    4444#include <virtio-pci.h>
    45 #include <pcapdump_iface.h>
    4645
    4746#define NAME    "virtio-net"
     
    7170};
    7271
    73 static void virtio_net_irq_handler(ipc_call_t *icall, ddf_dev_t *dev)
    74 {
    75         nic_t *nic = ddf_dev_data_get(dev);
     72/** VirtIO net IRQ handler.
     73 *
     74 * @param icall IRQ event notification
     75 * @param arg Argument (nic_t *)
     76 */
     77static void virtio_net_irq_handler(ipc_call_t *icall, void *arg)
     78{
     79        nic_t *nic = (nic_t *)arg;
    7680        virtio_net_t *virtio_net = nic_get_specific(nic);
    7781        virtio_dev_t *vdev = &virtio_net->virtio_dev;
     
    165169
    166170        return register_interrupt_handler(dev, virtio_net->irq,
    167             virtio_net_irq_handler, &irq_code, &virtio_net->irq_handle);
     171            virtio_net_irq_handler, (void *)nic, &irq_code,
     172            &virtio_net->irq_handle);
    168173}
    169174
     
    423428        }
    424429
    425         rc = nic_fun_add_to_cats(fun);
     430        rc = ddf_fun_add_to_category(fun, DEVICE_CATEGORY_NIC);
    426431        if (rc != EOK) {
    427                 ddf_msg(LVL_ERROR, "Failed adding function to categories");
    428                 ddf_fun_unbind(fun);
    429                 return rc;
     432                ddf_msg(LVL_ERROR, "Failed adding function to category");
     433                goto unbind;
    430434        }
    431435
     
    435439        return EOK;
    436440
    437         // unbind:
    438         // ddf_fun_unbind(fun);
     441unbind:
     442        ddf_fun_unbind(fun);
    439443destroy:
    440444        ddf_fun_destroy(fun);
Note: See TracChangeset for help on using the changeset viewer.