Changeset 8989f2a7 in mainline for uspace/drv/nic/ne2k/dp8390.c


Ignore:
Timestamp:
2012-01-15T10:38:46Z (12 years ago)
Author:
Frantisek Princ <frantisek.princ@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
121e7adf
Parents:
9957a97 (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 with mainline

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/nic/ne2k/dp8390.c

    r9957a97 r8989f2a7  
    404404 *
    405405 * @param[in,out] ne2k   Network interface structure.
    406  * @param[in]     packet Frame to be sent.
    407  *
    408  */
    409 void ne2k_send(nic_t *nic_data, packet_t *packet)
     406 * @param[in]     data   Pointer to frame data
     407 * @param[in]     size   Frame size in bytes
     408 *
     409 */
     410void ne2k_send(nic_t *nic_data, void *data, size_t size)
    410411{
    411412        ne2k_t *ne2k = (ne2k_t *) nic_get_specific(nic_data);
     
    419420                fibril_condvar_wait(&ne2k->sq_cv, &ne2k->sq_mutex);
    420421        }
    421         void *buf = packet_get_data(packet);
    422         size_t size = packet_get_data_length(packet);
    423422       
    424423        if ((size < ETH_MIN_PACK_SIZE) || (size > ETH_MAX_PACK_SIZE_TAGGED)) {
     
    428427
    429428        /* Upload the frame to the ethernet card */
    430         ne2k_upload(ne2k, buf, ne2k->sq.page * DP_PAGE, size);
     429        ne2k_upload(ne2k, data, ne2k->sq.page * DP_PAGE, size);
    431430        ne2k->sq.dirty = true;
    432431        ne2k->sq.size = size;
     
    438437        pio_write_8(ne2k->port + DP_CR, CR_TXP | CR_STA);
    439438        fibril_mutex_unlock(&ne2k->sq_mutex);
    440 
    441         /* Relase packet */
    442         nic_release_packet(nic_data, packet);
    443439}
    444440
Note: See TracChangeset for help on using the changeset viewer.