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 ),
return rc;
}
+ /* Do not remove this message */
+ printf ( "WARNING: Using legacy NIC wrapper\n" );
+
return 0;
}
void dummy_irq ( struct nic *nic __unused, irq_action_t irq_action __unused ) {
return;
}
+
+REQUIRE_OBJECT ( pci );