Changeset 1bc35b5 in mainline for uspace/lib/net


Ignore:
Timestamp:
2012-01-19T08:13:45Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d8da56b
Parents:
3ea725e
Message:

Remove most use of packet_t from NIC drivers.

Location:
uspace/lib/net
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/net/include/nil_remote.h

    r3ea725e r1bc35b5  
    3939#include <generic.h>
    4040#include <async.h>
     41#include <sys/types.h>
    4142
    4243#define nil_bind_service(service, device_id, me, receiver) \
     
    6162    size_t);
    6263extern int nil_device_state_msg(async_sess_t *, nic_device_id_t, sysarg_t);
    63 extern int nil_received_msg(async_sess_t *, nic_device_id_t, packet_id_t);
     64extern int nil_received_msg(async_sess_t *, nic_device_id_t, void *, size_t);
    6465extern int nil_addr_changed_msg(async_sess_t *, nic_device_id_t,
    6566    const nic_address_t *);
  • uspace/lib/net/nil/nil_remote.c

    r3ea725e r1bc35b5  
    7777 */
    7878int nil_received_msg(async_sess_t *sess, nic_device_id_t device_id,
    79     packet_id_t packet_id)
     79    void *data, size_t size)
    8080{
    81         return generic_received_msg_remote(sess, NET_NIL_RECEIVED,
    82             device_id, packet_id, 0, 0);
     81        async_exch_t *exch = async_exchange_begin(sess);
     82
     83        ipc_call_t answer;
     84        aid_t req = async_send_1(exch, NET_NIL_RECEIVED, (sysarg_t) device_id,
     85            &answer);
     86        sysarg_t retval = async_data_write_start(exch, data, size);
     87
     88        async_exchange_end(exch);
     89
     90        if (retval != EOK) {
     91                async_wait_for(req, NULL);
     92                return retval;
     93        }
     94
     95        async_wait_for(req, &retval);
     96        return retval;
    8397}
    8498
Note: See TracChangeset for help on using the changeset viewer.