openwifi/user_space/sdrctl_src/nl80211_testmode_def.h

87 lines
2.4 KiB
C
Raw Normal View History

2021-02-03 14:56:52 +00:00
// Author: Xianjun Jiao
// SPDX-FileCopyrightText: 2019 UGent
2021-01-20 12:30:12 +00:00
// SPDX-License-Identifier: AGPL-3.0-or-later
2019-12-10 13:03:47 +00:00
//---nl80211 cmd testmode definitions
//---should be used in driver sdr.c and user space app
2019-12-10 13:03:47 +00:00
enum openwifi_testmode_attr {
__OPENWIFI_ATTR_INVALID = 0,
OPENWIFI_ATTR_CMD = 1,
OPENWIFI_ATTR_GAP = 2,
OPENWIFI_ATTR_SLICE_IDX = 3,
OPENWIFI_ATTR_ADDR = 4,
OPENWIFI_ATTR_SLICE_TOTAL = 5,
OPENWIFI_ATTR_SLICE_START = 6,
OPENWIFI_ATTR_SLICE_END = 7,
// OPENWIFI_ATTR_SLICE_TOTAL1 = 8,
// OPENWIFI_ATTR_SLICE_START1 = 9,
// OPENWIFI_ATTR_SLICE_END1 = 10,
2019-12-10 13:03:47 +00:00
OPENWIFI_ATTR_RSSI_TH = 11,
2020-03-05 07:50:41 +00:00
OPENWIFI_ATTR_HIGH_TSF = 12,
OPENWIFI_ATTR_LOW_TSF = 13,
2019-12-10 13:03:47 +00:00
2020-03-05 07:50:41 +00:00
REG_ATTR_ADDR = 14,
REG_ATTR_VAL = 15,
2019-12-10 13:03:47 +00:00
/* keep last */
__OPENWIFI_ATTR_AFTER_LAST,
OPENWIFI_ATTR_MAX = __OPENWIFI_ATTR_AFTER_LAST - 1
};
enum openwifi_testmode_cmd {
OPENWIFI_CMD_SET_GAP = 0,
OPENWIFI_CMD_GET_GAP = 1,
OPENWIFI_CMD_SET_SLICE_IDX = 2,
OPENWIFI_CMD_GET_SLICE_IDX = 3,
2019-12-10 13:03:47 +00:00
OPENWIFI_CMD_SET_ADDR = 4,
OPENWIFI_CMD_GET_ADDR = 5,
2019-12-10 13:03:47 +00:00
OPENWIFI_CMD_SET_SLICE_TOTAL = 6,
OPENWIFI_CMD_GET_SLICE_TOTAL = 7,
2019-12-10 13:03:47 +00:00
OPENWIFI_CMD_SET_SLICE_START = 8,
OPENWIFI_CMD_GET_SLICE_START = 9,
2019-12-10 13:03:47 +00:00
OPENWIFI_CMD_SET_SLICE_END = 10,
OPENWIFI_CMD_GET_SLICE_END = 11,
2019-12-10 13:03:47 +00:00
// OPENWIFI_CMD_SET_SLICE_TOTAL1 = 12,
// OPENWIFI_CMD_GET_SLICE_TOTAL1 = 13,
2019-12-10 13:03:47 +00:00
// OPENWIFI_CMD_SET_SLICE_START1 = 14,
// OPENWIFI_CMD_GET_SLICE_START1 = 15,
2019-12-10 13:03:47 +00:00
// OPENWIFI_CMD_SET_SLICE_END1 = 16,
// OPENWIFI_CMD_GET_SLICE_END1 = 17,
2019-12-10 13:03:47 +00:00
OPENWIFI_CMD_SET_RSSI_TH = 18,
OPENWIFI_CMD_GET_RSSI_TH = 19,
2020-03-05 07:50:41 +00:00
OPENWIFI_CMD_SET_TSF = 20,
REG_CMD_SET = 21,
REG_CMD_GET = 22,
2019-12-10 13:03:47 +00:00
};
static const struct nla_policy openwifi_testmode_policy[OPENWIFI_ATTR_MAX + 1] = {
[OPENWIFI_ATTR_CMD] = { .type = NLA_U32 },
[OPENWIFI_ATTR_GAP] = { .type = NLA_U32 },
[OPENWIFI_ATTR_SLICE_IDX] = { .type = NLA_U32 },
[OPENWIFI_ATTR_ADDR] = { .type = NLA_U32 },
[OPENWIFI_ATTR_SLICE_TOTAL] = { .type = NLA_U32 },
[OPENWIFI_ATTR_SLICE_START] = { .type = NLA_U32 },
[OPENWIFI_ATTR_SLICE_END] = { .type = NLA_U32 },
// [OPENWIFI_ATTR_SLICE_TOTAL1] = { .type = NLA_U32 },
// [OPENWIFI_ATTR_SLICE_START1] = { .type = NLA_U32 },
// [OPENWIFI_ATTR_SLICE_END1] = { .type = NLA_U32 },
2019-12-10 13:03:47 +00:00
[OPENWIFI_ATTR_RSSI_TH] = { .type = NLA_U32 },
2020-03-05 07:50:41 +00:00
[OPENWIFI_ATTR_HIGH_TSF] = { .type = NLA_U32 },
[OPENWIFI_ATTR_LOW_TSF] = { .type = NLA_U32 },
2019-12-10 13:03:47 +00:00
[REG_ATTR_ADDR] = { .type = NLA_U32 },
[REG_ATTR_VAL] = { .type = NLA_U32 },
};