This is a driver for pureLiFi X, XL, XC devices which use light to transmit data, so they are not compatible with normal Wi-Fi devices. The driver uses separate NL80211_BAND_LC band to distinguish from Wi-Fi. The driver is based on 802.11 softMAC Architecture and uses native 802.11 for configuration and management. Station and Ad-Hoc modes are supported. The driver is compiled and tested in ARM, x86 architectures and compiled in powerpc architecture. This driver implementation has been based on the zd1211rw driver. Signed-off-by: Srinivasan Raju <srini.raju@purelifi.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220224182042.132466-3-srini.raju@purelifi.com
52 lines
1.2 KiB
C
52 lines
1.2 KiB
C
/* 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];
|
|
};
|
|
|