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

Commit b663cd10 authored by Michael Braun's avatar Michael Braun Committed by John W. Linville
Browse files

rt2800usb:fix hang during firmware load



The device 057c:8501 (AVM Fritz! WLAN v2 rev. B) boots into a state that does
not actually require loading a firmware file. The vendors driver finds out
about this by checking a firmware state register, so this patch adds this here.

Finally, with this patch applied, my wifi dongle actually becomes
useful (scan + connect to wpa network works).

Signed-off-by: default avatarMichael Braun <michael-dev@fami-braun.de>
Acked-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent de51b35d
Loading
Loading
Loading
Loading
+7 −2
Original line number Original line Diff line number Diff line
@@ -278,8 +278,13 @@ static int rt2800usb_write_firmware(struct rt2x00_dev *rt2x00dev,
	/*
	/*
	 * Write firmware to device.
	 * Write firmware to device.
	 */
	 */
	if (rt2800usb_autorun_detect(rt2x00dev)) {
		rt2x00_info(rt2x00dev,
			    "Firmware loading not required - NIC in AutoRun mode\n");
	} else {
		rt2x00usb_register_multiwrite(rt2x00dev, FIRMWARE_IMAGE_BASE,
		rt2x00usb_register_multiwrite(rt2x00dev, FIRMWARE_IMAGE_BASE,
					      data + offset, length);
					      data + offset, length);
	}


	rt2x00usb_register_write(rt2x00dev, H2M_MAILBOX_CID, ~0);
	rt2x00usb_register_write(rt2x00dev, H2M_MAILBOX_CID, ~0);
	rt2x00usb_register_write(rt2x00dev, H2M_MAILBOX_STATUS, ~0);
	rt2x00usb_register_write(rt2x00dev, H2M_MAILBOX_STATUS, ~0);