Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1355391ybl; Wed, 28 Aug 2019 13:25:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqxet5RNfUH85e7alfc11SVWDGqntsumEImsZC3URSd+259UKxWs7xHgGFjZ7vUD+7cAUV7q X-Received: by 2002:a63:6c7:: with SMTP id 190mr4996481pgg.7.1567023950391; Wed, 28 Aug 2019 13:25:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567023950; cv=none; d=google.com; s=arc-20160816; b=fVt0uYq5ck2bA+6wR6NTWiMTBPeIz5ock0JOPnrJSJzbMKssMcBnm6pjjfsYg2VIr/ IDJFyqj/lm1QZUAvnAdyBK8IGqFrj+w0+H3YBq6U4an0lSZ39gBi0z8YqYD4VW8Vqqw1 8AcD/Sx97KXcubLKSarIchRY3b+w0/GxdZPeXo6A9F+3GFJqWrMJPGjbf705hyeyjkqt IXscCBFQwvk3nBPziaEd5Uu06Ly7vXPXuzRYVTFBoJcD5cu9/od4Y6hZc9p22Pu8oSil QpXAeb3RwWO2+QdnGLLy3d4kqlerbFI2oIdAoB3t4ory3nSnZ6HxxSmvHyRjOpro5wCr 1lQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=BOkHqJcEeTIeUdnRowD8+k4huug5pMgHiHnawtqUN08=; b=y1RQXh71ZuyZzce6T5te/UBWVtn5icJP17TsuRUmA0bCO2ybIBAUSid0K3g2lJ1LdP 0eutJ0rlygNHjFlqzUP4oeE3NWhodZRUzBEO4oIxiAucRQt+lCBtnF5cUyLOgo5tcMxs UB99vinR2hqs94x31A2zjy6cer2C/XAJYZX0N4Xd4aQLQQlya3fbsKYUMPuwwO/xUzmB /J2ad9V0jhWsQMgcTsm6bPbCjTc1XlUq6SIdB62PptMY7BZ8B8BVLdSlZoNLy+5/EJZg T9QDzb7+csh/OoQ7S16WF99c1euF5lVuzwVh/bURLj9bik6WcHj2vt0pqepKL0deskxs I/JA== 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 g2si249123pfq.160.2019.08.28.13.25.23; Wed, 28 Aug 2019 13:25:50 -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 S1726805AbfH1UYX convert rfc822-to-8bit (ORCPT + 99 others); Wed, 28 Aug 2019 16:24:23 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:33281 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726687AbfH1UYX (ORCPT ); Wed, 28 Aug 2019 16:24:23 -0400 Received: from marcel-macbook.fritz.box (p4FEFC580.dip0.t-ipconnect.de [79.239.197.128]) by mail.holtmann.org (Postfix) with ESMTPSA id CA704CEC82; Wed, 28 Aug 2019 22:33:07 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: [PATCH v2] cfg80211: add local BSS receive time to survey information From: Marcel Holtmann In-Reply-To: Date: Wed, 28 Aug 2019 22:24:21 +0200 Cc: Felix Fietkau , linux-wireless@vger.kernel.org Content-Transfer-Encoding: 8BIT Message-Id: References: <20190828102042.58016-1-nbd@nbd.name> <9189B2C1-6E5B-4457-9354-A010F946EE33@holtmann.org> <18c4232675c7b4f13fbfe9e5d8e9364a0908f316.camel@sipsolutions.net> To: Johannes Berg X-Mailer: Apple Mail (2.3445.104.11) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Hi Johannes, >>> No, as usual, that would break ABI. PAD is a regular attribute, just >>> empty and ignored for aligning 64-bit values. >> >> then I do not grok on how the nla_put_u64_64bit works, but that is >> fine. >> >> I assumed these are similar to the NL80211_SURVEY_INFO_MAX which we >> also always move, but also not expected to be part of the API as a >> fixed value. > > No no, the _MAX is just the token we use for knowing what we want as the > maximum when parsing etc. > > The _PAD is actually a real attribute, basically nla_put_u64_64bit() > will do "nla_put_flag(_PAD)" if and only if "offset % 8 == 0", in order > to actually 64-bit align the 64-bit value in the following attribute. > > (Note that offset % 8 can only be 0 or 4, due to the way netlink > attributes work.) I get that part now. So the kernel is inserting a _PAD, but userspace is still not doing that. So for NL80211_ATTR_WDEV we should be doing the same actually? Regards Marcel