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

Commit 01fbd4ec authored by Stanislaw Gruszka's avatar Stanislaw Gruszka Committed by Kalle Valo
Browse files

rt2800usb: check Autorun mode on FW load only once



Seems H/W report correctly firmware Autorun value only at initialization
stage. When we close interface and open it again, Autorun value is 0 and
we try to load firmware what kills the device. To fix clear
REQUIRE_FIRMWARE firmware flag, to do not load firmware again, once we
discover Autorun mode.

Reported-and-tested-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 44a89c82
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -293,6 +293,7 @@ static int rt2800usb_write_firmware(struct rt2x00_dev *rt2x00dev,
	if (retval) {
		rt2x00_info(rt2x00dev,
			    "Firmware loading not required - NIC in AutoRun mode\n");
		__clear_bit(REQUIRE_FIRMWARE, &rt2x00dev->cap_flags);
	} else {
		rt2x00usb_register_multiwrite(rt2x00dev, FIRMWARE_IMAGE_BASE,
					      data + offset, length);