drivers/net/wireless/ath/ath6kl/bmi.h

Source file repositories/reference/linux-study-clean/drivers/net/wireless/ath/ath6kl/bmi.h

File Facts

System
Linux kernel
Corpus path
drivers/net/wireless/ath/ath6kl/bmi.h
Extension
.h
Size
8113 bytes
Lines
272
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 ath6kl_bmi_target_info {
	__le32 byte_count;   /* size of this structure */
	__le32 version;      /* target version id */
	__le32 type;         /* target type */
} __packed;

#define ath6kl_bmi_write_hi32(ar, item, val)				\
	({								\
		u32 addr;						\
		__le32 v;						\
									\
		addr = ath6kl_get_hi_item_addr(ar, HI_ITEM(item));	\
		v = cpu_to_le32(val);					\
		ath6kl_bmi_write(ar, addr, (u8 *) &v, sizeof(v));	\
	})

#define ath6kl_bmi_read_hi32(ar, item, val)				\
	({								\
		u32 addr, *check_type = val;				\
		__le32 tmp;						\
		int ret;						\
									\
		(void) (check_type == val);				\
		addr = ath6kl_get_hi_item_addr(ar, HI_ITEM(item));	\
		ret = ath6kl_bmi_read(ar, addr, (u8 *) &tmp, 4);	\
		if (!ret)						\
			*val = le32_to_cpu(tmp);			\
		ret;							\
	})

int ath6kl_bmi_init(struct ath6kl *ar);
void ath6kl_bmi_cleanup(struct ath6kl *ar);
void ath6kl_bmi_reset(struct ath6kl *ar);

int ath6kl_bmi_done(struct ath6kl *ar);
int ath6kl_bmi_get_target_info(struct ath6kl *ar,
			       struct ath6kl_bmi_target_info *targ_info);
int ath6kl_bmi_read(struct ath6kl *ar, u32 addr, u8 *buf, u32 len);
int ath6kl_bmi_write(struct ath6kl *ar, u32 addr, u8 *buf, u32 len);
int ath6kl_bmi_execute(struct ath6kl *ar,
		       u32 addr, u32 *param);
int ath6kl_bmi_set_app_start(struct ath6kl *ar,
			     u32 addr);
int ath6kl_bmi_reg_read(struct ath6kl *ar, u32 addr, u32 *param);
int ath6kl_bmi_reg_write(struct ath6kl *ar, u32 addr, u32 param);
int ath6kl_bmi_lz_data(struct ath6kl *ar,
		       u8 *buf, u32 len);
int ath6kl_bmi_lz_stream_start(struct ath6kl *ar,
			       u32 addr);
int ath6kl_bmi_fast_download(struct ath6kl *ar,
			     u32 addr, u8 *buf, u32 len);
#endif

Annotation

Implementation Notes