Ignore:
File:
1 edited

Legend:

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

    r1bc35b5 r6d8455d  
    5959#include <stdio.h>
    6060#include <libarch/ddi.h>
     61#include <net/packet.h>
     62#include <packet_client.h>
    6163#include "dp8390.h"
    6264
     
    7476        uint8_t status;
    7577       
    76         /** Pointer to next frame */
     78        /** Pointer to next packet */
    7779        uint8_t next;
    7880       
     
    391393        /*
    392394         * Reset the transmit ring. If we were transmitting a frame,
    393          * we pretend that the frame is processed. Higher layers will
    394          * retransmit if the frame wasn't actually sent.
     395         * we pretend that the packet is processed. Higher layers will
     396         * retransmit if the packet wasn't actually sent.
    395397         */
    396398        ne2k->sq.dirty = false;
     
    446448                return NULL;
    447449       
    448         bzero(frame->data, length);
     450        void *buf = packet_suffix(frame->packet, length);
     451        bzero(buf, length);
    449452        uint8_t last = page + length / DP_PAGE;
    450453       
     
    452455                size_t left = (ne2k->stop_page - page) * DP_PAGE
    453456                    - 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),
    455458                    left);
    456                 ne2k_download(ne2k, frame->data + left, ne2k->start_page * DP_PAGE,
     459                ne2k_download(ne2k, buf + left, ne2k->start_page * DP_PAGE,
    457460                    length - left);
    458461        } 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),
    460463                    length);
    461464        }
     
    538541                 * Update the boundary pointer
    539542                 * to the value of the page
    540                  * prior to the next frame to
     543                 * prior to the next packet to
    541544                 * be processed.
    542545                 */
     
    581584                fibril_mutex_lock(&ne2k->sq_mutex);
    582585                if (ne2k->sq.dirty) {
    583                         /* Prepare the buffer for next frame */
     586                        /* Prepare the buffer for next packet */
    584587                        ne2k->sq.dirty = false;
    585588                        ne2k->sq.size = 0;
Note: See TracChangeset for help on using the changeset viewer.