diff options
author | florian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2009-06-03 08:55:18 +0000 |
---|---|---|
committer | florian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2009-06-03 08:55:18 +0000 |
commit | 404123be4d5852b3f527b4cd76e21e08b8592617 (patch) | |
tree | 68b00059259c206b873addd113fea151eab76238 /target/linux/brcm63xx/files/drivers/net/bcm63xx_enet.h | |
parent | aea832cc6b8f626c9264fc0fd7d294570223b1a2 (diff) |
[brcm63xx] merger mtu/802.1q related fixes:
bcm63xx integrated ethernet mac supports receiving and sending frames
bigger than 1500 bytes, this patch adds support for changing MTU.
This patch also fixes the reception of 802.1q frames for default MTU
which were reported as oversized.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16302 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm63xx/files/drivers/net/bcm63xx_enet.h')
-rw-r--r-- | target/linux/brcm63xx/files/drivers/net/bcm63xx_enet.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/target/linux/brcm63xx/files/drivers/net/bcm63xx_enet.h b/target/linux/brcm63xx/files/drivers/net/bcm63xx_enet.h index fe7ffc19c..dc78f5ae2 100644 --- a/target/linux/brcm63xx/files/drivers/net/bcm63xx_enet.h +++ b/target/linux/brcm63xx/files/drivers/net/bcm63xx_enet.h @@ -23,9 +23,12 @@ * not overflow the fifo */ #define BCMENET_TX_FIFO_TRESH 32 -/* maximum rx/tx packet size */ -#define BCMENET_MAX_RX_SIZE (ETH_FRAME_LEN + 4) -#define BCMENET_MAX_TX_SIZE (ETH_FRAME_LEN + 4) +/* + * hardware maximum rx/tx packet size including FCS, max mtu is + * actually 2047, but if we set max rx size register to 2047 we won't + * get overflow information if packet size is 2048 or above + */ +#define BCMENET_MAX_MTU 2046 /* * rx/tx dma descriptor @@ -202,6 +205,9 @@ struct bcm_enet_priv { /* next dirty rx descriptor to refill */ int rx_dirty_desc; + /* size of allocated rx skbs */ + unsigned int rx_skb_size; + /* list of skb given to hw for rx */ struct sk_buff **rx_skb; @@ -289,6 +295,9 @@ struct bcm_enet_priv { /* platform device reference */ struct platform_device *pdev; + + /* maximum hardware transmit/receive size */ + unsigned int hw_mtu; }; #endif /* ! BCM63XX_ENET_H_ */ |