Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/net/generic/generic.c

    r6b82009 r00d7e1b  
    5454 */
    5555int generic_device_state_msg_remote(async_sess_t *sess, sysarg_t message,
    56     device_id_t device_id, sysarg_t state, services_t target)
     56    nic_device_id_t device_id, sysarg_t state, services_t target)
    5757{
    5858        async_exch_t *exch = async_exchange_begin(sess);
     
    6868 * @param[in] message   Service specific message.
    6969 * @param[in] device_id Device identifier.
    70  * @param[in] arg2      Second argument of the message.
    7170 * @param[in] service   Device module service.
    7271 *
     
    7776 */
    7877int generic_device_req_remote(async_sess_t *sess, sysarg_t message,
    79     device_id_t device_id, sysarg_t arg2, services_t service)
    80 {
    81         async_exch_t *exch = async_exchange_begin(sess);
    82         int rc = async_req_3_0(exch, message, (sysarg_t) device_id,
    83             arg2, (sysarg_t) service);
     78    nic_device_id_t device_id, services_t service)
     79{
     80        async_exch_t *exch = async_exchange_begin(sess);
     81        int rc = async_req_3_0(exch, message, (sysarg_t) device_id, 0,
     82            (sysarg_t) service);
    8483        async_exchange_end(exch);
    8584       
     
    103102 */
    104103int generic_get_addr_req(async_sess_t *sess, sysarg_t message,
    105     device_id_t device_id, measured_string_t **address, uint8_t **data)
    106 {
    107         if ((!address) || (!data))
     104    nic_device_id_t device_id, uint8_t *address, size_t max_len)
     105{
     106        if (!address)
    108107                return EBADMEM;
    109108       
    110109        /* Request the address */
    111110        async_exch_t *exch = async_exchange_begin(sess);
    112         aid_t message_id = async_send_1(exch, message, (sysarg_t) device_id,
     111        aid_t aid = async_send_1(exch, message, (sysarg_t) device_id,
    113112            NULL);
    114         int rc = measured_strings_return(exch, address, data, 1);
     113        int rc = async_data_read_start(exch, address, max_len);
    115114        async_exchange_end(exch);
    116115       
    117116        sysarg_t result;
    118         async_wait_for(message_id, &result);
    119        
    120         /* If not successful */
    121         if ((rc == EOK) && (result != EOK)) {
    122                 /* Clear the data */
    123                 free(*address);
    124                 free(*data);
    125         }
     117        async_wait_for(aid, &result);
     118       
     119        if (rc != EOK)
     120                return rc;
    126121       
    127122        return (int) result;
     
    142137 */
    143138int generic_packet_size_req_remote(async_sess_t *sess, sysarg_t message,
    144     device_id_t device_id, packet_dimension_t *packet_dimension)
     139    nic_device_id_t device_id, packet_dimension_t *packet_dimension)
    145140{
    146141        if (!packet_dimension)
     
    179174 */
    180175int generic_received_msg_remote(async_sess_t *sess, sysarg_t message,
    181     device_id_t device_id, packet_id_t packet_id, services_t target,
     176    nic_device_id_t device_id, packet_id_t packet_id, services_t target,
    182177    services_t error)
    183178{
     
    210205 */
    211206int generic_send_msg_remote(async_sess_t *sess, sysarg_t message,
    212     device_id_t device_id, packet_id_t packet_id, services_t sender,
     207    nic_device_id_t device_id, packet_id_t packet_id, services_t sender,
    213208    services_t error)
    214209{
     
    251246 */
    252247int generic_translate_req(async_sess_t *sess, sysarg_t message,
    253     device_id_t device_id, services_t service,
     248    nic_device_id_t device_id, services_t service,
    254249    measured_string_t *configuration, size_t count,
    255250    measured_string_t **translation, uint8_t **data)
Note: See TracChangeset for help on using the changeset viewer.