Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/nic/e1k/e1k.c

    r60744cb re55d2c1  
    4949#include <nic.h>
    5050#include <ops/nic.h>
     51#include <pcapdump_iface.h>
    5152#include "e1k.h"
    5253
     
    174175        /** Lock for EEPROM access */
    175176        fibril_mutex_t eeprom_lock;
     177
    176178} e1000_t;
    177179
     
    11891191                if (frame != NULL) {
    11901192                        memcpy(frame->data, e1000->rx_frame_virt[next_tail], frame_size);
     1193
    11911194                        nic_received_frame(nic, frame);
    11921195                } else {
     
    12441247 *
    12451248 * @param icall IPC call structure
    1246  * @param arg   Argument (nic_t *)
    1247  *
    1248  */
    1249 static void e1000_interrupt_handler(ipc_call_t *icall, void *arg)
     1249 * @param dev   E1000 device
     1250 *
     1251 */
     1252static void e1000_interrupt_handler(ipc_call_t *icall,
     1253    ddf_dev_t *dev)
    12501254{
    12511255        uint32_t icr = (uint32_t) ipc_get_arg2(icall);
    1252         nic_t *nic = (nic_t *)arg;
     1256        nic_t *nic = NIC_DATA_DEV(dev);
    12531257        e1000_t *e1000 = DRIVER_DATA_NIC(nic);
    12541258
     
    12821286
    12831287        errno_t rc = register_interrupt_handler(nic_get_ddf_dev(nic), e1000->irq,
    1284             e1000_interrupt_handler, (void *)nic, &e1000_irq_code, handle);
     1288            e1000_interrupt_handler, &e1000_irq_code, handle);
    12851289
    12861290        fibril_mutex_unlock(&irq_reg_mutex);
     
    21982202                goto err_fun_bind;
    21992203
    2200         rc = ddf_fun_add_to_category(fun, DEVICE_CATEGORY_NIC);
    2201         if (rc != EOK)
    2202                 goto err_add_to_cat;
    2203 
     2204        rc = nic_fun_add_to_cats(fun);
     2205        if (rc != EOK) {
     2206                ddf_msg(LVL_ERROR, "Failed adding function to categories");
     2207                ddf_fun_unbind(fun);
     2208                return rc;
     2209        }
    22042210        return EOK;
    22052211
    2206 err_add_to_cat:
    2207         ddf_fun_unbind(fun);
     2212        // err_add_to_cat:
     2213        // ddf_fun_unbind(fun);
    22082214err_fun_bind:
    22092215err_rx_structure:
     
    23652371
    23662372        memcpy(e1000->tx_frame_virt[tdt], data, size);
    2367 
    23682373        tx_descriptor_addr->phys_addr = PTR_TO_U64(e1000->tx_frame_phys[tdt]);
    23692374        tx_descriptor_addr->length = size;
Note: See TracChangeset for help on using the changeset viewer.