Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp498047lqr; Wed, 5 Jun 2024 11:58:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVmAnesTLYDLvWhL/GSDZVYiaINVc9ILaPMVa3Mfc4/GiIeHZ2mZZIj3bm8DyrW41coJ5GjncOV3hG3uuTr91Wf/iQyl73kX0D08wwTDQ== X-Google-Smtp-Source: AGHT+IGb9JIn3KlrRwpV6MjTECQohvueFI5Cs2EfKpylqatqiOQ6E4/2Gr+j6YuhvhjDUGtdHA23 X-Received: by 2002:a05:6a21:8195:b0:1af:f38e:85b with SMTP id adf61e73a8af0-1b2c55fe98fmr598357637.10.1717613906315; Wed, 05 Jun 2024 11:58:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717613906; cv=pass; d=google.com; s=arc-20160816; b=Qxw+/nX6kDfnKNdpU9W/n9eGJNRVQuk9iBVGMLYtg2cj9xokIfTiig5eCRnNAEZt9E xRPH+2/+4ZcWRQ/Ox9fb2sbW1klOGvN15MzJPlljhqHpzmTXhOsZca/kIEWlj8GoCGwW nRVmdDVPS/TNN1ZNpIINVXF+n8zZAtbwWWVEj4ANRR15MD9q2FFgUCD+UEPIHy/bvj/F +DtXg1XPQ/4lnutxz0rntgq8BnUisrQVepxM8LKFigxdezrtO4v2YUJOS6uGv6zTE6Sw AlDy29JQ7D/B+jODkTohDYrpXQqIe3XC+1nutwGA08QHKViSKAhNEO4zx8y0z9RBE35K QL5A== 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=BnRLGsQdHzBIFwy2a7a4pMb4QdK2fWR40v5UFjKAhTw=; fh=fUr549cSqKocV7UcRuBHkVs5Q/EFHHdf/SC+m2DGkeo=; b=oAvKUssHOq9jqowa2y+Y89v72185IZWF0xppfBN1CtKqhRvUTUbBFpJInjv2I/USrv Y6NP1U+sZKcCpNaKzu659vJvNxqLk1slF9lR6ctlg32slP9tT/C2ka3ep/PrtP8P4zDw 5nerc6Yvg0QK3fa1r4suS+br6GUC4ItaMDv2/dLObu9NS3zywwjOEWfe1cJByhfYdrQU Te1mnhR6x/YFL0OHvHIXUvgqXkASnXgZOcB3loZOUIlOdbcufAtQ9mtFgvp/yJEJx8A2 L1xB9MQywfeIhgXqH49HrwBTYKzmSSSF2A9ZuszmlsRNkXnJpR9Vyz+q5toVAKU80b+d Aeww==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=ikmorR7u; arc=pass (i=1 dkim=pass dkdomain=nbd.name dmarc=pass fromdomain=nbd.name); spf=pass (google.com: domain of linux-wireless+bounces-8581-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8581-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nbd.name Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-6c3540facc1si10472266a12.45.2024.06.05.11.58.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 11:58:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-8581-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=ikmorR7u; arc=pass (i=1 dkim=pass dkdomain=nbd.name dmarc=pass fromdomain=nbd.name); spf=pass (google.com: domain of linux-wireless+bounces-8581-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8581-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nbd.name 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 30EDFB2267E for ; Wed, 5 Jun 2024 18:48:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 79D9BDF43; Wed, 5 Jun 2024 18:48:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nbd.name header.i=@nbd.name header.b="ikmorR7u" X-Original-To: linux-wireless@vger.kernel.org Received: from nbd.name (nbd.name [46.4.11.11]) (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 6AFE2DF78 for ; Wed, 5 Jun 2024 18:48:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.4.11.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717613283; cv=none; b=b+8fTX0d379VuBDajJ93LqffUjsCVWBuCF49qXtJB+7vqZgaGiwMCIXw9Mrw9SxQcF+XZTal9iR8dOkTSOlFjnh1tYmGfIg+qWwY4aLmVzvDERywFp+nWaofRLqs4Iuny59R+E6OOMzi404jYLup4575DaihDt46hOnXPZF5M1k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717613283; c=relaxed/simple; bh=L0xoNxB36J4Mx9116ONuACgOQV074hsWsLHXB/9Pxxc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Em3wYjPLDdC/TIFAh4uglmsnyLx5TowCwwzcQuqkaWpt8vqf1pm2v3GVCNnmM14LMtenVqHW+VT8IVegwo46kA7sHBMCGUQBC77CTQBXc8xOR3mQULPAxeXMLeqLZaRamtoZ/SwcPnoxs+/rxkWuYI/kWnCObtNWn9OEQc8XIsY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nbd.name; spf=none smtp.mailfrom=nbd.name; dkim=pass (1024-bit key) header.d=nbd.name header.i=@nbd.name header.b=ikmorR7u; arc=none smtp.client-ip=46.4.11.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nbd.name Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=nbd.name DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=BnRLGsQdHzBIFwy2a7a4pMb4QdK2fWR40v5UFjKAhTw=; b=ikmorR7uef0IblnmHSSInTI15l ViKP7BNphia7CZuGYgkMWIe+tiyCXD3vMCbOJmnvrgAA2JYkBJpDa/Nm6S99U9Q2pQ3NpB3GeVwD9 uEK11/n9poQiDRmVMLUhUjpMIMD6orrd02OMd7gJ0mjXU7rjfRJk5vYMF0Obt1aqN9dQ=; Received: from p4ff130d0.dip0.t-ipconnect.de ([79.241.48.208] helo=localhost.localdomain) by ds12 with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (Exim 4.96) (envelope-from ) id 1sEvQA-008Gwq-0w; Wed, 05 Jun 2024 20:31:38 +0200 From: Felix Fietkau To: linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net, quic_adisi@quicinc.com, quic_periyasa@quicinc.com, ath12k@lists.infradead.org Subject: [RFC v2 4/7] wifi: mac80211: add radio index to ieee80211_chanctx_conf Date: Wed, 5 Jun 2024 20:31:27 +0200 Message-ID: X-Mailer: git-send-email 2.44.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Will be used to explicitly assign a channel context to a wiphy radio. Signed-off-by: Felix Fietkau --- include/net/mac80211.h | 2 ++ net/mac80211/chan.c | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/include/net/mac80211.h b/include/net/mac80211.h index ecfa65ade226..98394970c991 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -250,6 +250,7 @@ struct ieee80211_chan_req { * @min_def: the minimum channel definition currently required. * @ap: the channel definition the AP actually is operating as, * for use with (wider bandwidth) OFDMA + * @radio_idx: index of the wiphy radio used used for this channel * @rx_chains_static: The number of RX chains that must always be * active on the channel to receive MIMO transmissions * @rx_chains_dynamic: The number of RX chains that must be enabled @@ -264,6 +265,7 @@ struct ieee80211_chanctx_conf { struct cfg80211_chan_def min_def; struct cfg80211_chan_def ap; + int radio_idx; u8 rx_chains_static, rx_chains_dynamic; bool radar_enabled; diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c index ec16d7676088..574ae961a7cf 100644 --- a/net/mac80211/chan.c +++ b/net/mac80211/chan.c @@ -638,7 +638,8 @@ ieee80211_chanctx_radar_required(struct ieee80211_local *local, static struct ieee80211_chanctx * ieee80211_alloc_chanctx(struct ieee80211_local *local, const struct ieee80211_chan_req *chanreq, - enum ieee80211_chanctx_mode mode) + enum ieee80211_chanctx_mode mode, + int radio_idx) { struct ieee80211_chanctx *ctx; @@ -656,6 +657,7 @@ ieee80211_alloc_chanctx(struct ieee80211_local *local, ctx->conf.rx_chains_dynamic = 1; ctx->mode = mode; ctx->conf.radar_enabled = false; + ctx->conf.radio_idx = radio_idx; _ieee80211_recalc_chanctx_min_def(local, ctx, NULL); return ctx; @@ -696,7 +698,7 @@ ieee80211_new_chanctx(struct ieee80211_local *local, lockdep_assert_wiphy(local->hw.wiphy); - ctx = ieee80211_alloc_chanctx(local, chanreq, mode); + ctx = ieee80211_alloc_chanctx(local, chanreq, mode, -1); if (!ctx) return ERR_PTR(-ENOMEM); @@ -1126,7 +1128,7 @@ int ieee80211_link_reserve_chanctx(struct ieee80211_link_data *link, !list_empty(&curr_ctx->reserved_links)) return -EBUSY; - new_ctx = ieee80211_alloc_chanctx(local, chanreq, mode); + new_ctx = ieee80211_alloc_chanctx(local, chanreq, mode, -1); if (!new_ctx) return -ENOMEM; -- git-series 0.9.1