Changeset 1bc35b5 in mainline for uspace/drv/nic/ne2k/dp8390.c


Ignore:
Timestamp:
2012-01-19T08:13:45Z (12 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d8da56b
Parents:
3ea725e
Message:

Remove most use of packet_t from NIC drivers.

File:
1 edited

Legend:

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

    r3ea725e r1bc35b5  
    5959#include <stdio.h>
    6060#include <libarch/ddi.h>
    61 #include <net/packet.h>
    62 #include <packet_client.h>
    6361#include "dp8390.h"
    6462
     
    7674        uint8_t status;
    7775       
    78         /** Pointer to next packet */
     76        /** Pointer to next frame */
    7977        uint8_t next;
    8078       
     
    393391        /*
    394392         * Reset the transmit ring. If we were transmitting a frame,
    395          * we pretend that the packet is processed. Higher layers will
    396          * retransmit if the packet wasn't actually sent.
     393         * we pretend that the frame is processed. Higher layers will
     394         * retransmit if the frame wasn't actually sent.
    397395         */
    398396        ne2k->sq.dirty = false;
     
    448446                return NULL;
    449447       
    450         void *buf = packet_suffix(frame->packet, length);
    451         bzero(buf, length);
     448        bzero(frame->data, length);
    452449        uint8_t last = page + length / DP_PAGE;
    453450       
     
    455452                size_t left = (ne2k->stop_page - page) * DP_PAGE
    456453                    - sizeof(recv_header_t);
    457                 ne2k_download(ne2k, buf, page * DP_PAGE + sizeof(recv_header_t),
     454                ne2k_download(ne2k, frame->data, page * DP_PAGE + sizeof(recv_header_t),
    458455                    left);
    459                 ne2k_download(ne2k, buf + left, ne2k->start_page * DP_PAGE,
     456                ne2k_download(ne2k, frame->data + left, ne2k->start_page * DP_PAGE,
    460457                    length - left);
    461458        } else {
    462                 ne2k_download(ne2k, buf, page * DP_PAGE + sizeof(recv_header_t),
     459                ne2k_download(ne2k, frame->data, page * DP_PAGE + sizeof(recv_header_t),
    463460                    length);
    464461        }
     
    541538                 * Update the boundary pointer
    542539                 * to the value of the page
    543                  * prior to the next packet to
     540                 * prior to the next frame to
    544541                 * be processed.
    545542                 */
     
    584581                fibril_mutex_lock(&ne2k->sq_mutex);
    585582                if (ne2k->sq.dirty) {
    586                         /* Prepare the buffer for next packet */
     583                        /* Prepare the buffer for next frame */
    587584                        ne2k->sq.dirty = false;
    588585                        ne2k->sq.size = 0;
Note: See TracChangeset for help on using the changeset viewer.