All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Kalle Valo <kvalo@codeaurora.org>
Cc: linux-wireless@vger.kernel.org,
	Stanislaw Gruszka <sgruszka@redhat.com>,
	Helmut Schaa <helmut.schaa@googlemail.com>
Subject: Re: [1/3] rt2x00usb: initialize the read value in case of failure
Date: Tue, 17 Mar 2015 09:34:14 +0100	[thread overview]
Message-ID: <20150317083414.GA1276@linutronix.de> (raw)
In-Reply-To: <20150316164100.GA6208@linutronix.de>

* 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…

>>Kalle Valo

Sebastian

  reply	other threads:[~2015-03-17  8:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-12 14:35 [PATCH 1/3] rt2x00usb: initialize the read value in case of failure Sebastian Andrzej Siewior
2015-03-12 14:35 ` [PATCH 2/3] rt2x00usb: check USB's request error code in rt2800usb_autorun_detect() Sebastian Andrzej Siewior
2015-03-12 14:35 ` [PATCH 3/3] rt2x00usb: drop rt2x00usb_disable_radio() from rt2800usb_disable_radio() Sebastian Andrzej Siewior
2015-03-16 16:06 ` [1/3] rt2x00usb: initialize the read value in case of failure Kalle Valo
2015-03-16 16:41   ` Sebastian Andrzej Siewior
2015-03-17  8:34     ` Sebastian Andrzej Siewior [this message]
2015-03-18 13:11       ` Stanislaw Gruszka
2015-03-19 13:24         ` Sebastian Andrzej Siewior
2015-03-19 14:30           ` Stanislaw Gruszka
2015-03-19 14:32           ` [PATCH] rt2800usb: check Autorun mode on FW load only once Stanislaw Gruszka
2015-03-30  8:29             ` Kalle Valo
2015-03-18 12:48     ` [1/3] rt2x00usb: initialize the read value in case of failure Stanislaw Gruszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150317083414.GA1276@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=helmut.schaa@googlemail.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=sgruszka@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.