From: Francois Romieu Date: Tue, 12 Jul 2011 06:24:28 +0000 (+0200) Subject: r8169: expand received packet length indication. X-Git-Tag: v2.6.39-400.9.0~423^2~19^2~11^2~44 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=d78299c95e6c534b7f09734ad49c9d38c2f6f8fd;p=users%2Fjedix%2Flinux-maple.git r8169: expand received packet length indication. 8168d and above allow jumbo frames beyond 8k. Bump the received packet length check before enabling jumbo frames on these chipsets. Frame length indication covers bits 0..13 of the first Rx descriptor 32 bits for the 8169 and 8168. I only have authoritative documentation for the allowed use of the extra (13) bit with the 8169 and 8168c. Realtek's drivers use the same mask for the 816x and the fast ethernet only 810x. (cherry picked from commit deb9d93c89d311714a60809b28160e538e1cbb43) Signed-off-by: Francois Romieu Signed-off-by: Joe Jin --- diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index f06c036d6750..01fcc5026b75 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -5415,7 +5415,7 @@ static int rtl8169_rx_interrupt(struct net_device *dev, } else { struct sk_buff *skb; dma_addr_t addr = le64_to_cpu(desc->addr); - int pkt_size = (status & 0x00001FFF) - 4; + int pkt_size = (status & 0x00003fff) - 4; /* * The driver does not support incoming fragmented