Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/nic/rtl8139/driver.c

    re55d2c1 r60744cb  
    4242#include <stdio.h>
    4343#include <str.h>
    44 #include <pcapdump_iface.h>
    4544
    4645#include "defs.h"
     
    820819 *
    821820 * @param icall  The IPC call structure
    822  * @param dev    The rtl8139 device
    823  *
    824  */
    825 static void rtl8139_interrupt_handler(ipc_call_t *icall, ddf_dev_t *dev)
    826 {
    827         assert(dev);
    828         assert(icall);
    829 
     821 * @param arg    Argument (nic_t *)
     822 *
     823 */
     824static void rtl8139_interrupt_handler(ipc_call_t *icall, void *arg)
     825{
    830826        uint16_t isr = (uint16_t) ipc_get_arg2(icall);
    831         nic_t *nic_data = nic_get_from_ddf_dev(dev);
     827        nic_t *nic_data = (nic_t *)arg;
    832828        rtl8139_t *rtl8139 = nic_get_specific(nic_data);
    833829
     
    862858        rtl8139_irq_code.cmds[3].addr = rtl8139->io_addr + IMR;
    863859        errno_t rc = register_interrupt_handler(nic_get_ddf_dev(nic_data),
    864             rtl8139->irq, rtl8139_interrupt_handler, &rtl8139_irq_code, handle);
     860            rtl8139->irq, rtl8139_interrupt_handler, (void *)nic_data,
     861            &rtl8139_irq_code, handle);
    865862
    866863        RTL8139_IRQ_STRUCT_UNLOCK();
     
    13081305                goto err_fun_create;
    13091306        }
    1310 
    1311         rc = nic_fun_add_to_cats(fun);
     1307        rc = ddf_fun_add_to_category(fun, DEVICE_CATEGORY_NIC);
    13121308        if (rc != EOK) {
    1313                 ddf_msg(LVL_ERROR, "Failed adding function to categories");
    1314                 ddf_fun_unbind(fun);
    1315                 return rc;
     1309                ddf_msg(LVL_ERROR, "Failed adding function to category");
     1310                goto err_fun_bind;
    13161311        }
    13171312
     
    13211316        return EOK;
    13221317
    1323         // err_fun_bind:
    1324         // ddf_fun_unbind(fun);
     1318err_fun_bind:
     1319        ddf_fun_unbind(fun);
    13251320err_fun_create:
    13261321        ddf_fun_destroy(fun);
Note: See TracChangeset for help on using the changeset viewer.