|
|
|
|
21
|
static int legacy_transmit ( struct net_device *netdev, struct pk_buff *pkb ) {
|
21
|
static int legacy_transmit ( struct net_device *netdev, struct pk_buff *pkb ) {
|
22
|
struct nic *nic = netdev->priv;
|
22
|
struct nic *nic = netdev->priv;
|
23
|
struct ethhdr *ethhdr = pkb->data;
|
23
|
struct ethhdr *ethhdr = pkb->data;
|
|
|
24
|
+ int pad_len;
|
24
|
|
25
|
|
|
|
26
|
+ pad_len = ( ETH_ZLEN - pkb_len ( pkb ) );
|
|
|
27
|
+ if ( pad_len > 0 )
|
|
|
28
|
+ memset ( pkb_put ( pkb, pad_len ), 0, pad_len );
|
25
|
pkb_pull ( pkb, sizeof ( *ethhdr ) );
|
29
|
pkb_pull ( pkb, sizeof ( *ethhdr ) );
|
26
|
nic->nic_op->transmit ( nic, ( const char * ) ethhdr->h_dest,
|
30
|
nic->nic_op->transmit ( nic, ( const char * ) ethhdr->h_dest,
|
27
|
ntohs ( ethhdr->h_protocol ),
|
31
|
ntohs ( ethhdr->h_protocol ),
|