mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2025-12-12 15:42:11 -05:00
ar71xx: fix off-by-one error in packet descriptor splitting (patch from #13072)
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 42428
This commit is contained in:
parent
05dd36a980
commit
2da2317fed
@ -704,7 +704,12 @@ static int ag71xx_fill_dma_desc(struct ag71xx_ring *ring, u32 addr, int len)
|
|||||||
|
|
||||||
if (cur_len > split) {
|
if (cur_len > split) {
|
||||||
cur_len = split;
|
cur_len = split;
|
||||||
if (len < split + 4)
|
|
||||||
|
/*
|
||||||
|
* TX will hang if DMA transfers <= 4 bytes,
|
||||||
|
* make sure next segment is more than 4 bytes long.
|
||||||
|
*/
|
||||||
|
if (len <= split + 4)
|
||||||
cur_len -= 4;
|
cur_len -= 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user