Re: [1/3] rt2x00usb: initialize the read value in case of failure
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: 2015-03-17 08:34:17
* Sebastian Andrzej Siewior | 2015-03-16 17:41:00 [+0100]: Just an update: …
|ieee80211 phy0: rt2800usb_write_firmware: Info - Firmware loading not required - NIC in AutoRun mode |IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready |IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready switch to AP mode done. And this should be where it switches back to managed mode |ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x06 failed for offset 0x3200 with error -110 val: 0 type 40 |ieee80211 phy0: rt2800usb_write_firmware: Info - Firmware is written.
so the difference is that I don't see "NIC in AutoRun mode". So rt2800usb_autorun_detect() does not return 1 for some reason but 0 instead and whatever comes next kills the stick. Maybe it was tired of of the wpa <-> hostapd mode switch for no reason. So I told rt2800usb_autorun_detect() to always return 1 and not to care what the stick says. The stick now runs for 12.5h in test without a problem (that means it is able to connect to the AP and hostapd does not complain, too). After around 11h I saw the message that it would write the firmware (but it got ignored instead). So the workaround seems to work. I have no idea what AutoRun mode is (it seems that the stick already has a firmware and is happy with it) and I have no clue why the firmware decides to lie about it. I looked at the vendor driver I found at github (which seems to be from 2012-10-22, DPO_RT5572_LinuxSTA_2.6.1.3) and well, I look again if someone says it is worth looking… They seem to do some kind "firmware is comming" magic which might be already done in the current driver at a different spot but I think the main question is why request is answered wrong. I *think* the vendor driver sends the USB_MODE_AUTORUN request only once but it is hard to tell…
quoted
Kalle Valo
Sebastian