Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1077405ybl; Wed, 14 Aug 2019 10:19:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqz2gc7g9WNhvPqxMahxJuyE+n59imteG42CVHYpBakXlULtZP0Dbm1h4DPXJ4G/XlYRLL9+ X-Received: by 2002:a63:fe15:: with SMTP id p21mr210423pgh.149.1565803172028; Wed, 14 Aug 2019 10:19:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565803172; cv=none; d=google.com; s=arc-20160816; b=lWtqFlRjC9qBBNb+pNGh3eVa/cYYOdb11R5Op8iEQZjZgOcvilWBvCmgLnHnPePQFF 1QeuV3i9vHu5DDkU1yguOqhiV7q3RIMfKkyR3U4cbFeWlhmOpikkSpNtFV+4/6Xtb0Eh OaedTuBgcExrTMnt9rEkmwh/CwMT4yVohSaegkUCmovnG6t2piJnQPJxQp5RDPju7YbF FfN8/2OBdFiQK5gQLjv16Hu1GQamStP4z+n1Y5AvEqAICxR0GDPEGPV/bmMjdKztC5LG r5x6SHsG0oOjcNkZaov7fWUs29dyZSjMG5gLEXE3d1uxyqLrwbf3rPACBiUjOfPtoXDY ILwg== 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=fx6v798NrBkln3CF6C5CCJNie2SEcVi/udXEBbC1xFk=; b=kNFWh3kTh+XiwiBO4nWsKqj4KPU9w1ihLwfDTfUtjBmIQK+Qf89GMNNQ7Q3RF1YFeK RKzgtxaBZOaG+RglCy/DddAuufgzxPboQG0swhX+crCV+YTabrEMjsSeDCdyEZS++/Yg gR0g0veXnXKSOc/eH2VtNELO2tyXm95jU7VGQj5DHRJs2YDfiF1DfHgy0CSYXaoIWlLc Cc+fnsaabb6LfusY3H+D1aM1GAzgQBbJ81rf7b2qezN6ALx/g2FGcMOgZsw8WbFsn7Zg Af5EfONPEsp0+kCxgA0UgKQtNLyjCyb/fhdktekOlLXQdNWyQ1glMLS+Z0q97m+kAohq tzeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="M35/YSc6"; 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 c127si90579pfa.20.2019.08.14.10.19.16; Wed, 14 Aug 2019 10:19:32 -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="M35/YSc6"; 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 S1730717AbfHNRMX (ORCPT + 99 others); Wed, 14 Aug 2019 13:12:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:36176 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730551AbfHNRMW (ORCPT ); Wed, 14 Aug 2019 13:12: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 C28192063F; Wed, 14 Aug 2019 17:12:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565802741; bh=KeKCSgAh3NEDkvNfRegDeeVn1rxpXFc1KArvuGXMxSo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M35/YSc6y8QfmY69ubKF6nm9WBUpoiqln9O1xOiwQiwYo53aqnydEHuSiW6rewPPb k33x3aTK2Jv0u3cFOl+kF8VhQbXkxy7WnIaCQtNj4kQL5CNSckzQsZqhfrhdt4GLP5 fy2PmpQMTA89jddplNMyGEJUPLMVRgStIsUO3LbQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Luca Coelho , Johannes Berg Subject: [PATCH 4.19 91/91] iwlwifi: mvm: fix version check for GEO_TX_POWER_LIMIT support Date: Wed, 14 Aug 2019 19:01:54 +0200 Message-Id: <20190814165754.169260155@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190814165748.991235624@linuxfoundation.org> References: <20190814165748.991235624@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 commit f5a47fae6aa3eb06f100e701d2342ee56b857bee upstream. We erroneously added a check for FW API version 41 before sending GEO_TX_POWER_LIMIT, but this was already implemented in version 38. Additionally, it was cherry-picked to older versions, namely 17, 26 and 29, so check for those as well. Cc: stable@vger.kernel.org Fixes: eca1e56ceedd ("iwlwifi: mvm: don't send GEO_TX_POWER_LIMIT to old firmwares") Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c @@ -842,9 +842,14 @@ static bool iwl_mvm_sar_geo_support(stru * The GEO_TX_POWER_LIMIT command is not supported on earlier * 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. + * the first byte of ucode_ver. This was implemented + * initially on version 38 and then backported to 36, 29 and + * 17. */ - return IWL_UCODE_SERIAL(mvm->fw->ucode_ver) >= 41; + return IWL_UCODE_SERIAL(mvm->fw->ucode_ver) >= 38 || + IWL_UCODE_SERIAL(mvm->fw->ucode_ver) == 36 || + IWL_UCODE_SERIAL(mvm->fw->ucode_ver) == 29 || + IWL_UCODE_SERIAL(mvm->fw->ucode_ver) == 17; } int iwl_mvm_get_sar_geo_profile(struct iwl_mvm *mvm)