projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[ar71xx] add AR7240 specific fixes for the ag71xx driver
[openwrt.git]
/
target
/
linux
/
ar71xx
/
files
/
drivers
/
net
/
ag71xx
/
ag71xx_main.c
diff --git
a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c
b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c
index
0183488
..
e5eced2
100644
(file)
--- a/
target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c
+++ b/
target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c
@@
-473,6
+473,8
@@
static int ag71xx_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
if (!ag71xx_desc_empty(desc))
goto err_drop;
if (!ag71xx_desc_empty(desc))
goto err_drop;
+ ag71xx_add_ar8216_header(ag, skb);
+
if (skb->len <= 0) {
DBG("%s: packet len is too small\n", ag->dev->name);
goto err_drop;
if (skb->len <= 0) {
DBG("%s: packet len is too small\n", ag->dev->name);
goto err_drop;
@@
-647,15
+649,20
@@
static int ag71xx_rx_packets(struct ag71xx *ag, int limit)
skb_put(skb, pktlen);
skb->dev = dev;
skb_put(skb, pktlen);
skb->dev = dev;
- skb->protocol = eth_type_trans(skb, dev);
skb->ip_summed = CHECKSUM_NONE;
skb->ip_summed = CHECKSUM_NONE;
- netif_receive_skb(skb);
-
dev->last_rx = jiffies;
dev->stats.rx_packets++;
dev->stats.rx_bytes += pktlen;
dev->last_rx = jiffies;
dev->stats.rx_packets++;
dev->stats.rx_bytes += pktlen;
+ if (ag71xx_remove_ar8216_header(ag, skb) != 0) {
+ dev->stats.rx_dropped++;
+ kfree_skb(skb);
+ } else {
+ skb->protocol = eth_type_trans(skb, dev);
+ netif_receive_skb(skb);
+ }
+
ring->buf[i].skb = NULL;
done++;
ring->buf[i].skb = NULL;
done++;
This page took
0.028403 seconds
and
4
git commands to generate.