Ignore:
File:
1 edited

Legend:

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

    re55d2c1 r60744cb  
    4949#include <nic.h>
    5050#include <ops/nic.h>
    51 #include <pcapdump_iface.h>
    5251#include "e1k.h"
    5352
     
    175174        /** Lock for EEPROM access */
    176175        fibril_mutex_t eeprom_lock;
    177 
    178176} e1000_t;
    179177
     
    11911189                if (frame != NULL) {
    11921190                        memcpy(frame->data, e1000->rx_frame_virt[next_tail], frame_size);
    1193 
    11941191                        nic_received_frame(nic, frame);
    11951192                } else {
     
    12471244 *
    12481245 * @param icall IPC call structure
    1249  * @param dev   E1000 device
    1250  *
    1251  */
    1252 static void e1000_interrupt_handler(ipc_call_t *icall,
    1253     ddf_dev_t *dev)
     1246 * @param arg   Argument (nic_t *)
     1247 *
     1248 */
     1249static void e1000_interrupt_handler(ipc_call_t *icall, void *arg)
    12541250{
    12551251        uint32_t icr = (uint32_t) ipc_get_arg2(icall);
    1256         nic_t *nic = NIC_DATA_DEV(dev);
     1252        nic_t *nic = (nic_t *)arg;
    12571253        e1000_t *e1000 = DRIVER_DATA_NIC(nic);
    12581254
     
    12861282
    12871283        errno_t rc = register_interrupt_handler(nic_get_ddf_dev(nic), e1000->irq,
    1288             e1000_interrupt_handler, &e1000_irq_code, handle);
     1284            e1000_interrupt_handler, (void *)nic, &e1000_irq_code, handle);
    12891285
    12901286        fibril_mutex_unlock(&irq_reg_mutex);
     
    22022198                goto err_fun_bind;
    22032199
    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         }
     2200        rc = ddf_fun_add_to_category(fun, DEVICE_CATEGORY_NIC);
     2201        if (rc != EOK)
     2202                goto err_add_to_cat;
     2203
    22102204        return EOK;
    22112205
    2212         // err_add_to_cat:
    2213         // ddf_fun_unbind(fun);
     2206err_add_to_cat:
     2207        ddf_fun_unbind(fun);
    22142208err_fun_bind:
    22152209err_rx_structure:
     
    23712365
    23722366        memcpy(e1000->tx_frame_virt[tdt], data, size);
     2367
    23732368        tx_descriptor_addr->phys_addr = PTR_TO_U64(e1000->tx_frame_phys[tdt]);
    23742369        tx_descriptor_addr->length = size;
Note: See TracChangeset for help on using the changeset viewer.