All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Alexander Aring <alex.aring@gmail.com>,
	Stefan Schmidt <stefan@datenfreihafen.org>,
	linux-wpan@vger.kernel.org
Cc: David Girault <david.girault@qorvo.com>,
	Romuald Despres <romuald.despres@qorvo.com>,
	Frederic Blain <frederic.blain@qorvo.com>,
	Nicolas Schodet <nico@ni.fr.eu.org>,
	Guilhem Imberton <guilhem.imberton@qorvo.com>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Eric Dumazet <edumazet@google.com>,
	netdev@vger.kernel.org, Miquel Raynal <miquel.raynal@bootlin.com>
Subject: [PATCH wpan-next v2 2/6] ieee802154: Define a beacon frame header
Date: Sat, 17 Dec 2022 01:02:22 +0100	[thread overview]
Message-ID: <20221217000226.646767-3-miquel.raynal@bootlin.com> (raw)
In-Reply-To: <20221217000226.646767-1-miquel.raynal@bootlin.com>

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 <miquel.raynal@bootlin.com>
---
 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 4c33a20ea57f..2f2196049a86 100644
--- a/include/net/ieee802154_netdev.h
+++ b/include/net/ieee802154_netdev.h
@@ -38,6 +38,42 @@
 
 #include <net/cfg802154.h>
 
+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 <asm/byteorder.h>"
+#endif
+} __packed;
+
 struct ieee802154_sechdr {
 #if defined(__LITTLE_ENDIAN_BITFIELD)
 	u8 level:3,
-- 
2.34.1


  parent reply	other threads:[~2022-12-17  0:02 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-17  0:02 [PATCH wpan-next v2 0/6] IEEE 802.15.4 passive scan support Miquel Raynal
2022-12-17  0:02 ` [PATCH wpan-next v2 1/6] ieee802154: Add support for user scanning requests Miquel Raynal
2022-12-17  0:02 ` Miquel Raynal [this message]
2022-12-17  0:02 ` [PATCH wpan-next v2 3/6] ieee802154: Introduce a helper to validate a channel Miquel Raynal
2023-01-03 14:14   ` Stefan Schmidt
2023-01-03 14:59     ` Miquel Raynal
2023-01-03 16:58       ` Miquel Raynal
2022-12-17  0:02 ` [PATCH wpan-next v2 4/6] mac802154: Prepare forcing specific symbol duration Miquel Raynal
2022-12-17  0:02 ` [PATCH wpan-next v2 5/6] mac802154: Add MLME Tx locked helpers Miquel Raynal
2022-12-17  0:02 ` [PATCH wpan-next v2 6/6] mac802154: Handle passive scanning Miquel Raynal
2023-01-03  1:04   ` Alexander Aring
2023-01-03  1:06     ` Alexander Aring
2023-01-03  1:15     ` Alexander Aring
2023-01-03 15:10       ` Miquel Raynal
2023-01-04  1:00         ` Alexander Aring
2023-01-05  9:24           ` Miquel Raynal
2023-01-03 14:42   ` Stefan Schmidt
2023-01-03  1:17 ` [PATCH wpan-next v2 0/6] IEEE 802.15.4 passive scan support Alexander Aring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221217000226.646767-3-miquel.raynal@bootlin.com \
    --to=miquel.raynal@bootlin.com \
    --cc=alex.aring@gmail.com \
    --cc=davem@davemloft.net \
    --cc=david.girault@qorvo.com \
    --cc=edumazet@google.com \
    --cc=frederic.blain@qorvo.com \
    --cc=guilhem.imberton@qorvo.com \
    --cc=kuba@kernel.org \
    --cc=linux-wpan@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nico@ni.fr.eu.org \
    --cc=pabeni@redhat.com \
    --cc=romuald.despres@qorvo.com \
    --cc=stefan@datenfreihafen.org \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.