Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0250ecec authored by Hans de Goede's avatar Hans de Goede Committed by John W. Linville
Browse files

p54pci: fix bugs in p54p_check_tx_ring

Hans de Goede identified a bug in p54p_check_tx_ring:

there are two ring indices. 1 => tx data and 3 => tx management.
But the old code had a constant "1" and this resulted in spurious
dma unmapping failures.

Cc: stable@kernel.org
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=583623


Bug-Identified-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarChristian Lamparter <chunkeey@googlemail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent fe6f212c
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -245,7 +245,7 @@ static void p54p_check_tx_ring(struct ieee80211_hw *dev, u32 *index,
	u32 idx, i;
	u32 idx, i;


	i = (*index) % ring_limit;
	i = (*index) % ring_limit;
	(*index) = idx = le32_to_cpu(ring_control->device_idx[1]);
	(*index) = idx = le32_to_cpu(ring_control->device_idx[ring_index]);
	idx %= ring_limit;
	idx %= ring_limit;


	while (i != idx) {
	while (i != idx) {