Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1126568pxb; Fri, 6 Nov 2020 01:26:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJyh+E4BSaVmowf1OX/uAq+7bmS4t7Ql5EOTm+wu1gKHCrfMuBUM/ekiR76TDnZ0JMT0XRz0 X-Received: by 2002:a05:6402:1750:: with SMTP id v16mr1003117edx.241.1604654810502; Fri, 06 Nov 2020 01:26:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604654810; cv=none; d=google.com; s=arc-20160816; b=G2WnglfuIeuHPww7VSYZHboTYhxIW8dzDpQdqejOyNw5FEsQMvfhyLGsET4CaJipv+ y5t5pNoTCHmoGaPn64ekUpjmDYB9hk6OKByQLCS+wH808NkbBkw58h/VF0j/vNdY6jNa LrmZweQybyg8g4cp61sNxgVbWO3EC6V9fyX9gvNM7d9sUxFhgSI9EI1wIaNJvsF/GjIk URsxev6JEajPkS8fPSgroki1kHQI1+TgRp4bwNJjAPTmFFhD/ppYePzgyBe6ox32iKln Lm4qukjRBeRz7TLiErhoIZq3V/H0LFpuK3t1qB9A4eXr2GV7f2lo9KZI9+HLFUmO1oP+ 2uAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=V2FkHhy6EuqnMYkTbXPR92PwcNRueSk3zXG07Cfhddk=; b=MMWqDaRKzQKsE0N/pYWp4c9pt7wZWy7wqanCwnXLpbtImepz9tlrGtk18PVsQvVBgg h8AJf5w440OIQftwo1yQlqGdKFowzsEcUzG9bdN5xKjFc5Yb6alcSjm1bg5oslKhc2fl MAnMq/DwNVTuKLXnRjQAcBEij+69K3h0rGV/xPEstc5UHKLlIsbdebHAnNi3AhyeGIeF SYgqqtplRsswE0Aq+KhX2MMQ1lhlDCYpKMiLF0Zi32nymIFGEYIV4RSv5IlBhGltiCo6 R57Oa7Xjng/P0KyOwsr/1+mFeainPgzdNWYxUpW9ywkrbdjR8HQ/AhJj9UkzTVHnqzz0 8/Hg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bc24si544682edb.438.2020.11.06.01.26.26; Fri, 06 Nov 2020 01:26:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726165AbgKFJYk (ORCPT + 99 others); Fri, 6 Nov 2020 04:24:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725893AbgKFJYk (ORCPT ); Fri, 6 Nov 2020 04:24:40 -0500 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2437CC0613CF for ; Fri, 6 Nov 2020 01:24:40 -0800 (PST) Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94) (envelope-from ) id 1kaxz4-002CEG-A6; Fri, 06 Nov 2020 10:24:38 +0100 Message-ID: Subject: Re: [PATCH V5 1/4] nl80211: add basic multiple bssid support From: Johannes Berg To: John Crispin Cc: linux-wireless@vger.kernel.org, Aloka Dixit Date: Fri, 06 Nov 2020 10:24:37 +0100 In-Reply-To: <20201103091743.1924854-2-john@phrozen.org> References: <20201103091743.1924854-1-john@phrozen.org> <20201103091743.1924854-2-john@phrozen.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-1.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-malware-bazaar: not-scanned Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Tue, 2020-11-03 at 10:17 +0100, John Crispin wrote: > +/** > + * struct ieee80211_multiple_bssid - AP settings for multi bssid > + * > + * @index: the index of this AP in the multi bssid group. > + * @count: the total number of multi bssid peer APs. > + * @parent: non-transmitted BSSs transmitted parents index > + * @ema: Shall the beacons be sent out in EMA mode. > + */ > +struct ieee80211_multiple_bssid { > + u8 index; > + u8 count; > + u32 parent; > + bool ema; > +}; > + Why is that ieee80211_ rather than cfg80211_? We've often (mostly?) reserved that for spec structs. > +/** > + * struct cfg80211_multiple_bssid_data - multiple_bssid data > + * @ies: array of extra information element(s) to add into Beacon frames for multiple > + * bssid or %NULL > + * @len: array of lengths of multiple_bssid.ies in octets > + * @cnt: number of entries in multiple_bssid.ies > + */ > +struct cfg80211_multiple_bssid_data { > + u8 *ies[NL80211_MULTIPLE_BSSID_IES_MAX]; > + size_t len[NL80211_MULTIPLE_BSSID_IES_MAX]; > + int cnt; > +}; Not sure if this is dynamically allocated but if now we could, and then we can make that struct ... { unsigned int cnt; struct { const u8 *data; size_t len; } elems[]; }; and get rid of NL80211_MULTIPLE_BSSID_IES_MAX. > @@ -1072,6 +1101,8 @@ struct cfg80211_beacon_data { > size_t probe_resp_len; > size_t lci_len; > size_t civicloc_len; > + > + struct cfg80211_multiple_bssid_data multiple_bssid; OK, so it's not (right now), but could even be embedded as the dynamically sized struct here at the end ... Or maybe keep some for the common case? But I don't think there's any general limit of 8, so I'm not convinced it makes sense to have such a (somewhat artificial) limit in nl80211. > + * @NL80211_ATTR_MULTIPLE_BSSID_PARENT: If this is a Non-Transmitted BSSID, define > + * the parent (transmitting) interface. by what, interface index? wdev id? > + * @NL80211_ATTR_MULTIPLE_BSSID_INDEX: The index of this BSS inside the multi bssid > + * element. > + * > + * @NL80211_ATTR_MULTIPLE_BSSID_COUNT: The number of BSSs inside the multi bssid element. > + * > + * @NL80211_ATTR_MULTIPLE_BSSID_IES: The Elements that describe our multiple BSS group. Might be better called "ELEMS" or something now, since "IE" is no longer used in the spec. > + * these get passed separately as the kernel might need to split them up for EMA VAP. > + * > + * @NL80211_ATTR_MULTIPLE_BSSID_EMA: Shall the multiple BSS beacons be sent out in EMA mode. Probably should describe the formats a bit - U32, nested with..., flag, etc. > +++ b/net/wireless/nl80211.c > @@ -715,6 +715,11 @@ static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = { > NLA_POLICY_EXACT_LEN(IEEE80211_S1G_CAPABILITY_LEN), > [NL80211_ATTR_S1G_CAPABILITY_MASK] = > NLA_POLICY_EXACT_LEN(IEEE80211_S1G_CAPABILITY_LEN), > + [NL80211_ATTR_MULTIPLE_BSSID_PARENT] = { .type = NLA_U32 }, > + [NL80211_ATTR_MULTIPLE_BSSID_INDEX] = { .type = NLA_U8 }, > + [NL80211_ATTR_MULTIPLE_BSSID_COUNT] = NLA_POLICY_RANGE(NLA_U8, 1, 16), Where does the 16 come from? johannes