Received: by 2002:a25:d783:0:0:0:0:0 with SMTP id o125csp658047ybg; Thu, 19 Mar 2020 06:32:17 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvsDA6urR84jOrIa8vuusk0Zy5bvKZDYWhN7v/xs/K4lqsk01Q2gSqng9/+x6QbfEf1HO8k X-Received: by 2002:a9d:1708:: with SMTP id i8mr2322375ota.250.1584624737440; Thu, 19 Mar 2020 06:32:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584624737; cv=none; d=google.com; s=arc-20160816; b=VM8rGNJg/X+2eqGxHyZ8X6xPdBrotce/PtuPQwOZa5TsN8IFEYPDSJXGmSNnu66bM8 k/itmyxDnDxTxam0XVxijwxGzsgYC/I7WPuaczyGfRCBw129TA+l50OGwD+Ker59zJ3x QxdiCc5sC8ouNU1yd76GXdKX7IHR0pvDkfX8yC04l+11tXFv/LWu3dDF6nc4R/Rz6Xoa afesgrDB01sl43ZcdIOME+R9VST6BMQ45EdCm5H8Ipj05zeeUs/qXd/m+DJSW8Fm+CW7 1P6PZKwJgykft3/+TMMaNMal6kl374+RiIma6p9WiYWzGZNCgFM12e9YbHVv0lc8Fm4k pS/Q== 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=kUdzWFRrq5fCWXv4wvKd9COxPvfdq/qsMbu7BDGMEAo=; b=sWA4GPtq3ky7eAvaZGuY0vjdc8GMH1CsuV0Q2zDsrJb7lj2HmJB9jfDCuC4CihBB5Q tVN1F5k8Y10ucaRn5FRMxr4bnc5hF9ga9AF1ULNUEJUoWhLypiZfFecK5Z4EBs2yhNFZ AqvSZb8h7UFK4ybn4+9LS2NHnkQOaYL1gIojkDvmfICzteO8HtSjSytlX9h51+3b4Kpg vqk+bSVN5gQzDKKcDm/VB2WcF/DjTBMyOZHmB76Vhu/CwnyK1Et5TDQJn0esn1LG2Kde wSnpwFBj5pD+qF+gHp+IS5uvj/bdKAnNh/QKYIdbjEmAI/vkRVK/yE9I5w9AtOlPJghd do+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="uQ/4Qneb"; 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 x26si1163218otq.220.2020.03.19.06.32.04; Thu, 19 Mar 2020 06:32:17 -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="uQ/4Qneb"; 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 S1729627AbgCSNRW (ORCPT + 99 others); Thu, 19 Mar 2020 09:17:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:38470 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729622AbgCSNRT (ORCPT ); Thu, 19 Mar 2020 09:17:19 -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 5DDDB21775; Thu, 19 Mar 2020 13:17:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584623838; bh=+d8ajJzWO100hATUUE+6j7BLWE9UwVheTuluFvGV3IM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uQ/4QnebPSIxX53wNWnAybJUwiC897iCRWc+rWQiA5ytcDfNnHkD0k5cG5lokqP4o BZos7ivQGWyRnNc0J6uQp/zeX02Wh063VuVPFJ6KIRA0k62F4zKzWzlnow+a2FrvUJ OVg54x4TcFBqj7AARfLIOb+/sfaz+Txnusi0WYDw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Moulding , Kalle Valo Subject: [PATCH 4.14 39/99] iwlwifi: mvm: Do not require PHY_SKU NVM section for 3168 devices Date: Thu, 19 Mar 2020 14:03:17 +0100 Message-Id: <20200319123953.604920974@linuxfoundation.org> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200319123941.630731708@linuxfoundation.org> References: <20200319123941.630731708@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: Dan Moulding commit a9149d243f259ad8f02b1e23dfe8ba06128f15e1 upstream. The logic for checking required NVM sections was recently fixed in commit b3f20e098293 ("iwlwifi: mvm: fix NVM check for 3168 devices"). However, with that fixed the else is now taken for 3168 devices and within the else clause there is a mandatory check for the PHY_SKU section. This causes the parsing to fail for 3168 devices. The PHY_SKU section is really only mandatory for the IWL_NVM_EXT layout (the phy_sku parameter of iwl_parse_nvm_data is only used when the NVM type is IWL_NVM_EXT). So this changes the PHY_SKU section check so that it's only mandatory for IWL_NVM_EXT. Fixes: b3f20e098293 ("iwlwifi: mvm: fix NVM check for 3168 devices") Signed-off-by: Dan Moulding Signed-off-by: Kalle Valo Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c @@ -326,7 +326,8 @@ iwl_parse_nvm_sections(struct iwl_mvm *m } /* PHY_SKU section is mandatory in B0 */ - if (!mvm->nvm_sections[NVM_SECTION_TYPE_PHY_SKU].data) { + if (mvm->trans->cfg->nvm_type == IWL_NVM_EXT && + !mvm->nvm_sections[NVM_SECTION_TYPE_PHY_SKU].data) { IWL_ERR(mvm, "Can't parse phy_sku in B0, empty sections\n"); return NULL;