patch-1.3.7 linux/drivers/net/de4x5.c
Next file: linux/drivers/net/de600.c
Previous file: linux/drivers/net/at1700.c
Back to the patch index
Back to the overall index
- Lines: 40
- Date:
Thu Jul 6 13:22:04 1995
- Orig file:
v1.3.6/linux/drivers/net/de4x5.c
- Orig date:
Fri Jun 30 16:22:27 1995
diff -u --recursive --new-file v1.3.6/linux/drivers/net/de4x5.c linux/drivers/net/de4x5.c
@@ -1153,9 +1153,10 @@
struct sk_buff *skb;
short pkt_len = (short)(lp->rx_ring[entry].status >> 16) - 4;
- if ((skb = dev_alloc_skb(pkt_len)) != NULL) {
+ if ((skb = dev_alloc_skb(pkt_len+2)) != NULL) {
skb->dev = dev;
+ skb_reserve(skb,2); /* Align */
if (entry < lp->rx_old) { /* Wrapped buffer */
short len = (lp->rxRingSize - lp->rx_old) * RX_BUFF_SZ;
memcpy(skb_put(skb,len), bus_to_virt(lp->rx_ring[lp->rx_old].buf), len);
@@ -2663,21 +2664,21 @@
tmp.addr[j++] = dev->dev_addr[i];
}
tmp.addr[j++] = lp->rxRingSize;
- tmp.lval[j>>2] = (s32)lp->rx_ring; j+=4;
- tmp.lval[j>>2] = (s32)lp->tx_ring; j+=4;
+ tmp.lval[j>>2] = (long)lp->rx_ring; j+=4;
+ tmp.lval[j>>2] = (long)lp->tx_ring; j+=4;
for (i=0;i<lp->rxRingSize-1;i++){
if (i < 3) {
- tmp.lval[j>>2] = (s32)&lp->rx_ring[i].status; j+=4;
+ tmp.lval[j>>2] = (long)&lp->rx_ring[i].status; j+=4;
}
}
- tmp.lval[j>>2] = (s32)&lp->rx_ring[i].status; j+=4;
+ tmp.lval[j>>2] = (long)&lp->rx_ring[i].status; j+=4;
for (i=0;i<lp->txRingSize-1;i++){
if (i < 3) {
- tmp.lval[j>>2] = (s32)&lp->tx_ring[i].status; j+=4;
+ tmp.lval[j>>2] = (long)&lp->tx_ring[i].status; j+=4;
}
}
- tmp.lval[j>>2] = (s32)&lp->tx_ring[i].status; j+=4;
+ tmp.lval[j>>2] = (long)&lp->tx_ring[i].status; j+=4;
for (i=0;i<lp->rxRingSize-1;i++){
if (i < 3) {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this