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=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS 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 64665C2BB1D for ; Tue, 17 Mar 2020 10:21:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3E1BF20658 for ; Tue, 17 Mar 2020 10:21:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726084AbgCQKVi (ORCPT ); Tue, 17 Mar 2020 06:21:38 -0400 Received: from paleale.coelho.fi ([176.9.41.70]:34442 "EHLO farmhouse.coelho.fi" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725730AbgCQKVi (ORCPT ); Tue, 17 Mar 2020 06:21:38 -0400 Received: from 91-156-6-193.elisa-laajakaista.fi ([91.156.6.193] helo=redipa) by farmhouse.coelho.fi with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.92.2) (envelope-from ) id 1jE9Lq-0003Wc-Sl; Tue, 17 Mar 2020 12:21:35 +0200 Message-ID: <88e116237ccfb75e0e37f0659448a099df2be7c2.camel@coelho.fi> From: Luca Coelho To: Jonathan McDowell , linux-wireless@vger.kernel.org Cc: Intel Linux Wireless , Ihab Zhaika , johannes.berg@intel.com, emmanuel.grumbach@intel.com, linux-kernel@vger.kernel.org Date: Tue, 17 Mar 2020 12:21:33 +0200 In-Reply-To: <20200314105700.GM311@earth.li> References: <20200314105700.GM311@earth.li> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.1-4 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH] iwlwifi: mvm: Avoid use of GEO_TX_POWER_LIMIT when not supported Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Sat, 2020-03-14 at 10:57 +0000, Jonathan McDowell wrote: > Commit 39c1a9728f93 refactored the SAR table support and inadvertently > added a call to GEO_TX_POWER_LIMIT without checking that the firmware > supported it. This caused a regression for device + firmware > combinations lacking the support. Add a check in iwl_mvm_sar_init to > prevent this. > > Fixes: 39c1a9728f93 (iwlwifi: refactor the SAR tables from mvm to acpi) > Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=206395 > Cc: stable@vger.kernel.org # 5.5 > Signed-Off-By: Jonathan McDowell > > diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c > index 54c094e88474..4a8a4cb2c553 100644 > --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c > +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c > @@ -1007,6 +1007,13 @@ static int iwl_mvm_sar_init(struct iwl_mvm *mvm) > if (ret == -ENOENT) > return 1; > > + /* > + * If our firmware doesn't support GEO_TX_POWER_LIMIT then skip trying > + * to use it. > + */ > + if (!iwl_sar_geo_support(&mvm->fwrt)) > + return 1; > + > return ret; > } Thanks, Jonathan! We already have an internal patch that fixes this (also fixes another symptom of the same bug). I'll send it out now. -- Cheers, Luca.