Changeset 7eaeec1 in mainline for uspace/drv/nic/ne2k/ne2k.c


Ignore:
Timestamp:
2012-08-20T21:27:38Z (12 years ago)
Author:
Sean Bartell <wingedtachikoma@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6a97f2e
Parents:
f3a37e28 (diff), dd13349 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes

File:
1 edited

Legend:

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

    rf3a37e28 r7eaeec1  
    3838 */
    3939
     40/* XXX Fix this */
     41#define _DDF_DATA_IMPLANT
     42
    4043#include <stdio.h>
    4144#include <errno.h>
     
    6164#define IRQ_GET_TSR(call)  ((int) IPC_GET_ARG3(call))
    6265
    63 #define DRIVER_DATA(dev) ((nic_t *) ((dev)->driver_data))
     66#define DRIVER_DATA(dev) ((nic_t *) ddf_dev_data_get(dev))
    6467#define NE2K(device) ((ne2k_t *) nic_get_specific(DRIVER_DATA(device)))
    6568
     
    169172static void ne2k_dev_cleanup(ddf_dev_t *dev)
    170173{
    171         if (dev->driver_data != NULL) {
     174        if (ddf_dev_data_get(dev) != NULL) {
    172175                ne2k_t *ne2k = NE2K(dev);
    173176                if (ne2k) {
     
    177180                nic_unbind_and_destroy(dev);
    178181        }
    179         if (dev->parent_sess != NULL) {
    180                 async_hangup(dev->parent_sess);
    181                 dev->parent_sess = NULL;
    182         }
    183182}
    184183
     
    279278static int ne2k_set_address(ddf_fun_t *fun, const nic_address_t *address)
    280279{
    281         nic_t *nic_data = DRIVER_DATA(fun);
     280        nic_t *nic_data = DRIVER_DATA(ddf_fun_get_dev(fun));
    282281        int rc = nic_report_address(nic_data, address);
    283282        if (rc != EOK) {
     
    410409        }
    411410        nic_set_ddf_fun(nic_data, fun);
    412         fun->ops = &ne2k_dev_ops;
    413         fun->driver_data = nic_data;
     411        ddf_fun_set_ops(fun, &ne2k_dev_ops);
     412        ddf_fun_data_implant(fun, nic_data);
    414413       
    415414        rc = ddf_fun_bind(fun);
Note: See TracChangeset for help on using the changeset viewer.