18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * nl802154.h
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Copyright (C) 2007, 2008, 2009 Siemens AG
68c2ecf20Sopenharmony_ci */
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci#ifndef NL802154_H
98c2ecf20Sopenharmony_ci#define NL802154_H
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci#define IEEE802154_NL_NAME "802.15.4 MAC"
128c2ecf20Sopenharmony_ci#define IEEE802154_MCAST_COORD_NAME "coordinator"
138c2ecf20Sopenharmony_ci#define IEEE802154_MCAST_BEACON_NAME "beacon"
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_cienum {
168c2ecf20Sopenharmony_ci	__IEEE802154_ATTR_INVALID,
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ci	IEEE802154_ATTR_DEV_NAME,
198c2ecf20Sopenharmony_ci	IEEE802154_ATTR_DEV_INDEX,
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ci	IEEE802154_ATTR_STATUS,
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ci	IEEE802154_ATTR_SHORT_ADDR,
248c2ecf20Sopenharmony_ci	IEEE802154_ATTR_HW_ADDR,
258c2ecf20Sopenharmony_ci	IEEE802154_ATTR_PAN_ID,
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci	IEEE802154_ATTR_CHANNEL,
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ci	IEEE802154_ATTR_COORD_SHORT_ADDR,
308c2ecf20Sopenharmony_ci	IEEE802154_ATTR_COORD_HW_ADDR,
318c2ecf20Sopenharmony_ci	IEEE802154_ATTR_COORD_PAN_ID,
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci	IEEE802154_ATTR_SRC_SHORT_ADDR,
348c2ecf20Sopenharmony_ci	IEEE802154_ATTR_SRC_HW_ADDR,
358c2ecf20Sopenharmony_ci	IEEE802154_ATTR_SRC_PAN_ID,
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ci	IEEE802154_ATTR_DEST_SHORT_ADDR,
388c2ecf20Sopenharmony_ci	IEEE802154_ATTR_DEST_HW_ADDR,
398c2ecf20Sopenharmony_ci	IEEE802154_ATTR_DEST_PAN_ID,
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ci	IEEE802154_ATTR_CAPABILITY,
428c2ecf20Sopenharmony_ci	IEEE802154_ATTR_REASON,
438c2ecf20Sopenharmony_ci	IEEE802154_ATTR_SCAN_TYPE,
448c2ecf20Sopenharmony_ci	IEEE802154_ATTR_CHANNELS,
458c2ecf20Sopenharmony_ci	IEEE802154_ATTR_DURATION,
468c2ecf20Sopenharmony_ci	IEEE802154_ATTR_ED_LIST,
478c2ecf20Sopenharmony_ci	IEEE802154_ATTR_BCN_ORD,
488c2ecf20Sopenharmony_ci	IEEE802154_ATTR_SF_ORD,
498c2ecf20Sopenharmony_ci	IEEE802154_ATTR_PAN_COORD,
508c2ecf20Sopenharmony_ci	IEEE802154_ATTR_BAT_EXT,
518c2ecf20Sopenharmony_ci	IEEE802154_ATTR_COORD_REALIGN,
528c2ecf20Sopenharmony_ci	IEEE802154_ATTR_SEC,
538c2ecf20Sopenharmony_ci
548c2ecf20Sopenharmony_ci	IEEE802154_ATTR_PAGE,
558c2ecf20Sopenharmony_ci	IEEE802154_ATTR_CHANNEL_PAGE_LIST,
568c2ecf20Sopenharmony_ci
578c2ecf20Sopenharmony_ci	IEEE802154_ATTR_PHY_NAME,
588c2ecf20Sopenharmony_ci	IEEE802154_ATTR_DEV_TYPE,
598c2ecf20Sopenharmony_ci
608c2ecf20Sopenharmony_ci	IEEE802154_ATTR_TXPOWER,
618c2ecf20Sopenharmony_ci	IEEE802154_ATTR_LBT_ENABLED,
628c2ecf20Sopenharmony_ci	IEEE802154_ATTR_CCA_MODE,
638c2ecf20Sopenharmony_ci	IEEE802154_ATTR_CCA_ED_LEVEL,
648c2ecf20Sopenharmony_ci	IEEE802154_ATTR_CSMA_RETRIES,
658c2ecf20Sopenharmony_ci	IEEE802154_ATTR_CSMA_MIN_BE,
668c2ecf20Sopenharmony_ci	IEEE802154_ATTR_CSMA_MAX_BE,
678c2ecf20Sopenharmony_ci
688c2ecf20Sopenharmony_ci	IEEE802154_ATTR_FRAME_RETRIES,
698c2ecf20Sopenharmony_ci
708c2ecf20Sopenharmony_ci	IEEE802154_ATTR_LLSEC_ENABLED,
718c2ecf20Sopenharmony_ci	IEEE802154_ATTR_LLSEC_SECLEVEL,
728c2ecf20Sopenharmony_ci	IEEE802154_ATTR_LLSEC_KEY_MODE,
738c2ecf20Sopenharmony_ci	IEEE802154_ATTR_LLSEC_KEY_SOURCE_SHORT,
748c2ecf20Sopenharmony_ci	IEEE802154_ATTR_LLSEC_KEY_SOURCE_EXTENDED,
758c2ecf20Sopenharmony_ci	IEEE802154_ATTR_LLSEC_KEY_ID,
768c2ecf20Sopenharmony_ci	IEEE802154_ATTR_LLSEC_FRAME_COUNTER,
778c2ecf20Sopenharmony_ci	IEEE802154_ATTR_LLSEC_KEY_BYTES,
788c2ecf20Sopenharmony_ci	IEEE802154_ATTR_LLSEC_KEY_USAGE_FRAME_TYPES,
798c2ecf20Sopenharmony_ci	IEEE802154_ATTR_LLSEC_KEY_USAGE_COMMANDS,
808c2ecf20Sopenharmony_ci	IEEE802154_ATTR_LLSEC_FRAME_TYPE,
818c2ecf20Sopenharmony_ci	IEEE802154_ATTR_LLSEC_CMD_FRAME_ID,
828c2ecf20Sopenharmony_ci	IEEE802154_ATTR_LLSEC_SECLEVELS,
838c2ecf20Sopenharmony_ci	IEEE802154_ATTR_LLSEC_DEV_OVERRIDE,
848c2ecf20Sopenharmony_ci	IEEE802154_ATTR_LLSEC_DEV_KEY_MODE,
858c2ecf20Sopenharmony_ci
868c2ecf20Sopenharmony_ci	IEEE802154_ATTR_PAD,
878c2ecf20Sopenharmony_ci
888c2ecf20Sopenharmony_ci	__IEEE802154_ATTR_MAX,
898c2ecf20Sopenharmony_ci};
908c2ecf20Sopenharmony_ci
918c2ecf20Sopenharmony_ci#define IEEE802154_ATTR_MAX (__IEEE802154_ATTR_MAX - 1)
928c2ecf20Sopenharmony_ci
938c2ecf20Sopenharmony_ciextern const struct nla_policy ieee802154_policy[];
948c2ecf20Sopenharmony_ci
958c2ecf20Sopenharmony_ci/* commands */
968c2ecf20Sopenharmony_ci/* REQ should be responded with CONF
978c2ecf20Sopenharmony_ci * and INDIC with RESP
988c2ecf20Sopenharmony_ci */
998c2ecf20Sopenharmony_cienum {
1008c2ecf20Sopenharmony_ci	__IEEE802154_COMMAND_INVALID,
1018c2ecf20Sopenharmony_ci
1028c2ecf20Sopenharmony_ci	IEEE802154_ASSOCIATE_REQ,
1038c2ecf20Sopenharmony_ci	IEEE802154_ASSOCIATE_CONF,
1048c2ecf20Sopenharmony_ci	IEEE802154_DISASSOCIATE_REQ,
1058c2ecf20Sopenharmony_ci	IEEE802154_DISASSOCIATE_CONF,
1068c2ecf20Sopenharmony_ci	IEEE802154_GET_REQ,
1078c2ecf20Sopenharmony_ci	IEEE802154_GET_CONF,
1088c2ecf20Sopenharmony_ci	IEEE802154_RESET_REQ,
1098c2ecf20Sopenharmony_ci	IEEE802154_RESET_CONF,
1108c2ecf20Sopenharmony_ci	IEEE802154_SCAN_REQ,
1118c2ecf20Sopenharmony_ci	IEEE802154_SCAN_CONF,
1128c2ecf20Sopenharmony_ci	IEEE802154_SET_REQ,
1138c2ecf20Sopenharmony_ci	IEEE802154_SET_CONF,
1148c2ecf20Sopenharmony_ci	IEEE802154_START_REQ,
1158c2ecf20Sopenharmony_ci	IEEE802154_START_CONF,
1168c2ecf20Sopenharmony_ci	IEEE802154_SYNC_REQ,
1178c2ecf20Sopenharmony_ci	IEEE802154_POLL_REQ,
1188c2ecf20Sopenharmony_ci	IEEE802154_POLL_CONF,
1198c2ecf20Sopenharmony_ci
1208c2ecf20Sopenharmony_ci	IEEE802154_ASSOCIATE_INDIC,
1218c2ecf20Sopenharmony_ci	IEEE802154_ASSOCIATE_RESP,
1228c2ecf20Sopenharmony_ci	IEEE802154_DISASSOCIATE_INDIC,
1238c2ecf20Sopenharmony_ci	IEEE802154_BEACON_NOTIFY_INDIC,
1248c2ecf20Sopenharmony_ci	IEEE802154_ORPHAN_INDIC,
1258c2ecf20Sopenharmony_ci	IEEE802154_ORPHAN_RESP,
1268c2ecf20Sopenharmony_ci	IEEE802154_COMM_STATUS_INDIC,
1278c2ecf20Sopenharmony_ci	IEEE802154_SYNC_LOSS_INDIC,
1288c2ecf20Sopenharmony_ci
1298c2ecf20Sopenharmony_ci	IEEE802154_GTS_REQ, /* Not supported yet */
1308c2ecf20Sopenharmony_ci	IEEE802154_GTS_INDIC, /* Not supported yet */
1318c2ecf20Sopenharmony_ci	IEEE802154_GTS_CONF, /* Not supported yet */
1328c2ecf20Sopenharmony_ci	IEEE802154_RX_ENABLE_REQ, /* Not supported yet */
1338c2ecf20Sopenharmony_ci	IEEE802154_RX_ENABLE_CONF, /* Not supported yet */
1348c2ecf20Sopenharmony_ci
1358c2ecf20Sopenharmony_ci	IEEE802154_LIST_IFACE,
1368c2ecf20Sopenharmony_ci	IEEE802154_LIST_PHY,
1378c2ecf20Sopenharmony_ci	IEEE802154_ADD_IFACE,
1388c2ecf20Sopenharmony_ci	IEEE802154_DEL_IFACE,
1398c2ecf20Sopenharmony_ci
1408c2ecf20Sopenharmony_ci	IEEE802154_SET_MACPARAMS,
1418c2ecf20Sopenharmony_ci
1428c2ecf20Sopenharmony_ci	IEEE802154_LLSEC_GETPARAMS,
1438c2ecf20Sopenharmony_ci	IEEE802154_LLSEC_SETPARAMS,
1448c2ecf20Sopenharmony_ci	IEEE802154_LLSEC_LIST_KEY,
1458c2ecf20Sopenharmony_ci	IEEE802154_LLSEC_ADD_KEY,
1468c2ecf20Sopenharmony_ci	IEEE802154_LLSEC_DEL_KEY,
1478c2ecf20Sopenharmony_ci	IEEE802154_LLSEC_LIST_DEV,
1488c2ecf20Sopenharmony_ci	IEEE802154_LLSEC_ADD_DEV,
1498c2ecf20Sopenharmony_ci	IEEE802154_LLSEC_DEL_DEV,
1508c2ecf20Sopenharmony_ci	IEEE802154_LLSEC_LIST_DEVKEY,
1518c2ecf20Sopenharmony_ci	IEEE802154_LLSEC_ADD_DEVKEY,
1528c2ecf20Sopenharmony_ci	IEEE802154_LLSEC_DEL_DEVKEY,
1538c2ecf20Sopenharmony_ci	IEEE802154_LLSEC_LIST_SECLEVEL,
1548c2ecf20Sopenharmony_ci	IEEE802154_LLSEC_ADD_SECLEVEL,
1558c2ecf20Sopenharmony_ci	IEEE802154_LLSEC_DEL_SECLEVEL,
1568c2ecf20Sopenharmony_ci
1578c2ecf20Sopenharmony_ci	__IEEE802154_CMD_MAX,
1588c2ecf20Sopenharmony_ci};
1598c2ecf20Sopenharmony_ci
1608c2ecf20Sopenharmony_ci#define IEEE802154_CMD_MAX (__IEEE802154_CMD_MAX - 1)
1618c2ecf20Sopenharmony_ci
1628c2ecf20Sopenharmony_cienum {
1638c2ecf20Sopenharmony_ci	__IEEE802154_DEV_INVALID = -1,
1648c2ecf20Sopenharmony_ci
1658c2ecf20Sopenharmony_ci	IEEE802154_DEV_WPAN,
1668c2ecf20Sopenharmony_ci	IEEE802154_DEV_MONITOR,
1678c2ecf20Sopenharmony_ci
1688c2ecf20Sopenharmony_ci	__IEEE802154_DEV_MAX,
1698c2ecf20Sopenharmony_ci};
1708c2ecf20Sopenharmony_ci
1718c2ecf20Sopenharmony_ci#endif
172