12c21d115SSergey Lapin /* 22c21d115SSergey Lapin * nl802154.h 32c21d115SSergey Lapin * 42c21d115SSergey Lapin * Copyright (C) 2007, 2008 Siemens AG 52c21d115SSergey Lapin * 62c21d115SSergey Lapin * This program is free software; you can redistribute it and/or modify 72c21d115SSergey Lapin * it under the terms of the GNU General Public License version 2 82c21d115SSergey Lapin * as published by the Free Software Foundation. 92c21d115SSergey Lapin * 102c21d115SSergey Lapin * This program is distributed in the hope that it will be useful, 112c21d115SSergey Lapin * but WITHOUT ANY WARRANTY; without even the implied warranty of 122c21d115SSergey Lapin * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 132c21d115SSergey Lapin * GNU General Public License for more details. 142c21d115SSergey Lapin * 152c21d115SSergey Lapin * You should have received a copy of the GNU General Public License along 162c21d115SSergey Lapin * with this program; if not, write to the Free Software Foundation, Inc., 172c21d115SSergey Lapin * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 182c21d115SSergey Lapin * 192c21d115SSergey Lapin */ 202c21d115SSergey Lapin 212c21d115SSergey Lapin #include <linux/kernel.h> 222c21d115SSergey Lapin #include <net/netlink.h> 232c21d115SSergey Lapin #include <linux/nl802154.h> 242c21d115SSergey Lapin 252c21d115SSergey Lapin #define NLA_HW_ADDR NLA_U64 262c21d115SSergey Lapin 2778090a58SDmitry Baryshkov const struct nla_policy ieee802154_policy[IEEE802154_ATTR_MAX + 1] = { 282c21d115SSergey Lapin [IEEE802154_ATTR_DEV_NAME] = { .type = NLA_STRING, }, 292c21d115SSergey Lapin [IEEE802154_ATTR_DEV_INDEX] = { .type = NLA_U32, }, 301eaa9d03SDmitry Eremin-Solenikov [IEEE802154_ATTR_PHY_NAME] = { .type = NLA_STRING, }, 312c21d115SSergey Lapin 322c21d115SSergey Lapin [IEEE802154_ATTR_STATUS] = { .type = NLA_U8, }, 332c21d115SSergey Lapin [IEEE802154_ATTR_SHORT_ADDR] = { .type = NLA_U16, }, 342c21d115SSergey Lapin [IEEE802154_ATTR_HW_ADDR] = { .type = NLA_HW_ADDR, }, 352c21d115SSergey Lapin [IEEE802154_ATTR_PAN_ID] = { .type = NLA_U16, }, 362c21d115SSergey Lapin [IEEE802154_ATTR_CHANNEL] = { .type = NLA_U8, }, 3716eea493SDmitry Eremin-Solenikov [IEEE802154_ATTR_PAGE] = { .type = NLA_U8, }, 382c21d115SSergey Lapin [IEEE802154_ATTR_COORD_SHORT_ADDR] = { .type = NLA_U16, }, 392c21d115SSergey Lapin [IEEE802154_ATTR_COORD_HW_ADDR] = { .type = NLA_HW_ADDR, }, 402c21d115SSergey Lapin [IEEE802154_ATTR_COORD_PAN_ID] = { .type = NLA_U16, }, 412c21d115SSergey Lapin [IEEE802154_ATTR_SRC_SHORT_ADDR] = { .type = NLA_U16, }, 422c21d115SSergey Lapin [IEEE802154_ATTR_SRC_HW_ADDR] = { .type = NLA_HW_ADDR, }, 432c21d115SSergey Lapin [IEEE802154_ATTR_SRC_PAN_ID] = { .type = NLA_U16, }, 442c21d115SSergey Lapin [IEEE802154_ATTR_DEST_SHORT_ADDR] = { .type = NLA_U16, }, 452c21d115SSergey Lapin [IEEE802154_ATTR_DEST_HW_ADDR] = { .type = NLA_HW_ADDR, }, 462c21d115SSergey Lapin [IEEE802154_ATTR_DEST_PAN_ID] = { .type = NLA_U16, }, 472c21d115SSergey Lapin 482c21d115SSergey Lapin [IEEE802154_ATTR_CAPABILITY] = { .type = NLA_U8, }, 492c21d115SSergey Lapin [IEEE802154_ATTR_REASON] = { .type = NLA_U8, }, 502c21d115SSergey Lapin [IEEE802154_ATTR_SCAN_TYPE] = { .type = NLA_U8, }, 512c21d115SSergey Lapin [IEEE802154_ATTR_CHANNELS] = { .type = NLA_U32, }, 522c21d115SSergey Lapin [IEEE802154_ATTR_DURATION] = { .type = NLA_U8, }, 532c21d115SSergey Lapin [IEEE802154_ATTR_ED_LIST] = { .len = 27 }, 541eaa9d03SDmitry Eremin-Solenikov [IEEE802154_ATTR_CHANNEL_PAGE_LIST] = { .len = 32 * 4, }, 559b2777d6SPhoebe Buckheister 569b2777d6SPhoebe Buckheister [IEEE802154_ATTR_TXPOWER] = { .type = NLA_S8, }, 5784dda3c6SPhoebe Buckheister [IEEE802154_ATTR_LBT_ENABLED] = { .type = NLA_U8, }, 58ba08fea5SPhoebe Buckheister [IEEE802154_ATTR_CCA_MODE] = { .type = NLA_U8, }, 596ca00197SPhoebe Buckheister [IEEE802154_ATTR_CCA_ED_LEVEL] = { .type = NLA_S32, }, 604244db1bSPhoebe Buckheister [IEEE802154_ATTR_CSMA_RETRIES] = { .type = NLA_U8, }, 614244db1bSPhoebe Buckheister [IEEE802154_ATTR_CSMA_MIN_BE] = { .type = NLA_U8, }, 624244db1bSPhoebe Buckheister [IEEE802154_ATTR_CSMA_MAX_BE] = { .type = NLA_U8, }, 634244db1bSPhoebe Buckheister 644244db1bSPhoebe Buckheister [IEEE802154_ATTR_FRAME_RETRIES] = { .type = NLA_S8, }, 65*3e9c156eSPhoebe Buckheister 66*3e9c156eSPhoebe Buckheister [IEEE802154_ATTR_LLSEC_ENABLED] = { .type = NLA_U8, }, 67*3e9c156eSPhoebe Buckheister [IEEE802154_ATTR_LLSEC_SECLEVEL] = { .type = NLA_U8, }, 68*3e9c156eSPhoebe Buckheister [IEEE802154_ATTR_LLSEC_KEY_MODE] = { .type = NLA_U8, }, 69*3e9c156eSPhoebe Buckheister [IEEE802154_ATTR_LLSEC_KEY_SOURCE_SHORT] = { .type = NLA_U32, }, 70*3e9c156eSPhoebe Buckheister [IEEE802154_ATTR_LLSEC_KEY_SOURCE_EXTENDED] = { .type = NLA_HW_ADDR, }, 71*3e9c156eSPhoebe Buckheister [IEEE802154_ATTR_LLSEC_KEY_ID] = { .type = NLA_U8, }, 72*3e9c156eSPhoebe Buckheister [IEEE802154_ATTR_LLSEC_FRAME_COUNTER] = { .type = NLA_U32 }, 73*3e9c156eSPhoebe Buckheister [IEEE802154_ATTR_LLSEC_KEY_BYTES] = { .len = 16, }, 74*3e9c156eSPhoebe Buckheister [IEEE802154_ATTR_LLSEC_KEY_USAGE_FRAME_TYPES] = { .type = NLA_U8, }, 75*3e9c156eSPhoebe Buckheister [IEEE802154_ATTR_LLSEC_KEY_USAGE_COMMANDS] = { .len = 258 / 8 }, 76*3e9c156eSPhoebe Buckheister [IEEE802154_ATTR_LLSEC_FRAME_TYPE] = { .type = NLA_U8, }, 77*3e9c156eSPhoebe Buckheister [IEEE802154_ATTR_LLSEC_CMD_FRAME_ID] = { .type = NLA_U8, }, 78*3e9c156eSPhoebe Buckheister [IEEE802154_ATTR_LLSEC_SECLEVELS] = { .type = NLA_U8, }, 79*3e9c156eSPhoebe Buckheister [IEEE802154_ATTR_LLSEC_DEV_OVERRIDE] = { .type = NLA_U8, }, 80*3e9c156eSPhoebe Buckheister [IEEE802154_ATTR_LLSEC_DEV_KEY_MODE] = { .type = NLA_U8, }, 812c21d115SSergey Lapin }; 8278090a58SDmitry Baryshkov 83