david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

Legacy drivers will not pad when necessary

This commit is contained in:
Michael Brown 2006-06-05 16:10:36 +00:00
parent 7826de3f7e
commit 754cfdfcf4
1 changed files with 4 additions and 0 deletions

View File

@ -21,7 +21,11 @@ struct nic nic;
static int legacy_transmit ( struct net_device *netdev, struct pk_buff *pkb ) {
struct nic *nic = netdev->priv;
struct ethhdr *ethhdr = pkb->data;
int pad_len;
pad_len = ( ETH_ZLEN - pkb_len ( pkb ) );
if ( pad_len > 0 )
memset ( pkb_put ( pkb, pad_len ), 0, pad_len );
pkb_pull ( pkb, sizeof ( *ethhdr ) );
nic->nic_op->transmit ( nic, ( const char * ) ethhdr->h_dest,
ntohs ( ethhdr->h_protocol ),