Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1988797ybg; Thu, 30 Jul 2020 07:44:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySPySrY4dA+MiT7VVpOPXosoUFQeM/S376uIl5tMvxOc1GZFALmjuuWNdqqoDP7CMGAjAh X-Received: by 2002:a17:906:3b91:: with SMTP id u17mr2834740ejf.305.1596120278525; Thu, 30 Jul 2020 07:44:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596120278; cv=none; d=google.com; s=arc-20160816; b=GolWMEmWD4yfFKWmZWnCTl+H4/Z+ADora5klV1pNScWL8hPTKmv9pHsA2xvxyeUeVy 8dFeO9kG4YEQXlfWNseapRx0aVXPqLfmzRi3H9WUKq+6MIgMenyYOkK21OsyCOsNmksE fW6N6kPl3wZ5lbjok4jczibElgodrPp2Y16RGMuSrawpyERnX7CE8WZBg3c0P8UbTrLU a29vh2JFYA7eY3bo6xoXF6E1dE6on4hlvsTOEmWxsh2pd1ZMDNn0fzzazqf6Hb1JG8Uk fEabjLqlpjt5vWMNnPVk1k05Zv1hUIkeiT9swcy/qj5q4NZk0/IysC2U/BC9bA9gRV4h nACg== 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 :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=GXZ0hZtH3eDDYB19aG8/gX7LBKY2xl0Jc3cWAdOggF4=; b=0CuyAPjYHVIAe5nuUQ/l4PTGOskbvFeH+qj5N3fknNwp2dO/p3ZEnb2/8jIEXZgYxI qAMalirAf07NWiVIIpHWezENtg9uXl+I30r7dy4q4cilu1ONeJca4WPwlPxngHAzUVAN D1kcRyNGa1ebc7KRh+c4Zmyoqi/j/hOXcmQm5RfwIRGrIyoWGuj1lz8sW8Aqyar+o6ZH wK0RplJfu/SVD3Tn/VIaRITcjd4asMINLSP8FU7hvj3xdiUPmbXBVYAEUd76+xzyeTig raVSrZOjQUUpstwB3IxUVCNkuZ4ofs2fxKW9diu6WfoW7txLc2tP2ZoZ4LNp+SUGm+pf ijtA== 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 lt11si3204657ejb.436.2020.07.30.07.44.14; Thu, 30 Jul 2020 07:44:38 -0700 (PDT) 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 S1729672AbgG3OnU (ORCPT + 99 others); Thu, 30 Jul 2020 10:43:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728297AbgG3OnR (ORCPT ); Thu, 30 Jul 2020 10:43:17 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71642C061574 for ; Thu, 30 Jul 2020 07:43:17 -0700 (PDT) Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.93) (envelope-from ) id 1k19m6-00DaQa-Et; Thu, 30 Jul 2020 16:43:15 +0200 Message-ID: Subject: Re: [PATCH v4 1/2] nl80211: Add FILS discovery support From: Johannes Berg To: Aloka Dixit Cc: linux-wireless@vger.kernel.org Date: Thu, 30 Jul 2020 16:43:13 +0200 In-Reply-To: <20200618050427.5891-2-alokad@codeaurora.org> References: <20200618050427.5891-1-alokad@codeaurora.org> <20200618050427.5891-2-alokad@codeaurora.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.4 (3.36.4-1.fc32) 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 On Wed, 2020-06-17 at 22:04 -0700, Aloka Dixit wrote: > + * @NL80211_FILS_DISCOVERY_TMPL: Optional FILS discovery template. > + * It has contents of IEEE Std 802.11ai-2016 9.6.8.36 FILS discovery frame > + * (Figure 9-687a). Is that "It has (contents of ... FILS discovery frame) ..." or "It has contents of (... FILS discovery frame) ..."? I mean, is that with or without headers? The wording doesn't seem entirely clear to me. OTOH, if it's with headers, how could it be optional? In fact, either way, how is it optional? > +static int nl80211_parse_fils_discovery(struct nlattr *attrs, > + struct cfg80211_ap_settings *params) > +{ > + struct nlattr *tmpl; > + struct nlattr *tb[NL80211_FILS_DISCOVERY_MAX + 1]; > + int ret; > + struct cfg80211_fils_discovery *fd = ¶ms->fils_discovery; > + > + ret = nla_parse_nested(tb, NL80211_FILS_DISCOVERY_MAX, attrs, > + fils_discovery_policy, NULL); > + if (ret) > + return ret; > + > + if (!tb[NL80211_FILS_DISCOVERY_INT_MIN] || > + !tb[NL80211_FILS_DISCOVERY_INT_MAX]) > + return -EINVAL; > + > + fd->min_interval = nla_get_u32(tb[NL80211_FILS_DISCOVERY_INT_MIN]); > + fd->max_interval = nla_get_u32(tb[NL80211_FILS_DISCOVERY_INT_MAX]); > + > + tmpl = tb[NL80211_FILS_DISCOVERY_TMPL]; > + if (tmpl) { > + fd->tmpl = nla_data(tmpl); > + fd->tmpl_len = nla_len(tmpl); And if it's with headers, it should have some kind of minimum length too? You've only put a maximum length into the policy. (Which reminds me I wanted to have an NLA_POLICY_RANGE(NLA_BINARY, min, max) but haven't done that yet ...) johannes