// Author: Xianjun Jiao
// SPDX-FileCopyrightText: 2019 UGent
// SPDX-License-Identifier: AGPL-3.0-or-later

//---nl80211 cmd testmode definitions
//---should be used in driver sdr.c and user space app

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,
	OPENWIFI_ATTR_RSSI_TH = 11,
	OPENWIFI_ATTR_HIGH_TSF = 12,
	OPENWIFI_ATTR_LOW_TSF = 13,

	REG_ATTR_ADDR = 14,
	REG_ATTR_VAL = 15,

	/* 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,
	
	OPENWIFI_CMD_SET_ADDR = 4,
	OPENWIFI_CMD_GET_ADDR = 5,
	
	OPENWIFI_CMD_SET_SLICE_TOTAL = 6,
	OPENWIFI_CMD_GET_SLICE_TOTAL = 7,

	OPENWIFI_CMD_SET_SLICE_START = 8,
	OPENWIFI_CMD_GET_SLICE_START = 9,

	OPENWIFI_CMD_SET_SLICE_END = 10,
	OPENWIFI_CMD_GET_SLICE_END = 11,

	// OPENWIFI_CMD_SET_SLICE_TOTAL1 = 12,
	// OPENWIFI_CMD_GET_SLICE_TOTAL1 = 13,

	// OPENWIFI_CMD_SET_SLICE_START1 = 14,
	// OPENWIFI_CMD_GET_SLICE_START1 = 15,

	// OPENWIFI_CMD_SET_SLICE_END1 = 16,
	// OPENWIFI_CMD_GET_SLICE_END1 = 17,

	OPENWIFI_CMD_SET_RSSI_TH = 18,
	OPENWIFI_CMD_GET_RSSI_TH = 19,

	OPENWIFI_CMD_SET_TSF = 20,

	REG_CMD_SET = 21,
	REG_CMD_GET = 22,
};

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 },
	[OPENWIFI_ATTR_RSSI_TH] = { .type = NLA_U32 },
	[OPENWIFI_ATTR_HIGH_TSF] = { .type = NLA_U32 },
	[OPENWIFI_ATTR_LOW_TSF] = { .type = NLA_U32 },

	[REG_ATTR_ADDR] = { .type = NLA_U32 },
	[REG_ATTR_VAL] = { .type = NLA_U32 },
};
