Changes in uspace/drv/nic/ne2k/ne2k.c [56fd7cf:8486c07] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/nic/ne2k/ne2k.c
r56fd7cf r8486c07 38 38 */ 39 39 40 /* XXX Fix this */41 #define _DDF_DATA_IMPLANT42 43 40 #include <stdio.h> 44 41 #include <errno.h> … … 64 61 #define IRQ_GET_TSR(call) ((int) IPC_GET_ARG3(call)) 65 62 66 #define DRIVER_DATA(dev) ((nic_t *) ddf_dev_data_get(dev))63 #define DRIVER_DATA(dev) ((nic_t *) ((dev)->driver_data)) 67 64 #define NE2K(device) ((ne2k_t *) nic_get_specific(DRIVER_DATA(device))) 68 65 … … 172 169 static void ne2k_dev_cleanup(ddf_dev_t *dev) 173 170 { 174 if (d df_dev_data_get(dev)!= NULL) {171 if (dev->driver_data != NULL) { 175 172 ne2k_t *ne2k = NE2K(dev); 176 173 if (ne2k) { … … 180 177 nic_unbind_and_destroy(dev); 181 178 } 179 if (dev->parent_sess != NULL) { 180 async_hangup(dev->parent_sess); 181 dev->parent_sess = NULL; 182 } 182 183 } 183 184 … … 278 279 static int ne2k_set_address(ddf_fun_t *fun, const nic_address_t *address) 279 280 { 280 nic_t *nic_data = DRIVER_DATA( ddf_fun_get_dev(fun));281 nic_t *nic_data = DRIVER_DATA(fun); 281 282 int rc = nic_report_address(nic_data, address); 282 283 if (rc != EOK) { … … 409 410 } 410 411 nic_set_ddf_fun(nic_data, fun); 411 ddf_fun_set_ops(fun, &ne2k_dev_ops);412 ddf_fun_data_implant(fun, nic_data);412 fun->ops = &ne2k_dev_ops; 413 fun->driver_data = nic_data; 413 414 414 415 rc = ddf_fun_bind(fun);
Note:
See TracChangeset
for help on using the changeset viewer.