patch-2.4.21 linux-2.4.21/drivers/net/ni52.c
Next file: linux-2.4.21/drivers/net/ni65.c
Previous file: linux-2.4.21/drivers/net/ni5010.c
Back to the patch index
Back to the overall index
- Lines: 27
- Date:
2003-06-13 07:51:35.000000000 -0700
- Orig file:
linux-2.4.20/drivers/net/ni52.c
- Orig date:
2001-09-30 12:26:07.000000000 -0700
diff -urN linux-2.4.20/drivers/net/ni52.c linux-2.4.21/drivers/net/ni52.c
@@ -226,10 +226,11 @@
volatile struct iscp_struct *iscp; /* volatile is important */
volatile struct scb_struct *scb; /* volatile is important */
volatile struct tbd_struct *xmit_buffs[NUM_XMIT_BUFFS];
- volatile struct transmit_cmd_struct *xmit_cmds[NUM_XMIT_BUFFS];
#if (NUM_XMIT_BUFFS == 1)
+ volatile struct transmit_cmd_struct *xmit_cmds[2];
volatile struct nop_cmd_struct *nop_cmds[2];
#else
+ volatile struct transmit_cmd_struct *xmit_cmds[NUM_XMIT_BUFFS];
volatile struct nop_cmd_struct *nop_cmds[NUM_XMIT_BUFFS];
#endif
volatile int nop_point,num_recv_buffs;
@@ -1162,7 +1163,12 @@
#endif
{
memcpy((char *)p->xmit_cbuffs[p->xmit_count],(char *)(skb->data),skb->len);
- len = (ETH_ZLEN < skb->len) ? skb->len : ETH_ZLEN;
+ len = skb->len;
+ if(len < ETH_ZLEN)
+ {
+ len = ETH_ZLEN;
+ memset((char *)p->xmit_cbuffs[p->xmit_count]+skb->len, 0, len - skb->len);
+ }
#if (NUM_XMIT_BUFFS == 1)
# ifdef NO_NOPCOMMANDS
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)