Changeset a1347a7 in mainline for uspace/drv/nic/lo/lo.c


Ignore:
Timestamp:
2012-01-15T13:51:09Z (13 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/drv/nic/lo/lo.c

    r03e0a244 ra1347a7  
    5959};
    6060
    61 static void lo_write_packet(nic_t *nic_data, packet_t *packet)
     61static void lo_send_frame(nic_t *nic_data, void *data, size_t size)
    6262{
    63         nic_report_send_ok(nic_data, 1, packet_get_data_length(packet));
     63        packet_t *packet;
     64        int rc;
     65
     66        packet = nic_alloc_packet(nic_data, size);
     67        if (packet == NULL)
     68                return;
     69
     70        rc = packet_copy_data(packet, data, size);
     71        if (rc != EOK)
     72                return;
     73
     74        nic_report_send_ok(nic_data, 1, size);
    6475        nic_received_noneth_packet(nic_data, packet);
    6576}
     
    8899       
    89100        dev->driver_data = nic_data;
    90         nic_set_write_packet_handler(nic_data, lo_write_packet);
     101        nic_set_send_frame_handler(nic_data, lo_send_frame);
    91102       
    92103        int rc = nic_connect_to_services(nic_data);
Note: See TracChangeset for help on using the changeset viewer.