aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/spider_net.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/spider_net.c')
-rw-r--r--drivers/net/spider_net.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c
index f1cd13fbd5c1..4c26b9a5683e 100644
--- a/drivers/net/spider_net.c
+++ b/drivers/net/spider_net.c
@@ -926,19 +926,8 @@ spider_net_pass_skb_up(struct spider_net_descr *descr,
926 926
927 data_status = descr->data_status; 927 data_status = descr->data_status;
928 data_error = descr->data_error; 928 data_error = descr->data_error;
929
930 netdev = card->netdev; 929 netdev = card->netdev;
931 930
932 /* the cases we'll throw away the packet immediately */
933 if (data_error & SPIDER_NET_DESTROY_RX_FLAGS) {
934 if (netif_msg_rx_err(card))
935 pr_err("error in received descriptor found, "
936 "data_status=x%08x, data_error=x%08x\n",
937 data_status, data_error);
938 card->spider_stats.rx_desc_error++;
939 return 0;
940 }
941
942 skb = descr->skb; 931 skb = descr->skb;
943 skb->dev = netdev; 932 skb->dev = netdev;
944 skb_put(skb, descr->valid_size); 933 skb_put(skb, descr->valid_size);
@@ -1037,6 +1026,18 @@ spider_net_decode_one_descr(struct spider_net_card *card)
1037 goto refill; 1026 goto refill;
1038 } 1027 }
1039 1028
1029 /* The cases we'll throw away the packet immediately */
1030 if (descr->data_error & SPIDER_NET_DESTROY_RX_FLAGS) {
1031 if (netif_msg_rx_err(card))
1032 pr_err("%s: error in received descriptor found, "
1033 "data_status=x%08x, data_error=x%08x\n",
1034 card->netdev->name,
1035 descr->data_status, descr->data_error);
1036 card->spider_stats.rx_desc_error++;
1037 dev_kfree_skb_irq(descr->skb);
1038 goto refill;
1039 }
1040
1040 /* ok, we've got a packet in descr */ 1041 /* ok, we've got a packet in descr */
1041 result = spider_net_pass_skb_up(descr, card); 1042 result = spider_net_pass_skb_up(descr, card);
1042refill: 1043refill: