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:
parent
7826de3f7e
commit
754cfdfcf4
@ -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 ),
|
||||
|
Loading…
Reference in New Issue
Block a user