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

Use pkb_pad() rather than doing it the dangerous way :)

This commit is contained in:
Michael Brown 2007-01-11 05:26:16 +00:00
parent a3ed0cbbc7
commit 03390f0cd6

View File

@ -148,12 +148,9 @@ 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 );
/* Pad the packet */
pkb_pad ( pkb, ETH_ZLEN );
/* Send packet */
pnic_command ( pnic, PNIC_CMD_XMIT, pkb->data, pkb_len ( pkb ),