Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp107532lqh; Mon, 6 May 2024 12:49:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVR2PeJJlMSVYCyzB0nrGAPLcikVy6aS/IT5PaFbqkfjIyeil2wGhzRnErVU7/0cJGP1zXoNb0lGk52yzFNRHGuQqZMTWzPW5I1YPDUPw== X-Google-Smtp-Source: AGHT+IFF6irDEjj3aO4BR1WxB0SQelYe5Q/cJaR6bpH0Ck9i+81a/WWm9PhPfCfOsCBGDxanX/PA X-Received: by 2002:a05:6870:b14a:b0:22e:d64e:d5b9 with SMTP id a10-20020a056870b14a00b0022ed64ed5b9mr14041822oal.55.1715024942265; Mon, 06 May 2024 12:49:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715024942; cv=pass; d=google.com; s=arc-20160816; b=KkUOVB3LYEdIiSlpj/Y9N5i9Gf5hogHLNlIdfBy3sCMncT5eb2ug3DOFklVyQKYnxg 7h6q9olZs5n+gGdjvw+LdcSrsmlgVjgPHh4yvlOPdt36rYSBXfJoh/9IA/v+U96vV+3+ IVj3mNEFMaOJ8dXioqiELRrQAJsNfPIWYjUK38z4Vv8isLpaBmdsiOVILvfvgCogPv/8 WdMx3GraGtqc+svauIYotPy2R5OkeLZkEeCd/WuHWraHBVbG08hX7IrLRqfIBxFc4UfT E4RK7nKtrp/9rjGGulDtNDcRCs4eqcOZz6Gk22zaEjJAqgOx1XhEtfiEAhaxnQYwlNag X6pA== 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=br1xmNroZrrclCjektPdnkXQxj7Hs9pHrphCeRPFlxY=; fh=QCRMbNmxBrwEohLjUHQ8w4lzVnBUUFoRxUspyxOIxFc=; b=igQs/UQn9KlADnv1cGm3x55v73gA1EW8Lv5K8gnVCrCMtRXyeTO/7DfJ+DUpw1yebS 7zQktgMcug0MVA0jSBFHnruh0ioQUuMxNuNmuiP8flgwzSTDBhjJMNOTvQj8eFrBJTBq 6boWR4/ea3m3j+0OUhxGVLwrEb1B1hjcGuKnnT92oJdjXUFicZL1X+PseACTlkvpfSCF TdE1dTJjzthiZzESS47tFW4p6Il8MqXAtATuNHKvJ4SXybLWYFPMe0QM4vBZltVI68/o SV25AeMrfd7qE4dCkKUbm6B8grWrWOJAZGUV5LqdN3xqEPyuF9hmUhnxn5kdQrQsRLp3 t13g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=C7u9GWr3; 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-7247-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7247-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id o14-20020a656a4e000000b0061b56f70ccesi8423879pgu.136.2024.05.06.12.49.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 12:49:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-7247-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=C7u9GWr3; 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-7247-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7247-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id D98CB280FF8 for ; Mon, 6 May 2024 19:49:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3025C15B992; Mon, 6 May 2024 19:45:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="C7u9GWr3" 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 A3BFB15ADBE for ; Mon, 6 May 2024 19:45:44 +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=1715024746; cv=none; b=QsvcKV1LBs+2oN9W4P/Cy0VXpD4+T3EYnCatoEjwXqocbc0Sx9itp7QQA+qCRUTbZZ8//T/Efr2Je5u4AYlaHfRzDEu9OKS2o7U9iaQrSMchOhSMVewvRNNQHBMYvw+5jkWX6bvJST/T1p3M7p4w/U0oJ380uiEKlXWOUsgg7FU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715024746; c=relaxed/simple; bh=i3VeNL/NcK5U+0aBg6ykZUo+wo/pCB9POLAoe9SwNiw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OsoMr0qPg5ceGX29SaaX0Pw4YI5HRRLHVOuAM1X+yfrb+E/A6xtrzEeSaSZ170zKiv53ZF6K4K/jaS6ZHXelzBJ8JtuyEJDcBnC0fybWY4vwgIfKu/UCZN7iDGtlyqT445+qUbwEojHzS0lQ8FiE1gPKtil3mJpUStTxjI3QUqY= 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=C7u9GWr3; 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=br1xmNroZrrclCjektPdnkXQxj7Hs9pHrphCeRPFlxY=; t=1715024744; x=1716234344; b=C7u9GWr3oaPA8TBHZ4fwcyR9iL5WYud647Dwg7y65juHimO mGMm9wamIehpOxucf1SfbCfCLV8dkHvz3fQuLHZzv1Ge57okFfxjPxQ4C2hJtjuILwoCxGnrl3aJD vKOOYO5YWbsz6AT7qj1XLa2y/fxutN5A/6Y3fYzxCWQZESXIcxgts14hZPMcGdsdnNYviOeoI6OaW H4Ns20aOvQRrsJTh13k1sR/rod8h5pudJ2vS7PjFb7wiBeDXphLa6zvmFIgLMTTNbGl880hMA5sQ/ fO85JZFdhuV+mbGZH2Vb/as3aoUWj8O81srU0N1MxbUaFjteDUaQLlTTuT7rd98Q==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1s44HN-00000008C27-3aQz; Mon, 06 May 2024 21:45:42 +0200 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 3/5] wifi: ath11k: fix TPE power levels Date: Mon, 6 May 2024 21:37:55 +0200 Message-ID: <20240506214536.d99fcf5856b9.I359bb401ea74bf82dc981a86a7ca3fa44d169d2e@changeid> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240506194536.102148-7-johannes@sipsolutions.net> References: <20240506194536.102148-7-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 59e5e8085742..73876760afe9 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