From: Arend van Spriel <arend@broadcom•com>
To: Linus Torvalds <torvalds@linux-foundation•org>
Cc: 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 11:55:37 +0100 [thread overview]
Message-ID: <54BB9129.5010103@broadcom.com> (raw)
In-Reply-To: <CA+55aFyr9LC7oLoJeyFwK4KRURbbUyO63jznTTAkQF+9LBAsfg@mail.gmail.com>
On 01/18/15 04:25, Linus Torvalds wrote:
> So there seems to be some issue with unlucky timing when turning off
> wireless while the driver is busy scanning. I can't reproduce this, so
> it's a one-off, but it's not just ugly warnings, the kernel woudln't
> scan any wireless on that device afterwards and I had to reboot to get
> networking back, so there is some long-term damage.
>
> This is with Intel wireless (iwlwifi, it's a iwl N7260 thing, rev
> 0x144 if anybody cares) , but the warning callbacks don't seem to be
> iwl-specific.
>
> This was a recent top-of-git kernel (3.19.0-rc4-00241-gfc7f0dd38172 to
> be exact).
>
> Anybody have any ideas? Anything in particular I should try out to
> help possibly get more information?
If I am not mistaken the "iwl N7260 thing" is a PCIe device.
iwl_pcie_irq_handler
iwl_trans_pcie_rf_kill
if (iwl_op_mode_hw_rf_kill)
iwl_trans_pcie_stop_device
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.
Regards,
Arend
diff --git a/drivers/net/wireless/iwlwifi/mvm/ops.c
b/drivers/net/wireless/iwlwi
index 97dfba5..685217a 100644
--- a/drivers/net/wireless/iwlwifi/mvm/ops.c
+++ b/drivers/net/wireless/iwlwifi/mvm/ops.c
@@ -779,6 +779,9 @@ static bool iwl_mvm_set_hw_rfkill_state(struct
iwl_op_mode *
if (calibrating)
iwl_abort_notification_waits(&mvm->notif_wait);
+ /* stop scheduled scan */
+ iwl_mvm_scan_offload_stop(mvm, true);
+
/*
* Stop the device if we run OPERATIONAL firmware or if we are
in the
* middle of the calibrations.
next prev parent reply other threads:[~2015-01-18 10:55 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 [this message]
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
[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=54BB9129.5010103@broadcom.com \
--to=arend@broadcom$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--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