Changeset a1347a7 in mainline for uspace/lib/drv/generic/remote_nic.c


Ignore:
Timestamp:
2012-01-15T13:51:09Z (12 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bd79281
Parents:
03e0a244 (diff), f302586 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/generic/remote_nic.c

    r03e0a244 ra1347a7  
    3939#include <errno.h>
    4040#include <ipc/services.h>
    41 #include <adt/measured_strings.h>
    4241#include <sys/time.h>
    4342#include "ops/nic.h"
    4443
    45 static void remote_nic_send_message(ddf_fun_t *dev, void *iface,
    46     ipc_callid_t callid, ipc_call_t *call)
    47 {
    48         nic_iface_t *nic_iface = (nic_iface_t *) iface;
    49         assert(nic_iface->send_message);
    50        
    51         packet_id_t packet_id = (packet_id_t) IPC_GET_ARG2(*call);
    52        
    53         int rc = nic_iface->send_message(dev, packet_id);
    54         async_answer_0(callid, rc);
     44static void remote_nic_send_frame(ddf_fun_t *dev, void *iface,
     45    ipc_callid_t callid, ipc_call_t *call)
     46{
     47        nic_iface_t *nic_iface = (nic_iface_t *) iface;
     48        assert(nic_iface->send_frame);
     49       
     50        void *data;
     51        size_t size;
     52        int rc;
     53       
     54        rc = async_data_write_accept(&data, false, 0, 0, 0, &size);
     55        if (rc != EOK) {
     56                async_answer_0(callid, EINVAL);
     57                return;
     58        }
     59       
     60        rc = nic_iface->send_frame(dev, data, size);
     61        async_answer_0(callid, rc);
     62        free(data);
    5563}
    5664
     
    11941202 */
    11951203static remote_iface_func_ptr_t remote_nic_iface_ops[] = {
    1196         &remote_nic_send_message,
     1204        &remote_nic_send_frame,
    11971205        &remote_nic_connect_to_nil,
    11981206        &remote_nic_get_state,
Note: See TracChangeset for help on using the changeset viewer.