summaryrefslogtreecommitdiffstats
path: root/src/drivers/net/pnic.c
diff options
context:
space:
mode:
authorMichael Brown2007-05-19 20:39:40 +0200
committerMichael Brown2007-05-19 20:39:40 +0200
commit3e2c6b6736729633c5d6c00cd31458a1c6a49730 (patch)
tree8c9e1ed94b301680c9870ed09424e3a2a2e4bafa /src/drivers/net/pnic.c
parentAdd explicit "freeing" debug messages. (diff)
downloadipxe-3e2c6b6736729633c5d6c00cd31458a1c6a49730.tar.gz
ipxe-3e2c6b6736729633c5d6c00cd31458a1c6a49730.tar.xz
ipxe-3e2c6b6736729633c5d6c00cd31458a1c6a49730.zip
pkbuff->iobuf changeover
Achieved via Perl using: perl -pi -e 's/pk_buff/io_buffer/g; s/Packet buffer/I\/O buffer/ig; ' \ -e 's/pkbuff\.h/iobuf.h/g; s/pkb_/iob_/g; s/_pkb/_iob/g; ' \ -e 's/pkb/iobuf/g; s/PKB/IOB/g;'
Diffstat (limited to 'src/drivers/net/pnic.c')
-rw-r--r--src/drivers/net/pnic.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/drivers/net/pnic.c b/src/drivers/net/pnic.c
index 7f442420..95571961 100644
--- a/src/drivers/net/pnic.c
+++ b/src/drivers/net/pnic.c
@@ -19,7 +19,7 @@ Bochs Pseudo NIC driver for Etherboot
#include <gpxe/pci.h>
#include <gpxe/if_ether.h>
#include <gpxe/ethernet.h>
-#include <gpxe/pkbuff.h>
+#include <gpxe/iobuf.h>
#include <gpxe/netdevice.h>
#include "pnic_api.h"
@@ -114,7 +114,7 @@ POLL - Wait for a frame
***************************************************************************/
static void pnic_poll ( struct net_device *netdev, unsigned int rx_quota ) {
struct pnic *pnic = netdev->priv;
- struct pk_buff *pkb;
+ struct io_buffer *iobuf;
uint16_t length;
uint16_t qlen;
@@ -126,19 +126,19 @@ static void pnic_poll ( struct net_device *netdev, unsigned int rx_quota ) {
break;
if ( qlen == 0 )
break;
- pkb = alloc_pkb ( ETH_FRAME_LEN );
- if ( ! pkb ) {
+ iobuf = alloc_iob ( ETH_FRAME_LEN );
+ if ( ! iobuf ) {
printf ( "could not allocate buffer\n" );
break;
}
if ( pnic_command ( pnic, PNIC_CMD_RECV, NULL, 0,
- pkb->data, ETH_FRAME_LEN, &length )
+ iobuf->data, ETH_FRAME_LEN, &length )
!= PNIC_STATUS_OK ) {
- free_pkb ( pkb );
+ free_iob ( iobuf );
break;
}
- pkb_put ( pkb, length );
- netdev_rx ( netdev, pkb );
+ iob_put ( iobuf, length );
+ netdev_rx ( netdev, iobuf );
--rx_quota;
}
}
@@ -146,17 +146,17 @@ static void pnic_poll ( struct net_device *netdev, unsigned int rx_quota ) {
/**************************************************************************
TRANSMIT - Transmit a frame
***************************************************************************/
-static int pnic_transmit ( struct net_device *netdev, struct pk_buff *pkb ) {
+static int pnic_transmit ( struct net_device *netdev, struct io_buffer *iobuf ) {
struct pnic *pnic = netdev->priv;
/* Pad the packet */
- pkb_pad ( pkb, ETH_ZLEN );
+ iob_pad ( iobuf, ETH_ZLEN );
/* Send packet */
- pnic_command ( pnic, PNIC_CMD_XMIT, pkb->data, pkb_len ( pkb ),
+ pnic_command ( pnic, PNIC_CMD_XMIT, iobuf->data, iob_len ( iobuf ),
NULL, 0, NULL );
- netdev_tx_complete ( netdev, pkb );
+ netdev_tx_complete ( netdev, iobuf );
return 0;
}