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

PNIC doesn't auto-pad.

This commit is contained in:
Michael Brown 2006-06-05 16:10:14 +00:00
parent 286bf68faf
commit 7826de3f7e

View File

@ -147,9 +147,17 @@ TRANSMIT - Transmit a frame
***************************************************************************/
static int pnic_transmit ( struct net_device *netdev, struct pk_buff *pkb ) {
struct pnic *pnic = netdev->priv;
int pad_len;
/* Pad to minimum packet length */
pad_len = ( ETH_ZLEN - pkb_len ( pkb ) );
if ( pad_len > 0 )
memset ( pkb_put ( pkb, pad_len ), 0, pad_len );
/* Send packet */
pnic_command ( pnic, PNIC_CMD_XMIT, pkb->data, pkb_len ( pkb ),
NULL, 0, NULL );
free_pkb ( pkb );
return 0;
}