Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9938487ybi; Wed, 24 Jul 2019 12:40:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqzRnpOiYTc+0nadS0tsbEVxS+i3Kfk9yXQpprvolx9M8pgp6i0250SHrqM57RTSeTIFrBC0 X-Received: by 2002:a17:90a:36e4:: with SMTP id t91mr86229810pjb.22.1563997253372; Wed, 24 Jul 2019 12:40:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563997253; cv=none; d=google.com; s=arc-20160816; b=ceY7PJAkpgAbs0v9d+tLZqm5s374q7jZ5o2tEZnurAjuKE9+cJzS9KF6rdSeDZIG9w l6ldq2Fm4V28WSMbXr2OtY9DKYHPeOlfmYt80l7irq72o+dIT/gcoHYOqC11iV30wj0G F8FFSk0WZgcfQMZuL/UzrhOdKupiFQA6j3w6GBqcg7OdhWKbtAEBOSD5D6YYCTEm4us6 sPpIxYtpAhCB+D3Uh3CSnX7O+WOH8ASxVMaSU63Hx0Kdj1xpmcHOHNle1iRuCTKt/LqC EnJlIOWzRvWBaC1yHF4FkZ2/pud7hgL659hgQJ6rVZNzmO5Rluy+ihn4TH7DDIXzxnq7 UnfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=q8gH/g/WXbXdUvm+6gh4xW+6eQepCloHRMHuxx9IG1U=; b=A046ugI6DLLmQ3xubdNFdywa/56fkH00zZUGdG22XAVNjQEAfaB8OBqazAXrgiJAbo Mcw3Wk7yvvhb5By8/C+OggC3qKntazFt0K1qoLAaES/btFngyay2qE/YM21gzw3Aj+fb voje8epB5tv/UwaygwD/gRc9BFzKhQYSNcHr6GvlS3MLB7kZjkJztGYlUnWed7a8kChe YLq7iir90T93ULRyUKhIDvmhvbjiifQgiKQ6c1mC8++8g2WlpFzy5GLDlGBHyfDAN7tm FKJrVcNsWmDWHUBpYXwk73gqUAG9aK1XApUzFMBIQ3t0YPTfcS5L09/IQ7cvTj/bXq4W j54A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iS9zQjSF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x9si16479646plo.98.2019.07.24.12.40.39; Wed, 24 Jul 2019 12:40:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iS9zQjSF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389919AbfGXTjY (ORCPT + 99 others); Wed, 24 Jul 2019 15:39:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:40382 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389300AbfGXTjW (ORCPT ); Wed, 24 Jul 2019 15:39:22 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B2B7F22ADB; Wed, 24 Jul 2019 19:39:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563997162; bh=CPNZ+QSf1n22rncsUpD/LvnhCTo6fBi49pfftRYaJgI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iS9zQjSF0fVwSE/OVa8N2eQtNYewqYNjsU9ixzSLjcGc1dfpNUfcn55NYPLylqElj 7OoevIWcQW2LgNwK6++chWDIiYLxIpzkebngHlmwCNPq3dzUUFSMC2jD67nvQyIB7C zgSXPcbTnsdZo/MpUdmZbv2VuUmXdD8wIYiOPSnA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Emmanuel Grumbach , Luca Coelho Subject: [PATCH 5.2 300/413] iwlwifi: mvm: clear rfkill_safe_init_done when we start the firmware Date: Wed, 24 Jul 2019 21:19:51 +0200 Message-Id: <20190724191757.431975096@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191735.096702571@linuxfoundation.org> References: <20190724191735.096702571@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Emmanuel Grumbach commit 940225628652b340b2bfe99f42f3d2db9fd9ce6c upstream. Otherwise it'll stay set forever which is clearly buggy. Cc: stable@vger.kernel.org Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c @@ -419,6 +419,8 @@ static int iwl_run_unified_mvm_ucode(str lockdep_assert_held(&mvm->mutex); + mvm->rfkill_safe_init_done = false; + iwl_init_notification_wait(&mvm->notif_wait, &init_wait, init_complete, @@ -537,8 +539,7 @@ int iwl_run_init_mvm_ucode(struct iwl_mv lockdep_assert_held(&mvm->mutex); - if (WARN_ON_ONCE(mvm->rfkill_safe_init_done)) - return 0; + mvm->rfkill_safe_init_done = false; iwl_init_notification_wait(&mvm->notif_wait, &calib_wait, @@ -1108,10 +1109,13 @@ static int iwl_mvm_load_rt_fw(struct iwl iwl_fw_dbg_apply_point(&mvm->fwrt, IWL_FW_INI_APPLY_EARLY); + mvm->rfkill_safe_init_done = false; ret = iwl_mvm_load_ucode_wait_alive(mvm, IWL_UCODE_REGULAR); if (ret) return ret; + mvm->rfkill_safe_init_done = true; + iwl_fw_dbg_apply_point(&mvm->fwrt, IWL_FW_INI_APPLY_AFTER_ALIVE); return iwl_init_paging(&mvm->fwrt, mvm->fwrt.cur_fw_img);