Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp2241630ybg; Thu, 30 Jul 2020 14:21:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSxiZBJx0gcA7EGoX04ZZspnFKI7RMg0g5xjOYVh634ToPCMmrh27EkV/0C6mI0cAsSxqh X-Received: by 2002:a17:906:3b83:: with SMTP id u3mr996258ejf.55.1596144092573; Thu, 30 Jul 2020 14:21:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596144092; cv=none; d=google.com; s=arc-20160816; b=Ta5mazbW9WZTkgzUJUTQ+wFk8OGyCV1NNWr1EYMmCSPPfAiKasNQ91ql1arZqX6wdr sbdhJhI/wANObpNb3IfyHNy5F5/+lY4bGTpA7/t8mPzp0d5HBh7iyfBRnJtcgskTcgth p/4f2ObSSYExhq4lvFdSrjOfFvEMuGR1EEkEbkhbG9rYcOioDGIxcNn1ZTmHruQ36mMv hVc45Og3/+BlxxS9RhbrsxtgZhca+Tv2aAddUTQV09be9CJ1Rxw6QuLxga7WYXH+eBVZ EriaIjV+oHPuaJb9CLq/U6NFmfGe/U4GuDzIEWXTrKQ2K3dKo3d6tBwoTu8zkPsoWcIv DpHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature; bh=VYzqPduQzYY5DMAxe9wN74AoN74LbLs+XuxwlGN8PjI=; b=bha1o4ppqoj14fpbBUGoJ4v/nZQgmpGHPggzi0y+YCWr0O+OZ7tF9ef+vIm8P1YXDm 5+o6KbBG3mt7562GTVStpFfiWWqoA9majjmyrh3OpX1Ekj556hQoOeqMLo60TJos0wQ7 aNu1Q8hAhfQ4brBUipdmWx7mTySvg9RMd0GPhedqpowgW8Mh8xRBArgwFJS8BEn5OBV1 HkmEj+WVks0SL6KfJQbHnQF71Z6AbK+3Vv6VBWPzkyKqPII9Yl8r9TYp7nJEovPStA4r EDUKAXsKdN4wotEJm7Ku2+yYFagNX1gbVbuPKvJem1L82mtYFNPYhspf4TNUrS0tyglf aXig== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=ESvibcEu; 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 t19si3933876ejj.568.2020.07.30.14.20.58; Thu, 30 Jul 2020 14:21:32 -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; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=ESvibcEu; 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 S1730633AbgG3VRt (ORCPT + 99 others); Thu, 30 Jul 2020 17:17:49 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:29772 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730281AbgG3VRt (ORCPT ); Thu, 30 Jul 2020 17:17:49 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1596143868; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=VYzqPduQzYY5DMAxe9wN74AoN74LbLs+XuxwlGN8PjI=; b=ESvibcEuEwNfFATdQrorP6HdWb/+O0jYzpLAToZjySODSP2LN44EAwA4Z3PSvQgRV48qdLGh r7EhaD8DsJBhTjVGmq3p/TunwzmAULfPzNr9LYZDcmvTOuMF8Aan2FO/QWMJHTCsy1Iaf4yR l+jtVe6dSlsU/FsKGTV5ZDCPTNc= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n15.prod.us-east-1.postgun.com with SMTP id 5f2338fc798b10296896c122 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Thu, 30 Jul 2020 21:17:48 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 3BC4DC433C9; Thu, 30 Jul 2020 21:17:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: alokad) by smtp.codeaurora.org (Postfix) with ESMTPSA id 6711CC433C6; Thu, 30 Jul 2020 21:17:46 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 30 Jul 2020 14:17:46 -0700 From: Aloka Dixit To: Johannes Berg Cc: linux-wireless@vger.kernel.org, linux-wireless-owner@vger.kernel.org Subject: Re: [PATCH v4 1/2] nl80211: Add FILS discovery support In-Reply-To: References: <20200618050427.5891-1-alokad@codeaurora.org> <20200618050427.5891-2-alokad@codeaurora.org> Message-ID: <2b1ea1c4baedcb119f4e632b26399071@codeaurora.org> X-Sender: alokad@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 2020-07-30 07:43, Johannes Berg wrote: > 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? > Template has management frame headers as well. Will change the wording accordingly. I made the template optional because FILS discovery may or may not be offloaded to FW. Another way would be to make it mandatory here. >> +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 ...) > Yeah, I looked through existing examples for NLA_BINARY, those provide only the higher bound for length. But I can modify it to range once that is added. > johannes