Changeset cfb79747 in mainline for uspace/drv/nic/ne2k/ne2k.c
- Timestamp:
- 2012-02-14T22:06:15Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a31aad1
- Parents:
- 199112e4 (diff), e10d41a (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/nic/ne2k/ne2k.c
r199112e4 rcfb79747 286 286 /* Note: some frame with previous physical address may slip to NIL here 287 287 * (for a moment the filtering is not exact), but ethernet should be OK with 288 * that. Some packetmay also be lost, but this is not a problem.288 * that. Some frames may also be lost, but this is not a problem. 289 289 */ 290 290 ne2k_set_physical_address((ne2k_t *) nic_get_specific(nic_data), address); … … 363 363 static int ne2k_dev_add(ddf_dev_t *dev) 364 364 { 365 ddf_fun_t *fun; 366 365 367 /* Allocate driver data for the device. */ 366 368 nic_t *nic_data = nic_create_and_bind(dev); … … 396 398 } 397 399 398 rc = nic_ register_as_ddf_fun(nic_data, &ne2k_dev_ops);400 rc = nic_connect_to_services(nic_data); 399 401 if (rc != EOK) { 400 402 ne2k_dev_cleanup(dev); … … 402 404 } 403 405 404 rc = nic_connect_to_services(nic_data);405 if ( rc != EOK) {406 fun = ddf_fun_create(nic_get_ddf_dev(nic_data), fun_exposed, "port0"); 407 if (fun == NULL) { 406 408 ne2k_dev_cleanup(dev); 409 return ENOMEM; 410 } 411 nic_set_ddf_fun(nic_data, fun); 412 fun->ops = &ne2k_dev_ops; 413 fun->driver_data = nic_data; 414 415 rc = ddf_fun_bind(fun); 416 if (rc != EOK) { 417 ddf_fun_destroy(fun); 418 ne2k_dev_cleanup(dev); 419 return rc; 420 } 421 422 rc = ddf_fun_add_to_category(fun, DEVICE_CATEGORY_NIC); 423 if (rc != EOK) { 424 ddf_fun_unbind(fun); 425 ddf_fun_destroy(fun); 407 426 return rc; 408 427 }
Note:
See TracChangeset
for help on using the changeset viewer.