Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp493489lqr; Wed, 5 Jun 2024 11:48:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUaHrjW/kWvWodoHaGVXjGLnZqsyRnLyKEdh9xNoxkCXNy90JINPKjnp32oM5lPhVPzXytwMjxnTrCFS4h91IC3QuJfaqsfsKDUG7zIaQ== X-Google-Smtp-Source: AGHT+IHkUN1G75fKNdRGqUFZejEiRBpf7NUXukl0D5AYDMgP+a1bhctlBX88GTzBT/AwushXgrfc X-Received: by 2002:aca:1306:0:b0:3d2:ee:2bbf with SMTP id 5614622812f47-3d204290966mr3373454b6e.17.1717613332631; Wed, 05 Jun 2024 11:48:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717613332; cv=pass; d=google.com; s=arc-20160816; b=UgQrLrvYLw4ePw+H8E3H4k69jfD5AWNFnNG7/eTupt07aIYwUN/8he4egOpZpNmQWg trfwLONV9UV4u0UYccN8bGVntq+XLWQ/48/n4iID6vt/EO10B0YvvEqJGKMLpzLkEWHZ khYHJ4CU5J8y4TdXWU5o3i8WWEi04w/hwbLYMSsgtAaKt1RWqrjrBrVklhEx4+LS4pfI b13XKlHBwei0qmXlXgNOs6bN3J7yPkeT3HDuTaq8mBdYijRpaT+RiqycBTPGogmM/emv z7P50ej5mlhW77vaQCYCxOisqls9sqtwuEwx1AHampC1F3r/uJ3J3EbsCgjuNz0HH5Yn wbfg== 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=N8ysX8u8qfjL06FnkJCkxCDGjxY6B9IlU3WUADMIhyU=; fh=fUr549cSqKocV7UcRuBHkVs5Q/EFHHdf/SC+m2DGkeo=; b=g3wQI+VBycrAPJqG4YqZOTjyAC+Pt51TkBaL4bolRy/P8LJepVBm/eBbryrVmX4HHf AFW3o1VM8kJcaPI4aeqTHaQLeAwvLq3U9iVC5Me49tEtmrxhYUL/tayc+2G08WsqgDz+ r8MIRIIpJSHhNd1tcLc5NdNgQ7Tj/ijXKLPVkL3ZoXe/GRGHIqg0UixFJYQ1RjtZ/L9H +GH6FgdkbgfQ/qR/n6Gf6rj4pCf67MO9OcNi61U001Lisf623C1CF1z4ZvAF8+CrYYUx PSvjUYazLR91X/VnjeZ3Wh51G9YSCErTmxBa1pZMrwCM5Luw7bINe7EogFYt7pc6826d do5g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=gejp5XcE; arc=pass (i=1 dkim=pass dkdomain=nbd.name dmarc=pass fromdomain=nbd.name); spf=pass (google.com: domain of linux-wireless+bounces-8583-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8583-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nbd.name Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6ae4b42bfcdsi59287506d6.483.2024.06.05.11.48.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 11:48:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-8583-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=fail header.i=@nbd.name header.s=20160729 header.b=gejp5XcE; arc=pass (i=1 dkim=pass dkdomain=nbd.name dmarc=pass fromdomain=nbd.name); spf=pass (google.com: domain of linux-wireless+bounces-8583-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8583-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id EDAD61C247D0 for ; Wed, 5 Jun 2024 18:48:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B282213A3EF; Wed, 5 Jun 2024 18:48:10 +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="gejp5XcE" 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 32DB313A890 for ; Wed, 5 Jun 2024 18:48:09 +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=1717613290; cv=none; b=OJPBoyQXrq9jqLI79Sd+jMUaLQvfiR+5x270KCNaY2eU1SvDcb5xJ4bZy8EU06+7kG01kEAkgZXLoLP5JdpezGZwdQCl8CoUc53YFjVDZ7fu0h1jldZvFJkUSHRD7kuzEEb/JSl/xqJ+xBYW6qKNk0M/gtiOMQ70LOqziwjJ2fM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717613290; c=relaxed/simple; bh=4Kngy5kV13ZXqeEMnS0bNXe/MRNx8Ww+qyvfA1WXyW0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=QsNJGIyerVwh6Es+5+Zn9Ndhx1UNd0cA7I37IVE7KVZ2nXYfiMp7Z/3UwI4D/Mr7UHz3HnBe+bWggeNJ79JZps3AjAk0T/xvZFZ3VrQLWuG4uuvvlsCFIqzCTmw7UuI78cupVTNt9zK5Zr2zOpd+1c6qZwp1FA/viU48YJvWMbY= 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=gejp5XcE; 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: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: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=N8ysX8u8qfjL06FnkJCkxCDGjxY6B9IlU3WUADMIhyU=; b=gejp5XcErJUphH1wVAgVWoQUf4 CzH3Vqiya1hKNiMy6cqFLyBwZDqc0fMXYO1hq0oHaV3btE2rkMUpKyKlEEC+IWinIfukCTIQYZtJI iGvODkoOfacbs+MoJOsNuEuknb/ZvNfbpsvwqdBeWzeZSL6dy97QczGGMJbIkqAU2hmQ=; 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 1sEvQ9-008Gwq-0a; Wed, 05 Jun 2024 20:31:37 +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 0/7] cfg80211/mac80211: support defining multiple radios per wiphy Date: Wed, 5 Jun 2024 20:31:23 +0200 Message-ID: X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The prerequisite for MLO support in cfg80211/mac80211 is that all the links participating in MLO must be from the same wiphy/ieee80211_hw. To meet this expectation, some drivers may need to group multiple discrete hardware each acting as a link in MLO under single wiphy. With this series, the bands and supported frequencies of each individual radio are reported to user space. This allows user space to figure out the limitations of what combination of channels can be used concurrently. Each mac80211 channel context is assigned to a radio based on radio specific frequency ranges and interface combinations. This is loosely based on Karthikeyan Periyasamy's series "[PATCH 00/13] wifi: Add multi physical hardware iface combination support" with some differences: - a struct wiphy_radio is defined, which holds the frequency ranges and a full struct ieee80211_iface_combination array - a channel context is explicitly assigned to a radio when created - both global and per-radio interface combination limits are checked and enforced on channel context assignment Changes since RFC: - replace static per-radio number of channels limit with full ifcomb checks - remove band bitmask in favor of only using freq ranges Felix Fietkau (7): wifi: nl80211: split helper function from nl80211_put_iface_combinations wifi: cfg80211: add support for advertising multiple radios belonging to a wiphy wifi: cfg80211: extend interface combination check for multi-radio wifi: mac80211: add radio index to ieee80211_chanctx_conf wifi: mac80211: extend ifcomb check functions for multi-radio wifi: mac80211: move code in ieee80211_link_reserve_chanctx to a helper wifi: mac80211: add wiphy radio assignment and validation include/net/cfg80211.h | 40 ++++++- include/net/mac80211.h | 2 +- include/uapi/linux/nl80211.h | 48 ++++++++- net/mac80211/cfg.c | 6 +- net/mac80211/chan.c | 228 +++++++++++++++++++++++------------- net/mac80211/ibss.c | 2 +- net/mac80211/ieee80211_i.h | 4 +- net/mac80211/iface.c | 2 +- net/mac80211/util.c | 114 ++++++++++++------ net/wireless/nl80211.c | 190 +++++++++++++++++++++--------- net/wireless/util.c | 29 ++--- 11 files changed, 481 insertions(+), 184 deletions(-) base-commit: 5bcd9a0a59953b5ff55ac226f903397319bf7f40 -- git-series 0.9.1