Commit 44def58f authored by Miquel Raynal's avatar Miquel Raynal Committed by Stefan Schmidt

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: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Acked-by: default avatarAlexander Aring <aahringo@redhat.com>
Link: https://lore.kernel.org/r/20230103165644.432209-3-miquel.raynal@bootlin.comSigned-off-by: default avatarStefan Schmidt <stefan@datenfreihafen.org>
parent ed3557c9
...@@ -38,6 +38,42 @@ ...@@ -38,6 +38,42 @@
#include <net/cfg802154.h> #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 { struct ieee802154_sechdr {
#if defined(__LITTLE_ENDIAN_BITFIELD) #if defined(__LITTLE_ENDIAN_BITFIELD)
u8 level:3, u8 level:3,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment