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:
parent
a3ed0cbbc7
commit
03390f0cd6
@ -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 ),
|
||||
|
Loading…
Reference in New Issue
Block a user