ramips: net/mediatek fix logical error

fe_empty_txd() should return `tx_ring_size - 1` on ring empty, and
return 0 on ring full.

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
This commit is contained in:
Chen Minqiang 2020-03-19 15:56:08 +08:00 committed by CN_SZTL
parent 5d932412b0
commit 8f1f2afc00
No known key found for this signature in database
GPG Key ID: 6850B6345C862176

View File

@ -564,7 +564,7 @@ static inline u32 fe_empty_txd(struct fe_tx_ring *ring)
barrier();
return (u32)(ring->tx_ring_size -
((ring->tx_next_idx - ring->tx_free_idx) &
(ring->tx_ring_size - 1)));
(ring->tx_ring_size - 1)) - 1);
}
struct fe_map_state {