public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Arend van Spriel <arend@broadcom•com>
To: Linus Torvalds <torvalds@linux-foundation•org>
Cc: Emmanuel Grumbach <egrumbach@gmail•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 19:03:08 +0100	[thread overview]
Message-ID: <54BBF55C.7070704@broadcom.com> (raw)
In-Reply-To: <54BBF207.2030708@broadcom.com>

On 01/18/15 18:48, Arend van Spriel wrote:
> On 01/18/15 17:53, Linus Torvalds wrote:
>> On Sun, Jan 18, 2015 at 11:24 PM, Emmanuel
>> Grumbach<egrumbach@gmail•com> wrote:
>>>
>>> we have different scan flows based on the firmware version you have,
>>> so it would help if you could tell me what firmware you have.
>>
>> Sure. It's the larest one I could find
>>
>> iwlwifi 0000:01:00.0: loaded firmware version 23.11.10.0 op_mode iwlmvm
>>
>> with the actual firmware file being 'iwlwifi-7260-10.ucode' from the
>> current linux-firmware tree.
>>
>> Iin a different email Arend van Spriel<arend@broadcom•com> wrote:
>>>
>>> The function iwl_trans_pcie_stop_device() put device in low-power and
>>> resets the cpu on the device. So iwl_op_mode_hw_rf_kill ends up in
>>> iwl_mvm_set_hw_rfkill_state which schedules cfg80211_rfkill_sync_work
>>> and returns true if firmware is running. The patch below might work.
>>
>> Any suggestions for how to best try to trigger this for testing?
>> Looking at my logs, it turns out that I actually got this three times,
>> but they were all on the same boot, and I think the first case might
>> just have triggered the later ones.
>>
>> The trigger was turning off wifi from the wifi settings app due to
>> being in an airplane when they were closing the doors. I don't *think*
>> there was actually any wifi around at the time, which may or may not
>> have made the scanning take longer and made it easier to trigger.
>>
>> But I've done it before (although this machine has been upgraded to
>> F21 reasonably recently, and I did update the ucode file before the
>> trip). And I did it afterwards to test. And it happened that one time
>> (and then apparently kept happening during suspend/resume/shutdown,
>> but as mentioned, I blame that on some sticky problem from the first
>> time, and those events in turn happened because I couldn't get
>> wireless to work afterwards).
>>
>> IOW, I'm not at all sure I can recreate it, so your "analyzing the
>> source code for how this could happen" may be the only good way..
>
> Your issue occurs when firmware is instructed by user-space, ie.
> wpa_supplicant(?), to do "scheduled scan". This type of scanning is done
> entirely in the device. Typically, this type of scanning is done by
> wpa_supplicant after 3 normal scans in which no configured networks were
> found. The idea is that the host can be idle while the device does the
> scanning and wakes up the host when a configured network is found.
>
> 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.

After a scheduled scan has been set by wpa_supplicant, which is 
difficult to tell from user-space. Checking the nl80211 code it seems 
that kernel sends a netlink event for this so if you run 'iw event' you 
should be able to see the "start_sched_scan" event.

Regards,
Arend

> Regards,
> Arend
> --
> 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

  reply	other threads:[~2015-01-18 18:03 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
     [not found]   ` <CANUX_P0LCr3fzqLyjKQbZ-P2hAV-Nk6=AMm=oFOWCLW34cRg2w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-18 16:53     ` Linus Torvalds
2015-01-18 17:48       ` Arend van Spriel
2015-01-18 18:03         ` Arend van Spriel [this message]
     [not found]         ` <54BBF207.2030708-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2015-01-18 18:40           ` Linus Torvalds
     [not found]             ` <CA+55aFws=-MY+rUsEny=DsBx9gct93BnfeGXSnOCLxEFtvDj8A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-18 18:52               ` Emmanuel Grumbach
     [not found]                 ` <CANUX_P1pmB2PD00N2r2LgjNL4fG6RuTPxsO8G2weU+8EeENPTg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-18 19:13                   ` Emmanuel Grumbach
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=54BBF55C.7070704@broadcom.com \
    --to=arend@broadcom$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=egrumbach@gmail$(echo .)com \
    --cc=johannes@sipsolutions$(echo .)net \
    --cc=linux-wireless@vger$(echo .)kernel.org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=torvalds@linux-foundation$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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