Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp262611lqh; Thu, 28 Mar 2024 00:47:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUYEnV9Jkh9uIolDt/93x24F50ykLbTgUCSb34x+BKBgDidrE9HaY5oaDH+15RyLdR3spnsLBPoOCyi9Jn48o0edCsMDdimqLciIi73fg== X-Google-Smtp-Source: AGHT+IHhCIYky7oumZWBWKn0m/V+ZCXXKarCE09Mvk1beR75EBjCRevcDcTEyWj3NZs/y6Y73xg3 X-Received: by 2002:a05:6122:380c:b0:4d8:6ae0:36a6 with SMTP id em12-20020a056122380c00b004d86ae036a6mr2625805vkb.3.1711612034564; Thu, 28 Mar 2024 00:47:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711612034; cv=pass; d=google.com; s=arc-20160816; b=Sw7b+lQlKOrIK10w/cl1KxBIRPtB3kIr4dNc+QQSTDZJLfADWgNX5tBwly+p1KJGOa dnzl0bJAMSdQ56RZnRMSIo17spJaH/GbXP0I/gT/8m29223dRjrkhm+O2dN/OVmn7VEL GpPVQRt+ULc/KEkKTJvIy+X1uYFB9XSRhcovJCsDypy2SbBHuOmROTV1LeqgTGxa/hgN 8UcHlwEkFtQrIhsvzuuyuNkKOdlflaVDQWPmyv63pZn3tvO8EFmI+s458dJ0AX9TpswN VjEQ4etuRkJUU3MCneRFzdGPJBAjf4lp9dzdkFB1mSDuyLbkzNrfZ4hN4PRt/MSLNOHv DiTg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=EERVwLfnx9UxbLLME3eZTuSPk1hWRplKd/lN6v8KhsQ=; fh=AN3TPovGZlXbVOAi9DnJbFLhX12tsufHwxfR0pDbwBE=; b=nG+eVPdCkt3WONdtxoV0/it391QvS8vp3/B/S5W26VWl2Ft9agtTdiuxBt8/oPrjag nDAHfoao+6foclV3HKaRQSvq70dSBm+cj8n2bxnvB9o6W1Y0x9Ftp3Zsxk6VqtD6arnY HqHqBUD48oGyq+s9wMvOuK9/pBteAK5JY2Ffw4EypFYRFsg4P8VxJvye6EztCJb4sZY3 RfRuz87/bOoOYaLpbz1IepHH3kddi0+Aoku83OI91qASVqapRe0l95vNl4yA9BhvaidT UCUb1TBbp5IgCbkLHvHtq/yAiKbk6M5jL0LfRsWcaSfTnLNrHCYb/iAw2B8JVErbHESl lMYQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=uDWMqBXd; 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-5444-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-5444-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id x3-20020a0cff23000000b00696857e8526si884065qvt.146.2024.03.28.00.47.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 00:47:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-5444-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=pass header.i=@sipsolutions.net header.s=mail header.b=uDWMqBXd; 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-5444-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-5444-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id D68271C22F43 for ; Thu, 28 Mar 2024 07:47:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0035B50A7E; Thu, 28 Mar 2024 07:46:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="uDWMqBXd" 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 1040428DB3 for ; Thu, 28 Mar 2024 07:46:55 +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=1711612017; cv=none; b=aIBn9XOtzZjZfK7HP4H2NXfGzQeMeGTzp7TjR/AQPEYXPHzpHmqvtWWAo/lpAmiV1ieLvfNUGLO2JJ/64EDukaof2SrstNYFajFTyQdWaGftpYb48R8nRmp/ZdwyzGaw1oGpV82CttmvHq33UXtCulPDA9X4Pdnf+kHLPgCuIPc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711612017; c=relaxed/simple; bh=RIcp6iZ/oHdu6jbyqpVGhaFJisEzzppkGN6I0pVkpfg=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=QYTswr42U8M44NNPhrHxd1CQRYs/Yo/K2f23zvgGAM17xhygKz7VtLzYhjoabTY2HqoBF08mgR8yjsBTqvXMsQCh4Q8+LpAJ6/TbQLQU4422t5NasqCks4ocX4vxMlEsNyyUoIdXrSYDx2LNKkJfMA+jFHe5qaghqaDFQ4MJgE8= 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=uDWMqBXd; 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=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=EERVwLfnx9UxbLLME3eZTuSPk1hWRplKd/lN6v8KhsQ=; t=1711612016; x=1712821616; b=uDWMqBXdHeZn0TbnD//Tryt6QOoqYaeHG6cFuXbfiKetYGU IlarldI0pi9EH0NyhcFfqCw45x6GN4fVXmM1wh/3S2ZZiICqltWumOzjCM3/IWexSzOILBE+MfLlp YmSMaUXdioHPi30wpToPM/K0xK6V5Q0+0X2BxCpSQPpBk6HVMcelevkJQMM2bXIoaEfl3+RRQ9J5V zyOIUTlyX9gh9+aHZDnWyHsv1nRMFunT2zFuq/+YK97ZB2OUVwcGqnIWoPEotaXnV8ozYZhvgHu1v ab0cQCahjBhKFbJv/7j0RUgg9Khy2taz7rUhcY8FmKIzilL99+OXc+ZZMNqdgPeQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1rpkTL-00000000koo-3yZ3; Thu, 28 Mar 2024 08:46:52 +0100 Message-ID: Subject: Re: [PATCH 01/13] wifi: cfg80211: Add provision to advertise multiple radio in one wiphy From: Johannes Berg To: Karthikeyan Periyasamy , ath12k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Vasanthakumar Thiagarajan Date: Thu, 28 Mar 2024 08:46:50 +0100 In-Reply-To: <20240328072916.1164195-2-quic_periyasa@quicinc.com> References: <20240328072916.1164195-1-quic_periyasa@quicinc.com> <20240328072916.1164195-2-quic_periyasa@quicinc.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.4 (3.50.4-1.fc39) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-malware-bazaar: not-scanned That's a big set, not sure I can review it all at once :) > +struct ieee80211_chans_per_hw { > + u32 n_chans; > + struct ieee80211_channel chans[]; That should probably use __counted_by() these days. > + * @hw_chans: list of the channels supported by every constituent underl= ying > + * hardware. Drivers abstracting multiple discrete hardware (radio) unde= r > + * one wiphy can advertise the list of channels supported by each physic= al > + * hardware in this list. Underlying hardware specific channel list can = be > + * used while describing interface combination for each of them. I'd expect there to be a limit on channels being within a single band on a single "hardware"? > + * @num_hw: number of underlying hardware for which the channels list ar= e "number of [...] hardware" sounds odd to me, perhaps 'devices'? > + * advertised in @hw_chans, 0 if multi hardware is not support. Expect >= 2 > + * if multi hardware is support. >1, I guess, not >2 - and =3D=3D1 makes no sense really, maybe it should sa= y that? > +static bool > +cfg80211_hw_chans_in_supported_list(struct wiphy *wiphy, > + const struct ieee80211_chans_per_hw *chans) > +{ > + enum nl80211_band band; > + struct ieee80211_supported_band *sband; > + int i, j; > + > + for (i =3D 0; i < chans->n_chans; i++) { > + bool found =3D false; So if there should be a limit on single band per HW then probably this check could be written more efficiently: finding the band first based on the first channel, and then checking all the channels exist within the band. johannes