Changes in uspace/drv/nic/ne2k/dp8390.c [1bc35b5:6d8455d] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/nic/ne2k/dp8390.c
r1bc35b5 r6d8455d 59 59 #include <stdio.h> 60 60 #include <libarch/ddi.h> 61 #include <net/packet.h> 62 #include <packet_client.h> 61 63 #include "dp8390.h" 62 64 … … 74 76 uint8_t status; 75 77 76 /** Pointer to next frame*/78 /** Pointer to next packet */ 77 79 uint8_t next; 78 80 … … 391 393 /* 392 394 * Reset the transmit ring. If we were transmitting a frame, 393 * we pretend that the frameis processed. Higher layers will394 * retransmit if the framewasn't actually sent.395 * we pretend that the packet is processed. Higher layers will 396 * retransmit if the packet wasn't actually sent. 395 397 */ 396 398 ne2k->sq.dirty = false; … … 446 448 return NULL; 447 449 448 bzero(frame->data, length); 450 void *buf = packet_suffix(frame->packet, length); 451 bzero(buf, length); 449 452 uint8_t last = page + length / DP_PAGE; 450 453 … … 452 455 size_t left = (ne2k->stop_page - page) * DP_PAGE 453 456 - sizeof(recv_header_t); 454 ne2k_download(ne2k, frame->data, page * DP_PAGE + sizeof(recv_header_t),457 ne2k_download(ne2k, buf, page * DP_PAGE + sizeof(recv_header_t), 455 458 left); 456 ne2k_download(ne2k, frame->data+ left, ne2k->start_page * DP_PAGE,459 ne2k_download(ne2k, buf + left, ne2k->start_page * DP_PAGE, 457 460 length - left); 458 461 } else { 459 ne2k_download(ne2k, frame->data, page * DP_PAGE + sizeof(recv_header_t),462 ne2k_download(ne2k, buf, page * DP_PAGE + sizeof(recv_header_t), 460 463 length); 461 464 } … … 538 541 * Update the boundary pointer 539 542 * to the value of the page 540 * prior to the next frameto543 * prior to the next packet to 541 544 * be processed. 542 545 */ … … 581 584 fibril_mutex_lock(&ne2k->sq_mutex); 582 585 if (ne2k->sq.dirty) { 583 /* Prepare the buffer for next frame*/586 /* Prepare the buffer for next packet */ 584 587 ne2k->sq.dirty = false; 585 588 ne2k->sq.size = 0;
Note:
See TracChangeset
for help on using the changeset viewer.