Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp1147177lqt; Fri, 7 Jun 2024 09:13:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWCCXgwn+/ooExTR8MKMn9MTh5MyH1agzCNjuBB+p7steWj6da/E8rt2hQUEChU85+hAG4+FR+lmPi+dyFNt5dHs0zg6ql1msURJxY7VQ== X-Google-Smtp-Source: AGHT+IECTvVM7Qvb2Qy7rj3aArCpWoCBduY/TST5Qa6pr/EBmiN9S5ldXYq0ZcUH+Zp+Vh0XpV8f X-Received: by 2002:a50:99d7:0:b0:57c:6104:d14a with SMTP id 4fb4d7f45d1cf-57c6104d1c8mr702830a12.41.1717776817892; Fri, 07 Jun 2024 09:13:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717776817; cv=pass; d=google.com; s=arc-20160816; b=xV1ZqGz+jBLuBalWXLhn+gYQMNArkgEPVYKJXUeV5Gwv0SDnbu+tCkDorXLvXyuQll /D3ARlXbN7Yyh0FBI1PCvWLSa54C7hDYO/nJQl8TooQkgKVRu+xKHbXryWf4ixd4/uQE F12QtRGzlFGBODY9sijTeOVSSTRlr7N7eA9lZWP6SNj0m5OFV7aFEg+eXxzo6qcu1WDT 1dlqY3pMADguegfV910bmx85lR13l1rbEFO1HFTKTSGt9eUHepbew4iDNghigHmxwsep HxuyRfmGGtR/+9tKzAQCeALtSiRwK+4j66ZiFErQAraVxCaYyyVSf1kFqlZnW6txLGuo 1Hcw== 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=CKwOfuO2az5PhEPYoyro7GyrBecHAVRZ75EmmnwmRPN/WD+NcWXEO8buOxWeyI0yjI ft7vx86d+K6tUEQxKzNgi82u66/ZgNszPZoVXxWfhK4oTcwP8nUWc0SL0EYEeRvLPn0q pwotMU3hrLsoC0Drkhyz0KPS9RiUTQ07roN2fBkOqz4KUm6ycFdIHrym9JYLqKQ/xtzU p1SpUpL+anWWMK9SaaD02kA1RPhXKRixSiuaYZgFQFPR4TZ7WmMrMdXcCmOFsVmw5dSK tliRNZ4YkpUdA0tXkcC8mZz7KREiK1i7Ig3BYjd61+DYF/f1yA3QcA5F0M2lIQZSFNtd G9Xw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=CdOGA7UG; arc=pass (i=1 dkim=pass dkdomain=nbd.name dmarc=pass fromdomain=nbd.name); spf=pass (google.com: domain of linux-wireless+bounces-8705-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8705-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nbd.name Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57aae228e16si2041308a12.395.2024.06.07.09.13.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 09:13:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-8705-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=CdOGA7UG; arc=pass (i=1 dkim=pass dkdomain=nbd.name dmarc=pass fromdomain=nbd.name); spf=pass (google.com: domain of linux-wireless+bounces-8705-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8705-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 45C371F2807F for ; Fri, 7 Jun 2024 16:07:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5B96C19AA62; Fri, 7 Jun 2024 16:05:57 +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="CdOGA7UG" 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 2DB19199EB3 for ; Fri, 7 Jun 2024 16:05:55 +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=1717776357; cv=none; b=uSIgqaYsvjPdYZeqrbqe3TB8Ss2u9P1geCI9xByzGn4sShTKMD+rDKDAzDunYfS970JFb3hbpme6z5WLMhX8YkZIv20Ug76Yr+18oUQs/ifxz6MB/8qOpygqYnGOE/WYWBwHaGLhU7IYkNnO2H9p+o13Ar6U/74YNrsSpDxRIGA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717776357; c=relaxed/simple; bh=L0xoNxB36J4Mx9116ONuACgOQV074hsWsLHXB/9Pxxc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EYzqAnhNMlzWiIt4CVboOwtP4akxuN8Q26zzIJmXmDaW8v8T3G6VQrtZdW3SYKKbS9nHcVehxhfpC0CFgZ6IzCWafHDCuouzJF5dbcsv7RvtOCBZpkKzs23fC/PCxm8ced2evPz8mH9G5hVuVivX0ZGBFIlGZEnaFJ7+prFHVHg= 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=CdOGA7UG; 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=CdOGA7UGs62JgEBz9UhuNTowLb LiR5j2+ZHKeuyrB+WCAvc3Yjzpb/BAHVmnJLxtypAyr0x1VwN1w178EXRYgag+hkaOEa2IOPVooI3 4IaYtgEZ9EA0sgqDDfum1YXrM8OtlFjtJIL2k4WP/In1eJvBjipzQNkcKkTSgV3BA0PM=; Received: from p4ff13226.dip0.t-ipconnect.de ([79.241.50.38] helo=localhost.localdomain) by ds12 with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (Exim 4.96) (envelope-from ) id 1sFc6B-008xPc-18; Fri, 07 Jun 2024 18:05:51 +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 v4 6/9] wifi: mac80211: add radio index to ieee80211_chanctx_conf Date: Fri, 7 Jun 2024 18:05:45 +0200 Message-ID: <6a568ace507286c97a60e2f7cb809c0a31f18ecf.1717776325.git-series.nbd@nbd.name> 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