From d14e9e706e4f535af703b3f626b978910a861a4d Mon Sep 17 00:00:00 2001 From: Gabor Juhos Date: Tue, 13 Jul 2010 16:52:07 +0000 Subject: [PATCH] ramips: Fix bridging in ramips ethernet driver Bridging between the ramips ethernet driver and rt2800pci was somewhat broken. Frames received by the ethernet driver which were passed to the wifi driver for transmission were sometimes corrupted or sent out with huge delays. The reason for this is the missing assignment of skb->tail in the ramips ethernet driver's rx path resulting in skb->tail pointing to skb->data. Since skb->tail is used by mac80211 it writes into skb->data which messes up the frames content. Fix this by using skb_put to correctly set skb->len and skb->tail. Signed-off-by: Helmut Schaa SVN-Revision: 22172 --- target/linux/ramips/files/drivers/net/ramips.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ramips/files/drivers/net/ramips.c b/target/linux/ramips/files/drivers/net/ramips.c index 5a728be0281..4274c923bb0 100644 --- a/target/linux/ramips/files/drivers/net/ramips.c +++ b/target/linux/ramips/files/drivers/net/ramips.c @@ -231,7 +231,7 @@ ramips_eth_rx_hw(unsigned long ptr) max_rx--; rx_skb = priv->rx_skb[rx]; - rx_skb->len = RX_DMA_PLEN0(priv->rx[rx].rxd2); + skb_put(rx_skb, RX_DMA_PLEN0(priv->rx[rx].rxd2)); rx_skb->dev = dev; rx_skb->protocol = eth_type_trans(rx_skb, dev); rx_skb->ip_summed = CHECKSUM_NONE; -- 2.30.2