Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1067896ybl; Wed, 14 Aug 2019 10:11:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqwgao9G80gNH1f7SafHRcyKoQQcvBEYgrofIEFdovgkKzete6XGAizkLsOv5bzc8ZMFl3a4 X-Received: by 2002:a17:90a:5806:: with SMTP id h6mr714963pji.126.1565802664527; Wed, 14 Aug 2019 10:11:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565802664; cv=none; d=google.com; s=arc-20160816; b=IgCGfD5p/1EITCmPDkjW5TRRqTIclti+C7Bq97VDGaDQNhuIaZz8CLdLs8cC0XbxQ2 /eUFihNH5WiEp5r3dMTBT9MFaAlafv4H5RU2nU8/jzCL0O/iNtNazTCYm6c3u5Zy+lxI UTRE/LDLtvBawYNVUOyNC3BKsH4ZAXoR+LnHqlQ49XDp+Xj7tdj7z/ZwZLldqiuDLhDX SXiE3Z8FbHgnUTjRnwPm4mF2rXQARXQIHvulajqbA9qyQ0Pl9hAHpdfRS7QnmxgVjcqW zIco2kIMA0vyJvHErQNV2E22tC8n2P4XKF9k7hyXc1w2JM3dOsFI14dCAFPpAq4k2AOX 53ow== 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=kPGS7HnRxe3DNK2vB09YIHP5uOQrCDqu4hJnVHRH/7I=; b=ZLhsb6WOhaHaxwnOwcNhBwVLdhqJeOyRX7xqlTNPsWuYn8xKlXAasiHzxNrCN9SiHG 6E0ak465eLNXB2jkELoQVQm3QlLQd6HxJOirqo48NCzgemKDOkO6xIaZOI4RvNc1jjD6 l08eKJHUebiJqLArvh9HiZsYzLJrCwCDt561DMoYLezMsLS3WLlD7KeGrgqYiwh8dW4F 8Lc8jtX9yWj4RkwSAUDQ8RzQ4AsajgB1bocPtGRpNKfDqsDpJupV7mAwFv0lNzpidPNa ih2j0Yg/7h5XRGVKDln0umnSbQR+jvlxEpkWx28xnUsPxxWzV9XBXxbFcgZxccJV8hb+ gDGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Qmzje68T; 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 x6si169456pgq.473.2019.08.14.10.10.46; Wed, 14 Aug 2019 10:11:04 -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=Qmzje68T; 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 S1730153AbfHNRI3 (ORCPT + 99 others); Wed, 14 Aug 2019 13:08:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:58424 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729640AbfHNRIY (ORCPT ); Wed, 14 Aug 2019 13:08:24 -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 A017E2084D; Wed, 14 Aug 2019 17:08:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565802503; bh=P7Rjrz7bA+AxUUjdjRu62QFk1gGz/UCPmO33bcqzB7A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qmzje68TAOi2Zo65Tzxq/6oxjs5XFoEoKtDegdD7ZASXD2mq9Ck4eVmVQzC7XDyq/ gmQwdC36HtW7FGNqlhusUTp2ljNxZ9WvpCJwwFEM8YbqRZyT2LqO+Y6cPokYT2LUN5 WctvAVNOYFLyAcYa//1+vI0li/Yz3MdcUMAE/B30= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Luca Coelho , Johannes Berg Subject: [PATCH 5.2 144/144] iwlwifi: mvm: fix version check for GEO_TX_POWER_LIMIT support Date: Wed, 14 Aug 2019 19:01:40 +0200 Message-Id: <20190814165805.991434750@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190814165759.466811854@linuxfoundation.org> References: <20190814165759.466811854@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 @@ -880,9 +880,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)