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, }, 55*9b2777d6SPhoebe Buckheister 56*9b2777d6SPhoebe Buckheister [IEEE802154_ATTR_TXPOWER] = { .type = NLA_S8, }, 572c21d115SSergey Lapin }; 5878090a58SDmitry Baryshkov 59