drivers/net/wireless/ti/wl1251/cmd.h

Source file repositories/reference/linux-study-clean/drivers/net/wireless/ti/wl1251/cmd.h

File Facts

System
Linux kernel
Corpus path
drivers/net/wireless/ti/wl1251/cmd.h
Extension
.h
Size
9948 bytes
Lines
403
Domain
Driver Families
Bucket
drivers/net
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

struct wl1251_cmd_header {
	u16 id;
	u16 status;
} __packed;

struct  wl1251_command {
	struct wl1251_cmd_header header;
	u8  parameters[MAX_CMD_PARAMS];
} __packed;

enum {
	CMD_MAILBOX_IDLE              		=  0,
	CMD_STATUS_SUCCESS            		=  1,
	CMD_STATUS_UNKNOWN_CMD        		=  2,
	CMD_STATUS_UNKNOWN_IE         		=  3,
	CMD_STATUS_REJECT_MEAS_SG_ACTIVE 	= 11,
	CMD_STATUS_RX_BUSY            		= 13,
	CMD_STATUS_INVALID_PARAM      		= 14,
	CMD_STATUS_TEMPLATE_TOO_LARGE 		= 15,
	CMD_STATUS_OUT_OF_MEMORY      		= 16,
	CMD_STATUS_STA_TABLE_FULL     		= 17,
	CMD_STATUS_RADIO_ERROR        		= 18,
	CMD_STATUS_WRONG_NESTING      		= 19,
	CMD_STATUS_TIMEOUT            		= 21, /* Driver internal use.*/
	CMD_STATUS_FW_RESET           		= 22, /* Driver internal use.*/
	MAX_COMMAND_STATUS            		= 0xff
};


/*
 * CMD_READ_MEMORY
 *
 * The host issues this command to read the WiLink device memory/registers.
 *
 * Note: The Base Band address has special handling (16 bits registers and
 * addresses). For more information, see the hardware specification.
 */
/*
 * CMD_WRITE_MEMORY
 *
 * The host issues this command to write the WiLink device memory/registers.
 *
 * The Base Band address has special handling (16 bits registers and
 * addresses). For more information, see the hardware specification.
 */
#define MAX_READ_SIZE 256

struct cmd_read_write_memory {
	struct wl1251_cmd_header header;

	/* The address of the memory to read from or write to.*/
	u32 addr;

	/* The amount of data in bytes to read from or write to the WiLink
	 * device.*/
	u32 size;

	/* The actual value read from or written to the Wilink. The source
	   of this field is the Host in WRITE command or the Wilink in READ
	   command. */
	u8 value[MAX_READ_SIZE];
} __packed;

#define CMDMBOX_HEADER_LEN 4
#define CMDMBOX_INFO_ELEM_HEADER_LEN 4

#define WL1251_SCAN_OPT_PASSIVE		1
#define WL1251_SCAN_OPT_5GHZ_BAND	2
#define WL1251_SCAN_OPT_TRIGGERD_SCAN	4
#define WL1251_SCAN_OPT_PRIORITY_HIGH	8

#define WL1251_SCAN_MIN_DURATION 30000
#define WL1251_SCAN_MAX_DURATION 60000

#define WL1251_SCAN_NUM_PROBES 3

struct wl1251_scan_parameters {
	__le32 rx_config_options;
	__le32 rx_filter_options;

	/*
	 * Scan options:
	 * bit 0: When this bit is set, passive scan.
	 * bit 1: Band, when this bit is set we scan
	 * in the 5Ghz band.
	 * bit 2: voice mode, 0 for normal scan.
	 * bit 3: scan priority, 1 for high priority.
	 */
	__le16 scan_options;

Annotation

Implementation Notes