diff options
author | Miquel Raynal <miquel.raynal@bootlin.com> | 2023-01-03 17:56:40 +0100 |
---|---|---|
committer | Stefan Schmidt <stefan@datenfreihafen.org> | 2023-01-03 19:34:30 +0100 |
commit | 44def58f5835bbfaf81902c88460fd86a551f4b7 (patch) | |
tree | 3407677917fa4614e7a8dd22c652263b21040392 | |
parent | ieee802154: Add support for user scanning requests (diff) | |
download | linux-44def58f5835bbfaf81902c88460fd86a551f4b7.tar.xz linux-44def58f5835bbfaf81902c88460fd86a551f4b7.zip |
ieee802154: Define a beacon frame header
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>
Acked-by: Alexander Aring <aahringo@redhat.com>
Link: https://lore.kernel.org/r/20230103165644.432209-3-miquel.raynal@bootlin.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
-rw-r--r-- | include/net/ieee802154_netdev.h | 36 |
1 files changed, 36 insertions, 0 deletions
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, |