Changeset 77a69ea in mainline for uspace/lib/nic/src
- Timestamp:
- 2012-01-21T15:06:51Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ce7676c
- Parents:
- e86b8f0
- Location:
- uspace/lib/nic/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/nic/src/nic_driver.c
re86b8f0 r77a69ea 89 89 nic_iface_t *iface) 90 90 { 91 if (driver_ops) {92 if (!driver_ops->device_added)93 driver_ops->device_added = nic_device_added_impl;94 }95 96 91 if (dev_ops) { 97 92 if (!dev_ops->open) … … 464 459 } 465 460 466 /** Notify the NET service that the device is ready467 *468 * @param nic NICF structure469 *470 * @return EOK on success471 *472 */473 int nic_ready(nic_t *nic)474 {475 fibril_rwlock_read_lock(&nic->main_lock);476 477 async_sess_t *session = nic->net_session;478 devman_handle_t handle = nic->dev->handle;479 480 fibril_rwlock_read_unlock(&nic->main_lock);481 482 if (session == NULL)483 return EINVAL;484 485 return net_driver_ready(session, handle);486 }487 488 461 /** Inform the NICF about poll mode 489 462 * -
uspace/lib/nic/src/nic_impl.c
re86b8f0 r77a69ea 805 805 } 806 806 807 /** Default implementation of the device_added method808 *809 * Just calls nic_ready.810 *811 * @param dev812 *813 */814 void nic_device_added_impl(ddf_dev_t *dev)815 {816 nic_ready((nic_t *) dev->driver_data);817 }818 819 807 /** 820 808 * Default handler for unknown methods (outside of the NIC interface).
Note:
See TracChangeset
for help on using the changeset viewer.