Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1466748pxb; Wed, 12 Jan 2022 15:44:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJwa8/qjtFLqNbh0meLh78DIlI9UDTY/yuWr46XhLRpd4Q3WsLW5lqCag8CM67uaNg7zsn25 X-Received: by 2002:aa7:8018:0:b0:4bb:361b:b378 with SMTP id j24-20020aa78018000000b004bb361bb378mr1671506pfi.79.1642031088235; Wed, 12 Jan 2022 15:44:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642031088; cv=none; d=google.com; s=arc-20160816; b=Ru1cW9FEXTlWCS5UX+oWn5HTyORNQqct2JWdSfswmjOMg7iCdkjr2wmdpy5s+JPL/E ujYfUZ/019jD3GLjqkxQgXrpTE/Hz5+WHCPqHH/QjQBS2Tfhrgo/w92PDPirGz24gZGn qscZfrRN8GcHWg6NfQCEfqPmHMhEaUAg8S0Mjje9anSiWSumbZb6rBfIlMS5axWLuPx3 9exmJhFqPniy069SroL5Eh2Pc4k6BKftnzcbo8D4wKv6puLfZMpwkSqcdAdrXodqnL39 FOTI9kJx4O0PeGMNP8eqdYILltCfy/eBoaOkHkl1ZRDm+e9Ubs/DrxgW3B5ikSFxYXY1 wZUA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=pxB9Dibz6IIYkHxqXuTabSFs/UibjxaB5HgSVs8YLos=; b=YqNpE8hfnezxxeCfZCRuv/ZoiA93AtvfZaKlPh1LdbPUQpF7KnfqV8adh/MzHUV5Ji 16EnOqL5vTdh71gfJ7w4zdbhFi7Tol40gjy0HPP8RUBQxWgVaN/216qHBWVdSPRSmUlQ wCvuqfzsO51itpp96WBeNRfPLW7kwwJnVWpAxoBSBdavDOpc54LACst4CqSuD+JlGAll edcVu/VobyZpiu491UBC7k1J4B6vEXKYnFbTWcpbsSWDolsxzbNfuXgfnqJajyefBoFk tP2F8tunM6uvV/2UPqAk496f3ir7WsDWbI/fxZtcyFrrtIdVfsGiPifx6pdCmSxysYMe v1PQ== 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 j5si1028999pgk.532.2022.01.12.15.44.39; Wed, 12 Jan 2022 15:44:48 -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 S1355674AbiALReT (ORCPT + 71 others); Wed, 12 Jan 2022 12:34:19 -0500 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:37941 "EHLO relay7-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355660AbiALRdu (ORCPT ); Wed, 12 Jan 2022 12:33:50 -0500 Received: (Authenticated sender: miquel.raynal@bootlin.com) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id D19B520016; Wed, 12 Jan 2022 17:33:44 +0000 (UTC) From: Miquel Raynal To: Alexander Aring , Stefan Schmidt , linux-wpan@vger.kernel.org, "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org Cc: Michael Hennerich , Harry Morris , Varka Bhadram , Xue Liu , Alan Ott , David Girault , Romuald Despres , Frederic Blain , Nicolas Schodet , Thomas Petazzoni , linux-wireless@vger.kernel.org, Miquel Raynal Subject: [wpan-next v2 15/27] net: ieee802154: Define a beacon frame header Date: Wed, 12 Jan 2022 18:33:00 +0100 Message-Id: <20220112173312.764660-16-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220112173312.764660-1-miquel.raynal@bootlin.com> References: <20220112173312.764660-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This definition will be used when adding support for scanning and defines the content of a beacon frame header as in the 802.15.4 specification. Signed-off-by: Miquel Raynal --- include/net/ieee802154_netdev.h | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/include/net/ieee802154_netdev.h b/include/net/ieee802154_netdev.h index d0d188c3294b..fb6ac354a7b6 100644 --- a/include/net/ieee802154_netdev.h +++ b/include/net/ieee802154_netdev.h @@ -22,6 +22,42 @@ #include +struct ieee802154_beacon_hdr { +#if defined(__LITTLE_ENDIAN_BITFIELD) + u16 beacon_order:4, + superframe_order:4, + final_cap_slot:4, + battery_life_ext:1, + reserved0:1, + pan_coordinator:1, + assoc_permit:1; + u8 gts_count:3, + gts_reserved:4, + gts_permit:1; + u8 pend_short_addr_count:3, + reserved1:1, + pend_ext_addr_count:3, + reserved2:1; +#elif defined(__BIG_ENDIAN_BITFIELD) + u16 assoc_permit:1, + pan_coordinator:1, + reserved0:1, + battery_life_ext:1, + final_cap_slot:4, + superframe_order:4, + beacon_order:4; + u8 gts_permit:1, + gts_reserved:4, + gts_count:3; + u8 reserved2:1, + pend_ext_addr_count:3, + reserved1:1, + pend_short_addr_count:3; +#else +#error "Please fix " +#endif +} __packed; + struct ieee802154_sechdr { #if defined(__LITTLE_ENDIAN_BITFIELD) u8 level:3, -- 2.27.0