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>
This commit is contained in:
Miquel Raynal 2023-01-03 17:56:40 +01:00 коммит произвёл Stefan Schmidt
Родитель ed3557c947
Коммит 44def58f58
1 изменённых файлов: 36 добавлений и 0 удалений

Просмотреть файл

@ -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,