Changeset c3887ad in mainline


Ignore:
Timestamp:
2011-12-05T21:17:51Z (13 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2f016df, 3f162ab, 78257fe
Parents:
1f5c9c96
Message:

Fix Ethernet. Missed change in generic_send_msg_remote() was causing arp module to see device address length as 0.

File:
1 edited

Legend:

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

    r1f5c9c96 rc3887ad  
    104104    nic_device_id_t device_id, uint8_t *address, size_t max_len)
    105105{
    106         if (!address)
    107                 return EBADMEM;
     106        aid_t aid;
     107        ipc_call_t result;
     108       
     109        assert(address != NULL);
    108110       
    109111        /* Request the address */
    110112        async_exch_t *exch = async_exchange_begin(sess);
    111         aid_t aid = async_send_1(exch, message, (sysarg_t) device_id,
    112             NULL);
     113        aid = async_send_1(exch, message, (sysarg_t) device_id, &result);
     114       
     115        sysarg_t ipcrc;
    113116        int rc = async_data_read_start(exch, address, max_len);
    114117        async_exchange_end(exch);
    115118       
    116         sysarg_t result;
    117         async_wait_for(aid, &result);
    118        
    119         if (rc != EOK)
     119        if (rc != EOK) {
     120                async_wait_for(aid, &ipcrc);
    120121                return rc;
    121        
    122         return (int) result;
     122        }
     123       
     124        async_wait_for(aid, &ipcrc);
     125        if (ipcrc == EOK) {
     126                return IPC_GET_ARG1(result);
     127        } else {
     128                return (int) ipcrc;
     129        }
    123130}
    124131
Note: See TracChangeset for help on using the changeset viewer.