2
0
mirror of https://github.com/xcat2/xNBA.git synced 2024-12-14 07:11:32 +00:00

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

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