ar8216: fix transmission of large frames by setting the switch mtu
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 29 Jun 2009 21:54:16 +0000 (21:54 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 29 Jun 2009 21:54:16 +0000 (21:54 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16629 3c298f89-4303-0410-b956-a3cf2f4a3e73

target/linux/generic-2.6/files/drivers/net/phy/ar8216.c
target/linux/generic-2.6/files/drivers/net/phy/ar8216.h

index f629058..4354be9 100644 (file)
@@ -488,6 +488,10 @@ ar8216_reset_switch(struct switch_dev *dev)
        }
        /* XXX: undocumented magic from atheros, required! */
        priv->write(priv, 0x38, 0xc000050e);
        }
        /* XXX: undocumented magic from atheros, required! */
        priv->write(priv, 0x38, 0xc000050e);
+
+       ar8216_rmw(priv, AR8216_REG_GLOBAL_CTRL,
+               AR8216_GCTRL_MTU, 1518 + 8 + 2);
+
        return ar8216_hw_apply(dev);
 }
 
        return ar8216_hw_apply(dev);
 }
 
index e0f0452..b8a4f23 100644 (file)
@@ -26,6 +26,9 @@
 #define AR8216_REG_CTRL                        0x0000
 #define   AR8216_CTRL_RESET            BIT(31)
 
 #define AR8216_REG_CTRL                        0x0000
 #define   AR8216_CTRL_RESET            BIT(31)
 
+#define AR8216_REG_GLOBAL_CTRL         0x0030
+#define   AR8216_GCTRL_MTU             BITS(0, 10)
+
 #define AR8216_REG_VTU                 0x0040
 #define   AR8216_VTU_OP                        BITS(0, 3)
 #define   AR8216_VTU_OP_NOOP           0x0
 #define AR8216_REG_VTU                 0x0040
 #define   AR8216_VTU_OP                        BITS(0, 3)
 #define   AR8216_VTU_OP_NOOP           0x0
This page took 0.025739 seconds and 4 git commands to generate.