From: Emmanuel Grumbach <egrumbach@gmail.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Arend van Spriel <arend@broadcom.com>,
Johannes Berg <johannes@sipsolutions.net>,
David Miller <davem@davemloft.net>,
Linux Wireless List <linux-wireless@vger.kernel.org>,
Network Development <netdev@vger.kernel.org>
Subject: Re: Wireless scanning while turning off the radio problem..
Date: Sun, 18 Jan 2015 21:13:13 +0200 [thread overview]
Message-ID: <CANUX_P3kv5ofQJLGyEvRSgetHg=TJsaVennLJWq3ummgRJHWgg@mail.gmail.com> (raw)
In-Reply-To: <CANUX_P1pmB2PD00N2r2LgjNL4fG6RuTPxsO8G2weU+8EeENPTg@mail.gmail.com>
On Sun, Jan 18, 2015 at 8:52 PM, Emmanuel Grumbach <egrumbach@gmail.com> wrote:
> On Sun, Jan 18, 2015 at 8:40 PM, Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
>> On Mon, Jan 19, 2015 at 5:48 AM, Arend van Spriel <arend@broadcom.com> wrote:
>>>
>>> So as you indicated you were in location where none of your configured
>>> networks were available. Flipping the rfkill switch in that situation is the
>>> way to trigger the issue.
>>
>> So you certainly seem to be able to explain the behavior I saw under
>> the circumstances they happened.
>>
>> I suspect the best thing to do is to just apply your patch. I may not
>> be able to really test it much for the next few days anyway. Emmanuel?
>>
>
> Sorry - I was a bit busy.
> The patch seems wrong, we can't really call that function from the
> rfkill interrupt - it will blow up.
> The good news is that I could reproduce the bug based on what Arend
> pointed. I totally missed the fact
> that it was scheduled scan - thanks Arend for that.
>
> So the system I have here doesn't have HW rfkill so I had to implement
> a hook that fakes it,
> but I can't reproduce the problem.
> I'll come up with a patch.
Ok - Here is the patch:
diff --git a/drivers/net/wireless/iwlwifi/mvm/ops.c
b/drivers/net/wireless/iwlwifi/mvm/ops.c
index 384eefd..bbd8054 100644
--- a/drivers/net/wireless/iwlwifi/mvm/ops.c
+++ b/drivers/net/wireless/iwlwifi/mvm/ops.c
@@ -867,6 +867,9 @@ static bool iwl_mvm_set_hw_rfkill_state(struct
iwl_op_mode *op_mode, bool state)
if (calibrating)
iwl_abort_notification_waits(&mvm->notif_wait);
+ if (state)
+ mvm->scan_status = IWL_MVM_SCAN_NONE;
+
/*
* Stop the device if we run OPERATIONAL firmware or if we are in the
* middle of the calibrations.
I will send that for internal review, because I am not all that much
familiar with this and I want the guy who wrote that code to take a
look before I send a pull request, but that should help.
In any case, Linus, until you get the fix (which should be sent to
upstream in 12 hours) you can restart the whole wifi stack instead of
rebooting:
sudo modprobe -r iwlwifi
sudo modprobe iwlwifi
sudo killall wpa_supplicant
that should bring your wifi back without the need to reboot.
next prev parent reply other threads:[~2015-01-18 19:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-18 3:25 Wireless scanning while turning off the radio problem Linus Torvalds
2015-01-18 10:55 ` Arend van Spriel
2015-01-18 11:24 ` Emmanuel Grumbach
2015-01-18 16:53 ` Linus Torvalds
2015-01-18 17:48 ` Arend van Spriel
2015-01-18 18:03 ` Arend van Spriel
2015-01-18 18:40 ` Linus Torvalds
2015-01-18 18:52 ` Emmanuel Grumbach
2015-01-18 19:13 ` Emmanuel Grumbach [this message]
2015-01-18 19:41 ` Emmanuel Grumbach
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='CANUX_P3kv5ofQJLGyEvRSgetHg=TJsaVennLJWq3ummgRJHWgg@mail.gmail.com' \
--to=egrumbach@gmail.com \
--cc=arend@broadcom.com \
--cc=davem@davemloft.net \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).