Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1074683ybl; Wed, 14 Aug 2019 10:17:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqzPilccc2VOjYtKkprLTg14MatR+/UOd92SGMVe3T3m++twJmACJ+NPxKRA1BCNjFiYJ+7F X-Received: by 2002:a63:b20f:: with SMTP id x15mr189008pge.453.1565803023060; Wed, 14 Aug 2019 10:17:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565803023; cv=none; d=google.com; s=arc-20160816; b=OW4orL9w6YymhNm0Thz4NUTSifC15zO2ffkaOylokk2Jyv7HdIwMxxZXdyxcsUDA3Q GNf+ki1U3O+G5bX0YzSlMeqxYyQvA+C1t3d/rGIj1dSFBaCzwR6sXVtrgGUhu+rVM5dF HNWgNqX44Z5yh1BCSl1uAe5DiaRY93g8JtW4w37AKgQZpZ68SzcepkFe+i4MHKH2Jp/p bYsn7VIJNwPfTWkwpPaJ0SoBs3bYjsV9qYc/maC/kvFotCheusMhyIkfaLoEzaXz8A9u XVWnnll838ap/nykfXFEMl0KEGh8oDem8L+ghPYliEdqlPWGwj4jFN5rYznpnN9BlfDd 4tpA== 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=xF7TiXJ58Rz/5z9u3enL534TmM/ShQE6pEN/CAW+jhw=; b=PAsUt9AkUVikQ4/+Hh4ICv6l4N2VXfIkT5B+qVa1Ef2dms2UVQx2nH00XXQNeMNlHJ SiS/Bv3g1VrhyAp/k9eZr5tLmlhKNyZxakJwP9g5X0xKLoo2FcBSrEerjEpSqU+/rT5P DW70wfnUNo9oi1IEjlukllhDyug0TbXSMpUpQDSGIBUwCH3ZItfD30HbLsOdwUf/waMW YVjat132IfuvK+DQIE+YFMLFz6qYJNRiD1JHpx9PrvMwqLK3Z0W4QltnhtGszySp9RPT tB33fbBZTBaMM8d0dJ9XsCr8WiiPmXBGDBO0vD76O+4fzsM3VfrV8WxnL5d3mx4bq2By XEVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KHrdnBTR; 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 15si180149pgu.98.2019.08.14.10.16.47; Wed, 14 Aug 2019 10:17:03 -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=KHrdnBTR; 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 S1731169AbfHNRPD (ORCPT + 99 others); Wed, 14 Aug 2019 13:15:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:39502 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731168AbfHNRPB (ORCPT ); Wed, 14 Aug 2019 13:15:01 -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 F34C62063F; Wed, 14 Aug 2019 17:14:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565802900; bh=6qaoOe8w84kCMNHwy88DLxm7MP/SLZzakylh+6ItMX0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KHrdnBTRz74r6hWLHKmLS0oVf1E7QqUrbzF64RDQdNe8c37chSqIeU3M/tsJX1oW/ fg8q13mxoKFn0qIs4pMX1jSqSiFap7aEb3vNMP5J4xKvwkMIAZMXfHETP8AgIucPsE tQ1y9rTUjaHEjR5FRciCKVRxePZaLcvjxkqzq2Oo= 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.14 69/69] iwlwifi: mvm: fix version check for GEO_TX_POWER_LIMIT support Date: Wed, 14 Aug 2019 19:02:07 +0200 Message-Id: <20190814165750.561342853@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190814165744.822314328@linuxfoundation.org> References: <20190814165744.822314328@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 @@ -918,9 +918,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)