11802d0beSThomas Gleixner // SPDX-License-Identifier: GPL-2.0-only 22c21d115SSergey Lapin /* 32c21d115SSergey Lapin * nl802154.h 42c21d115SSergey Lapin * 52c21d115SSergey Lapin * Copyright (C) 2007, 2008 Siemens AG 62c21d115SSergey Lapin */ 72c21d115SSergey Lapin 82c21d115SSergey Lapin #include <linux/kernel.h> 92c21d115SSergey Lapin #include <net/netlink.h> 102c21d115SSergey Lapin #include <linux/nl802154.h> 112c21d115SSergey Lapin 122c21d115SSergey Lapin #define NLA_HW_ADDR NLA_U64 132c21d115SSergey Lapin 1478090a58SDmitry Baryshkov const struct nla_policy ieee802154_policy[IEEE802154_ATTR_MAX + 1] = { 152c21d115SSergey Lapin [IEEE802154_ATTR_DEV_NAME] = { .type = NLA_STRING, }, 162c21d115SSergey Lapin [IEEE802154_ATTR_DEV_INDEX] = { .type = NLA_U32, }, 171eaa9d03SDmitry Eremin-Solenikov [IEEE802154_ATTR_PHY_NAME] = { .type = NLA_STRING, }, 182c21d115SSergey Lapin 192c21d115SSergey Lapin [IEEE802154_ATTR_STATUS] = { .type = NLA_U8, }, 202c21d115SSergey Lapin [IEEE802154_ATTR_SHORT_ADDR] = { .type = NLA_U16, }, 212c21d115SSergey Lapin [IEEE802154_ATTR_HW_ADDR] = { .type = NLA_HW_ADDR, }, 222c21d115SSergey Lapin [IEEE802154_ATTR_PAN_ID] = { .type = NLA_U16, }, 232c21d115SSergey Lapin [IEEE802154_ATTR_CHANNEL] = { .type = NLA_U8, }, 249322cd7cSJakub Kicinski [IEEE802154_ATTR_BCN_ORD] = { .type = NLA_U8, }, 259322cd7cSJakub Kicinski [IEEE802154_ATTR_SF_ORD] = { .type = NLA_U8, }, 269322cd7cSJakub Kicinski [IEEE802154_ATTR_PAN_COORD] = { .type = NLA_U8, }, 279322cd7cSJakub Kicinski [IEEE802154_ATTR_BAT_EXT] = { .type = NLA_U8, }, 289322cd7cSJakub Kicinski [IEEE802154_ATTR_COORD_REALIGN] = { .type = NLA_U8, }, 2916eea493SDmitry Eremin-Solenikov [IEEE802154_ATTR_PAGE] = { .type = NLA_U8, }, 30*b60673c4SJakub Kicinski [IEEE802154_ATTR_DEV_TYPE] = { .type = NLA_U8, }, 312c21d115SSergey Lapin [IEEE802154_ATTR_COORD_SHORT_ADDR] = { .type = NLA_U16, }, 322c21d115SSergey Lapin [IEEE802154_ATTR_COORD_HW_ADDR] = { .type = NLA_HW_ADDR, }, 332c21d115SSergey Lapin [IEEE802154_ATTR_COORD_PAN_ID] = { .type = NLA_U16, }, 342c21d115SSergey Lapin [IEEE802154_ATTR_SRC_SHORT_ADDR] = { .type = NLA_U16, }, 352c21d115SSergey Lapin [IEEE802154_ATTR_SRC_HW_ADDR] = { .type = NLA_HW_ADDR, }, 362c21d115SSergey Lapin [IEEE802154_ATTR_SRC_PAN_ID] = { .type = NLA_U16, }, 372c21d115SSergey Lapin [IEEE802154_ATTR_DEST_SHORT_ADDR] = { .type = NLA_U16, }, 382c21d115SSergey Lapin [IEEE802154_ATTR_DEST_HW_ADDR] = { .type = NLA_HW_ADDR, }, 392c21d115SSergey Lapin [IEEE802154_ATTR_DEST_PAN_ID] = { .type = NLA_U16, }, 402c21d115SSergey Lapin 412c21d115SSergey Lapin [IEEE802154_ATTR_CAPABILITY] = { .type = NLA_U8, }, 422c21d115SSergey Lapin [IEEE802154_ATTR_REASON] = { .type = NLA_U8, }, 432c21d115SSergey Lapin [IEEE802154_ATTR_SCAN_TYPE] = { .type = NLA_U8, }, 442c21d115SSergey Lapin [IEEE802154_ATTR_CHANNELS] = { .type = NLA_U32, }, 452c21d115SSergey Lapin [IEEE802154_ATTR_DURATION] = { .type = NLA_U8, }, 462c21d115SSergey Lapin [IEEE802154_ATTR_ED_LIST] = { .len = 27 }, 471eaa9d03SDmitry Eremin-Solenikov [IEEE802154_ATTR_CHANNEL_PAGE_LIST] = { .len = 32 * 4, }, 489b2777d6SPhoebe Buckheister 499b2777d6SPhoebe Buckheister [IEEE802154_ATTR_TXPOWER] = { .type = NLA_S8, }, 5084dda3c6SPhoebe Buckheister [IEEE802154_ATTR_LBT_ENABLED] = { .type = NLA_U8, }, 51ba08fea5SPhoebe Buckheister [IEEE802154_ATTR_CCA_MODE] = { .type = NLA_U8, }, 526ca00197SPhoebe Buckheister [IEEE802154_ATTR_CCA_ED_LEVEL] = { .type = NLA_S32, }, 534244db1bSPhoebe Buckheister [IEEE802154_ATTR_CSMA_RETRIES] = { .type = NLA_U8, }, 544244db1bSPhoebe Buckheister [IEEE802154_ATTR_CSMA_MIN_BE] = { .type = NLA_U8, }, 554244db1bSPhoebe Buckheister [IEEE802154_ATTR_CSMA_MAX_BE] = { .type = NLA_U8, }, 564244db1bSPhoebe Buckheister 574244db1bSPhoebe Buckheister [IEEE802154_ATTR_FRAME_RETRIES] = { .type = NLA_S8, }, 583e9c156eSPhoebe Buckheister 593e9c156eSPhoebe Buckheister [IEEE802154_ATTR_LLSEC_ENABLED] = { .type = NLA_U8, }, 603e9c156eSPhoebe Buckheister [IEEE802154_ATTR_LLSEC_SECLEVEL] = { .type = NLA_U8, }, 613e9c156eSPhoebe Buckheister [IEEE802154_ATTR_LLSEC_KEY_MODE] = { .type = NLA_U8, }, 623e9c156eSPhoebe Buckheister [IEEE802154_ATTR_LLSEC_KEY_SOURCE_SHORT] = { .type = NLA_U32, }, 633e9c156eSPhoebe Buckheister [IEEE802154_ATTR_LLSEC_KEY_SOURCE_EXTENDED] = { .type = NLA_HW_ADDR, }, 643e9c156eSPhoebe Buckheister [IEEE802154_ATTR_LLSEC_KEY_ID] = { .type = NLA_U8, }, 653e9c156eSPhoebe Buckheister [IEEE802154_ATTR_LLSEC_FRAME_COUNTER] = { .type = NLA_U32 }, 663e9c156eSPhoebe Buckheister [IEEE802154_ATTR_LLSEC_KEY_BYTES] = { .len = 16, }, 673e9c156eSPhoebe Buckheister [IEEE802154_ATTR_LLSEC_KEY_USAGE_FRAME_TYPES] = { .type = NLA_U8, }, 683e9c156eSPhoebe Buckheister [IEEE802154_ATTR_LLSEC_KEY_USAGE_COMMANDS] = { .len = 258 / 8 }, 693e9c156eSPhoebe Buckheister [IEEE802154_ATTR_LLSEC_FRAME_TYPE] = { .type = NLA_U8, }, 703e9c156eSPhoebe Buckheister [IEEE802154_ATTR_LLSEC_CMD_FRAME_ID] = { .type = NLA_U8, }, 713e9c156eSPhoebe Buckheister [IEEE802154_ATTR_LLSEC_SECLEVELS] = { .type = NLA_U8, }, 723e9c156eSPhoebe Buckheister [IEEE802154_ATTR_LLSEC_DEV_OVERRIDE] = { .type = NLA_U8, }, 733e9c156eSPhoebe Buckheister [IEEE802154_ATTR_LLSEC_DEV_KEY_MODE] = { .type = NLA_U8, }, 742c21d115SSergey Lapin }; 75