Ignore:
File:
1 edited

Legend:

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

    r00d7e1b r6b82009  
    5454 */
    5555int generic_device_state_msg_remote(async_sess_t *sess, sysarg_t message,
    56     nic_device_id_t device_id, sysarg_t state, services_t target)
     56    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.
    7071 * @param[in] service   Device module service.
    7172 *
     
    7677 */
    7778int generic_device_req_remote(async_sess_t *sess, sysarg_t message,
    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);
     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);
    8384        async_exchange_end(exch);
    8485       
     
    102103 */
    103104int generic_get_addr_req(async_sess_t *sess, sysarg_t message,
    104     nic_device_id_t device_id, uint8_t *address, size_t max_len)
    105 {
    106         if (!address)
     105    device_id_t device_id, measured_string_t **address, uint8_t **data)
     106{
     107        if ((!address) || (!data))
    107108                return EBADMEM;
    108109       
    109110        /* Request the address */
    110111        async_exch_t *exch = async_exchange_begin(sess);
    111         aid_t aid = async_send_1(exch, message, (sysarg_t) device_id,
     112        aid_t message_id = async_send_1(exch, message, (sysarg_t) device_id,
    112113            NULL);
    113         int rc = async_data_read_start(exch, address, max_len);
     114        int rc = measured_strings_return(exch, address, data, 1);
    114115        async_exchange_end(exch);
    115116       
    116117        sysarg_t result;
    117         async_wait_for(aid, &result);
    118        
    119         if (rc != EOK)
    120                 return rc;
     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        }
    121126       
    122127        return (int) result;
     
    137142 */
    138143int generic_packet_size_req_remote(async_sess_t *sess, sysarg_t message,
    139     nic_device_id_t device_id, packet_dimension_t *packet_dimension)
     144    device_id_t device_id, packet_dimension_t *packet_dimension)
    140145{
    141146        if (!packet_dimension)
     
    174179 */
    175180int generic_received_msg_remote(async_sess_t *sess, sysarg_t message,
    176     nic_device_id_t device_id, packet_id_t packet_id, services_t target,
     181    device_id_t device_id, packet_id_t packet_id, services_t target,
    177182    services_t error)
    178183{
     
    205210 */
    206211int generic_send_msg_remote(async_sess_t *sess, sysarg_t message,
    207     nic_device_id_t device_id, packet_id_t packet_id, services_t sender,
     212    device_id_t device_id, packet_id_t packet_id, services_t sender,
    208213    services_t error)
    209214{
     
    246251 */
    247252int generic_translate_req(async_sess_t *sess, sysarg_t message,
    248     nic_device_id_t device_id, services_t service,
     253    device_id_t device_id, services_t service,
    249254    measured_string_t *configuration, size_t count,
    250255    measured_string_t **translation, uint8_t **data)
Note: See TracChangeset for help on using the changeset viewer.