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

📄 wavelan.h

📁 优龙2410linux2.6.8内核源代码
💻 H
📖 第 1 页 / 共 2 页
字号:
#define		PSA_SUBBAND_915		0	/* 915 MHz or 2.0 */#define		PSA_SUBBAND_2425	1	/* 2425 MHz	  */#define		PSA_SUBBAND_2460	2	/* 2460 MHz	  */#define		PSA_SUBBAND_2484	3	/* 2484 MHz	  */#define		PSA_SUBBAND_2430_5	4	/* 2430.5 MHz	  */  unsigned char	psa_quality_thr;	/* [0x21] Modem Quality Threshold */  unsigned char	psa_mod_delay;		/* [0x22] Modem Delay (?) (reserved) */  unsigned char	psa_nwid[2];		/* [0x23-0x24] Network ID */  unsigned char	psa_nwid_select;	/* [0x25] Network ID Select On/Off */  unsigned char	psa_encryption_select;	/* [0x26] Encryption On/Off */  unsigned char	psa_encryption_key[8];	/* [0x27-0x2E] Encryption Key */  unsigned char	psa_databus_width;	/* [0x2F] AT bus width select 8/16 */  unsigned char	psa_call_code[8];	/* [0x30-0x37] (Japan) Call Code */  unsigned char	psa_nwid_prefix[2];	/* [0x38-0x39] Roaming domain */  unsigned char	psa_reserved[2];	/* [0x3A-0x3B] Reserved - fixed 00 */  unsigned char	psa_conf_status;	/* [0x3C] Conf Status, bit 0=1:config*/  unsigned char	psa_crc[2];		/* [0x3D] CRC-16 over PSA */  unsigned char	psa_crc_status;		/* [0x3F] CRC Valid Flag */};#define	PSA_SIZE	64/* Calculate offset of a field in the above structure. * Warning:  only even addresses are used. */#define	psaoff(p,f) 	((unsigned short) ((void *)(&((psa_t *) ((void *) NULL + (p)))->f) - (void *) NULL))/******************** MODEM MANAGEMENT INTERFACE ********************//* * Modem Management Controller (MMC) write structure. */typedef struct mmw_t	mmw_t;struct mmw_t{  unsigned char	mmw_encr_key[8];	/* encryption key */  unsigned char	mmw_encr_enable;	/* Enable or disable encryption. */#define	MMW_ENCR_ENABLE_MODE	0x02	/* mode of security option */#define	MMW_ENCR_ENABLE_EN	0x01	/* Enable security option. */  unsigned char	mmw_unused0[1];		/* unused */  unsigned char	mmw_des_io_invert;	/* encryption option */#define	MMW_DES_IO_INVERT_RES	0x0F	/* reserved */#define	MMW_DES_IO_INVERT_CTRL	0xF0	/* control (?) (set to 0) */  unsigned char	mmw_unused1[5];		/* unused */  unsigned char	mmw_loopt_sel;		/* looptest selection */#define	MMW_LOOPT_SEL_DIS_NWID	0x40	/* Disable NWID filtering. */#define	MMW_LOOPT_SEL_INT	0x20	/* Activate Attention Request. */#define	MMW_LOOPT_SEL_LS	0x10	/* looptest, no collision avoidance */#define MMW_LOOPT_SEL_LT3A	0x08	/* looptest 3a */#define	MMW_LOOPT_SEL_LT3B	0x04	/* looptest 3b */#define	MMW_LOOPT_SEL_LT3C	0x02	/* looptest 3c */#define	MMW_LOOPT_SEL_LT3D	0x01	/* looptest 3d */  unsigned char	mmw_jabber_enable;	/* jabber timer enable */  /* Abort transmissions > 200 ms */  unsigned char	mmw_freeze;		/* freeze or unfreeze signal level */  /* 0 : signal level & qual updated for every new message, 1 : frozen */  unsigned char	mmw_anten_sel;		/* antenna selection */#define MMW_ANTEN_SEL_SEL	0x01	/* direct antenna selection */#define	MMW_ANTEN_SEL_ALG_EN	0x02	/* antenna selection algo. enable */  unsigned char	mmw_ifs;		/* inter frame spacing */  /* min time between transmission in bit periods (.5 us) - bit 0 ignored */  unsigned char	mmw_mod_delay;	 	/* modem delay (synchro) */  unsigned char	mmw_jam_time;		/* jamming time (after collision) */  unsigned char	mmw_unused2[1];		/* unused */  unsigned char	mmw_thr_pre_set;	/* level threshold preset */  /* Discard all packet with signal < this value (4) */  unsigned char	mmw_decay_prm;		/* decay parameters */  unsigned char	mmw_decay_updat_prm;	/* decay update parameters */  unsigned char	mmw_quality_thr;	/* quality (z-quotient) threshold */  /* Discard all packet with quality < this value (3) */  unsigned char	mmw_netw_id_l;		/* NWID low order byte */  unsigned char	mmw_netw_id_h;		/* NWID high order byte */  /* Network ID or Domain : create virtual net on the air */  /* 2.0 Hardware extension - frequency selection support */  unsigned char	mmw_mode_select;	/* for analog tests (set to 0) */  unsigned char	mmw_unused3[1];		/* unused */  unsigned char	mmw_fee_ctrl;		/* frequency EEPROM control */#define	MMW_FEE_CTRL_PRE	0x10	/* Enable protected instructions. */#define	MMW_FEE_CTRL_DWLD	0x08	/* Download EEPROM to mmc. */#define	MMW_FEE_CTRL_CMD	0x07	/* EEPROM commands:  */#define	MMW_FEE_CTRL_READ	0x06	/* Read */#define	MMW_FEE_CTRL_WREN	0x04	/* Write enable */#define	MMW_FEE_CTRL_WRITE	0x05	/* Write data to address. */#define	MMW_FEE_CTRL_WRALL	0x04	/* Write data to all addresses. */#define	MMW_FEE_CTRL_WDS	0x04	/* Write disable */#define	MMW_FEE_CTRL_PRREAD	0x16	/* Read addr from protect register */#define	MMW_FEE_CTRL_PREN	0x14	/* Protect register enable */#define	MMW_FEE_CTRL_PRCLEAR	0x17	/* Unprotect all registers. */#define	MMW_FEE_CTRL_PRWRITE	0x15	/* Write address in protect register */#define	MMW_FEE_CTRL_PRDS	0x14	/* Protect register disable */  /* Never issue the PRDS command:  it's irreversible! */  unsigned char	mmw_fee_addr;		/* EEPROM address */#define	MMW_FEE_ADDR_CHANNEL	0xF0	/* Select the channel. */#define	MMW_FEE_ADDR_OFFSET	0x0F	/* Offset in channel data */#define	MMW_FEE_ADDR_EN		0xC0	/* FEE_CTRL enable operations */#define	MMW_FEE_ADDR_DS		0x00	/* FEE_CTRL disable operations */#define	MMW_FEE_ADDR_ALL	0x40	/* FEE_CTRL all operations */#define	MMW_FEE_ADDR_CLEAR	0xFF	/* FEE_CTRL clear operations */  unsigned char	mmw_fee_data_l;		/* Write data to EEPROM. */  unsigned char	mmw_fee_data_h;		/* high octet */  unsigned char	mmw_ext_ant;		/* Setting for external antenna */#define	MMW_EXT_ANT_EXTANT	0x01	/* Select external antenna */#define	MMW_EXT_ANT_POL		0x02	/* Polarity of the antenna */#define	MMW_EXT_ANT_INTERNAL	0x00	/* Internal antenna */#define	MMW_EXT_ANT_EXTERNAL	0x03	/* External antenna */#define	MMW_EXT_ANT_IQ_TEST	0x1C	/* IQ test pattern (set to 0) */};#define	MMW_SIZE	37#define	mmwoff(p,f) 	(unsigned short)((void *)(&((mmw_t *)((void *)0 + (p)))->f) - (void *)0)/* * Modem Management Controller (MMC) read structure. */typedef struct mmr_t	mmr_t;struct mmr_t{  unsigned char	mmr_unused0[8];		/* unused */  unsigned char	mmr_des_status;		/* encryption status */  unsigned char	mmr_des_avail;		/* encryption available (0x55 read) */#define	MMR_DES_AVAIL_DES	0x55		/* DES available */#define	MMR_DES_AVAIL_AES	0x33		/* AES (AT&T) available */  unsigned char	mmr_des_io_invert;	/* des I/O invert register */  unsigned char	mmr_unused1[5];		/* unused */  unsigned char	mmr_dce_status;		/* DCE status */#define	MMR_DCE_STATUS_RX_BUSY		0x01	/* receiver busy */#define	MMR_DCE_STATUS_LOOPT_IND	0x02	/* loop test indicated */#define	MMR_DCE_STATUS_TX_BUSY		0x04	/* transmitter on */#define	MMR_DCE_STATUS_JBR_EXPIRED	0x08	/* jabber timer expired */#define MMR_DCE_STATUS			0x0F	/* mask to get the bits */  unsigned char	mmr_dsp_id;		/* DSP ID (AA = Daedalus rev A) */  unsigned char	mmr_unused2[2];		/* unused */  unsigned char	mmr_correct_nwid_l;	/* # of correct NWIDs rxd (low) */  unsigned char	mmr_correct_nwid_h;	/* # of correct NWIDs rxd (high) */  /* Warning:  read high-order octet first! */  unsigned char	mmr_wrong_nwid_l;	/* # of wrong NWIDs rxd (low) */  unsigned char	mmr_wrong_nwid_h;	/* # of wrong NWIDs rxd (high) */  unsigned char	mmr_thr_pre_set;	/* level threshold preset */#define	MMR_THR_PRE_SET		0x3F		/* level threshold preset */#define	MMR_THR_PRE_SET_CUR	0x80		/* Current signal above it */  unsigned char	mmr_signal_lvl;		/* signal level */#define	MMR_SIGNAL_LVL		0x3F		/* signal level */#define	MMR_SIGNAL_LVL_VALID	0x80		/* Updated since last read */  unsigned char	mmr_silence_lvl;	/* silence level (noise) */#define	MMR_SILENCE_LVL		0x3F		/* silence level */#define	MMR_SILENCE_LVL_VALID	0x80		/* Updated since last read */  unsigned char	mmr_sgnl_qual;		/* signal quality */#define	MMR_SGNL_QUAL		0x0F		/* signal quality */#define	MMR_SGNL_QUAL_ANT	0x80		/* current antenna used */  unsigned char	mmr_netw_id_l;		/* NWID low order byte (?) */  unsigned char	mmr_unused3[3];		/* unused */  /* 2.0 Hardware extension - frequency selection support */  unsigned char	mmr_fee_status;		/* Status of frequency EEPROM */#define	MMR_FEE_STATUS_ID	0xF0		/* Modem revision ID */#define	MMR_FEE_STATUS_DWLD	0x08		/* Download in progress */#define	MMR_FEE_STATUS_BUSY	0x04		/* EEPROM busy */  unsigned char	mmr_unused4[1];		/* unused */  unsigned char	mmr_fee_data_l;		/* Read data from EEPROM (low) */  unsigned char	mmr_fee_data_h;		/* Read data from EEPROM (high) */};#define	MMR_SIZE	36#define	mmroff(p,f) 	(unsigned short)((void *)(&((mmr_t *)((void *)0 + (p)))->f) - (void *)0)/* Make the two above structures one */typedef union mm_t{  struct mmw_t	w;	/* Write to the mmc */  struct mmr_t	r;	/* Read from the mmc */} mm_t;#endif /* _WAVELAN_H *//* * This software may only be used and distributed * according to the terms of the GNU General Public License. * * For more details, see wavelan.c. */

⌨️ 快捷键说明

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