summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/purelifi/plfxlc/intf.h
blob: 5ae89343b579421039e369046c76cccd3ce86314 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2021 pureLiFi
 */

#define PURELIFI_BYTE_NUM_ALIGNMENT 4
#define ETH_ALEN 6
#define AP_USER_LIMIT 8

#define PLF_VNDR_FPGA_STATE_REQ 0x30
#define PLF_VNDR_FPGA_SET_REQ 0x33
#define PLF_VNDR_FPGA_SET_CMD 0x34
#define PLF_VNDR_FPGA_STATE_CMD 0x35

#define PLF_VNDR_XL_FW_CMD 0x80
#define PLF_VNDR_XL_DATA_CMD 0x81
#define PLF_VNDR_XL_FILE_CMD 0x82
#define PLF_VNDR_XL_EX_CMD 0x83

#define PLF_MAC_VENDOR_REQUEST 0x36
#define PLF_SERIAL_NUMBER_VENDOR_REQUEST 0x37
#define PLF_FIRMWARE_VERSION_VENDOR_REQUEST 0x39
#define PLF_SERIAL_LEN 14
#define PLF_FW_VER_LEN 8

struct rx_status {
	__be16 rssi;
	u8     rate_idx;
	u8     pad;
	__be64 crc_error_count;
} __packed;

enum plf_usb_req_enum {
	USB_REQ_TEST_WR            = 0,
	USB_REQ_MAC_WR             = 1,
	USB_REQ_POWER_WR           = 2,
	USB_REQ_RXTX_WR            = 3,
	USB_REQ_BEACON_WR          = 4,
	USB_REQ_BEACON_INTERVAL_WR = 5,
	USB_REQ_RTS_CTS_RATE_WR    = 6,
	USB_REQ_HASH_WR            = 7,
	USB_REQ_DATA_TX            = 8,
	USB_REQ_RATE_WR            = 9,
	USB_REQ_SET_FREQ           = 15
};

struct plf_usb_req {
	__be32         id; /* should be plf_usb_req_enum */
	__be32	       len;
	u8             buf[512];
};