Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2566725rwi; Fri, 21 Oct 2022 05:30:50 -0700 (PDT) X-Google-Smtp-Source: AMsMyM70+ipayr3xuu8B4fjhDdm3ipqYnVSGId5maTqarXthj5ZQNxoDOctIzHLn9GuQV9H4uonI X-Received: by 2002:a05:6402:d0b:b0:458:a244:4e99 with SMTP id eb11-20020a0564020d0b00b00458a2444e99mr17349793edb.46.1666355450405; Fri, 21 Oct 2022 05:30:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666355450; cv=none; d=google.com; s=arc-20160816; b=ejg3jlIqpLI4j0uloG9Z992ZN5/+1HFXDKC3TVwqDxPiPMI4UFdZ7BHKREx6yAs/Pt KotWwMtv8srm26ShaPaQqS5bR2gP/4A0GV4VipRsosQzo4oeE9F5ScolniPx4M8HU+0V ZJn8g9drBYIoap5cHk/FkJgll1LFd19fLbFI3xDaU1NbCZDu+71oqDQUwQ4JqPIl0Arf rbdjf0eVFuixPAXf7PgbWlSHfFJ3xIS/DCiF6JoJiaBIOEzPOxQqNyelcijZjmA1FAL0 YXJqibYQW6HyvUqebLa3VeyOAY0WpbA6AcYKV5vhnwhfR1FS3AP9rJiTzm3c6vAf+RTc 80aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=jAzRSUGgENCNFLGU9uz9gZVi35DrYMgfiBGE0CplVIM=; b=CmMwbDnacMeddAdH7oBSVfWHPhUNXuK4quSboW3I5BsuHS31375TUGL3ooUxrBVtLq a81tH3u5L6oXriMan4cMXO7n5TaXXw2lD/AZmiTqqE9hvur20Dv0MPRL1R5I6s4WZy5u UehLTr3VI7BBl8kim+43aa+XuHkhxEQwQ4YmxKh0UdcOLMg3gxrr0TAWBhn86pcKFJok 4Ca+J7yMo8b7WcX1/XhLZfDFXP/iLEAeMCz9b/fofFOkoWMmjahCgR+K0peTq0WZzNcq rhzk6st3QVflwdTEgMqM6WgtpfADdMIibTUHnGojaU3kX5Jzy1OVl/HqKWA65quRuAZR 1erw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b="EBHJV6e/"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s7-20020a056402520700b0045f5118c39fsi9925060edd.367.2022.10.21.05.30.32; Fri, 21 Oct 2022 05:30:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b="EBHJV6e/"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229664AbiJUMZo (ORCPT + 65 others); Fri, 21 Oct 2022 08:25:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbiJUMZm (ORCPT ); Fri, 21 Oct 2022 08:25:42 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 697691BC179 for ; Fri, 21 Oct 2022 05:25:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=jAzRSUGgENCNFLGU9uz9gZVi35DrYMgfiBGE0CplVIM=; t=1666355141; x=1667564741; b=EBHJV6e/w66qdc2LyXSoE+bT5b4qqh5cmFKJNnThHRN1q1h QrmsgxzvFmv2Tx/OzPR6csHnRSMIg2OWaE0yvREv1Sh37pmbvs3zLXMWyJNgeq6tuIa2U5G9u5QsV G269cY6x2kPKj4WBjCgQJoBcqwQDBLNTpL5AUw0dRPOdDnqHP0kjF3tyjtcUEsZ0xw0sS4eMtqG2p X5eVmJN5Wpx0eQF1H4LAiDOlbKfg/UEyvvgch9IEUW3Hi6YeoTIxMa9CkJ6gGQ/XhBbn79LgdBA30 QK4FAwP6ZtqxBn4Vo4+Rkmyl3RBh8EP3rr8oBfEcDU5QC2CJZMLKzyUmwd6inmBA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1olr5n-00CrAB-0v; Fri, 21 Oct 2022 14:25:39 +0200 Message-ID: Subject: Re: [RFC 4/4] wifi: nl80211: send iface combination to user space in multi-hardware wiphy From: Johannes Berg To: Vasanthakumar Thiagarajan Cc: linux-wireless@vger.kernel.org Date: Fri, 21 Oct 2022 14:25:38 +0200 In-Reply-To: <20220920100518.19705-5-quic_vthiagar@quicinc.com> References: <20220920100518.19705-1-quic_vthiagar@quicinc.com> <20220920100518.19705-5-quic_vthiagar@quicinc.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4 (3.44.4-2.fc36) MIME-Version: 1.0 X-malware-bazaar: not-scanned X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Tue, 2022-09-20 at 15:35 +0530, Vasanthakumar Thiagarajan wrote: > A new nested nl attribute is added to the same existing NL command to > advertise the iface combination capability for each underlying hardware > when driver groups more than one physical hardware under one wiphy to > enable MLO among them. That's a good point - are we assuming this implies you can do MLO across the groups? Maybe somebody would want to use this advertisement without allowing MLO? (Not sure that's useful vs. multiple wiphys though, but maybe to simplify driver if there are some devices w/o MLO?) > + for (l =3D 0; l < c->iface_hw_list->n_limits; l++) { > + struct nlattr *limit; > + > + limit =3D nla_nest_start(msg, l + 1); > + if (!limit) > + return -ENOBUFS; > + > + if (nla_put_u16(msg, NL80211_IFACE_LIMIT_MAX, > + c->iface_hw_list[i].limits[l].max)) > + return -ENOBUFS; > + > + if (nla_put_u16(msg, NL80211_IFACE_LIMIT_TYPES, > + c->iface_hw_list[i].limits[l].types)) > + return -ENOBUFS; > + > + nla_nest_end(msg, limit); > + } > + nla_nest_end(msg, limits); Feels like this part is kind of pre-existing code, or should be, could it be refactored? > + if (nla_put_u32(msg, > + NL80211_IFACE_COMB_PER_HW_COMB_NUM_CHANNELS, > + c->iface_hw_list[i].num_different_channels)) > + return -ENOBUFS; > + > + if (nla_put_u16(msg, > + NL80211_IFACE_COMB_PER_HW_COMB_MAXIMUM, > + c->iface_hw_list[i].max_interfaces)) > + return -ENOBUFS; > + > + nla_nest_end(msg, hw_combi); And even this feels like it must already exist in some way? Wouldn't it even be easier to parse for userspace if it wasn't a separate set of attributes? johannes