浏览代码

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

tags/v0.9.3
Michael Brown 18 年前
父节点
当前提交
f33bbd4112
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2
    1
      src/drivers/net/legacy.c

+ 2
- 1
src/drivers/net/legacy.c 查看文件

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 ),

正在加载...
取消
保存