Changeset 77a69ea in mainline for uspace/lib/nic/src


Ignore:
Timestamp:
2012-01-21T15:06:51Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ce7676c
Parents:
e86b8f0
Message:

Allow multiple tasks to register for loc category change events.
Open NIC devices via location service, discover using category change events.
Eliminate device_added driver entry point.
loc_service_get_name() should return fully qualified service name.

Location:
uspace/lib/nic/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/nic/src/nic_driver.c

    re86b8f0 r77a69ea  
    8989    nic_iface_t *iface)
    9090{
    91         if (driver_ops) {
    92                 if (!driver_ops->device_added)
    93                         driver_ops->device_added = nic_device_added_impl;
    94         }
    95 
    9691        if (dev_ops) {
    9792                if (!dev_ops->open)
     
    464459}
    465460
    466 /** Notify the NET service that the device is ready
    467  *
    468  * @param nic NICF structure
    469  *
    470  * @return EOK on success
    471  *
    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 
    488461/** Inform the NICF about poll mode
    489462 *
  • uspace/lib/nic/src/nic_impl.c

    re86b8f0 r77a69ea  
    805805}
    806806
    807 /** Default implementation of the device_added method
    808  *
    809  * Just calls nic_ready.
    810  *
    811  * @param dev
    812  *
    813  */
    814 void nic_device_added_impl(ddf_dev_t *dev)
    815 {
    816         nic_ready((nic_t *) dev->driver_data);
    817 }
    818 
    819807/**
    820808 * Default handler for unknown methods (outside of the NIC interface).
Note: See TracChangeset for help on using the changeset viewer.