Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2266739iof; Wed, 8 Jun 2022 00:55:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw67eBq8p/rd1elehdMwaaAPiYAYELHSPIqfbHlkA1mUINIUmhIgJX7NfZsyyhW9ghtc82a X-Received: by 2002:a17:902:cf05:b0:156:9d:ca01 with SMTP id i5-20020a170902cf0500b00156009dca01mr32636666plg.111.1654674923857; Wed, 08 Jun 2022 00:55:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654674923; cv=none; d=google.com; s=arc-20160816; b=FZxtXX9dBzJVPTbljxA7GNW7RiOaXC5A1dqvJhcvEMmMu1YfUPsadp1kobnXN0fyO7 8Dnf390rxgF2ybkCuFV3+HgZi2RV9qasE21UwQ+Z5DlkLvRJO50YrvFhks8t6kRXo7WZ 79AzXmnD0rgRYAvXGjnvUyB4hKI0jiFdTgr0tKvRX//cxqOCrb/wfOftzAyPQdYSVzNn I5EeIcHmtbGXgGkhdljM59+OumWcdulRTjvx4qZo8DmvtF2+JBQ1z+mwrkUNDQcT9sgo LQKF5obR6dmQE+3gp0v13MWGKtrYObnc+8zHb5tUeZKUKl5yWqbOgJj/YRSNakCa54ZT x8cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=UT7jTUzkiI/raQqMtGW2k++pwi6HYJvVh4m7CNwTSIc=; b=YG45gTtvPHMGqZ7kVjmJyO1N9nAn+86JuCCjAxvn5r9QftVjfc8VI+n+uDyT8/HSmW Vu5m5HNHz3RBWJPEumvj7iRj6LTgvUefN56Fk5AoILp8IVtgTIizn5B/FXsNlHZkalNa QqcC9yvpyUq6YstS2YYwnGj8GhzhmK95UrQxfa28BFTUPE9bUZuhowXWzADgGxhmdBFe 54C5W4K6neDhgXC2TuIFmNYZvnlPR8+B0p/JnttfcQ0+iJN+zVYLuZqq1sLkI796Q4eX pkIGPOI3bfHbo3ya8JqQ4+v40badfZ56zEfFSeBw/tfdqDlojaMbHVfDXa6iy3fx38aH jKoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ev4CnCyW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s7-20020a17090302c700b00163ed1483a6si25331663plk.428.2022.06.08.00.55.11; Wed, 08 Jun 2022 00:55:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ev4CnCyW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442385AbiFHAy2 (ORCPT + 99 others); Tue, 7 Jun 2022 20:54:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1385037AbiFGWRN (ORCPT ); Tue, 7 Jun 2022 18:17:13 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 665CE262706; Tue, 7 Jun 2022 12:20:20 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E09E3B8233E; Tue, 7 Jun 2022 19:19:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57601C385A5; Tue, 7 Jun 2022 19:19:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654629593; bh=1xR0J75ZXSv9F3XwtXuUO8C7ILR4HML9B/tq5xySGAg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ev4CnCyW2zesNdcn8gvTabIncHOMAXpWIUikYPUAHboF4aeh9IBHpO6T3HrHv8yqH PgQiPcNegbOqUeYrpc8WD8dfbtX3ZWIRR7tyyerA1TBo12t79OkNYjH1Q4ubQmYsTG Bzna4iAvBDK74U95SSLYG0zoxwmekGs3JnL/2jj8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johannes Berg , Gregory Greenman Subject: [PATCH 5.18 720/879] iwlwifi: fw: init SAR GEO table only if data is present Date: Tue, 7 Jun 2022 19:03:58 +0200 Message-Id: <20220607165023.753760422@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Johannes Berg commit d1f6530c3e373ddd7c76b05646052a27eead14ad upstream. When no table data was read from ACPI, then filling the data and returning success here will fill zero values, which means transmit power will be limited to 0 dBm. This is clearly not intended. Return an error from iwl_sar_geo_init() if there's no data to fill into the command structure. Cc: stable@vger.kernel.org Signed-off-by: Johannes Berg Fixes: 78a19d5285d9 ("iwlwifi: mvm: Read the PPAG and SAR tables at INIT stage") Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20220517120044.bc45923b74e9.Id2b4362234b7f8ced82c591b95d4075dd2ec12f4@changeid Signed-off-by: Johannes Berg Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/intel/iwlwifi/fw/acpi.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/net/wireless/intel/iwlwifi/fw/acpi.c +++ b/drivers/net/wireless/intel/iwlwifi/fw/acpi.c @@ -937,6 +937,9 @@ int iwl_sar_geo_init(struct iwl_fw_runti { int i, j; + if (!fwrt->geo_enabled) + return -ENODATA; + if (!iwl_sar_geo_support(fwrt)) return -EOPNOTSUPP;