diff mbox

rt2800usb: check Autorun mode on FW load only once

Message ID 20150319143249.GB2516@redhat.com (mailing list archive)
State Accepted
Delegated to: Kalle Valo
Headers show

Commit Message

Stanislaw Gruszka March 19, 2015, 2:32 p.m. UTC
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: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
 drivers/net/wireless/rt2x00/rt2800usb.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Kalle Valo March 30, 2015, 8:29 a.m. UTC | #1
> 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: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>

Thanks, applied to wireless-drivers-next.git.

Kalle Valo
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index 9a2f44a..3a6cae8 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -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);