diff options
Diffstat (limited to 'drivers/atm/nicstar.c')
-rw-r--r-- | drivers/atm/nicstar.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/atm/nicstar.c b/drivers/atm/nicstar.c index aab9b3733d52..14ced85b3f54 100644 --- a/drivers/atm/nicstar.c +++ b/drivers/atm/nicstar.c | |||
@@ -2208,7 +2208,7 @@ static void dequeue_rx(ns_dev *card, ns_rsqe *rsqe) | |||
2208 | if (i == 1 && ns_rsqe_eopdu(rsqe)) | 2208 | if (i == 1 && ns_rsqe_eopdu(rsqe)) |
2209 | *((u32 *) sb->data) |= 0x00000002; | 2209 | *((u32 *) sb->data) |= 0x00000002; |
2210 | skb_put(sb, NS_AAL0_HEADER); | 2210 | skb_put(sb, NS_AAL0_HEADER); |
2211 | memcpy(sb->tail, cell, ATM_CELL_PAYLOAD); | 2211 | memcpy(skb_tail_pointer(sb), cell, ATM_CELL_PAYLOAD); |
2212 | skb_put(sb, ATM_CELL_PAYLOAD); | 2212 | skb_put(sb, ATM_CELL_PAYLOAD); |
2213 | ATM_SKB(sb)->vcc = vcc; | 2213 | ATM_SKB(sb)->vcc = vcc; |
2214 | __net_timestamp(sb); | 2214 | __net_timestamp(sb); |
@@ -2252,7 +2252,8 @@ static void dequeue_rx(ns_dev *card, ns_rsqe *rsqe) | |||
2252 | vc->rx_iov = iovb; | 2252 | vc->rx_iov = iovb; |
2253 | NS_SKB(iovb)->iovcnt = 0; | 2253 | NS_SKB(iovb)->iovcnt = 0; |
2254 | iovb->len = 0; | 2254 | iovb->len = 0; |
2255 | iovb->tail = iovb->data = iovb->head; | 2255 | iovb->data = iovb->head; |
2256 | skb_reset_tail_pointer(iovb); | ||
2256 | NS_SKB(iovb)->vcc = vcc; | 2257 | NS_SKB(iovb)->vcc = vcc; |
2257 | /* IMPORTANT: a pointer to the sk_buff containing the small or large | 2258 | /* IMPORTANT: a pointer to the sk_buff containing the small or large |
2258 | buffer is stored as iovec base, NOT a pointer to the | 2259 | buffer is stored as iovec base, NOT a pointer to the |
@@ -2265,7 +2266,8 @@ static void dequeue_rx(ns_dev *card, ns_rsqe *rsqe) | |||
2265 | recycle_iovec_rx_bufs(card, (struct iovec *) iovb->data, NS_MAX_IOVECS); | 2266 | recycle_iovec_rx_bufs(card, (struct iovec *) iovb->data, NS_MAX_IOVECS); |
2266 | NS_SKB(iovb)->iovcnt = 0; | 2267 | NS_SKB(iovb)->iovcnt = 0; |
2267 | iovb->len = 0; | 2268 | iovb->len = 0; |
2268 | iovb->tail = iovb->data = iovb->head; | 2269 | iovb->data = iovb->head; |
2270 | skb_reset_tail_pointer(iovb); | ||
2269 | NS_SKB(iovb)->vcc = vcc; | 2271 | NS_SKB(iovb)->vcc = vcc; |
2270 | } | 2272 | } |
2271 | iov = &((struct iovec *) iovb->data)[NS_SKB(iovb)->iovcnt++]; | 2273 | iov = &((struct iovec *) iovb->data)[NS_SKB(iovb)->iovcnt++]; |
@@ -2393,7 +2395,7 @@ static void dequeue_rx(ns_dev *card, ns_rsqe *rsqe) | |||
2393 | skb->destructor = ns_lb_destructor; | 2395 | skb->destructor = ns_lb_destructor; |
2394 | #endif /* NS_USE_DESTRUCTORS */ | 2396 | #endif /* NS_USE_DESTRUCTORS */ |
2395 | skb_push(skb, NS_SMBUFSIZE); | 2397 | skb_push(skb, NS_SMBUFSIZE); |
2396 | memcpy(skb->data, sb->data, NS_SMBUFSIZE); | 2398 | skb_copy_from_linear_data(sb, skb->data, NS_SMBUFSIZE); |
2397 | skb_put(skb, len - NS_SMBUFSIZE); | 2399 | skb_put(skb, len - NS_SMBUFSIZE); |
2398 | ATM_SKB(skb)->vcc = vcc; | 2400 | ATM_SKB(skb)->vcc = vcc; |
2399 | __net_timestamp(skb); | 2401 | __net_timestamp(skb); |
@@ -2477,7 +2479,7 @@ static void dequeue_rx(ns_dev *card, ns_rsqe *rsqe) | |||
2477 | { | 2479 | { |
2478 | /* Copy the small buffer to the huge buffer */ | 2480 | /* Copy the small buffer to the huge buffer */ |
2479 | sb = (struct sk_buff *) iov->iov_base; | 2481 | sb = (struct sk_buff *) iov->iov_base; |
2480 | memcpy(hb->data, sb->data, iov->iov_len); | 2482 | skb_copy_from_linear_data(sb, hb->data, iov->iov_len); |
2481 | skb_put(hb, iov->iov_len); | 2483 | skb_put(hb, iov->iov_len); |
2482 | remaining = len - iov->iov_len; | 2484 | remaining = len - iov->iov_len; |
2483 | iov++; | 2485 | iov++; |
@@ -2489,7 +2491,7 @@ static void dequeue_rx(ns_dev *card, ns_rsqe *rsqe) | |||
2489 | { | 2491 | { |
2490 | lb = (struct sk_buff *) iov->iov_base; | 2492 | lb = (struct sk_buff *) iov->iov_base; |
2491 | tocopy = min_t(int, remaining, iov->iov_len); | 2493 | tocopy = min_t(int, remaining, iov->iov_len); |
2492 | memcpy(hb->tail, lb->data, tocopy); | 2494 | skb_copy_from_linear_data(lb, skb_tail_pointer(hb), tocopy); |
2493 | skb_put(hb, tocopy); | 2495 | skb_put(hb, tocopy); |
2494 | iov++; | 2496 | iov++; |
2495 | remaining -= tocopy; | 2497 | remaining -= tocopy; |