drivers/net/wireless/zydas/zd1211rw/zd_rf.h

Source file repositories/reference/linux-study-clean/drivers/net/wireless/zydas/zd1211rw/zd_rf.h

File Facts

System
Linux kernel
Corpus path
drivers/net/wireless/zydas/zd1211rw/zd_rf.h
Extension
.h
Size
2495 bytes
Lines
96
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 zd_rf {
	u8 type;

	u8 channel;

	/* whether channel integration and calibration should be updated
	 * defaults to 1 (yes) */
	u8 update_channel_int:1;

	/* whether ZD_CR47 should be patched from the EEPROM, if the appropriate
	 * flag is set in the POD. The vendor driver suggests that this should
	 * be done for all RF's, but a bug in their code prevents but their
	 * HW_OverWritePhyRegFromE2P() routine from ever taking effect. */
	u8 patch_cck_gain:1;

	/* private RF driver data */
	void *priv;

	/* RF-specific functions */
	int (*init_hw)(struct zd_rf *rf);
	int (*set_channel)(struct zd_rf *rf, u8 channel);
	int (*switch_radio_on)(struct zd_rf *rf);
	int (*switch_radio_off)(struct zd_rf *rf);
	int (*patch_6m_band_edge)(struct zd_rf *rf, u8 channel);
	void (*clear)(struct zd_rf *rf);
};

const char *zd_rf_name(u8 type);
void zd_rf_init(struct zd_rf *rf);
void zd_rf_clear(struct zd_rf *rf);
int zd_rf_init_hw(struct zd_rf *rf, u8 type);

int zd_rf_scnprint_id(struct zd_rf *rf, char *buffer, size_t size);

int zd_rf_set_channel(struct zd_rf *rf, u8 channel);

int zd_switch_radio_on(struct zd_rf *rf);
int zd_switch_radio_off(struct zd_rf *rf);

int zd_rf_patch_6m_band_edge(struct zd_rf *rf, u8 channel);
int zd_rf_generic_patch_6m(struct zd_rf *rf, u8 channel);

static inline int zd_rf_should_update_pwr_int(struct zd_rf *rf)
{
	return rf->update_channel_int;
}

static inline int zd_rf_should_patch_cck_gain(struct zd_rf *rf)
{
	return rf->patch_cck_gain;
}

/* Functions for individual RF chips */

int zd_rf_init_rf2959(struct zd_rf *rf);
int zd_rf_init_al2230(struct zd_rf *rf);
int zd_rf_init_al7230b(struct zd_rf *rf);
int zd_rf_init_uw2453(struct zd_rf *rf);

#endif /* _ZD_RF_H */

Annotation

Implementation Notes