Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp97635lqt; Thu, 18 Apr 2024 09:20:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWZ2wiHk+ufd+papWaIGSlY3ruO8vUne+slm+ig4hslZwUVxxvWnTH2LDfa9zDGAXhlcP/3hVr+TQQ8uV8HhsVkmjUQJOIONK2cCK0fxA== X-Google-Smtp-Source: AGHT+IEFMFGmplSU12ZVpmiKfr9UPBsLSWxPOgIxrV1VKTy8jeSW6EEiLfAveWPYeOvUFSaq7/EM X-Received: by 2002:a17:902:c94d:b0:1e8:2c8d:b793 with SMTP id i13-20020a170902c94d00b001e82c8db793mr4251379pla.41.1713457225915; Thu, 18 Apr 2024 09:20:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713457225; cv=pass; d=google.com; s=arc-20160816; b=SXb0ew2Fp3oSVoqlm7oFw6QVAQvqTuMELOyBShe4bvTSlBshjJiQIu85GnhYFfmXFq J5+a30j2OSiY9qZkQ+2WQGKH+UKW5xk1iqziWAsPw1GKVzVZSC1BZlnvVVow4Nqs1TNu hJA9eQV5VaecgNRDYYr1KOWHOFl9Wn5WxynKiIxwXwIgVjMfIqHidQXZ762GUzpwKslE UZ1yKThBV6nUofOo8d3Ie6HVRAzHpfa+4EaaZmEsjG6gGiVAA5f6YSBXSS21WyIfCdlM +L/Ita570kwiSOcMGt+b1GNgEK7UE+CIOCk1r2rcBHPHBIIE4u1VMnAGZnkpo1jhFB0c u8xg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=ho1oha7NlPnVlvezMpGKsopg4GK7/gE9u/PyjelWSaE=; fh=unOd+iR/s4g3ccNRscfqoIvCvfbfQt24cpkffWnNbx8=; b=TawFUPpNUMWxjDd9dpwj+lvoYC5duYH6yjWagUzeX6+vBBorJOg+yApjBiQl7gQA5s yMiJFBzT3o2yvtaaxrzsPsbjiFvwUyW29PgANTHcWQFvZIbWDkDPio+zXqEUl3lut/ig PCQhNrnFSnMRP5NkaiUOdtR+qHjKdoqbLXn+U9UL6i0EuMIZFhnkJGMWiYcFzJGugx2W sBX1Y0THyJtLsK9eImmCm3gDYV42oRRWZxLL5mq+TUSGQeY59rqWqRb3atrHoqGRKuqz z+BEIGT67PT5kcKtHf9ye45q0l5DGKt5Uolom759birbfPf042ZgLx2Srq79yp7WIsBf 2gQQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UVnsRrlN; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-6532-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6532-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id l15-20020a170903120f00b001e556c4c001si1788298plh.51.2024.04.18.09.20.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 09:20:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-6532-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UVnsRrlN; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-6532-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6532-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 10D042836B1 for ; Thu, 18 Apr 2024 16:20:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A526216F84D; Thu, 18 Apr 2024 16:20:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UVnsRrlN" X-Original-To: linux-wireless@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 804BA1635A6 for ; Thu, 18 Apr 2024 16:20:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713457222; cv=none; b=KxqtuP0z0YjNyked3+y9wKC1E4N/VlLxMUIaU7a3VAgnUrYKK80nkRTxbz4o4S/c+3PFxScdg5CD6WgOx077UNNPSS2yi5yhU5Bcov4LU5/VkiOmnUQ17L+u1f8iNMMYNoM1kYUgJ+fwOUvQ4wY0j5xfmOeMdimOLvBNx9StIwg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713457222; c=relaxed/simple; bh=L/q/SEyMvrP7DvPROUW2dF6DzmVYdZULYChsgCNQMBg=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=mF1e3AOqiXwrCccbkhKJdHU0jq84nd6owkxDeGJX5ZTdFpPItBGdoRi7VA9eWIe4R/OZHtNANOz8/HRcP9hrX+9lMNctAFaocJYFPVaA+uLOfHjz6TtLb2R78J6wQXkzdsCasUr7EGGhLzGJ0AEIR7Jc5+fmOwwGj0reQZkh7dg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UVnsRrlN; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7CE90C113CC; Thu, 18 Apr 2024 16:20:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713457222; bh=L/q/SEyMvrP7DvPROUW2dF6DzmVYdZULYChsgCNQMBg=; h=From:To:Cc:Subject:Date:From; b=UVnsRrlNsqRHfWDScviRGPsLpVSihu5HcfJgZvVzJC36U9gwdvpmzly5fxNJFt5Og 7AoOHE1Kef+6ctGV1LDFmFRV+PU1DD0VjlKaG04gY93k7Fw9gIec7tW+4nZGwbrbTw GK3WjroIDq/Wvz6gJ/FmOEKCOUABzlCGq8eUf3Ie44I65ShWwH4K5tOb2XBmG4EKrD ZGHXphc0+engD3oHNslPG3BNo2pODHYTfoEtakkhJaSp3nTcHsy8EBk6AhLRu4d4Q4 +ka4MhLADNkeG11yHosL4hjZOr6uS+rl14sVecp2DcBO0dhGIwQB5lRiocL5lBW5OT 04gpeKG6Ob3Gg== From: Kalle Valo To: ath12k@lists.infradead.org Cc: linux-wireless@vger.kernel.org Subject: [PATCH v8 0/4] wifi: ath12k: ACPI support Date: Thu, 18 Apr 2024 19:20:15 +0300 Message-Id: <20240418162019.1246749-1-kvalo@kernel.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Kalle Valo Through reading ACPI tables, implement Time-Average-SAR(TAS), BIOS SAR, configuration of CCA threshold and band edge channel power functionalities. This is enabled only on WCN7850. TODO: * test with ACPI support in hardware (I don't have such hardware), especially suspend and hibernation v8: * rebase to ath-202404181528 * rewrite commit messages * cleanup and improvements all over to match the ath12k style, including error handling, naming and so on * locate new place to call ath12k_acpi_[start|stop]() * move wmi functions up in wmi.c file * consolidate WMI functions using WMI_PDEV_SET_BIOS_INTERFACE_CMDID into ath12k_wmi_set_bios_cmd() * ath12k_acpi_stop(): don't call acpi_remove_notify_handler() if we never installed the handler v7: https://patchwork.kernel.org/project/linux-wireless/cover/20231013114434.81648-1-quic_lingbok@quicinc.com/ * adjust the length of line * add cpu_to_le32() v6: * remove code that is not called v5: * rebase to the latest tag v4: * revise commit log using imperative voice * delete guid_is_null() v3: * remove unnecessary cpu_to_le32() * adjust the order of the macros * apply jeff's advice v2: * put in the include guard Lingbo Kong (4): wifi: ath12k: ACPI TAS support wifi: ath12k: ACPI SAR support wifi: ath12k: ACPI CCA threshold support wifi: ath12k: ACPI band edge channel power support drivers/net/wireless/ath/ath12k/Makefile | 1 + drivers/net/wireless/ath/ath12k/acpi.c | 394 +++++++++++++++++++++++ drivers/net/wireless/ath/ath12k/acpi.h | 76 +++++ drivers/net/wireless/ath/ath12k/core.c | 7 + drivers/net/wireless/ath/ath12k/core.h | 18 ++ drivers/net/wireless/ath/ath12k/hw.c | 10 + drivers/net/wireless/ath/ath12k/hw.h | 3 + drivers/net/wireless/ath/ath12k/wmi.c | 143 ++++++++ drivers/net/wireless/ath/ath12k/wmi.h | 41 +++ 9 files changed, 693 insertions(+) create mode 100644 drivers/net/wireless/ath/ath12k/acpi.c create mode 100644 drivers/net/wireless/ath/ath12k/acpi.h base-commit: c416602943dd36fbd13af7496430723935c867a3 -- 2.39.2