浏览代码

sis190: hard-code the alignment of tiny packets

There is no DMA involved here. Align the IP header without condition.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Stephen Hemminger 17 年之前
父节点
当前提交
e3eccad9f6
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      drivers/net/sis190.c

+ 2 - 2
drivers/net/sis190.c

@@ -526,9 +526,9 @@ static inline int sis190_try_rx_copy(struct sk_buff **sk_buff, int pkt_size,
 	if (pkt_size < rx_copybreak) {
 	if (pkt_size < rx_copybreak) {
 		struct sk_buff *skb;
 		struct sk_buff *skb;
 
 
-		skb = dev_alloc_skb(pkt_size + NET_IP_ALIGN);
+		skb = dev_alloc_skb(pkt_size + 2);
 		if (skb) {
 		if (skb) {
-			skb_reserve(skb, NET_IP_ALIGN);
+			skb_reserve(skb, 2);
 			skb_copy_to_linear_data(skb, sk_buff[0]->data, pkt_size);
 			skb_copy_to_linear_data(skb, sk_buff[0]->data, pkt_size);
 			*sk_buff = skb;
 			*sk_buff = skb;
 			sis190_give_to_asic(desc, rx_buf_sz);
 			sis190_give_to_asic(desc, rx_buf_sz);