⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 phy.h

📁 Airgo agn1000系列 无线网卡驱动源码
💻 H
📖 第 1 页 / 共 2 页
字号:
/* Interrupt Control interface */#define AGNX_INT_BASE		0x4000#define AGNX_INT_STAT		0x4000	/* interrupt status */	#define AGNX_INT_MASK		0x400c	/* interrupt mask *//* FIXME */#define		IRQ_TX_BEACON	0x1	/* TX Beacon */#define		IRQ_TX_RETRY	0x8	/* TX Retry Interrupt */#define		IRQ_TX_ACTIVITY	0x10	/* TX Activity */#define		IRQ_RX_ACTIVITY	0x20	/* RX Activity *//* FIXME I guess that instead RX a none exist staion's packet or    the station hasn't been init */#define		IRQ_RX_X	0x40	#define		IRQ_RX_Y	0x80	/* RX ? */#define		IRQ_RX_HASHHIT	0x100	/* RX Hash Hit */#define		IRQ_RX_FRAME	0x200	/* RX Frame */#define		IRQ_ERR_INT	0x400	/* Error Interrupt */#define		IRQ_TX_QUE_FULL	0x800	/* TX Workqueue Full */#define		IRQ_BANDMAN_ERR	0x10000	/* Bandwidth Management Error */#define		IRQ_TX_DISABLE	0x20000	/* TX Disable */#define		IRQ_RX_IVASESKEY 0x80000 /* RX Invalid Session Key */#define		IRQ_RX_KEYIDMIS	0x100000 /* RX key ID Mismatch */#define		IRQ_REP_THHIT	0x200000 /* Replay Threshold Hit */#define		IRQ_TIMER1	0x4000000 /* Timer1 */#define		IRQ_TIMER_CNT	0x10000000 /* Timer Count */#define		IRQ_PHY_FASTINT 0x20000000 /* Phy Fast Interrupt */#define		IRQ_PHY_SLOWINT	0x40000000 /* Phy Slow Interrupt */#define		IRQ_OTHER	0x80000000 /* Unknow interrupt */#define		AGNX_IRQ_ALL   	0xffffffff /* System Interface */#define AGNX_SYSITF_BASE	0x4400#define AGNX_SYSITF_SYSMODE	0x4400	/* system mode */#define AGNX_SYSITF_GPIOIN	0x4410 /* GPIO In *//* PIN lines for leds? */#define AGNX_SYSITF_GPIOUT	0x4414	/* GPIO Out *//* Timer Control */#define AGNX_TIMCTL_TIMER1	0x4800 /* Timer 1 */#define AGNX_TIMCTL_TIM1CTL	0x4808 /* Timer 1 Control *//* Antenna Calibration Interface */#define AGNX_ACI_BASE		0x5000#define AGNX_ACI_MODE		0x5000 /* Mode */#define AGNX_ACI_MEASURE	0x5004 /* Measure */#define AGNX_ACI_SELCHAIN	0x5008 /* Select Chain */#define AGNX_ACI_LEN		0x500c /* Length */#define AGNX_ACI_TIMER1		0x5018 /* Timer 1 */#define AGNX_ACI_TIMER2		0x501c /* Timer 2 */#define AGNX_ACI_OFFSET		0x5020 /* Offset */#define AGNX_ACI_STATUS		0x5030 /* Status */#define		CALI_IDLE	0x0#define		CALI_DONE	0x1#define		CALI_BUSY	0x2#define		CALI_ERR	0x3 #define AGNX_ACI_AICCHA0OVE	0x5034 /* AIC Channel 0 Override */#define AGNX_ACI_AICCHA1OVE	0x5038 /* AIC Channel 1 Override *//* Gain Control Registers */#define AGNX_GCR_BASE		0x9000/* threshold of primary antenna */#define AGNX_GCR_THD0A		0x9000	/* threshold? D0 A *//* low threshold of primary antenna */#define AGNX_GCR_THD0AL		0x9004	/* threshold? D0 A low *//* threshold of secondary antenna */#define AGNX_GCR_THD0B		0x9008	/* threshold? D0_B */#define AGNX_GCR_DUNSAT		0x900c /* d unsaturated */#define AGNX_GCR_DSAT		0x9010 /* d saturated */#define AGNX_GCR_DFIRCAL	0x9014 /* D Fir/Cal */#define AGNX_GCR_DGCTL11A	0x9018 /* d gain control 11a */#define AGNX_GCR_DGCTL11B	0x901c /* d gain control 11b *//* strength of gain */#define AGNX_GCR_GAININIT	0x9020	/* gain initialization */#define AGNX_GCR_THNOSIG	0x9024 /* threhold no signal */#define AGNX_GCR_COARSTEP	0x9028 /* coarse stepping */#define AGNX_GCR_SIFST11A	0x902c /* sifx time 11a */#define AGNX_GCR_SIFST11B	0x9030 /* sifx time 11b */#define AGNX_GCR_CWDETEC	0x9034 /* cw detection */#define AGNX_GCR_0X38		0x9038 /* ???? */#define AGNX_GCR_BOACT		0x903c	/* BO Active */#define AGNX_GCR_BOINACT	0x9040	/* BO Inactive */#define AGNX_GCR_BODYNA		0x9044	/* BO dynamic *//* 802.11 mode(a,b,g) */#define AGNX_GCR_DISCOVMOD	0x9048	/* discovery mode */#define AGNX_GCR_NLISTANT	0x904c	/* number of listening antenna */#define AGNX_GCR_NACTIANT	0x9050	/* number of active antenna */#define AGNX_GCR_NMEASANT	0x9054	/* number of measuring antenna */#define AGNX_GCR_NCAPTANT	0x9058	/* number of capture antenna */#define AGNX_GCR_THCAP11A	0x905c /* threshold capture 11a */#define AGNX_GCR_THCAP11B	0x9060 /* threshold capture 11b */#define AGNX_GCR_THCAPRX11A	0x9064 /* threshold capture rx 11a */#define AGNX_GCR_THCAPRX11B	0x9068 /* threshold capture rx 11b */#define AGNX_GCR_THLEVDRO	0x906c /* threshold level drop */#define AGNX_GCR_GAINSET0	0x9070 /* Gainset 0 */#define AGNX_GCR_GAINSET1	0x9074 /* Gainset 1 */#define AGNX_GCR_GAINSET2	0x9078 /* Gainset 2 */#define AGNX_GCR_MAXRXTIME11A	0x907c /* maximum rx time 11a */#define AGNX_GCR_MAXRXTIME11B	0x9080 /* maximum rx time 11b */#define AGNX_GCR_CORRTIME	0x9084 /* correction time *//* reset the subsystem, 0 = disable, 1 = enable */#define AGNX_GCR_RSTGCTL	0x9088	/* reset gain control *//* channel receiving */#define AGNX_GCR_RXCHANEL	0x908c	/* receive channel */#define AGNX_GCR_NOISE0		0x9090 /* Noise 0 */#define AGNX_GCR_NOISE1		0x9094 /* Noise 1 */#define AGNX_GCR_NOISE2		0x9098 /* Noise 2 */#define AGNX_GCR_SIGHTH		0x909c	/* Signal High Threshold */#define AGNX_GCR_SIGLTH		0x90a0	/* Signal Low Threshold */#define AGNX_GCR_CORRDROP	0x90a4 /* correction drop *//* threshold of tertiay antenna */#define AGNX_GCR_THCD		0x90a8	/* threshold? CD */  #define AGNX_GCR_THCS		0x90ac	/* threshold? CS */  #define AGNX_GCR_MAXPOWDIFF	0x90b8 /* maximum power difference */#define AGNX_GCR_TRACNT4	0x90ec /* Transition Count 4 */#define AGNX_GCR_TRACNT5      	0x90f0	/* transition count 5 */#define AGNX_GCR_TRACNT6       	0x90f4	/* transition count 6 */#define AGNX_GCR_TRACNT7       	0x90f8	/* transition coutn 7 */#define AGNX_GCR_TESTBUS	0x911c /* test bus */#define AGNX_GCR_CHAINNUM	0x9120 /* Number of Chains */#define AGNX_GCR_ANTCFG		0x9124	/* Antenna Config */#define AGNX_GCR_THJUMP		0x912c /* threhold jump */#define AGNX_GCR_THPOWER	0x9130 /* threshold power */#define AGNX_GCR_THPOWCLIP	0x9134 /* threshold power clip*/#define AGNX_GCR_FORCECTLCLK	0x9138 /* Force Gain Control Clock */#define AGNX_GCR_GAINSETWRITE	0x913c /* Gainset Write */#define AGNX_GCR_THD0BTFEST	0x9140	/* threshold d0 b tf estimate */#define AGNX_GCR_THRX11BPOWMIN	0x9144	/* threshold rx 11b power minimum */#define AGNX_GCR_0X14c		0x914c /* ?? */#define AGNX_GCR_0X150		0x9150 /* ?? */#define AGNX_GCR_RXOVERIDE	0x9194	/* recieve override */#define AGNX_GCR_WATCHDOG	0x91b0	/* watchdog timeout *//* Spi Interface */#define AGNX_SPI_BASE		0xdc00#define AGNX_SPI_CFG		0xdc00 /* spi configuration *//* Only accept 16 bits */#define AGNX_SPI_WMSW		0xdc04	/* write most significant word *//* Only accept 16 bits */#define AGNX_SPI_WLSW		0xdc08	/* write least significant word */#define AGNX_SPI_CTL		0xdc0c	/* spi control */#define AGNX_SPI_RMSW		0xdc10 /* read most significant word */#define AGNX_SPI_RLSW		0xdc14 /* read least significant word *//* SPI Control Mask */#define		SPI_READ_CTL		0x4000 /* read control */#define		SPI_BUSY_CTL		0x8000 /* busy control *//* RF and synth chips in spi */#define		RF_CHIP0	0x400#define		RF_CHIP1	0x800#define		RF_CHIP2	0x1000#define		SYNTH_CHIP	0x2000/* Unknown register */#define AGNX_UNKNOWN_BASE	0x7800/* FIXME MonitorGain */#define AGNX_MONGCR_BASE	0x12000/* Gain Table */#define AGNX_GAIN_TABLE		0x12400/* The initial FIR coefficient table */#define AGNX_FIR_BASE		0x19804#define AGNX_ENGINE_LOOKUP_TBL	0x800/* eeprom commands */#define EEPROM_CMD_NULL		0x0 /* NULL */#define EEPROM_CMD_WRITE	0x2 /* write */#define EEPROM_CMD_READ		0x3 /* read */#define EEPROM_CMD_STATUSREAD	0x5 /* status register read */#define EEPROM_CMD_WRITEENABLE	0x6 /* write enable */#define EEPROM_CMD_CONFIGURE	0x7 /* configure */#define EEPROM_DATAFORCOFIGURE	0x6 /* ??? *//* eeprom address */#define EEPROM_ADDR_SUBVID	0x0 /* Sub Vendor ID */#define EEPROM_ADDR_SUBSID	0x2 /* Sub System ID */#define EEPROM_ADDR_MACADDR	0x146 /* MAC Address */#define EEPROM_ADDR_LOTYPE	0x14f /* LO type */struct agnx_eeprom {	u8 data;	/* date */	u16 address;	/* address in EEPROM */	u8 cmd;		/* command, unknown, status */}  __attribute__((__packed__));#define AGNX_EEPROM_COMMAND_SHIFT	5#define AGNX_EEPROM_COMMAND_STAT	0x01void disable_receiver(struct agnx_priv *priv);void enable_receiver(struct agnx_priv *priv);u8 read_from_eeprom(struct agnx_priv *priv, u16 address);void agnx_hw_init(struct agnx_priv *priv);int agnx_hw_reset(struct agnx_priv *priv);int agnx_set_ssid(struct agnx_priv *priv, u8 *ssid, size_t ssid_len);void agnx_set_bssid(struct agnx_priv *priv, u8 *bssid);void enable_power_saving(struct agnx_priv *priv);void disable_power_saving(struct agnx_priv *priv);void calibrate_antenna_period(unsigned long data);#endif /* AGNX_PHY_H_ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -