From mboxrd@z Thu Jan 1 00:00:00 1970 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=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 E6FB5CA9EC9 for ; Mon, 4 Nov 2019 22:12:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BA5AA214D9 for ; Mon, 4 Nov 2019 22:12:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572905555; bh=Ao8ASdD9CZf78DrIKEabNV1v+VH8aKwvSs13qNzXdkQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=qVmm+lXHJHOYqj2EAa7+EW1DYTMFXYMOc9tjwgMepXlsFouURL9lmaMzcvxgHpls0 Pqx1AD4V9eQm+rxQ2yk2In3k2SRrOo0oZg/v5nYWM2fqAopeuhYiu9sXstBfTedaG8 zKRCwti+2P/yrUlWMgBUUHVWwYL1iVHLopVGan88= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390645AbfKDWLN (ORCPT ); Mon, 4 Nov 2019 17:11:13 -0500 Received: from mail.kernel.org ([198.145.29.99]:44508 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390122AbfKDWLM (ORCPT ); Mon, 4 Nov 2019 17:11:12 -0500 Received: from localhost (6.204-14-84.ripe.coltfrance.com [84.14.204.6]) (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 41718214D9; Mon, 4 Nov 2019 22:11:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572905471; bh=Ao8ASdD9CZf78DrIKEabNV1v+VH8aKwvSs13qNzXdkQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WVbbC5Eww0qeGfWhqz9VRn5bi5kmZg9dM9q5u8bvePxy33pYCZP++e/lbWKTgaW0p 1QVcuwcb9VWhi7wea3TRPIgTdOg/jjdx2bBDOkrSZCuxHqkJ2GXIZiouQUY+NpT4OA nWGqgJBQzoxBF3HKzQUlOC6dyFoQJQu2AX/hspEY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Luca Coelho Subject: [PATCH 5.3 157/163] iwlwifi: exclude GEO SAR support for 3168 Date: Mon, 4 Nov 2019 22:45:47 +0100 Message-Id: <20191104212151.635874148@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191104212140.046021995@linuxfoundation.org> References: <20191104212140.046021995@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Luca Coelho commit 12e36d98d3e5acf5fc57774e0a15906d55f30cb9 upstream. We currently support two NICs in FW version 29, namely 7265D and 3168. Out of these, only 7265D supports GEO SAR, so adjust the function that checks for it accordingly. Signed-off-by: Luca Coelho Fixes: f5a47fae6aa3 ("iwlwifi: mvm: fix version check for GEO_TX_POWER_LIMIT support") Signed-off-by: Luca Coelho Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c @@ -887,15 +887,17 @@ static bool iwl_mvm_sar_geo_support(stru * firmware versions. Unfortunately, we don't have a TLV API * flag to rely on, so rely on the major version which is in * the first byte of ucode_ver. This was implemented - * initially on version 38 and then backported to29 and 17. - * The intention was to have it in 36 as well, but not all - * 8000 family got this feature enabled. The 8000 family is - * the only one using version 36, so skip this version - * entirely. + * initially on version 38 and then backported to 17. It was + * also backported to 29, but only for 7265D devices. The + * intention was to have it in 36 as well, but not all 8000 + * family got this feature enabled. The 8000 family is the + * only one using version 36, so skip this version entirely. */ return IWL_UCODE_SERIAL(mvm->fw->ucode_ver) >= 38 || - IWL_UCODE_SERIAL(mvm->fw->ucode_ver) == 29 || - IWL_UCODE_SERIAL(mvm->fw->ucode_ver) == 17; + IWL_UCODE_SERIAL(mvm->fw->ucode_ver) == 17 || + (IWL_UCODE_SERIAL(mvm->fw->ucode_ver) == 29 && + ((mvm->trans->hw_rev & CSR_HW_REV_TYPE_MSK) == + CSR_HW_REV_TYPE_7265D)); } int iwl_mvm_get_sar_geo_profile(struct iwl_mvm *mvm)