162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * This header file contains global constant/enum definitions,
462306a36Sopenharmony_ci * global variable declaration.
562306a36Sopenharmony_ci */
662306a36Sopenharmony_ci#ifndef _LBS_DEFS_H_
762306a36Sopenharmony_ci#define _LBS_DEFS_H_
862306a36Sopenharmony_ci
962306a36Sopenharmony_ci#include <linux/spinlock.h>
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ci#ifdef CONFIG_LIBERTAS_DEBUG
1262306a36Sopenharmony_ci#define DEBUG
1362306a36Sopenharmony_ci#define PROC_DEBUG
1462306a36Sopenharmony_ci#endif
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ci#ifndef DRV_NAME
1762306a36Sopenharmony_ci#define DRV_NAME "libertas"
1862306a36Sopenharmony_ci#endif
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_ci#define LBS_DEB_ENTER	0x00000001
2262306a36Sopenharmony_ci#define LBS_DEB_LEAVE	0x00000002
2362306a36Sopenharmony_ci#define LBS_DEB_MAIN	0x00000004
2462306a36Sopenharmony_ci#define LBS_DEB_NET	0x00000008
2562306a36Sopenharmony_ci#define LBS_DEB_MESH	0x00000010
2662306a36Sopenharmony_ci#define LBS_DEB_WEXT	0x00000020
2762306a36Sopenharmony_ci#define LBS_DEB_IOCTL	0x00000040
2862306a36Sopenharmony_ci#define LBS_DEB_SCAN	0x00000080
2962306a36Sopenharmony_ci#define LBS_DEB_ASSOC	0x00000100
3062306a36Sopenharmony_ci#define LBS_DEB_JOIN	0x00000200
3162306a36Sopenharmony_ci#define LBS_DEB_11D	0x00000400
3262306a36Sopenharmony_ci#define LBS_DEB_DEBUGFS	0x00000800
3362306a36Sopenharmony_ci#define LBS_DEB_ETHTOOL	0x00001000
3462306a36Sopenharmony_ci#define LBS_DEB_HOST	0x00002000
3562306a36Sopenharmony_ci#define LBS_DEB_CMD	0x00004000
3662306a36Sopenharmony_ci#define LBS_DEB_RX	0x00008000
3762306a36Sopenharmony_ci#define LBS_DEB_TX	0x00010000
3862306a36Sopenharmony_ci#define LBS_DEB_USB	0x00020000
3962306a36Sopenharmony_ci#define LBS_DEB_CS	0x00040000
4062306a36Sopenharmony_ci#define LBS_DEB_FW	0x00080000
4162306a36Sopenharmony_ci#define LBS_DEB_THREAD	0x00100000
4262306a36Sopenharmony_ci#define LBS_DEB_HEX	0x00200000
4362306a36Sopenharmony_ci#define LBS_DEB_SDIO	0x00400000
4462306a36Sopenharmony_ci#define LBS_DEB_SYSFS	0x00800000
4562306a36Sopenharmony_ci#define LBS_DEB_SPI	0x01000000
4662306a36Sopenharmony_ci#define LBS_DEB_CFG80211 0x02000000
4762306a36Sopenharmony_ci
4862306a36Sopenharmony_ciextern unsigned int lbs_debug;
4962306a36Sopenharmony_ci
5062306a36Sopenharmony_ci#ifdef DEBUG
5162306a36Sopenharmony_ci#define LBS_DEB_LL(grp, grpnam, fmt, args...) \
5262306a36Sopenharmony_cido { if ((lbs_debug & (grp)) == (grp)) \
5362306a36Sopenharmony_ci  printk(KERN_DEBUG DRV_NAME grpnam ": " fmt, ## args); } while (0)
5462306a36Sopenharmony_ci#else
5562306a36Sopenharmony_ci#define LBS_DEB_LL(grp, grpnam, fmt, args...) do {} while (0)
5662306a36Sopenharmony_ci#endif
5762306a36Sopenharmony_ci
5862306a36Sopenharmony_ci#define lbs_deb_main(fmt, args...)      LBS_DEB_LL(LBS_DEB_MAIN, " main", fmt, ##args)
5962306a36Sopenharmony_ci#define lbs_deb_net(fmt, args...)       LBS_DEB_LL(LBS_DEB_NET, " net", fmt, ##args)
6062306a36Sopenharmony_ci#define lbs_deb_mesh(fmt, args...)      LBS_DEB_LL(LBS_DEB_MESH, " mesh", fmt, ##args)
6162306a36Sopenharmony_ci#define lbs_deb_wext(fmt, args...)      LBS_DEB_LL(LBS_DEB_WEXT, " wext", fmt, ##args)
6262306a36Sopenharmony_ci#define lbs_deb_ioctl(fmt, args...)     LBS_DEB_LL(LBS_DEB_IOCTL, " ioctl", fmt, ##args)
6362306a36Sopenharmony_ci#define lbs_deb_scan(fmt, args...)      LBS_DEB_LL(LBS_DEB_SCAN, " scan", fmt, ##args)
6462306a36Sopenharmony_ci#define lbs_deb_assoc(fmt, args...)     LBS_DEB_LL(LBS_DEB_ASSOC, " assoc", fmt, ##args)
6562306a36Sopenharmony_ci#define lbs_deb_join(fmt, args...)      LBS_DEB_LL(LBS_DEB_JOIN, " join", fmt, ##args)
6662306a36Sopenharmony_ci#define lbs_deb_11d(fmt, args...)       LBS_DEB_LL(LBS_DEB_11D, " 11d", fmt, ##args)
6762306a36Sopenharmony_ci#define lbs_deb_debugfs(fmt, args...)   LBS_DEB_LL(LBS_DEB_DEBUGFS, " debugfs", fmt, ##args)
6862306a36Sopenharmony_ci#define lbs_deb_ethtool(fmt, args...)   LBS_DEB_LL(LBS_DEB_ETHTOOL, " ethtool", fmt, ##args)
6962306a36Sopenharmony_ci#define lbs_deb_host(fmt, args...)      LBS_DEB_LL(LBS_DEB_HOST, " host", fmt, ##args)
7062306a36Sopenharmony_ci#define lbs_deb_cmd(fmt, args...)       LBS_DEB_LL(LBS_DEB_CMD, " cmd", fmt, ##args)
7162306a36Sopenharmony_ci#define lbs_deb_rx(fmt, args...)        LBS_DEB_LL(LBS_DEB_RX, " rx", fmt, ##args)
7262306a36Sopenharmony_ci#define lbs_deb_tx(fmt, args...)        LBS_DEB_LL(LBS_DEB_TX, " tx", fmt, ##args)
7362306a36Sopenharmony_ci#define lbs_deb_fw(fmt, args...)        LBS_DEB_LL(LBS_DEB_FW, " fw", fmt, ##args)
7462306a36Sopenharmony_ci#define lbs_deb_usb(fmt, args...)       LBS_DEB_LL(LBS_DEB_USB, " usb", fmt, ##args)
7562306a36Sopenharmony_ci#define lbs_deb_usbd(dev, fmt, args...) LBS_DEB_LL(LBS_DEB_USB, " usbd", "%s:" fmt, dev_name(dev), ##args)
7662306a36Sopenharmony_ci#define lbs_deb_cs(fmt, args...)        LBS_DEB_LL(LBS_DEB_CS, " cs", fmt, ##args)
7762306a36Sopenharmony_ci#define lbs_deb_thread(fmt, args...)    LBS_DEB_LL(LBS_DEB_THREAD, " thread", fmt, ##args)
7862306a36Sopenharmony_ci#define lbs_deb_sdio(fmt, args...)      LBS_DEB_LL(LBS_DEB_SDIO, " sdio", fmt, ##args)
7962306a36Sopenharmony_ci#define lbs_deb_sysfs(fmt, args...)     LBS_DEB_LL(LBS_DEB_SYSFS, " sysfs", fmt, ##args)
8062306a36Sopenharmony_ci#define lbs_deb_spi(fmt, args...)       LBS_DEB_LL(LBS_DEB_SPI, " spi", fmt, ##args)
8162306a36Sopenharmony_ci#define lbs_deb_cfg80211(fmt, args...)  LBS_DEB_LL(LBS_DEB_CFG80211, " cfg80211", fmt, ##args)
8262306a36Sopenharmony_ci
8362306a36Sopenharmony_ci#ifdef DEBUG
8462306a36Sopenharmony_cistatic inline void lbs_deb_hex(unsigned int grp, const char *prompt,
8562306a36Sopenharmony_ci			       const u8 *buf, int len)
8662306a36Sopenharmony_ci{
8762306a36Sopenharmony_ci	int i = 0;
8862306a36Sopenharmony_ci
8962306a36Sopenharmony_ci	if (len &&
9062306a36Sopenharmony_ci	    (lbs_debug & LBS_DEB_HEX) &&
9162306a36Sopenharmony_ci	    (lbs_debug & grp))
9262306a36Sopenharmony_ci	{
9362306a36Sopenharmony_ci		for (i = 1; i <= len; i++) {
9462306a36Sopenharmony_ci			if ((i & 0xf) == 1) {
9562306a36Sopenharmony_ci				if (i != 1)
9662306a36Sopenharmony_ci					printk("\n");
9762306a36Sopenharmony_ci				printk(DRV_NAME " %s: ", prompt);
9862306a36Sopenharmony_ci			}
9962306a36Sopenharmony_ci			printk("%02x ", (u8) * buf);
10062306a36Sopenharmony_ci			buf++;
10162306a36Sopenharmony_ci		}
10262306a36Sopenharmony_ci		printk("\n");
10362306a36Sopenharmony_ci	}
10462306a36Sopenharmony_ci}
10562306a36Sopenharmony_ci#else
10662306a36Sopenharmony_ci#define lbs_deb_hex(grp,prompt,buf,len)	do {} while (0)
10762306a36Sopenharmony_ci#endif
10862306a36Sopenharmony_ci
10962306a36Sopenharmony_ci
11062306a36Sopenharmony_ci
11162306a36Sopenharmony_ci/* Buffer Constants */
11262306a36Sopenharmony_ci
11362306a36Sopenharmony_ci/*	The size of SQ memory PPA, DPA are 8 DWORDs, that keep the physical
11462306a36Sopenharmony_ci *	addresses of TxPD buffers. Station has only 8 TxPD available, Whereas
11562306a36Sopenharmony_ci *	driver has more local TxPDs. Each TxPD on the host memory is associated
11662306a36Sopenharmony_ci *	with a Tx control node. The driver maintains 8 RxPD descriptors for
11762306a36Sopenharmony_ci *	station firmware to store Rx packet information.
11862306a36Sopenharmony_ci *
11962306a36Sopenharmony_ci *	Current version of MAC has a 32x6 multicast address buffer.
12062306a36Sopenharmony_ci *
12162306a36Sopenharmony_ci *	802.11b can have up to  14 channels, the driver keeps the
12262306a36Sopenharmony_ci *	BSSID(MAC address) of each APs or Ad hoc stations it has sensed.
12362306a36Sopenharmony_ci */
12462306a36Sopenharmony_ci
12562306a36Sopenharmony_ci#define MRVDRV_MAX_MULTICAST_LIST_SIZE	32
12662306a36Sopenharmony_ci#define LBS_NUM_CMD_BUFFERS             10
12762306a36Sopenharmony_ci#define LBS_CMD_BUFFER_SIZE             (2 * 1024)
12862306a36Sopenharmony_ci#define MRVDRV_MAX_CHANNEL_SIZE		14
12962306a36Sopenharmony_ci#define MRVDRV_ASSOCIATION_TIME_OUT	255
13062306a36Sopenharmony_ci#define MRVDRV_SNAP_HEADER_LEN          8
13162306a36Sopenharmony_ci
13262306a36Sopenharmony_ci#define	LBS_UPLD_SIZE			2312
13362306a36Sopenharmony_ci#define DEV_NAME_LEN			32
13462306a36Sopenharmony_ci
13562306a36Sopenharmony_ci/* Wake criteria for HOST_SLEEP_CFG command */
13662306a36Sopenharmony_ci#define EHS_WAKE_ON_BROADCAST_DATA	0x0001
13762306a36Sopenharmony_ci#define EHS_WAKE_ON_UNICAST_DATA	0x0002
13862306a36Sopenharmony_ci#define EHS_WAKE_ON_MAC_EVENT		0x0004
13962306a36Sopenharmony_ci#define EHS_WAKE_ON_MULTICAST_DATA	0x0008
14062306a36Sopenharmony_ci#define EHS_REMOVE_WAKEUP		0xFFFFFFFF
14162306a36Sopenharmony_ci/* Wake rules for Host_Sleep_CFG command */
14262306a36Sopenharmony_ci#define WOL_RULE_NET_TYPE_INFRA_OR_IBSS	0x00
14362306a36Sopenharmony_ci#define WOL_RULE_NET_TYPE_MESH		0x10
14462306a36Sopenharmony_ci#define WOL_RULE_ADDR_TYPE_BCAST	0x01
14562306a36Sopenharmony_ci#define WOL_RULE_ADDR_TYPE_MCAST	0x08
14662306a36Sopenharmony_ci#define WOL_RULE_ADDR_TYPE_UCAST	0x02
14762306a36Sopenharmony_ci#define WOL_RULE_OP_AND			0x01
14862306a36Sopenharmony_ci#define WOL_RULE_OP_OR			0x02
14962306a36Sopenharmony_ci#define WOL_RULE_OP_INVALID		0xFF
15062306a36Sopenharmony_ci#define WOL_RESULT_VALID_CMD		0
15162306a36Sopenharmony_ci#define WOL_RESULT_NOSPC_ERR		1
15262306a36Sopenharmony_ci#define WOL_RESULT_EEXIST_ERR		2
15362306a36Sopenharmony_ci
15462306a36Sopenharmony_ci/* Misc constants */
15562306a36Sopenharmony_ci/* This section defines 802.11 specific contants */
15662306a36Sopenharmony_ci
15762306a36Sopenharmony_ci#define MRVDRV_MAX_BSS_DESCRIPTS		16
15862306a36Sopenharmony_ci#define MRVDRV_MAX_REGION_CODE			6
15962306a36Sopenharmony_ci
16062306a36Sopenharmony_ci#define MRVDRV_DEFAULT_LISTEN_INTERVAL		10
16162306a36Sopenharmony_ci
16262306a36Sopenharmony_ci#define	MRVDRV_CHANNELS_PER_SCAN		4
16362306a36Sopenharmony_ci#define	MRVDRV_MAX_CHANNELS_PER_SCAN		14
16462306a36Sopenharmony_ci
16562306a36Sopenharmony_ci#define MRVDRV_MIN_BEACON_INTERVAL		20
16662306a36Sopenharmony_ci#define MRVDRV_MAX_BEACON_INTERVAL		1000
16762306a36Sopenharmony_ci#define MRVDRV_BEACON_INTERVAL			100
16862306a36Sopenharmony_ci
16962306a36Sopenharmony_ci#define MARVELL_MESH_IE_LENGTH		9
17062306a36Sopenharmony_ci
17162306a36Sopenharmony_ci/*
17262306a36Sopenharmony_ci * Values used to populate the struct mrvl_mesh_ie.  The only time you need this
17362306a36Sopenharmony_ci * is when enabling the mesh using CMD_MESH_CONFIG.
17462306a36Sopenharmony_ci */
17562306a36Sopenharmony_ci#define MARVELL_MESH_IE_TYPE		4
17662306a36Sopenharmony_ci#define MARVELL_MESH_IE_SUBTYPE		0
17762306a36Sopenharmony_ci#define MARVELL_MESH_IE_VERSION		0
17862306a36Sopenharmony_ci#define MARVELL_MESH_PROTO_ID_HWMP	0
17962306a36Sopenharmony_ci#define MARVELL_MESH_METRIC_ID		0
18062306a36Sopenharmony_ci#define MARVELL_MESH_CAPABILITY		0
18162306a36Sopenharmony_ci
18262306a36Sopenharmony_ci/* INT status Bit Definition */
18362306a36Sopenharmony_ci#define MRVDRV_TX_DNLD_RDY		0x0001
18462306a36Sopenharmony_ci#define MRVDRV_RX_UPLD_RDY		0x0002
18562306a36Sopenharmony_ci#define MRVDRV_CMD_DNLD_RDY		0x0004
18662306a36Sopenharmony_ci#define MRVDRV_CMD_UPLD_RDY		0x0008
18762306a36Sopenharmony_ci#define MRVDRV_CARDEVENT		0x0010
18862306a36Sopenharmony_ci
18962306a36Sopenharmony_ci/* Automatic TX control default levels */
19062306a36Sopenharmony_ci#define POW_ADAPT_DEFAULT_P0 13
19162306a36Sopenharmony_ci#define POW_ADAPT_DEFAULT_P1 15
19262306a36Sopenharmony_ci#define POW_ADAPT_DEFAULT_P2 18
19362306a36Sopenharmony_ci#define TPC_DEFAULT_P0 5
19462306a36Sopenharmony_ci#define TPC_DEFAULT_P1 10
19562306a36Sopenharmony_ci#define TPC_DEFAULT_P2 13
19662306a36Sopenharmony_ci
19762306a36Sopenharmony_ci/* TxPD status */
19862306a36Sopenharmony_ci
19962306a36Sopenharmony_ci/*
20062306a36Sopenharmony_ci *	Station firmware use TxPD status field to report final Tx transmit
20162306a36Sopenharmony_ci *	result, Bit masks are used to present combined situations.
20262306a36Sopenharmony_ci */
20362306a36Sopenharmony_ci
20462306a36Sopenharmony_ci#define MRVDRV_TxPD_POWER_MGMT_NULL_PACKET 0x01
20562306a36Sopenharmony_ci#define MRVDRV_TxPD_POWER_MGMT_LAST_PACKET 0x08
20662306a36Sopenharmony_ci
20762306a36Sopenharmony_ci/* Tx mesh flag */
20862306a36Sopenharmony_ci/*
20962306a36Sopenharmony_ci * Currently we are using normal WDS flag as mesh flag.
21062306a36Sopenharmony_ci * TODO: change to proper mesh flag when MAC understands it.
21162306a36Sopenharmony_ci */
21262306a36Sopenharmony_ci#define TxPD_CONTROL_WDS_FRAME (1<<17)
21362306a36Sopenharmony_ci#define TxPD_MESH_FRAME TxPD_CONTROL_WDS_FRAME
21462306a36Sopenharmony_ci
21562306a36Sopenharmony_ci/* Mesh interface ID */
21662306a36Sopenharmony_ci#define MESH_IFACE_ID					0x0001
21762306a36Sopenharmony_ci/* Mesh id should be in bits 14-13-12 */
21862306a36Sopenharmony_ci#define MESH_IFACE_BIT_OFFSET				0x000c
21962306a36Sopenharmony_ci/* Mesh enable bit in FW capability */
22062306a36Sopenharmony_ci#define MESH_CAPINFO_ENABLE_MASK			(1<<16)
22162306a36Sopenharmony_ci
22262306a36Sopenharmony_ci/* FW definition from Marvell v4 */
22362306a36Sopenharmony_ci#define MRVL_FW_V4					(0x04)
22462306a36Sopenharmony_ci/* FW definition from Marvell v5 */
22562306a36Sopenharmony_ci#define MRVL_FW_V5					(0x05)
22662306a36Sopenharmony_ci/* FW definition from Marvell v10 */
22762306a36Sopenharmony_ci#define MRVL_FW_V10					(0x0a)
22862306a36Sopenharmony_ci/* FW major revision definition */
22962306a36Sopenharmony_ci#define MRVL_FW_MAJOR_REV(x)				((x)>>24)
23062306a36Sopenharmony_ci
23162306a36Sopenharmony_ci/* RxPD status */
23262306a36Sopenharmony_ci
23362306a36Sopenharmony_ci#define MRVDRV_RXPD_STATUS_OK                0x0001
23462306a36Sopenharmony_ci
23562306a36Sopenharmony_ci/* RxPD status - Received packet types */
23662306a36Sopenharmony_ci/* Rx mesh flag */
23762306a36Sopenharmony_ci/*
23862306a36Sopenharmony_ci * Currently we are using normal WDS flag as mesh flag.
23962306a36Sopenharmony_ci * TODO: change to proper mesh flag when MAC understands it.
24062306a36Sopenharmony_ci */
24162306a36Sopenharmony_ci#define RxPD_CONTROL_WDS_FRAME (0x40)
24262306a36Sopenharmony_ci#define RxPD_MESH_FRAME RxPD_CONTROL_WDS_FRAME
24362306a36Sopenharmony_ci
24462306a36Sopenharmony_ci/* RSSI-related defines */
24562306a36Sopenharmony_ci/*
24662306a36Sopenharmony_ci *	RSSI constants are used to implement 802.11 RSSI threshold
24762306a36Sopenharmony_ci *	indication. if the Rx packet signal got too weak for 5 consecutive
24862306a36Sopenharmony_ci *	times, miniport driver (driver) will report this event to wrapper
24962306a36Sopenharmony_ci */
25062306a36Sopenharmony_ci
25162306a36Sopenharmony_ci#define MRVDRV_NF_DEFAULT_SCAN_VALUE		(-96)
25262306a36Sopenharmony_ci
25362306a36Sopenharmony_ci/* RTS/FRAG related defines */
25462306a36Sopenharmony_ci#define MRVDRV_RTS_MIN_VALUE		0
25562306a36Sopenharmony_ci#define MRVDRV_RTS_MAX_VALUE		2347
25662306a36Sopenharmony_ci#define MRVDRV_FRAG_MIN_VALUE		256
25762306a36Sopenharmony_ci#define MRVDRV_FRAG_MAX_VALUE		2346
25862306a36Sopenharmony_ci
25962306a36Sopenharmony_ci/* This is for firmware specific length */
26062306a36Sopenharmony_ci#define EXTRA_LEN	36
26162306a36Sopenharmony_ci
26262306a36Sopenharmony_ci#define MRVDRV_ETH_TX_PACKET_BUFFER_SIZE \
26362306a36Sopenharmony_ci	(ETH_FRAME_LEN + sizeof(struct txpd) + EXTRA_LEN)
26462306a36Sopenharmony_ci
26562306a36Sopenharmony_ci#define MRVDRV_ETH_RX_PACKET_BUFFER_SIZE \
26662306a36Sopenharmony_ci	(ETH_FRAME_LEN + sizeof(struct rxpd) \
26762306a36Sopenharmony_ci	 + MRVDRV_SNAP_HEADER_LEN + EXTRA_LEN)
26862306a36Sopenharmony_ci
26962306a36Sopenharmony_ci#define	CMD_F_HOSTCMD		(1 << 0)
27062306a36Sopenharmony_ci#define FW_CAPINFO_WPA  	(1 << 0)
27162306a36Sopenharmony_ci#define FW_CAPINFO_PS  		(1 << 1)
27262306a36Sopenharmony_ci#define FW_CAPINFO_FIRMWARE_UPGRADE	(1 << 13)
27362306a36Sopenharmony_ci#define FW_CAPINFO_BOOT2_UPGRADE	(1<<14)
27462306a36Sopenharmony_ci#define FW_CAPINFO_PERSISTENT_CONFIG	(1<<15)
27562306a36Sopenharmony_ci
27662306a36Sopenharmony_ci#define KEY_LEN_WPA_AES			16
27762306a36Sopenharmony_ci#define KEY_LEN_WPA_TKIP		32
27862306a36Sopenharmony_ci#define KEY_LEN_WEP_104			13
27962306a36Sopenharmony_ci#define KEY_LEN_WEP_40			5
28062306a36Sopenharmony_ci
28162306a36Sopenharmony_ci#define RF_ANTENNA_1		0x1
28262306a36Sopenharmony_ci#define RF_ANTENNA_2		0x2
28362306a36Sopenharmony_ci#define RF_ANTENNA_AUTO		0xFFFF
28462306a36Sopenharmony_ci
28562306a36Sopenharmony_ci#define	BAND_B			(0x01)
28662306a36Sopenharmony_ci#define	BAND_G			(0x02)
28762306a36Sopenharmony_ci#define ALL_802_11_BANDS	(BAND_B | BAND_G)
28862306a36Sopenharmony_ci
28962306a36Sopenharmony_ci#define MAX_RATES			14
29062306a36Sopenharmony_ci
29162306a36Sopenharmony_ci#define	MAX_LEDS			8
29262306a36Sopenharmony_ci
29362306a36Sopenharmony_ci/* Global Variable Declaration */
29462306a36Sopenharmony_ciextern const char lbs_driver_version[];
29562306a36Sopenharmony_ciextern u16 lbs_region_code_to_index[MRVDRV_MAX_REGION_CODE];
29662306a36Sopenharmony_ci
29762306a36Sopenharmony_ci
29862306a36Sopenharmony_ci/* ENUM definition */
29962306a36Sopenharmony_ci/* SNRNF_TYPE */
30062306a36Sopenharmony_cienum SNRNF_TYPE {
30162306a36Sopenharmony_ci	TYPE_BEACON = 0,
30262306a36Sopenharmony_ci	TYPE_RXPD,
30362306a36Sopenharmony_ci	MAX_TYPE_B
30462306a36Sopenharmony_ci};
30562306a36Sopenharmony_ci
30662306a36Sopenharmony_ci/* SNRNF_DATA */
30762306a36Sopenharmony_cienum SNRNF_DATA {
30862306a36Sopenharmony_ci	TYPE_NOAVG = 0,
30962306a36Sopenharmony_ci	TYPE_AVG,
31062306a36Sopenharmony_ci	MAX_TYPE_AVG
31162306a36Sopenharmony_ci};
31262306a36Sopenharmony_ci
31362306a36Sopenharmony_ci/* LBS_802_11_POWER_MODE */
31462306a36Sopenharmony_cienum LBS_802_11_POWER_MODE {
31562306a36Sopenharmony_ci	LBS802_11POWERMODECAM,
31662306a36Sopenharmony_ci	LBS802_11POWERMODEMAX_PSP,
31762306a36Sopenharmony_ci	LBS802_11POWERMODEFAST_PSP,
31862306a36Sopenharmony_ci	/* not a real mode, defined as an upper bound */
31962306a36Sopenharmony_ci	LBS802_11POWEMODEMAX
32062306a36Sopenharmony_ci};
32162306a36Sopenharmony_ci
32262306a36Sopenharmony_ci/* PS_STATE */
32362306a36Sopenharmony_cienum PS_STATE {
32462306a36Sopenharmony_ci	PS_STATE_FULL_POWER,
32562306a36Sopenharmony_ci	PS_STATE_AWAKE,
32662306a36Sopenharmony_ci	PS_STATE_PRE_SLEEP,
32762306a36Sopenharmony_ci	PS_STATE_SLEEP
32862306a36Sopenharmony_ci};
32962306a36Sopenharmony_ci
33062306a36Sopenharmony_ci/* DNLD_STATE */
33162306a36Sopenharmony_cienum DNLD_STATE {
33262306a36Sopenharmony_ci	DNLD_RES_RECEIVED,
33362306a36Sopenharmony_ci	DNLD_DATA_SENT,
33462306a36Sopenharmony_ci	DNLD_CMD_SENT,
33562306a36Sopenharmony_ci	DNLD_BOOTCMD_SENT,
33662306a36Sopenharmony_ci};
33762306a36Sopenharmony_ci
33862306a36Sopenharmony_ci/* LBS_MEDIA_STATE */
33962306a36Sopenharmony_cienum LBS_MEDIA_STATE {
34062306a36Sopenharmony_ci	LBS_CONNECTED,
34162306a36Sopenharmony_ci	LBS_DISCONNECTED
34262306a36Sopenharmony_ci};
34362306a36Sopenharmony_ci
34462306a36Sopenharmony_ci/* LBS_802_11_PRIVACY_FILTER */
34562306a36Sopenharmony_cienum LBS_802_11_PRIVACY_FILTER {
34662306a36Sopenharmony_ci	LBS802_11PRIVFILTERACCEPTALL,
34762306a36Sopenharmony_ci	LBS802_11PRIVFILTER8021XWEP
34862306a36Sopenharmony_ci};
34962306a36Sopenharmony_ci
35062306a36Sopenharmony_ci/* mv_ms_type */
35162306a36Sopenharmony_cienum mv_ms_type {
35262306a36Sopenharmony_ci	MVMS_DAT = 0,
35362306a36Sopenharmony_ci	MVMS_CMD = 1,
35462306a36Sopenharmony_ci	MVMS_TXDONE = 2,
35562306a36Sopenharmony_ci	MVMS_EVENT
35662306a36Sopenharmony_ci};
35762306a36Sopenharmony_ci
35862306a36Sopenharmony_ci/* KEY_TYPE_ID */
35962306a36Sopenharmony_cienum KEY_TYPE_ID {
36062306a36Sopenharmony_ci	KEY_TYPE_ID_WEP = 0,
36162306a36Sopenharmony_ci	KEY_TYPE_ID_TKIP,
36262306a36Sopenharmony_ci	KEY_TYPE_ID_AES
36362306a36Sopenharmony_ci};
36462306a36Sopenharmony_ci
36562306a36Sopenharmony_ci/* KEY_INFO_WPA (applies to both TKIP and AES/CCMP) */
36662306a36Sopenharmony_cienum KEY_INFO_WPA {
36762306a36Sopenharmony_ci	KEY_INFO_WPA_MCAST = 0x01,
36862306a36Sopenharmony_ci	KEY_INFO_WPA_UNICAST = 0x02,
36962306a36Sopenharmony_ci	KEY_INFO_WPA_ENABLED = 0x04
37062306a36Sopenharmony_ci};
37162306a36Sopenharmony_ci
37262306a36Sopenharmony_ci/* Default values for fwt commands. */
37362306a36Sopenharmony_ci#define FWT_DEFAULT_METRIC 0
37462306a36Sopenharmony_ci#define FWT_DEFAULT_DIR 1
37562306a36Sopenharmony_ci/* Default Rate, 11Mbps */
37662306a36Sopenharmony_ci#define FWT_DEFAULT_RATE 3
37762306a36Sopenharmony_ci#define FWT_DEFAULT_SSN 0xffffffff
37862306a36Sopenharmony_ci#define FWT_DEFAULT_DSN 0
37962306a36Sopenharmony_ci#define FWT_DEFAULT_HOPCOUNT 0
38062306a36Sopenharmony_ci#define FWT_DEFAULT_TTL 0
38162306a36Sopenharmony_ci#define FWT_DEFAULT_EXPIRATION 0
38262306a36Sopenharmony_ci#define FWT_DEFAULT_SLEEPMODE 0
38362306a36Sopenharmony_ci#define FWT_DEFAULT_SNR 0
38462306a36Sopenharmony_ci
38562306a36Sopenharmony_ci#endif
386