#include <linux/ieee802154.h>
#include <net/mac802154.h>
#include <net/ieee802154_netdev.h>
ieee802154_hdr_push_addr(u8 *buf, const struct ieee802154_addr *addr,
if (addr->mode == IEEE802154_ADDR_NONE)
memcpy(buf + pos, &addr->pan_id, 2);
case IEEE802154_ADDR_SHORT:
memcpy(buf + pos, &addr->short_addr, 2);
case IEEE802154_ADDR_LONG:
memcpy(buf + pos, &addr->extended_addr, IEEE802154_ADDR_LEN);
pos += IEEE802154_ADDR_LEN;
ieee802154_hdr_push_sechdr(u8 *buf, const struct ieee802154_sechdr *hdr)
memcpy(buf + 1, &hdr->frame_counter, 4);
switch (hdr->key_id_mode) {
case IEEE802154_SCF_KEY_IMPLICIT:
case IEEE802154_SCF_KEY_INDEX:
case IEEE802154_SCF_KEY_SHORT_INDEX:
memcpy(buf + pos, &hdr->short_src, 4);