drivers/staging/rtl8723bs/include/rtl8723b_hal.h

Source file repositories/reference/linux-study-clean/drivers/staging/rtl8723bs/include/rtl8723b_hal.h

File Facts

System
Linux kernel
Corpus path
drivers/staging/rtl8723bs/include/rtl8723b_hal.h
Extension
.h
Size
7671 bytes
Lines
244
Domain
Driver Families
Bucket
drivers/staging
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 rt_firmware {
	u32 fw_length;
	u8 *fw_buffer_sz;
};

/* This structure must be carefully byte-ordered. */
struct rt_firmware_hdr {
	/*  8-byte alignment required */

	/*  LONG WORD 0 ---- */
	__le16 signature;  /* 92C0: test chip; 92C, 88C0: test chip;
			    * 88C1: MP A-cut; 92C1: MP A-cut
			    */
	u8 category;	   /* AP/NIC and USB/PCI */
	u8 function;	   /* Reserved for different FW function indications,
			    * for further use when driver needs to download
			    * different FW in different conditions.
			    */
	__le16 version;    /* FW Version */
	__le16 subversion; /* FW Subversion, default 0x00 */

	/*  LONG WORD 1 ---- */
	u8 month;  /* Release time Month field */
	u8 date;   /* Release time Date field */
	u8 hour;   /* Release time Hour field */
	u8 minute; /* Release time Minute field */

	__le16 ram_code_size; /* The size of RAM code */
	__le16 rsvd2;

	/*  LONG WORD 2 ---- */
	__le32 svn_idx;	/* The SVN entry index */
	__le32 rsvd3;

	/*  LONG WORD 3 ---- */
	__le32 rsvd4;
	__le32 rsvd5;
};

#define DRIVER_EARLY_INT_TIME_8723B  0x05
#define BCN_DMA_ATIME_INT_TIME_8723B 0x02

/* for 8723B */
/* TX 32K, RX 16K, Page size 128B for TX, 8B for RX */
#define PAGE_SIZE_TX_8723B 128
#define PAGE_SIZE_RX_8723B 8

#define RX_DMA_SIZE_8723B          0x4000 /* 16K */
#define RX_DMA_RESERVED_SIZE_8723B 0x80   /* 128B, reserved for tx report */
#define RX_DMA_BOUNDARY_8723B \
	(RX_DMA_SIZE_8723B - RX_DMA_RESERVED_SIZE_8723B - 1)

/* Note: We will divide number of pages equally for each queue other than the
 * public queue!
 */

/* For General Reserved Page Number(Beacon Queue is reserved page) */
/* Beacon:2, PS-Poll:1, Null Data:1, Qos Null Data:1, BT Qos Null Data:1 */
#define BCNQ_PAGE_NUM_8723B  0x08
#define BCNQ1_PAGE_NUM_8723B 0x00

#define MAX_RX_DMA_BUFFER_SIZE_8723B 0x2800 /* RX 10K */

/* For WoWLan, more reserved page */
/* ARP Rsp:1, RWC:1, GTK Info:1, GTK RSP:2, GTK EXT MEM:2, PNO: 6 */
#define WOWLAN_PAGE_NUM_8723B 0x00

#define TX_TOTAL_PAGE_NUMBER_8723B     \
	(0xFF - BCNQ_PAGE_NUM_8723B  - \
		BCNQ1_PAGE_NUM_8723B - \
		WOWLAN_PAGE_NUM_8723B)
#define TX_PAGE_BOUNDARY_8723B (TX_TOTAL_PAGE_NUMBER_8723B + 1)

#define WMM_NORMAL_TX_TOTAL_PAGE_NUMBER_8723B TX_TOTAL_PAGE_NUMBER_8723B
#define WMM_NORMAL_TX_PAGE_BOUNDARY_8723B \
	(WMM_NORMAL_TX_TOTAL_PAGE_NUMBER_8723B + 1)

/* For Normal Chip Setting */
/* (HPQ + LPQ + NPQ + PUBQ) shall be TX_TOTAL_PAGE_NUMBER_8723B */
#define NORMAL_PAGE_NUM_HPQ_8723B 0x0C
#define NORMAL_PAGE_NUM_LPQ_8723B 0x02
#define NORMAL_PAGE_NUM_NPQ_8723B 0x02

/*  Note: For Normal Chip Setting, modify later */
#define WMM_NORMAL_PAGE_NUM_HPQ_8723B 0x30
#define WMM_NORMAL_PAGE_NUM_LPQ_8723B 0x20
#define WMM_NORMAL_PAGE_NUM_NPQ_8723B 0x20

#include "HalVerDef.h"
#include "hal_com.h"

Annotation

Implementation Notes