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:
parent
5d932412b0
commit
8f1f2afc00
@ -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 {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user