diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-04-13 17:32:33 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-04-13 17:32:33 +0000 |
commit | 1bf8e555bb3466baf775113ab27aa8f05f0e6aa7 (patch) | |
tree | 741d4683dc45fdeba55701fe6b1d03186a5eacd0 /target/linux/generic/patches-3.18/077-08-bgmac-add-check-for-oversized-packets.patch | |
parent | 24e9f521068575a0670028f21fe0323461f80bf1 (diff) | |
download | mtk-20170518-1bf8e555bb3466baf775113ab27aa8f05f0e6aa7.zip mtk-20170518-1bf8e555bb3466baf775113ab27aa8f05f0e6aa7.tar.gz mtk-20170518-1bf8e555bb3466baf775113ab27aa8f05f0e6aa7.tar.bz2 |
kernel: sync bgmac changes with latest upstream submission
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 45420
Diffstat (limited to 'target/linux/generic/patches-3.18/077-08-bgmac-add-check-for-oversized-packets.patch')
-rw-r--r-- | target/linux/generic/patches-3.18/077-08-bgmac-add-check-for-oversized-packets.patch | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/target/linux/generic/patches-3.18/077-08-bgmac-add-check-for-oversized-packets.patch b/target/linux/generic/patches-3.18/077-08-bgmac-add-check-for-oversized-packets.patch index fa45a43..89e1a32 100644 --- a/target/linux/generic/patches-3.18/077-08-bgmac-add-check-for-oversized-packets.patch +++ b/target/linux/generic/patches-3.18/077-08-bgmac-add-check-for-oversized-packets.patch @@ -11,15 +11,14 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org> --- a/drivers/net/ethernet/broadcom/bgmac.c +++ b/drivers/net/ethernet/broadcom/bgmac.c -@@ -422,6 +422,14 @@ static int bgmac_dma_rx_read(struct bgma +@@ -428,6 +428,13 @@ static int bgmac_dma_rx_read(struct bgma break; } + if (len > BGMAC_RX_ALLOC_SIZE) { + bgmac_err(bgmac, "Found oversized packet at slot %d, DMA issue!\n", + ring->start); -+ rx->len = cpu_to_le16(0xdead); -+ rx->flags = cpu_to_le16(0xbeef); ++ kfree(buf); + break; + } + |