Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp576051ybi; Fri, 12 Jul 2019 01:04:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqytMHj2VIUXqKNu7eI6lQ/vv/z1ubQ8VZ5uUR7KJLik2zc/KQjO60G8qkcOepvlYpz8wZAY X-Received: by 2002:a63:4612:: with SMTP id t18mr208496pga.85.1562918646292; Fri, 12 Jul 2019 01:04:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562918646; cv=none; d=google.com; s=arc-20160816; b=qw3EwNoouZWaU74yJSupoVRK0Rgucwlx+W9e2Axo7WN27jB+RvAvR3DiAcb7tKM1MT kEIxE3MFoL3xFTQiU+fo6QDwd4BuX3YaKICbuhGcP4hfpVzsTD/MCKvxTYoEAlhkHcZ7 a+h5XHBhlgC81Cl6VLXAW9nZYSI5FvMlLarTNXJW/UAV+PRVkHL/SSdssJNChJ/XM7RF O90/cvqRA+tXDUFOPTEmUVYngLSwYfV874r6Px3FKxr3a3MAyxBX+5NUetKqJWGY+Ebv IB3xaRQvfgfb2hcCaKPK8SLOUQWZifuJanU7lJ97y3YFNq+of/vlcyzjf2vI4S+Ppuy3 9ILA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=7FdHa2oL2+GX8UgHWlgF5hEq5YRIRb4Kd0lprDWN8ds=; b=OxfoJxvbOgUX9TvnpD+lFXpuC6KINFCmL2+e5BTCJgGXdh5LopmmeW6ZcJqATgMURo IYtDYm8mGF77lvDXafZPiT7IeNfztDL9SEA5qvTxGY//4PthnkPRm+WuyffQp27gzzky /2bKBqfDNyRXE4T0RV0zTnsqyiqFf/5DUsUaGXGVxoublIQq/45q9zjsCaBs7gF/jUHl KmAEn15Hr1sjkDyLzPhqHfGC+vKffQmAiS9hStE0JgK8UFtm5aS1YArXRWoWocnhX5Bv /fcdNFSiEMR3bP31ZWo29CmKnLgGFF0NMYLzG9FEark+eZxtRuA44tp93qBcizNVNq/l h6Lg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e14si7665283pfd.141.2019.07.12.01.03.51; Fri, 12 Jul 2019 01:04:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726382AbfGLIDH (ORCPT + 99 others); Fri, 12 Jul 2019 04:03:07 -0400 Received: from s3.sipsolutions.net ([144.76.43.62]:54390 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726258AbfGLIDG (ORCPT ); Fri, 12 Jul 2019 04:03:06 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1hlqWG-0005M7-MJ; Fri, 12 Jul 2019 10:03:04 +0200 Message-ID: Subject: Re: [PATCH v3 1/2] nl80211: Add support for EDMG channels From: Johannes Berg To: Alexei Lazar Cc: linux-wireless@vger.kernel.org, wil6210@qti.qualcomm.com Date: Fri, 12 Jul 2019 10:03:03 +0200 In-Reply-To: References: <1561458567-31866-1-git-send-email-ailizaro@codeaurora.org> <1561458567-31866-2-git-send-email-ailizaro@codeaurora.org> <77b693b163faf61d72b2734b97081734f0345211.camel@sipsolutions.net> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 (3.28.5-3.fc28) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Hi Alexei, > Channels is a bitmap of 2.16GHz (normal) channels 1..6 > bw_config defines the allowed combinations (bonding) of these "normal" > channels. But bw_config is not itself some sort of bitmap, it's just a kind of enum value, right? Maybe we should actually use an enum for it rather than having the hardcoded values? > Let's say driver reports support for channels number 1,2,3 > (channels=0x7). > Example #1: driver reports bw_config=5 > bw_config=5 allows combinations of 1 or 2 channels. > It means driver can operate in one of these combinations: > Channel 1 only > Channel 2 only > Channel 3 only > Channels 1+2 (cb2) > Channels 2+3 (cb2) OK. > The primary channel BTW must be one of the operational channels so if > driver choose channels 1+3 then primary channel cannot be 2. Makes sense. > > It seems to me that you should, however, expose n_bonded_ch to > > userspace? We do expose all the details about the bitrate normally, see > > nl80211_put_sta_rate(). We do calculate the bitrate to expose that too, > > but do expose all the details too. > > > > Hmm. Looking at that, it looks like DMG doesn't actually do that. So > > perhaps not, though it seems to me that it ought to be possible? > > We will look into that and address in separate patch. Right, separate patch definitely makes sense. Thanks! > > > + /* check bw_config against contiguous edmg channels */ > > > + switch (chandef->edmg.bw_config) { > > > + case 4: > > > + case 8: > > > + case 12: > > > + if (max_continuous < 1) > > > + return false; > > > + break; I think that indeed this could be clearer if you have an enum. johannes