Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/device/nic.c

    r9cd8165 r6d8455d  
    7373}
    7474
    75 /** Create callback connection from NIC service
    76  *
    77  * @param[in] dev_sess
     75/** Connect the driver to the NET and NIL services
     76 *
     77 * @param[in] dev_sess
     78 * @param[in] nil_service Service identifier for the NIL service
    7879 * @param[in] device_id
    7980 *
     
    8182 *
    8283 */
    83 int nic_callback_create(async_sess_t *dev_sess, async_client_conn_t cfun,
    84     void *carg)
    85 {
    86         ipc_call_t answer;
    87         int rc;
    88         sysarg_t retval;
    89        
    90         async_exch_t *exch = async_exchange_begin(dev_sess);
    91         aid_t req = async_send_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    92             NIC_CALLBACK_CREATE, &answer);
    93        
    94         rc = async_connect_to_me(exch, 0, 0, 0, cfun, carg);
    95         if (rc != EOK) {
    96                 async_wait_for(req, NULL);
    97                 return rc;
    98         }
    99         async_exchange_end(exch);
    100        
    101         async_wait_for(req, &retval);
    102         return (int) retval;
     84int nic_connect_to_nil(async_sess_t *dev_sess, services_t nil_service,
     85    nic_device_id_t device_id)
     86{
     87        async_exch_t *exch = async_exchange_begin(dev_sess);
     88        int rc = async_req_3_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     89            NIC_CONNECT_TO_NIL, nil_service, device_id);
     90        async_exchange_end(exch);
     91       
     92        return rc;
    10393}
    10494
     
    345335 * it can never force the NIC to advertise unsupported modes.
    346336 *
    347  * The allowed modes are defined in "nic/eth_phys.h" in the C library.
     337 * The allowed modes are defined in "net/eth_phys.h" in the C library.
    348338 *
    349339 * @param[in] dev_sess
     
    382372/** Probe current state of auto-negotiation.
    383373 *
    384  * Modes are defined in the "nic/eth_phys.h" in the C library.
     374 * Modes are defined in the "net/eth_phys.h" in the C library.
    385375 *
    386376 * @param[in]  dev_sess
Note: See TracChangeset for help on using the changeset viewer.