13ae75e02SAlexander Aring #ifndef __NL802154_H 23ae75e02SAlexander Aring #define __NL802154_H 33ae75e02SAlexander Aring /* 43ae75e02SAlexander Aring * 802.15.4 netlink interface public header 53ae75e02SAlexander Aring * 63ae75e02SAlexander Aring * Copyright 2014 Alexander Aring <aar@pengutronix.de> 73ae75e02SAlexander Aring * 83ae75e02SAlexander Aring * Permission to use, copy, modify, and/or distribute this software for any 93ae75e02SAlexander Aring * purpose with or without fee is hereby granted, provided that the above 103ae75e02SAlexander Aring * copyright notice and this permission notice appear in all copies. 113ae75e02SAlexander Aring * 123ae75e02SAlexander Aring * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 133ae75e02SAlexander Aring * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 143ae75e02SAlexander Aring * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 153ae75e02SAlexander Aring * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 163ae75e02SAlexander Aring * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 173ae75e02SAlexander Aring * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 183ae75e02SAlexander Aring * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 193ae75e02SAlexander Aring * 203ae75e02SAlexander Aring */ 213ae75e02SAlexander Aring 223ae75e02SAlexander Aring #define NL802154_GENL_NAME "nl802154" 233ae75e02SAlexander Aring 243ae75e02SAlexander Aring enum nl802154_commands { 253ae75e02SAlexander Aring /* don't change the order or add anything between, this is ABI! */ 263ae75e02SAlexander Aring /* currently we don't shipping this file via uapi, ignore the above one */ 273ae75e02SAlexander Aring NL802154_CMD_UNSPEC, 283ae75e02SAlexander Aring 293ae75e02SAlexander Aring NL802154_CMD_GET_WPAN_PHY, /* can dump */ 303ae75e02SAlexander Aring NL802154_CMD_SET_WPAN_PHY, 313ae75e02SAlexander Aring NL802154_CMD_NEW_WPAN_PHY, 323ae75e02SAlexander Aring NL802154_CMD_DEL_WPAN_PHY, 333ae75e02SAlexander Aring 343ae75e02SAlexander Aring NL802154_CMD_GET_INTERFACE, /* can dump */ 353ae75e02SAlexander Aring NL802154_CMD_SET_INTERFACE, 363ae75e02SAlexander Aring NL802154_CMD_NEW_INTERFACE, 373ae75e02SAlexander Aring NL802154_CMD_DEL_INTERFACE, 383ae75e02SAlexander Aring 393ae75e02SAlexander Aring NL802154_CMD_SET_CHANNEL, 403ae75e02SAlexander Aring 413ae75e02SAlexander Aring NL802154_CMD_SET_PAN_ID, 423ae75e02SAlexander Aring NL802154_CMD_SET_SHORT_ADDR, 433ae75e02SAlexander Aring 443ae75e02SAlexander Aring NL802154_CMD_SET_TX_POWER, 453ae75e02SAlexander Aring NL802154_CMD_SET_CCA_MODE, 463ae75e02SAlexander Aring NL802154_CMD_SET_CCA_ED_LEVEL, 473ae75e02SAlexander Aring 483ae75e02SAlexander Aring NL802154_CMD_SET_MAX_FRAME_RETRIES, 493ae75e02SAlexander Aring 503ae75e02SAlexander Aring NL802154_CMD_SET_BACKOFF_EXPONENT, 513ae75e02SAlexander Aring NL802154_CMD_SET_MAX_CSMA_BACKOFFS, 523ae75e02SAlexander Aring 533ae75e02SAlexander Aring NL802154_CMD_SET_LBT_MODE, 543ae75e02SAlexander Aring 55c91208d8SAlexander Aring NL802154_CMD_SET_ACKREQ_DEFAULT, 56c91208d8SAlexander Aring 57*66e5c267SAlexander Aring NL802154_CMD_SET_WPAN_PHY_NETNS, 58*66e5c267SAlexander Aring 593ae75e02SAlexander Aring /* add new commands above here */ 603ae75e02SAlexander Aring 61a26c5fd7SAlexander Aring #ifdef CONFIG_IEEE802154_NL802154_EXPERIMENTAL 62a26c5fd7SAlexander Aring NL802154_CMD_SET_SEC_PARAMS, 63a26c5fd7SAlexander Aring NL802154_CMD_GET_SEC_KEY, /* can dump */ 64a26c5fd7SAlexander Aring NL802154_CMD_NEW_SEC_KEY, 65a26c5fd7SAlexander Aring NL802154_CMD_DEL_SEC_KEY, 66a26c5fd7SAlexander Aring NL802154_CMD_GET_SEC_DEV, /* can dump */ 67a26c5fd7SAlexander Aring NL802154_CMD_NEW_SEC_DEV, 68a26c5fd7SAlexander Aring NL802154_CMD_DEL_SEC_DEV, 69a26c5fd7SAlexander Aring NL802154_CMD_GET_SEC_DEVKEY, /* can dump */ 70a26c5fd7SAlexander Aring NL802154_CMD_NEW_SEC_DEVKEY, 71a26c5fd7SAlexander Aring NL802154_CMD_DEL_SEC_DEVKEY, 72a26c5fd7SAlexander Aring NL802154_CMD_GET_SEC_LEVEL, /* can dump */ 73a26c5fd7SAlexander Aring NL802154_CMD_NEW_SEC_LEVEL, 74a26c5fd7SAlexander Aring NL802154_CMD_DEL_SEC_LEVEL, 75a26c5fd7SAlexander Aring #endif /* CONFIG_IEEE802154_NL802154_EXPERIMENTAL */ 76a26c5fd7SAlexander Aring 773ae75e02SAlexander Aring /* used to define NL802154_CMD_MAX below */ 783ae75e02SAlexander Aring __NL802154_CMD_AFTER_LAST, 793ae75e02SAlexander Aring NL802154_CMD_MAX = __NL802154_CMD_AFTER_LAST - 1 803ae75e02SAlexander Aring }; 813ae75e02SAlexander Aring 823ae75e02SAlexander Aring enum nl802154_attrs { 833ae75e02SAlexander Aring /* don't change the order or add anything between, this is ABI! */ 843ae75e02SAlexander Aring /* currently we don't shipping this file via uapi, ignore the above one */ 853ae75e02SAlexander Aring NL802154_ATTR_UNSPEC, 863ae75e02SAlexander Aring 873ae75e02SAlexander Aring NL802154_ATTR_WPAN_PHY, 883ae75e02SAlexander Aring NL802154_ATTR_WPAN_PHY_NAME, 893ae75e02SAlexander Aring 903ae75e02SAlexander Aring NL802154_ATTR_IFINDEX, 913ae75e02SAlexander Aring NL802154_ATTR_IFNAME, 923ae75e02SAlexander Aring NL802154_ATTR_IFTYPE, 933ae75e02SAlexander Aring 943ae75e02SAlexander Aring NL802154_ATTR_WPAN_DEV, 953ae75e02SAlexander Aring 963ae75e02SAlexander Aring NL802154_ATTR_PAGE, 973ae75e02SAlexander Aring NL802154_ATTR_CHANNEL, 983ae75e02SAlexander Aring 993ae75e02SAlexander Aring NL802154_ATTR_PAN_ID, 1003ae75e02SAlexander Aring NL802154_ATTR_SHORT_ADDR, 1013ae75e02SAlexander Aring 1023ae75e02SAlexander Aring NL802154_ATTR_TX_POWER, 1033ae75e02SAlexander Aring 1043ae75e02SAlexander Aring NL802154_ATTR_CCA_MODE, 105ba2a9506SAlexander Aring NL802154_ATTR_CCA_OPT, 1063ae75e02SAlexander Aring NL802154_ATTR_CCA_ED_LEVEL, 1073ae75e02SAlexander Aring 1083ae75e02SAlexander Aring NL802154_ATTR_MAX_FRAME_RETRIES, 1093ae75e02SAlexander Aring 1103ae75e02SAlexander Aring NL802154_ATTR_MAX_BE, 1113ae75e02SAlexander Aring NL802154_ATTR_MIN_BE, 1123ae75e02SAlexander Aring NL802154_ATTR_MAX_CSMA_BACKOFFS, 1133ae75e02SAlexander Aring 1143ae75e02SAlexander Aring NL802154_ATTR_LBT_MODE, 1153ae75e02SAlexander Aring 1163ae75e02SAlexander Aring NL802154_ATTR_GENERATION, 1173ae75e02SAlexander Aring 1183ae75e02SAlexander Aring NL802154_ATTR_CHANNELS_SUPPORTED, 1193ae75e02SAlexander Aring NL802154_ATTR_SUPPORTED_CHANNEL, 1203ae75e02SAlexander Aring 1213ae75e02SAlexander Aring NL802154_ATTR_EXTENDED_ADDR, 1223ae75e02SAlexander Aring 1230e665457SAlexander Aring NL802154_ATTR_WPAN_PHY_CAPS, 1240e665457SAlexander Aring 125133be026SVarka Bhadram NL802154_ATTR_SUPPORTED_COMMANDS, 126133be026SVarka Bhadram 127c91208d8SAlexander Aring NL802154_ATTR_ACKREQ_DEFAULT, 128c91208d8SAlexander Aring 129aece0c3fSAlexander Aring NL802154_ATTR_PAD, 130aece0c3fSAlexander Aring 131*66e5c267SAlexander Aring NL802154_ATTR_PID, 132*66e5c267SAlexander Aring NL802154_ATTR_NETNS_FD, 133*66e5c267SAlexander Aring 1343ae75e02SAlexander Aring /* add attributes here, update the policy in nl802154.c */ 1353ae75e02SAlexander Aring 136a26c5fd7SAlexander Aring #ifdef CONFIG_IEEE802154_NL802154_EXPERIMENTAL 137a26c5fd7SAlexander Aring NL802154_ATTR_SEC_ENABLED, 138a26c5fd7SAlexander Aring NL802154_ATTR_SEC_OUT_LEVEL, 139a26c5fd7SAlexander Aring NL802154_ATTR_SEC_OUT_KEY_ID, 140a26c5fd7SAlexander Aring NL802154_ATTR_SEC_FRAME_COUNTER, 141a26c5fd7SAlexander Aring 142a26c5fd7SAlexander Aring NL802154_ATTR_SEC_LEVEL, 143a26c5fd7SAlexander Aring NL802154_ATTR_SEC_DEVICE, 144a26c5fd7SAlexander Aring NL802154_ATTR_SEC_DEVKEY, 145a26c5fd7SAlexander Aring NL802154_ATTR_SEC_KEY, 146a26c5fd7SAlexander Aring #endif /* CONFIG_IEEE802154_NL802154_EXPERIMENTAL */ 147a26c5fd7SAlexander Aring 1483ae75e02SAlexander Aring __NL802154_ATTR_AFTER_LAST, 1493ae75e02SAlexander Aring NL802154_ATTR_MAX = __NL802154_ATTR_AFTER_LAST - 1 1503ae75e02SAlexander Aring }; 1513ae75e02SAlexander Aring 1523ae75e02SAlexander Aring enum nl802154_iftype { 1533ae75e02SAlexander Aring /* for backwards compatibility TODO */ 1543ae75e02SAlexander Aring NL802154_IFTYPE_UNSPEC = -1, 1553ae75e02SAlexander Aring 1563ae75e02SAlexander Aring NL802154_IFTYPE_NODE, 1573ae75e02SAlexander Aring NL802154_IFTYPE_MONITOR, 1583ae75e02SAlexander Aring NL802154_IFTYPE_COORD, 1593ae75e02SAlexander Aring 1603ae75e02SAlexander Aring /* keep last */ 1613ae75e02SAlexander Aring NUM_NL802154_IFTYPES, 1623ae75e02SAlexander Aring NL802154_IFTYPE_MAX = NUM_NL802154_IFTYPES - 1 1633ae75e02SAlexander Aring }; 1643ae75e02SAlexander Aring 165b40d6376SAlexander Aring /** 1660e665457SAlexander Aring * enum nl802154_wpan_phy_capability_attr - wpan phy capability attributes 1670e665457SAlexander Aring * 1680e665457SAlexander Aring * @__NL802154_CAP_ATTR_INVALID: attribute number 0 is reserved 1690e665457SAlexander Aring * @NL802154_CAP_ATTR_CHANNELS: a nested attribute for nl802154_channel_attr 1700e665457SAlexander Aring * @NL802154_CAP_ATTR_TX_POWERS: a nested attribute for 1710e665457SAlexander Aring * nl802154_wpan_phy_tx_power 1720e665457SAlexander Aring * @NL802154_CAP_ATTR_MIN_CCA_ED_LEVEL: minimum value for cca_ed_level 1730e665457SAlexander Aring * @NL802154_CAP_ATTR_MAX_CCA_ED_LEVEL: maxmimum value for cca_ed_level 1740e665457SAlexander Aring * @NL802154_CAP_ATTR_CCA_MODES: nl802154_cca_modes flags 1750e665457SAlexander Aring * @NL802154_CAP_ATTR_CCA_OPTS: nl802154_cca_opts flags 1760e665457SAlexander Aring * @NL802154_CAP_ATTR_MIN_MINBE: minimum of minbe value 1770e665457SAlexander Aring * @NL802154_CAP_ATTR_MAX_MINBE: maximum of minbe value 1780e665457SAlexander Aring * @NL802154_CAP_ATTR_MIN_MAXBE: minimum of maxbe value 1790e665457SAlexander Aring * @NL802154_CAP_ATTR_MAX_MINBE: maximum of maxbe value 1800e665457SAlexander Aring * @NL802154_CAP_ATTR_MIN_CSMA_BACKOFFS: minimum of csma backoff value 1810e665457SAlexander Aring * @NL802154_CAP_ATTR_MAX_CSMA_BACKOFFS: maximum of csma backoffs value 1820e665457SAlexander Aring * @NL802154_CAP_ATTR_MIN_FRAME_RETRIES: minimum of frame retries value 1830e665457SAlexander Aring * @NL802154_CAP_ATTR_MAX_FRAME_RETRIES: maximum of frame retries value 1840e665457SAlexander Aring * @NL802154_CAP_ATTR_IFTYPES: nl802154_iftype flags 1850e665457SAlexander Aring * @NL802154_CAP_ATTR_LBT: nl802154_supported_bool_states flags 1860e665457SAlexander Aring * @NL802154_CAP_ATTR_MAX: highest cap attribute currently defined 1870e665457SAlexander Aring * @__NL802154_CAP_ATTR_AFTER_LAST: internal use 1880e665457SAlexander Aring */ 1890e665457SAlexander Aring enum nl802154_wpan_phy_capability_attr { 1900e665457SAlexander Aring __NL802154_CAP_ATTR_INVALID, 1910e665457SAlexander Aring 1920e665457SAlexander Aring NL802154_CAP_ATTR_IFTYPES, 1930e665457SAlexander Aring 1940e665457SAlexander Aring NL802154_CAP_ATTR_CHANNELS, 1950e665457SAlexander Aring NL802154_CAP_ATTR_TX_POWERS, 1960e665457SAlexander Aring 1970e665457SAlexander Aring NL802154_CAP_ATTR_CCA_ED_LEVELS, 1980e665457SAlexander Aring NL802154_CAP_ATTR_CCA_MODES, 1990e665457SAlexander Aring NL802154_CAP_ATTR_CCA_OPTS, 2000e665457SAlexander Aring 2010e665457SAlexander Aring NL802154_CAP_ATTR_MIN_MINBE, 2020e665457SAlexander Aring NL802154_CAP_ATTR_MAX_MINBE, 2030e665457SAlexander Aring 2040e665457SAlexander Aring NL802154_CAP_ATTR_MIN_MAXBE, 2050e665457SAlexander Aring NL802154_CAP_ATTR_MAX_MAXBE, 2060e665457SAlexander Aring 2070e665457SAlexander Aring NL802154_CAP_ATTR_MIN_CSMA_BACKOFFS, 2080e665457SAlexander Aring NL802154_CAP_ATTR_MAX_CSMA_BACKOFFS, 2090e665457SAlexander Aring 2100e665457SAlexander Aring NL802154_CAP_ATTR_MIN_FRAME_RETRIES, 2110e665457SAlexander Aring NL802154_CAP_ATTR_MAX_FRAME_RETRIES, 2120e665457SAlexander Aring 2130e665457SAlexander Aring NL802154_CAP_ATTR_LBT, 2140e665457SAlexander Aring 2150e665457SAlexander Aring /* keep last */ 2160e665457SAlexander Aring __NL802154_CAP_ATTR_AFTER_LAST, 2170e665457SAlexander Aring NL802154_CAP_ATTR_MAX = __NL802154_CAP_ATTR_AFTER_LAST - 1 2180e665457SAlexander Aring }; 2190e665457SAlexander Aring 2200e665457SAlexander Aring /** 221b40d6376SAlexander Aring * enum nl802154_cca_modes - cca modes 222b40d6376SAlexander Aring * 223b40d6376SAlexander Aring * @__NL802154_CCA_INVALID: cca mode number 0 is reserved 224b40d6376SAlexander Aring * @NL802154_CCA_ENERGY: Energy above threshold 225b40d6376SAlexander Aring * @NL802154_CCA_CARRIER: Carrier sense only 226b40d6376SAlexander Aring * @NL802154_CCA_ENERGY_CARRIER: Carrier sense with energy above threshold 227b40d6376SAlexander Aring * @NL802154_CCA_ALOHA: CCA shall always report an idle medium 228b40d6376SAlexander Aring * @NL802154_CCA_UWB_SHR: UWB preamble sense based on the SHR of a frame 229d446278cSChristoffer Holmstedt * @NL802154_CCA_UWB_MULTIPLEXED: UWB preamble sense based on the packet with 230b40d6376SAlexander Aring * the multiplexed preamble 231b40d6376SAlexander Aring * @__NL802154_CCA_ATTR_AFTER_LAST: Internal 232b40d6376SAlexander Aring * @NL802154_CCA_ATTR_MAX: Maximum CCA attribute number 233b40d6376SAlexander Aring */ 234b40d6376SAlexander Aring enum nl802154_cca_modes { 235b40d6376SAlexander Aring __NL802154_CCA_INVALID, 236b40d6376SAlexander Aring NL802154_CCA_ENERGY, 237b40d6376SAlexander Aring NL802154_CCA_CARRIER, 238b40d6376SAlexander Aring NL802154_CCA_ENERGY_CARRIER, 239b40d6376SAlexander Aring NL802154_CCA_ALOHA, 240b40d6376SAlexander Aring NL802154_CCA_UWB_SHR, 241d446278cSChristoffer Holmstedt NL802154_CCA_UWB_MULTIPLEXED, 242b40d6376SAlexander Aring 243b40d6376SAlexander Aring /* keep last */ 244b40d6376SAlexander Aring __NL802154_CCA_ATTR_AFTER_LAST, 245b40d6376SAlexander Aring NL802154_CCA_ATTR_MAX = __NL802154_CCA_ATTR_AFTER_LAST - 1 246b40d6376SAlexander Aring }; 247b40d6376SAlexander Aring 248b40d6376SAlexander Aring /** 249b40d6376SAlexander Aring * enum nl802154_cca_opts - additional options for cca modes 250b40d6376SAlexander Aring * 251b40d6376SAlexander Aring * @NL802154_CCA_OPT_ENERGY_CARRIER_OR: NL802154_CCA_ENERGY_CARRIER with OR 252b40d6376SAlexander Aring * @NL802154_CCA_OPT_ENERGY_CARRIER_AND: NL802154_CCA_ENERGY_CARRIER with AND 253b40d6376SAlexander Aring */ 254b40d6376SAlexander Aring enum nl802154_cca_opts { 255b40d6376SAlexander Aring NL802154_CCA_OPT_ENERGY_CARRIER_AND, 256b40d6376SAlexander Aring NL802154_CCA_OPT_ENERGY_CARRIER_OR, 257b40d6376SAlexander Aring 258b40d6376SAlexander Aring /* keep last */ 259b40d6376SAlexander Aring __NL802154_CCA_OPT_ATTR_AFTER_LAST, 260b40d6376SAlexander Aring NL802154_CCA_OPT_ATTR_MAX = __NL802154_CCA_OPT_ATTR_AFTER_LAST - 1 261b40d6376SAlexander Aring }; 262b40d6376SAlexander Aring 263fea3318dSAlexander Aring /** 264fea3318dSAlexander Aring * enum nl802154_supported_bool_states - bool states for bool capability entry 265fea3318dSAlexander Aring * 266fea3318dSAlexander Aring * @NL802154_SUPPORTED_BOOL_FALSE: indicates to set false 267fea3318dSAlexander Aring * @NL802154_SUPPORTED_BOOL_TRUE: indicates to set true 268fea3318dSAlexander Aring * @__NL802154_SUPPORTED_BOOL_INVALD: reserved 269fea3318dSAlexander Aring * @NL802154_SUPPORTED_BOOL_BOTH: indicates to set true and false 270fea3318dSAlexander Aring * @__NL802154_SUPPORTED_BOOL_AFTER_LAST: Internal 271fea3318dSAlexander Aring * @NL802154_SUPPORTED_BOOL_MAX: highest value for bool states 272fea3318dSAlexander Aring */ 273fea3318dSAlexander Aring enum nl802154_supported_bool_states { 274fea3318dSAlexander Aring NL802154_SUPPORTED_BOOL_FALSE, 275fea3318dSAlexander Aring NL802154_SUPPORTED_BOOL_TRUE, 276fea3318dSAlexander Aring /* to handle them in a mask */ 277fea3318dSAlexander Aring __NL802154_SUPPORTED_BOOL_INVALD, 278fea3318dSAlexander Aring NL802154_SUPPORTED_BOOL_BOTH, 279fea3318dSAlexander Aring 280fea3318dSAlexander Aring /* keep last */ 281fea3318dSAlexander Aring __NL802154_SUPPORTED_BOOL_AFTER_LAST, 282fea3318dSAlexander Aring NL802154_SUPPORTED_BOOL_MAX = __NL802154_SUPPORTED_BOOL_AFTER_LAST - 1 283fea3318dSAlexander Aring }; 284fea3318dSAlexander Aring 285a26c5fd7SAlexander Aring #ifdef CONFIG_IEEE802154_NL802154_EXPERIMENTAL 286a26c5fd7SAlexander Aring 287a26c5fd7SAlexander Aring enum nl802154_dev_addr_modes { 288a26c5fd7SAlexander Aring NL802154_DEV_ADDR_NONE, 289a26c5fd7SAlexander Aring __NL802154_DEV_ADDR_INVALID, 290a26c5fd7SAlexander Aring NL802154_DEV_ADDR_SHORT, 291a26c5fd7SAlexander Aring NL802154_DEV_ADDR_EXTENDED, 292a26c5fd7SAlexander Aring 293a26c5fd7SAlexander Aring /* keep last */ 294a26c5fd7SAlexander Aring __NL802154_DEV_ADDR_AFTER_LAST, 295a26c5fd7SAlexander Aring NL802154_DEV_ADDR_MAX = __NL802154_DEV_ADDR_AFTER_LAST - 1 296a26c5fd7SAlexander Aring }; 297a26c5fd7SAlexander Aring 298a26c5fd7SAlexander Aring enum nl802154_dev_addr_attrs { 299a26c5fd7SAlexander Aring NL802154_DEV_ADDR_ATTR_UNSPEC, 300a26c5fd7SAlexander Aring 301a26c5fd7SAlexander Aring NL802154_DEV_ADDR_ATTR_PAN_ID, 302a26c5fd7SAlexander Aring NL802154_DEV_ADDR_ATTR_MODE, 303a26c5fd7SAlexander Aring NL802154_DEV_ADDR_ATTR_SHORT, 304a26c5fd7SAlexander Aring NL802154_DEV_ADDR_ATTR_EXTENDED, 305e7479122SNicolas Dichtel NL802154_DEV_ADDR_ATTR_PAD, 306a26c5fd7SAlexander Aring 307a26c5fd7SAlexander Aring /* keep last */ 308a26c5fd7SAlexander Aring __NL802154_DEV_ADDR_ATTR_AFTER_LAST, 309a26c5fd7SAlexander Aring NL802154_DEV_ADDR_ATTR_MAX = __NL802154_DEV_ADDR_ATTR_AFTER_LAST - 1 310a26c5fd7SAlexander Aring }; 311a26c5fd7SAlexander Aring 312a26c5fd7SAlexander Aring enum nl802154_key_id_modes { 313a26c5fd7SAlexander Aring NL802154_KEY_ID_MODE_IMPLICIT, 314a26c5fd7SAlexander Aring NL802154_KEY_ID_MODE_INDEX, 315a26c5fd7SAlexander Aring NL802154_KEY_ID_MODE_INDEX_SHORT, 316a26c5fd7SAlexander Aring NL802154_KEY_ID_MODE_INDEX_EXTENDED, 317a26c5fd7SAlexander Aring 318a26c5fd7SAlexander Aring /* keep last */ 319a26c5fd7SAlexander Aring __NL802154_KEY_ID_MODE_AFTER_LAST, 320a26c5fd7SAlexander Aring NL802154_KEY_ID_MODE_MAX = __NL802154_KEY_ID_MODE_AFTER_LAST - 1 321a26c5fd7SAlexander Aring }; 322a26c5fd7SAlexander Aring 323a26c5fd7SAlexander Aring enum nl802154_key_id_attrs { 324a26c5fd7SAlexander Aring NL802154_KEY_ID_ATTR_UNSPEC, 325a26c5fd7SAlexander Aring 326a26c5fd7SAlexander Aring NL802154_KEY_ID_ATTR_MODE, 327a26c5fd7SAlexander Aring NL802154_KEY_ID_ATTR_INDEX, 328a26c5fd7SAlexander Aring NL802154_KEY_ID_ATTR_IMPLICIT, 329a26c5fd7SAlexander Aring NL802154_KEY_ID_ATTR_SOURCE_SHORT, 330a26c5fd7SAlexander Aring NL802154_KEY_ID_ATTR_SOURCE_EXTENDED, 331e7479122SNicolas Dichtel NL802154_KEY_ID_ATTR_PAD, 332a26c5fd7SAlexander Aring 333a26c5fd7SAlexander Aring /* keep last */ 334a26c5fd7SAlexander Aring __NL802154_KEY_ID_ATTR_AFTER_LAST, 335a26c5fd7SAlexander Aring NL802154_KEY_ID_ATTR_MAX = __NL802154_KEY_ID_ATTR_AFTER_LAST - 1 336a26c5fd7SAlexander Aring }; 337a26c5fd7SAlexander Aring 338a26c5fd7SAlexander Aring enum nl802154_seclevels { 339a26c5fd7SAlexander Aring NL802154_SECLEVEL_NONE, 340a26c5fd7SAlexander Aring NL802154_SECLEVEL_MIC32, 341a26c5fd7SAlexander Aring NL802154_SECLEVEL_MIC64, 342a26c5fd7SAlexander Aring NL802154_SECLEVEL_MIC128, 343a26c5fd7SAlexander Aring NL802154_SECLEVEL_ENC, 344a26c5fd7SAlexander Aring NL802154_SECLEVEL_ENC_MIC32, 345a26c5fd7SAlexander Aring NL802154_SECLEVEL_ENC_MIC64, 346a26c5fd7SAlexander Aring NL802154_SECLEVEL_ENC_MIC128, 347a26c5fd7SAlexander Aring 348a26c5fd7SAlexander Aring /* keep last */ 349a26c5fd7SAlexander Aring __NL802154_SECLEVEL_AFTER_LAST, 350a26c5fd7SAlexander Aring NL802154_SECLEVEL_MAX = __NL802154_SECLEVEL_AFTER_LAST - 1 351a26c5fd7SAlexander Aring }; 352a26c5fd7SAlexander Aring 353a26c5fd7SAlexander Aring enum nl802154_frames { 354a26c5fd7SAlexander Aring NL802154_FRAME_BEACON, 355a26c5fd7SAlexander Aring NL802154_FRAME_DATA, 356a26c5fd7SAlexander Aring NL802154_FRAME_ACK, 357a26c5fd7SAlexander Aring NL802154_FRAME_CMD, 358a26c5fd7SAlexander Aring 359a26c5fd7SAlexander Aring /* keep last */ 360a26c5fd7SAlexander Aring __NL802154_FRAME_AFTER_LAST, 361a26c5fd7SAlexander Aring NL802154_FRAME_MAX = __NL802154_FRAME_AFTER_LAST - 1 362a26c5fd7SAlexander Aring }; 363a26c5fd7SAlexander Aring 364a26c5fd7SAlexander Aring enum nl802154_cmd_frames { 365a26c5fd7SAlexander Aring __NL802154_CMD_FRAME_INVALID, 366a26c5fd7SAlexander Aring NL802154_CMD_FRAME_ASSOC_REQUEST, 367a26c5fd7SAlexander Aring NL802154_CMD_FRAME_ASSOC_RESPONSE, 368a26c5fd7SAlexander Aring NL802154_CMD_FRAME_DISASSOC_NOTIFY, 369a26c5fd7SAlexander Aring NL802154_CMD_FRAME_DATA_REQUEST, 370a26c5fd7SAlexander Aring NL802154_CMD_FRAME_PAN_ID_CONFLICT_NOTIFY, 371a26c5fd7SAlexander Aring NL802154_CMD_FRAME_ORPHAN_NOTIFY, 372a26c5fd7SAlexander Aring NL802154_CMD_FRAME_BEACON_REQUEST, 373a26c5fd7SAlexander Aring NL802154_CMD_FRAME_COORD_REALIGNMENT, 374a26c5fd7SAlexander Aring NL802154_CMD_FRAME_GTS_REQUEST, 375a26c5fd7SAlexander Aring 376a26c5fd7SAlexander Aring /* keep last */ 377a26c5fd7SAlexander Aring __NL802154_CMD_FRAME_AFTER_LAST, 378a26c5fd7SAlexander Aring NL802154_CMD_FRAME_MAX = __NL802154_CMD_FRAME_AFTER_LAST - 1 379a26c5fd7SAlexander Aring }; 380a26c5fd7SAlexander Aring 381a26c5fd7SAlexander Aring enum nl802154_seclevel_attrs { 382a26c5fd7SAlexander Aring NL802154_SECLEVEL_ATTR_UNSPEC, 383a26c5fd7SAlexander Aring 384a26c5fd7SAlexander Aring NL802154_SECLEVEL_ATTR_LEVELS, 385a26c5fd7SAlexander Aring NL802154_SECLEVEL_ATTR_FRAME, 386a26c5fd7SAlexander Aring NL802154_SECLEVEL_ATTR_CMD_FRAME, 387a26c5fd7SAlexander Aring NL802154_SECLEVEL_ATTR_DEV_OVERRIDE, 388a26c5fd7SAlexander Aring 389a26c5fd7SAlexander Aring /* keep last */ 390a26c5fd7SAlexander Aring __NL802154_SECLEVEL_ATTR_AFTER_LAST, 391a26c5fd7SAlexander Aring NL802154_SECLEVEL_ATTR_MAX = __NL802154_SECLEVEL_ATTR_AFTER_LAST - 1 392a26c5fd7SAlexander Aring }; 393a26c5fd7SAlexander Aring 394a26c5fd7SAlexander Aring /* TODO what is this? couldn't find in mib */ 395a26c5fd7SAlexander Aring enum { 396a26c5fd7SAlexander Aring NL802154_DEVKEY_IGNORE, 397a26c5fd7SAlexander Aring NL802154_DEVKEY_RESTRICT, 398a26c5fd7SAlexander Aring NL802154_DEVKEY_RECORD, 399a26c5fd7SAlexander Aring 400a26c5fd7SAlexander Aring /* keep last */ 401a26c5fd7SAlexander Aring __NL802154_DEVKEY_AFTER_LAST, 402a26c5fd7SAlexander Aring NL802154_DEVKEY_MAX = __NL802154_DEVKEY_AFTER_LAST - 1 403a26c5fd7SAlexander Aring }; 404a26c5fd7SAlexander Aring 405a26c5fd7SAlexander Aring enum nl802154_dev { 406a26c5fd7SAlexander Aring NL802154_DEV_ATTR_UNSPEC, 407a26c5fd7SAlexander Aring 408a26c5fd7SAlexander Aring NL802154_DEV_ATTR_FRAME_COUNTER, 409a26c5fd7SAlexander Aring NL802154_DEV_ATTR_PAN_ID, 410a26c5fd7SAlexander Aring NL802154_DEV_ATTR_SHORT_ADDR, 411a26c5fd7SAlexander Aring NL802154_DEV_ATTR_EXTENDED_ADDR, 412a26c5fd7SAlexander Aring NL802154_DEV_ATTR_SECLEVEL_EXEMPT, 413a26c5fd7SAlexander Aring NL802154_DEV_ATTR_KEY_MODE, 414e7479122SNicolas Dichtel NL802154_DEV_ATTR_PAD, 415a26c5fd7SAlexander Aring 416a26c5fd7SAlexander Aring /* keep last */ 417a26c5fd7SAlexander Aring __NL802154_DEV_ATTR_AFTER_LAST, 418a26c5fd7SAlexander Aring NL802154_DEV_ATTR_MAX = __NL802154_DEV_ATTR_AFTER_LAST - 1 419a26c5fd7SAlexander Aring }; 420a26c5fd7SAlexander Aring 421a26c5fd7SAlexander Aring enum nl802154_devkey { 422a26c5fd7SAlexander Aring NL802154_DEVKEY_ATTR_UNSPEC, 423a26c5fd7SAlexander Aring 424a26c5fd7SAlexander Aring NL802154_DEVKEY_ATTR_FRAME_COUNTER, 425a26c5fd7SAlexander Aring NL802154_DEVKEY_ATTR_EXTENDED_ADDR, 426a26c5fd7SAlexander Aring NL802154_DEVKEY_ATTR_ID, 427e7479122SNicolas Dichtel NL802154_DEVKEY_ATTR_PAD, 428a26c5fd7SAlexander Aring 429a26c5fd7SAlexander Aring /* keep last */ 430a26c5fd7SAlexander Aring __NL802154_DEVKEY_ATTR_AFTER_LAST, 431a26c5fd7SAlexander Aring NL802154_DEVKEY_ATTR_MAX = __NL802154_DEVKEY_ATTR_AFTER_LAST - 1 432a26c5fd7SAlexander Aring }; 433a26c5fd7SAlexander Aring 434a26c5fd7SAlexander Aring enum nl802154_key { 435a26c5fd7SAlexander Aring NL802154_KEY_ATTR_UNSPEC, 436a26c5fd7SAlexander Aring 437a26c5fd7SAlexander Aring NL802154_KEY_ATTR_ID, 438a26c5fd7SAlexander Aring NL802154_KEY_ATTR_USAGE_FRAMES, 439a26c5fd7SAlexander Aring NL802154_KEY_ATTR_USAGE_CMDS, 440a26c5fd7SAlexander Aring NL802154_KEY_ATTR_BYTES, 441a26c5fd7SAlexander Aring 442a26c5fd7SAlexander Aring /* keep last */ 443a26c5fd7SAlexander Aring __NL802154_KEY_ATTR_AFTER_LAST, 444a26c5fd7SAlexander Aring NL802154_KEY_ATTR_MAX = __NL802154_KEY_ATTR_AFTER_LAST - 1 445a26c5fd7SAlexander Aring }; 446a26c5fd7SAlexander Aring 447a26c5fd7SAlexander Aring #define NL802154_KEY_SIZE 16 448a26c5fd7SAlexander Aring #define NL802154_CMD_FRAME_NR_IDS 256 449a26c5fd7SAlexander Aring 450a26c5fd7SAlexander Aring #endif /* CONFIG_IEEE802154_NL802154_EXPERIMENTAL */ 451a26c5fd7SAlexander Aring 4523ae75e02SAlexander Aring #endif /* __NL802154_H */ 453