Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp15134lqd; Tue, 23 Apr 2024 13:00:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVfgAinK+JSxyeLFWlrwlxoY5E/VtHmoOJiChD5MwpSLPYeR7K3083YEq6Jv8R9CQvvRFK2jvUf/D8aRh2VGtwIzWxPwJnfR/5Wv/ZtmQ== X-Google-Smtp-Source: AGHT+IGStx1DfRuilPA9gWKbNQSbF9KKbpXzIfoXLVRFYX4M0ebFbmIPjfymD2rgwCIX7/BTzu+G X-Received: by 2002:a05:6102:22d3:b0:47b:d8d4:100e with SMTP id a19-20020a05610222d300b0047bd8d4100emr610894vsh.19.1713902434513; Tue, 23 Apr 2024 13:00:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713902434; cv=pass; d=google.com; s=arc-20160816; b=W0Kzz7g6RxMGv8ZzyJlHZG1vVhwBD1ZrHLTaIZ7rf434rrEGytMThHaaJADIXCKyK6 kDcxvEGn/CMsFug2YWEsN1jBx5C1r2SU6g7ypXFJj6wBJCwzybXas6t1DiMNSsgNHFU9 X77BnFLnvIU2kLrOs2sYsX+FqotpOHa9pXFM8kE5oAqsJR3M24PslVPkDgr04mXbSvnD 0nqu1JkzeMWfvf1nflscceDUa33wizQadIePi/f73WQZ0CLRQWBso3koUP1acASVx50S IJj54XG8kc8SjghAl1q3VdUwbwYx3noVlyIIxnagmq7GiwYLxoYfl9HH7KZvZcWFRLIt bz9w== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=0a+zQWlSfs8UrEOhOd3X8gQDvjO8x7SQjUFUQtUwYug=; fh=QCRMbNmxBrwEohLjUHQ8w4lzVnBUUFoRxUspyxOIxFc=; b=VD5H2gzDBioAp/4pK9YQn3hbjwRUcfzmHTVtl4GA9d4mi1Lpj2Or1muua5OoaVXn30 vdAv4xbwAKRa5HdTPCm3i2ioBoS7YZSBKdUZErCTf8ADaM2+OIsPOl7fdGr7SdRks0si Kd07gyJfqj924npuLL7Y99Yn3B2Me2CBS0QA0wHT6hXPnEbOpKIHP1xVffdvt8+DXJz9 KdIbiwDy8UZxwpchnppC+INLS2sKwCYtvPEPtQbYgOHtkyf45W7192f2iwNJE3tbKxjo 5Hj4g44H6Yc1Pvk9+KK1me02YLfZKZlcs4lXGFuxe32z5C6wVJFTZYEocgxowcGVvyph XRxw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=qn1imbgu; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-6739-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6739-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id ia22-20020a0561024b1600b0047bb05fd397si2828212vsb.323.2024.04.23.13.00.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 13:00:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-6739-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=qn1imbgu; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-6739-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6739-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 3BE081C22100 for ; Tue, 23 Apr 2024 20:00:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D83671422DF; Tue, 23 Apr 2024 20:00:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="qn1imbgu" X-Original-To: linux-wireless@vger.kernel.org Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 07C161422A3 for ; Tue, 23 Apr 2024 20:00:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713902428; cv=none; b=Fvf4LL78nULa3Q/b17Z47uhIK5gOMjjwJ0QNehjkoZF98IqSF3PnP8VFEm6hogH3FeA3jgJz34CVU8mjPqAdJKLQvpv7bxp6km6xq2qDLD+8HyaeU4jqH/G/Cct96XV6wIUP0t6tyZjw5LC3ojDNlUb3Lz8B2eSBZwOj2XxXAWM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713902428; c=relaxed/simple; bh=adtgfr+fqVLRH/huwT/2UyvFhowbmpzAnpYwpbcL3Jc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Z/sexsM9R5JtCIfZLIV41V2Fjfou74GkaimQ/t7sALm4AiYJa7y29OK3XoQJNoT4gPIqfeTgRmob5LMWMNcZK8ckWCTCW3ywFNbnmWbkFVrkfDkcT6CoMB2OVEO9UERLHRyvbJgyUWe6nWq4KZS5gPDAJj9rxx4QljaeYHOSZu8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=qn1imbgu; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=0a+zQWlSfs8UrEOhOd3X8gQDvjO8x7SQjUFUQtUwYug=; t=1713902427; x=1715112027; b=qn1imbguaZmOEyjquDCgzfJhkUS4TibvxVL+0lyqTRewiUN qDuatIt7fYlGdI+ut9k5oIRSdGaNFAmI1l5x0XI7+FrVdcRxez2Hk/Bw2u/tSnw2lOEwWqQEUpL/G GR62STLMVf4J2xaRg7CpRVX4/Ao/pFu2xZolGZM+HVgP9CDRJXx6WIn01+atIYfoCWtmHrrLiuzeH WkRgMGh8aJMhHkPzpvkHdYTmRMFFwXNW8e/8GpQi1KthPtAD/h1tll0ofIQRGm+zJgHg89ELnFVNz IIvnm9kbtxTqviSXJKtoRf84iw4ndcgVFrYBirwKFeD+8Fr6qHt1dDSVEAS4stBw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1rzMJU-00000002OTL-0gOH; Tue, 23 Apr 2024 22:00:24 +0200 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Johannes Berg Subject: [RFC PATCH 2/4] wifi: ath11k: fix TPE power levels Date: Tue, 23 Apr 2024 21:56:13 +0200 Message-ID: <20240423220019.891a5ad582bb.I359bb401ea74bf82dc981a86a7ca3fa44d169d2e@changeid> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240423200019.192941-6-johannes@sipsolutions.net> References: <20240423200019.192941-6-johannes@sipsolutions.net> 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: Johannes Berg The chanctx can be shared, but it seems like the TPE values for this vif should only reflect the channel that the vif uses, which is captured in bss_conf->chanreq.oper rather than the chanctx. Use that when calculating defaults, a similar issue is where the data from the AP is processed, but I'm moving that to mac80211. Signed-off-by: Johannes Berg --- drivers/net/wireless/ath/ath11k/mac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 03b0a6ac6d6a..1a3ea072eec3 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -7701,7 +7701,8 @@ void ath11k_mac_fill_reg_tpc_info(struct ath11k *ar, is_tpe_present = true; num_pwr_levels = arvif->reg_tpc_info.num_pwr_levels; } else { - num_pwr_levels = ath11k_mac_get_num_pwr_levels(&ctx->def); + num_pwr_levels = + ath11k_mac_get_num_pwr_levels(&bss_conf->chanreq.oper); } for (pwr_lvl_idx = 0; pwr_lvl_idx < num_pwr_levels; pwr_lvl_idx++) { -- 2.44.0