Browse Source

How has the legacy wrapper been working for the past month or so...?

tags/v0.9.3
Michael Brown 17 years ago
parent
commit
f33bbd4112
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      src/drivers/net/legacy.c

+ 2
- 1
src/drivers/net/legacy.c View File

23
 
23
 
24
 static int legacy_transmit ( struct net_device *netdev, struct io_buffer *iobuf ) {
24
 static int legacy_transmit ( struct net_device *netdev, struct io_buffer *iobuf ) {
25
 	struct nic *nic = netdev->priv;
25
 	struct nic *nic = netdev->priv;
26
-	struct ethhdr *ethhdr = iobuf->data;
26
+	struct ethhdr *ethhdr;
27
 
27
 
28
 	DBG ( "Transmitting %d bytes\n", iob_len ( iobuf ) );
28
 	DBG ( "Transmitting %d bytes\n", iob_len ( iobuf ) );
29
 	iob_pad ( iobuf, ETH_ZLEN );
29
 	iob_pad ( iobuf, ETH_ZLEN );
30
+	ethhdr = iobuf->data;
30
 	iob_pull ( iobuf, sizeof ( *ethhdr ) );
31
 	iob_pull ( iobuf, sizeof ( *ethhdr ) );
31
 	nic->nic_op->transmit ( nic, ( const char * ) ethhdr->h_dest,
32
 	nic->nic_op->transmit ( nic, ( const char * ) ethhdr->h_dest,
32
 				ntohs ( ethhdr->h_protocol ),
33
 				ntohs ( ethhdr->h_protocol ),

Loading…
Cancel
Save