ar71xx: ag71xx: call the phy driver's netif_receive_skb()
authorGabor Juhos <juhosg@openwrt.org>
Fri, 9 Apr 2010 08:38:46 +0000 (08:38 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Fri, 9 Apr 2010 08:38:46 +0000 (08:38 +0000)
Ag71xx needs to call the phy's netif_receive_skb() to allow phy drivers
to mangle rx packets. This patch fixes it.

This fixes the header mangling of the AR8216 driver.

Signed-off-by: Jonas Gorski <jonas.gorski+openwrt@gmail.com>
Cc:backfire@openwrt.org

SVN-Revision: 20750

target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h
target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c

index a64b4a8c5b9370699b8ac253078419b2586de478..77551dd6255f32e8eae7894f0bbdcc277b345517 100644 (file)
@@ -38,7 +38,7 @@
 #define ETH_FCS_LEN    4
 
 #define AG71XX_DRV_NAME                "ag71xx"
-#define AG71XX_DRV_VERSION     "0.5.33"
+#define AG71XX_DRV_VERSION     "0.5.34"
 
 #define AG71XX_NAPI_WEIGHT     64
 #define AG71XX_OOM_REFILL      (1 + HZ/10)
index 4b35b1f251b84660250ff35e781816858d09a0c7..27c19564fcedccc316e8f5630ec7c9d8c27ae5f2 100644 (file)
@@ -826,8 +826,12 @@ static int ag71xx_rx_packets(struct ag71xx *ag, int limit)
                } else {
                        skb->dev = dev;
                        skb->ip_summed = CHECKSUM_NONE;
-                       skb->protocol = eth_type_trans(skb, dev);
-                       netif_receive_skb(skb);
+                       if (ag->phy_dev) {
+                               ag->phy_dev->netif_receive_skb(skb);
+                       } else {
+                               skb->protocol = eth_type_trans(skb, dev);
+                               netif_receive_skb(skb);
+                       }
                }
 
                ring->buf[i].skb = NULL;