From patchwork Tue Jan 28 09:31:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Moulding X-Patchwork-Id: 216574 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C169C33CB3 for ; Tue, 28 Jan 2020 09:31:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DD59D24684 for ; Tue, 28 Jan 2020 09:31:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=me.com header.i=@me.com header.b="2BNpLBez" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726010AbgA1Jbh (ORCPT ); Tue, 28 Jan 2020 04:31:37 -0500 Received: from mr85p00im-hyfv06021401.me.com ([17.58.23.190]:59806 "EHLO mr85p00im-hyfv06021401.me.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725880AbgA1Jbg (ORCPT ); Tue, 28 Jan 2020 04:31:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1580203895; bh=ZMzR/8JyeMhZZOSK2w/eTcj8BsGlPiyEh/fg4/R8wyU=; h=From:To:Subject:Date:Message-Id; b=2BNpLBezHIX45z8YHGyRhXGbHI48jnz20dECPJ7/137afiIKZGCfT/dieEAeSy0yE X3aTPSmHfeC2QpkWkX7gf2CdFylZSepkP59Ooh6IAJHrDsb980bq+NGrm1tJgEOvgk vcQiGEw0sUXvpveaLrSiDRopN6CkXbplTOFgppExnOqPFmu/EaEMGxRYplVI+LIxrH cxNz3Wfn7mDjkiezwkb3N7TRJgSxRP5g5tBJqL44cm2BH2zWttEvIXiLTi5pGW77ZF 3KoEC3e3O7lp+k4gByf1wqz4HYnrYzCcyBAGLZTOW0oqTisIiaoGxSsvnci6E1h1sr csdEdpJSYQK7g== Received: from stitch.danm.net (c-73-98-236-45.hsd1.ut.comcast.net [73.98.236.45]) by mr85p00im-hyfv06021401.me.com (Postfix) with ESMTPSA id 8FD499C07D0; Tue, 28 Jan 2020 09:31:35 +0000 (UTC) From: Dan Moulding To: linux-wireless@vger.kernel.org Cc: johannes.berg@intel.com, emmanuel.grumbach@intel.com, luciano.coelho@intel.com, linuxwifi@intel.com, Dan Moulding Subject: [PATCH v2 5.5] iwlwifi: mvm: Do not require PHY_SKU NVM section for 3168 devices Date: Tue, 28 Jan 2020 02:31:07 -0700 Message-Id: <20200128093107.9740-1-dmoulding@me.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2020-01-28_02:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-2001280078 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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 --- v2: Fixed incorrect commit title in commit references in the commit message drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c b/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c index 46128a2a9c6e..e98ce380c7b9 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c @@ -308,7 +308,8 @@ iwl_parse_nvm_sections(struct iwl_mvm *mvm) } /* 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;