From patchwork Sun Jan 18 19:13:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emmanuel Grumbach X-Patchwork-Id: 5653971 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 26EDAC058D for ; Sun, 18 Jan 2015 19:13:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 514F72035B for ; Sun, 18 Jan 2015 19:13:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6BD4620149 for ; Sun, 18 Jan 2015 19:13:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751677AbbARTNQ (ORCPT ); Sun, 18 Jan 2015 14:13:16 -0500 Received: from mail-la0-f44.google.com ([209.85.215.44]:59765 "EHLO mail-la0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751051AbbARTNP (ORCPT ); Sun, 18 Jan 2015 14:13:15 -0500 Received: by mail-la0-f44.google.com with SMTP id hz20so3327031lab.3; Sun, 18 Jan 2015 11:13:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=CMllQglqzGJzaoNzBEp08LwP9bVHjNQ3s9u9AMzZi5Y=; b=kQeRBxSPExoyM+FXdDmsf7epKsuzjMPv6ajI2jCR5gVTuu/yyie7djhvUTMurceDxl MTV0jOGxFHeWL8Po9Z5AHtspzicnUG3e9g7F2QHGB/SF83D0OftaunaYO3Zlcu1Rjmet BAjHOvx2HIv8dDmqAVzAicgOl3IWGaT6eSmIwV/WzETQl+1TJs9bxK2DWMTqK+BUC1nZ 0669biw/Aof1iG8E2dDMtdzr+x9RacIwsMv4IZRMmQcox3kqmaJ2k0zZVug2qM9K4nT7 DOqJ7vpKXfDu0bM796Qj4bOtdCXD98IDyjXsCTDB2rbNEiMFsghxG5OwSCZvmKof4Flp 1Rbg== MIME-Version: 1.0 X-Received: by 10.112.129.195 with SMTP id ny3mr26419395lbb.10.1421608393839; Sun, 18 Jan 2015 11:13:13 -0800 (PST) Received: by 10.114.233.235 with HTTP; Sun, 18 Jan 2015 11:13:13 -0800 (PST) In-Reply-To: References: <54BBF207.2030708@broadcom.com> Date: Sun, 18 Jan 2015 21:13:13 +0200 Message-ID: Subject: Re: Wireless scanning while turning off the radio problem.. From: Emmanuel Grumbach To: Linus Torvalds Cc: Arend van Spriel , Johannes Berg , David Miller , Linux Wireless List , Network Development Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Sun, Jan 18, 2015 at 8:52 PM, Emmanuel Grumbach wrote: > On Sun, Jan 18, 2015 at 8:40 PM, Linus Torvalds > wrote: >> On Mon, Jan 19, 2015 at 5:48 AM, Arend van Spriel 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: * 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. --- 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 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