Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp704041ybv; Thu, 13 Feb 2020 08:03:48 -0800 (PST) X-Google-Smtp-Source: APXvYqz6fzisWDQTGBzzIS1Zmg0F9RCTfOqjQ0ygny9XcStVGNDsWTigSTQi/f7e1GHcXvklsKAo X-Received: by 2002:a9d:3e43:: with SMTP id h3mr13242493otg.84.1581609828464; Thu, 13 Feb 2020 08:03:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581609828; cv=none; d=google.com; s=arc-20160816; b=wfejiAlt3F+YjVOWNu6aCGCrrxSMnraYC+xcnfouHW6YIQjLoLUEGBDvCU9Bcq25Ug otxVIvbE1c/l4mulMRKrlY24YmtiL0MqIHX6QtRBAWImiwO5qqdX/6qCeXEmaFZsjFJB 3bYFy48OCtCBetfZBn7F8Qr810QKVhQL62d+9ce6GcebmAAMZnd5LEVNf1GXDe2PbOzj a5HjeG9BZebqYHzUsl6uPvIECzXxZu4zGnaaKqHx1OIuVfY+QTV5VAJ6zb4VM2G7H8mY m2Sjz/ZyqtbntfPnIIIICuT68B7OY+3eWYCaOyi+RR2WwcQbSuVdles3m6wD7+zNLhLr eF8w== 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=m80b93/ZTETAvLgEghJA1RlsJENvjmtT+HuQ5hj33jg=; b=ZqHzgnTlKx55xV1GwTkesN4LhxmbbqA4JtqBOotxOvhU4mjz8mVRQBsqwFHPlU3EAh YTG8nhePptIj8/IhquFdNrzTI4LWOAQXn3EkDp4gr2PE+W7KotyG1R54K7M5AlYpB/vk FLZKkV0h+0pqOgKJOJ9k3M/PdAerrS6qOYaWAD/TRYVBSnoPrP5eVwsx3dTGXWXNhO5Q nAIT1GT6jJHpKmDc2SobKWyX3d0z6ueb+Wl0lke1PR1yrIY+v0nRUZ8KB4nxfe05/jh2 rhUXCGKc6QDBvXYauV7z9+3TSZM7pTDU+kUq43SVRSihh6LH0lypDGPJLtS9Bex79DQh +DMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=uznEuYOE; 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 9si1330717ois.90.2020.02.13.08.03.28; Thu, 13 Feb 2020 08:03:48 -0800 (PST) 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=uznEuYOE; 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 S1728835AbgBMQBn (ORCPT + 99 others); Thu, 13 Feb 2020 11:01:43 -0500 Received: from mail.kernel.org ([198.145.29.99]:38542 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727864AbgBMPYi (ORCPT ); Thu, 13 Feb 2020 10:24:38 -0500 Received: from localhost (unknown [104.132.1.104]) (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 9D453246B8; Thu, 13 Feb 2020 15:24:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581607473; bh=eb1UltVrFvwiuZunsalF4EFcmZxE9toebsgbA/VaFy0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uznEuYOEI902yu8BHHLF+uS5sIN0Fj6Z81uOkq2A8Zr90FhYesDQ3CZVVSVNxnCqc mbog5r9rqDg1koYDQVMTUdUfuEnq7jxljbFfG6DpdbLUesRZUe/uN7F++rvTUpBOjK DGMkxGLF5iD29WcdSpumn+xSGQsxTYfkDZxQoMDo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stefan Sperling , Luca Coelho , Sasha Levin Subject: [PATCH 4.14 004/173] iwlwifi: mvm: fix NVM check for 3168 devices Date: Thu, 13 Feb 2020 07:18:27 -0800 Message-Id: <20200213151933.253082365@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200213151931.677980430@linuxfoundation.org> References: <20200213151931.677980430@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: Luca Coelho [ Upstream commit b3f20e098293892388d6a0491d6bbb2efb46fbff ] We had a check on !NVM_EXT and then a check for NVM_SDP in the else block of this if. The else block, obviously, could only be reached if using NVM_EXT, so it would never be NVM_SDP. Fix that by checking whether the nvm_type is IWL_NVM instead of checking for !IWL_NVM_EXT to solve this issue. Reported-by: Stefan Sperling Signed-off-by: Luca Coelho Signed-off-by: Sasha Levin --- drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c b/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c index ca2d66ce84247..8f3032b7174d3 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c @@ -298,7 +298,7 @@ iwl_parse_nvm_sections(struct iwl_mvm *mvm) int regulatory_type; /* Checking for required sections */ - if (mvm->trans->cfg->nvm_type != IWL_NVM_EXT) { + if (mvm->trans->cfg->nvm_type == IWL_NVM) { if (!mvm->nvm_sections[NVM_SECTION_TYPE_SW].data || !mvm->nvm_sections[mvm->cfg->nvm_hw_section_num].data) { IWL_ERR(mvm, "Can't parse empty OTP/NVM sections\n"); -- 2.20.1