亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? am930hw.c

?? wlan_monitor monitor utility for wlan device
?? C
?? 第 1 頁 / 共 4 頁
字號:
/* am930_hw.c: Handles the specifics of the AM79C930/PRISM card*	--------------------------------------------------------------------**   Linux WLAN **   The contents of this file are subject to the Mozilla Public*   License Version 1.0 (the "License"); you may not use this file*   except in compliance with the License. You may obtain a copy of*   the License at http://www.mozilla.org/MPL/**   Software distributed under the License is distributed on an "AS*   IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or*   implied. See the License for the specific language governing*   rights and limitations under the License.**   The initial developer of the original code is Mark S. Mathews*   <mark@absoval.com>.  Portions created by Mark S. Mathews*   are Copyright (C) 1998 AbsoluteValue Software, Inc.  All Rights Reserved.*   *	--------------------------------------------------------------------**	The author may be reached as mark@absoval.com, or C/O AbsoluteValue*	Software Inc., P.O. Box 941149, Maitland, FL, 32794-1149**	Thanks to David Hinds, Donald Becker, and the rest of the Linux*	developers worldwide for making all of this possible.**	--------------------------------------------------------------------**	The functions here implement all of the stuff that's specific*	to this card.  I've tried to keep all of the AM79C930 hardware and*	firmware stuff here.  Some specifics have bled into the mac and mgr*	sections though.------------------------------------------------------------------------*//* The following prevents "kernel_version" from being set in this file. */#define __NO_VERSION__/* PCMCIA headers generated during PCMCIA package installation */#include <pcmcia/config.h>#include <pcmcia/k_compat.h>/* Module related headers, non-module drivers should not include */#include <linux/version.h>/* Standard driver includes */#include <assert.h>#include <linux/delay.h>#include <linux/kernel.h>#include <linux/types.h>#include <linux/fcntl.h>#include <linux/interrupt.h>#include <linux/ptrace.h>#include <linux/ioport.h>#include <linux/in.h>#include <linux/malloc.h>#include <linux/string.h>#include <linux/timer.h>#include <asm/system.h>#include <asm/bitops.h>#include <asm/io.h>#include <linux/errno.h>/* Ethernet and network includes */#include <linux/if_ether.h>#include <linux/netdevice.h>#include <linux/etherdevice.h>#include <linux/skbuff.h>#include <linux/if_arp.h>#include <linux/ioport.h>/* Card and Driver services includes */#include <pcmcia/version.h>#include <pcmcia/cs_types.h>#include <pcmcia/cs.h>#include <pcmcia/cistpl.h>#include <pcmcia/ds.h>#include <pcmcia/cisreg.h>/* Local Includes */#include <wlan/version.h>#include <wlan/am930const.h>#include <wlan/p80211.h>#include <wlan/am930mib.h>#include "am930debug.h"#include "am930di.h"#include "am930mac.h"#include "am930hw.h"#include "am930mgr.h"#include "am930llc.h"/* This one sets up the bit for debug msg testing */#define FILEBIT	DBHW/*================================================================*//* Local Macros  *//* Am79c930, io port address methods (16 port mode) */#define GCR(hw)		((hw)->iobase)#define BSS(hw)		(((hw)->iobase) + 0x01)#define LMAL(hw)	(((hw)->iobase) + 0x02)#define LMAU(hw)	(((hw)->iobase) + 0x03)#define DPLL(hw)	(((hw)->iobase) + 0x04)#define DPLM(hw)	(((hw)->iobase) + 0x05)#define DPUM(hw)	(((hw)->iobase) + 0x06)#define DPUU(hw)	(((hw)->iobase) + 0x07)#define TIR(index,base)	 /* TODO: write an inline for accessing the TIR's *//* General */#define ABS(N) ((N) < 0 ? -(N) : (N))#define AM930HW_FWNOTREADY		(0x01)#define AM930HW_FWCMDTIMEOUT	(0x02)#define AM930HW_CMD_SUCCESS			0#define AM930HW_CMD_GETMIBFAILED	1#define AM930HW_CMD_INITTXFAILED	2#define AM930HW_CMD_INITRXFAILED	3#define AM930HW_CMD_SCANFAILED		4#define AM930HW_CMD_SETMIBFAILED	5#define AM930HW_CMD_SYNCFAILED		6/*--- getset function action values ------------------*/#define SU_GET_INTMASK1		0x01#define SU_SET_INTMASK1		0x02#define SU_GET_INTMASK2		0x04#define SU_SET_INTMASK2		0x08#define SU_GET_INTSTATUS1	0x10#define SU_SET_INTSTATUS1	0x20#define SU_GET_INTSTATUS2	0x10#define SU_SET_INTSTATUS2	0x20#define SU_GETSET_INT_FAILED	(BIT7) /* Queue setup values *//* See notes for 5/18/97 for discussion */#define AM930_NTXDESC		3#define AM930_MAX_TXDATA	1548/*================================================================*//* Local Types  *//* return type for the f/w command send method */typedef struct am930hw_cmd_result{	UINT8	fw_status;		/* f/w returned status  */	UINT8	fw_err_off;		/* f/w error offset */	UINT8	drvr_status;	/* driver code errors */	UINT8	rsvd;			} SU_PACK am930hw_cmd_result_t;/* types for setting up the tx queues in card memory */typedef struct am930tx_dataslot{	am930tx_desc_t	desc;	UINT8			data[AM930_MAX_TXDATA];} SU_PACK am930tx_dataslot_t;/*================================================================*//* Local Functions  *//* private: *//* Hardware/firmware helper methods, (private) */static int	am930hw_lockint( am930hw_t *hw);static void	am930hw_unlockint( am930hw_t *hw);static UINT32 am930hw_read_rxnext(am930hw_t *hw);static am930hw_cmd_result_t am930hw_fw_cmd( am930hw_t *hw, UINT8 cmd, void* cmdparms, INT32 parmsize);static UINT16 am930hw_getset_int( am930hw_t *hw, int action, UINT8 mask, UINT8 status );static int am930hw_init_tx_queues( am930hw_t *hw);UINT32 am930hw_sync( am930hw_t *hw, UINT32 ch, UINT32 startBSS, 					wlan_bss_ts_t ts, UINT32 ref_time );/* firmware command helpers */static UINT32 am930hw_tx_enable(am930hw_t *hw);static UINT32 am930hw_rx_enable(am930hw_t *hw);/* ISR helpers */static void am930hw_onint_scancomplete( am930hw_t *hw);static void am930hw_onint_rx( am930hw_t *hw );static void am930hw_onint_tx( am930hw_t *hw );static void am930hw_onint_cmdcomplete( am930hw_t *hw );/* Card tx buffer memory mgmt */void am930mem_init( am930mem_t *mem, UINT32 start, UINT32 len);UINT32 am930mem_alloc( am930mem_t *mem, UINT32 size );UINT32 am930mem_free( am930mem_t *mem, UINT32 p, UINT32 len);/* Card memcpy functions */static void readcard( am930hw_t *hw, UINT32 cardaddr, void *buf, UINT32 len);static void writecard( am930hw_t *hw, UINT32 cardaddr, void *buf, UINT32 len);static UINT8  read8( am930hw_t *hw, UINT32 cardaddr );static UINT16 read16( am930hw_t *hw, UINT32 cardaddr );static UINT32 read32( am930hw_t *hw, UINT32 cardaddr );static void   write8( am930hw_t *hw, UINT32 cardaddr, UINT8 val );static void   write16( am930hw_t *hw, UINT32 cardaddr, UINT16 val );static void   write32( am930hw_t *hw, UINT32 cardaddr, UINT32 val );/* Debug Helper Methods*/void am930hw_dbprintregs( am930hw_t *hw);void am930hw_dbprintCS_blk( am930hw_t *hw);void am930hw_dbprintCMD_blk( am930hw_t *hw);void am930hw_dbprintRXdesc( am930rx_desc_t *d);void am930hw_dbprintTXdesc( am930tx_desc_t *d);void am930hw_dbprintallMIBs(am930hw_t *hw);void am930hw_dbprintMIBlocal(am930hw_t *hw);void am930hw_dbprintMIBmac(am930hw_t *hw);void am930hw_dbprintMIBmac_addr_stat_grp(am930hw_t *hw);void am930hw_dbprintMIBmac_statistics(am930hw_t *hw);void am930hw_dbprintMIBmac_mgmt( am930hw_t *hw);void am930hw_dbprintMIBphy(am930hw_t *hw);void am930db_prrxdesc( am930rx_desc_t *desc);/*================================================================*//* Static variables  */#if defined(FW_ORIG)char sutro_banner[] = "SUTRO: Oct  2 1996, 09:59:37";#elif defined(FW_NEW)char sutro_banner[] = "SUTRO: Jan 30 1997, 15:38:13";#elsechar sutro_banner[] = "SUTRO";#endif/* start mod: tld */static UINT32 rssi_tld=0;/* end mod: tld *//*================================================================*//* defined here because of inline *//*----------------------------------------------------------------*	am930hw_(un)lockint**	These two functions handle locking and unlocking driver access*	to the control/status fields int_status and int_mask. *	This is handled via the lockout_host and lockout_fw fields of*	the cs block.**	PS: if the firmware isn't locked out already, it doesn't hurt*       anything to call unlockint**	returns: 0 on success*			 non-zero on failure----------------------------------------------------------------*/static __INLINE__ void am930hw_unlockint( am930hw_t *hw){	DBFENTER;	write8(hw, hw->cs + CS_OFF_LOCKOUT_FW, 0);	DBFEXIT;}static __INLINE__ int am930hw_lockint( am930hw_t *hw){	u_int	result = 0;	int		ntries;	int		count;	u_long	flags;	DBFENTER;	/* Disable interrupts */	save_flags(flags);	cli();	/* Attempt the access procedure at most three times */	ntries = 3;	do	{		/*--- check access ---*/		count = 10; /* waitloop */		while( count-- > 0 && read8(hw, hw->cs + CS_OFF_LOCKOUT_HOST))		{			udelay(5);		}		if ( count > 0)		{			/*--- attempt lockout ---*/			write8(hw, hw->cs + CS_OFF_LOCKOUT_FW, 0xff); /* lockout the f/w */				/*--- check access again ---*/			if ( read8(hw, hw->cs + CS_OFF_LOCKOUT_HOST) != 0 )			{				write8( hw, hw->cs + CS_OFF_LOCKOUT_FW, 0);			}		}	} while ( read8(hw, hw->cs + CS_OFF_LOCKOUT_FW) == 0 && ntries--);	/* Enable interrupts */	sti();	restore_flags(flags);	if ( ntries <= 0 )	{		DBPRT( DBFWSTATE,"Attempt to lockout f/w from cs block failed!\n");		result = 1;	}	DBFEXIT;	return result;}/*----------------------------------------------------------------*	am930hw_construct**	Called _after_ someone has determined that we do in fact have*	an am930 device present in the system _and_ we know where it *	is.  Compared to some drivers, this might be considered to be*	"probe part 2".**	This function will:*		allocate the hw struct*		fill in constant (possibly calculated) fields*		initialize the ioports on the card,*		perform a reset of the card (includes the f/w NOP test)*		read the f/w banner to determine the f/w version*		test the f/w version for a match with this driver***	When complete, we know that the card has been successfully reset*	and the firmware is up and running.  Additionally, the*	firmware has been identified**	Subsequent code will either prepare the card for tx/rx*	or prepare the card for flash writes.**	Arguments:*		irq		- IRQ being used by the card*		iobase	- base addr for io window*		membase	- base addr for memory window, if zero then there*					is no memory window, use the io method to access*					on card SRAM*		*	returns: addr. of the hw object if successful, NULL otherwise*----------------------------------------------------------------*/am930hw_t* am930hw_construct( UINT32 irq, UINT32 iobase, UINT32 membase,							  am930mac_t *mac){	am930hw_t				*hw = NULL;	char					banner[SU_LEN_BANNER];	char					*endp;	UINT8					reg;	su_mib_local_t			mib;	DBFENTER;	/* allocate and zero the object */	hw = kmalloc( sizeof(am930hw_t), GFP_KERNEL);	if (hw != NULL )	{		memset( hw, 0, sizeof(am930hw_t));		hw->state |= AM930HW_CONFIG_PENDING;		/* Initialize some of the members of the object */		hw->mac = mac;		hw->membase = membase;		hw->usemem = (membase != 0);		hw->iobase = iobase;		hw->irq = irq;		printk(KERN_NOTICE"am930_cs: io=0x%lx irq=%ld", hw->iobase, hw->irq);		if (hw->membase) {			printk(" membase=0x%lx\n", hw->membase);		}		else {			printk("\n");		}		hw->banner =	SU_OFF_BANNER;		hw->cs =		SU_OFF_CNTL_STATUS_BLK;		hw->cmd =		SU_OFF_CMD_BLK;		hw->txcmplt =	SU_OFF_LAST_TXDESC;		hw->vbm =		SU_OFF_VBM;		/* Card is in an unknown state, perform a reset */		if ( am930hw_reset(hw) != 0 )		{			am930hw_destruct( hw );			hw = NULL;		}		else  		{			/* card should be in a post reset state and 			   f/w NOP was successful, we can now issue f/w cmds and			   access oncard SRAM 			*/			/* first get and check the firmware banner for correct version */			readcard( hw, hw->banner, banner, SU_LEN_BANNER);			printk( KERN_NOTICE "am930_cs: Firmware Banner: %s \n", banner);			hw->fw_major = simple_strtoul(banner+13, &endp, 10);			hw->fw_minor = simple_strtoul(endp+1, &endp, 10);			hw->fw_date  = simple_strtoul(endp+1, &endp, 10);			hw->fw_api   = simple_strtoul(endp+4, &endp, 10);			printk( KERN_DEBUG"f/w version:%lu.%02lu  date:%lu api:%lu\n", 				hw->fw_major, hw->fw_minor, hw->fw_date, hw->fw_api);			if ( !( (hw->fw_major == 2 && hw->fw_minor == 0) ||  			        (hw->fw_major == 2 && hw->fw_minor == 1) ||  					(hw->fw_major == 1 && hw->fw_minor == 50) )  )			{				DBPRT( DBINIT, "Unsupported firmware version!\n");				am930hw_destruct( hw );				hw = NULL;			}			else			{				/* First, enable ints from the 188 core, then enable f/w */				/* Enable Core Generated Interrupts */				outb_p( BIT1, GCR(hw) );				am930hw_getset_int( hw, 					SU_SET_INTMASK1 | SU_SET_INTSTATUS1 |					SU_SET_INTMASK2 | SU_SET_INTSTATUS2, 0x00, 0x00 );				reg = inb_p( GCR(hw) );				reg |= BIT3;				outb_p( reg, GCR(hw) );				/* Lets set usr_return to zero */				write8(hw, hw->cs + CS_OFF_USER_RTN, 0);				/* Set the pwr_dn to zero *//*				write8(hw, hw->cs + CS_OFF_DIS_PWR_DN, 1); */				/* Set the dis_pwr_dn register bit to zero */	/*				reg = inb_p( GCR(hw) );				reg |= BIT5;				outb_p( reg, GCR(hw) );*/				/* set the state bit for the object */				hw->state &= ~AM930HW_CONFIG_PENDING;				hw->state |= AM930HW_CONFIG;							DBPRT( DBINIT, "Card reset and firmware TestInterface are "					"successful\n");				/* Get the rx buffer loc and size for sanity checking in */				/*  onint_rx */				am930hw_mibget( hw, SUMIB_LOCAL, 0, 						sizeof(su_mib_local_t), &mib);				hw->rx_base = mib.rx_buffer_offset;				hw->rx_len  = mib.rx_buffer_size;				/* reset int bit in GCR (probably set by getmib cmd above) */				reg = inb_p( GCR(hw) );				reg |= BIT3;				outb_p( reg, GCR(hw) );				reg = inb_p( GCR(hw) );			}		}	}	DBFEXIT;    return hw;} /*----------------------------------------------------------------*	am930hw_destruct**	returns: nothing----------------------------------------------------------------*/void am930hw_destruct(am930hw_t *hw){	DBFENTER;	kfree_s( hw, sizeof(am930hw_t));	DBFEXIT;	return;}/*----------------------------------------------------------------*	am930hw_fw_cmd**	This is a helper function used to send commands to the*	firmware. It copies its arguments to the command block*	and then sets the command. After setting the command, we then*	wait for the command to complete. The wait includes a timeout*	and if the command times out, that status is returned.*	Otherwise we return the firmware indicated status. If the*	firmware status is OK and if needed, the command parms are*	copied to the buffer space provided by the caller.**	Argument notes:*		the ABS of the parmsize argument provides the number of *		bytes to copy to the command parm area, and if the parm*		is < 0 then after the command completes, we copy that*		many bytes back from the command parm area as well.**	returns: an am930cmd_result_t structure, which should be *			four bytes long and can be played with like an int.----------------------------------------------------------------*/am930hw_cmd_result_t am930hw_fw_cmd( am930hw_t *hw, UINT8 cmd, void* cmdparms, INT32 parmsize){	am930hw_cmd_result_t	result;	UINT32					timeout;	DBFENTER;	/* clear the result struct */	memset( &result, 0, sizeof(result));	/* wait for the cmd block to be available */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩电影免费在线观看网站| 欧美一区二区三区四区高清 | 亚洲成a人v欧美综合天堂下载| 调教+趴+乳夹+国产+精品| 精品一区二区国语对白| 91丨九色丨国产丨porny| 日韩免费高清视频| 亚洲精品中文字幕乱码三区| 韩国av一区二区三区四区| 精品欧美黑人一区二区三区| 久久精品国产久精国产| 国产香蕉久久精品综合网| 韩国一区二区视频| 91捆绑美女网站| 久久精品一区二区三区四区 | 国产精品热久久久久夜色精品三区| 亚洲三级在线播放| 激情综合网最新| 欧美日韩一区视频| 亚洲欧美一区二区在线观看| 国产精品资源在线看| 欧美美女一区二区三区| 亚洲精品欧美综合四区| www.亚洲精品| 国产日韩精品一区二区三区在线| 美国十次了思思久久精品导航| 欧美日韩美女一区二区| 一区二区三区精品在线| 成人app在线观看| 亚洲欧美一区二区久久 | 欧美在线999| 中文字幕一区二区三区色视频| 国产成人亚洲综合a∨猫咪| 精品国产伦一区二区三区观看体验| 婷婷丁香久久五月婷婷| 欧美理论在线播放| 石原莉奈在线亚洲二区| 欧美日本一道本| 日日欢夜夜爽一区| 欧美一区二区三区的| 日韩不卡一区二区三区| 日韩欧美国产一区二区在线播放 | 99久久国产综合精品女不卡| 国产精品丝袜91| jlzzjlzz国产精品久久| 亚洲国产精品国自产拍av| 精品视频在线免费| 偷拍一区二区三区四区| 亚洲三级在线播放| 国产精品久久久久久亚洲毛片| 精品一二三四区| 日韩欧美中文字幕精品| 老司机精品视频线观看86| 欧美第一区第二区| 国产精品原创巨作av| 中文字幕av一区 二区| 99国产精品久久久久久久久久| 亚洲精品ww久久久久久p站| 欧美色精品天天在线观看视频| 五月开心婷婷久久| 精品美女被调教视频大全网站| 国产精品一区二区无线| 中文字幕在线一区| 欧美日韩日日摸| 久久99久久99| 椎名由奈av一区二区三区| 欧美日韩美女一区二区| 国产一区二区免费在线| 国产精品久久久久久亚洲伦| 欧美精选在线播放| 国产精品1区2区3区| 亚洲一本大道在线| 精品一区二区三区在线观看| 97精品国产露脸对白| 国产精品日韩精品欧美在线| 狠狠色狠狠色综合| 精品免费视频.| 国产传媒日韩欧美成人| 日本一区二区三区视频视频| 国产精品影音先锋| 一区二区三区91| 欧美激情在线观看视频免费| 男女男精品视频网| 国产精品素人一区二区| 在线播放中文一区| 北岛玲一区二区三区四区| 亚洲成人动漫在线免费观看| 国产拍欧美日韩视频二区| 欧洲一区二区av| 国产精品一区2区| 午夜婷婷国产麻豆精品| 欧美激情中文字幕一区二区| 制服.丝袜.亚洲.中文.综合| 99re在线精品| 精品中文av资源站在线观看| 亚洲乱码国产乱码精品精小说| 久久这里只有精品首页| 欧美日韩在线亚洲一区蜜芽| 成人小视频在线| 国内精品伊人久久久久av一坑| 夜夜亚洲天天久久| 久久久99精品免费观看| 欧美一区二区视频在线观看2022| 91在线观看地址| 国产福利一区二区三区视频| 蜜桃在线一区二区三区| 亚洲成人激情自拍| 亚洲欧洲成人av每日更新| 久久午夜国产精品| 日韩精品中文字幕一区| 884aa四虎影成人精品一区| 99re在线视频这里只有精品| 成人免费看黄yyy456| 国产一区二区三区久久悠悠色av| 丝袜脚交一区二区| 亚洲线精品一区二区三区| 亚洲精品精品亚洲| 最新成人av在线| 国产精品国产a| 国产精品网曝门| 日本一区二区免费在线| 欧美激情一区二区| 欧美激情中文字幕一区二区| 国产欧美精品一区二区色综合朱莉| 26uuu亚洲| 国产亚洲女人久久久久毛片| 久久久精品欧美丰满| 久久久久久亚洲综合影院红桃| 欧美www视频| 久久久久久久久久美女| 久久丝袜美腿综合| 欧美极品美女视频| 日韩理论在线观看| 洋洋成人永久网站入口| 亚洲国产精品综合小说图片区| 亚洲国产成人av| 另类调教123区| 国产精品1区2区3区在线观看| 高清国产一区二区| 色综合久久中文综合久久牛| 国产调教视频一区| 日本女人一区二区三区| 欧美国产精品v| 亚洲免费在线视频| 亚洲成人av在线电影| 美脚の诱脚舐め脚责91| 欧美精品乱码久久久久久按摩| 欧美军同video69gay| 在线不卡中文字幕| 精品成人私密视频| 国产精品久久久久久福利一牛影视| 亚洲少妇30p| 男女激情视频一区| 成人性色生活片| 欧美三级在线看| 亚洲精品一区二区三区精华液| 国产精品伦一区| 日韩中文字幕1| 成人免费观看av| 欧美一区二区三区四区视频| 国产丝袜在线精品| 亚洲va在线va天堂| 从欧美一区二区三区| 欧美日韩极品在线观看一区| 国产亚洲精品aa| 亚洲成人久久影院| 北岛玲一区二区三区四区| 欧美精品乱人伦久久久久久| 国产精品久久久久久久午夜片| 日韩精品三区四区| 99精品在线观看视频| 日韩免费在线观看| 一区二区三区四区在线| 国产精品资源网| 欧美精品v国产精品v日韩精品| 中文字幕第一区综合| 亚洲午夜免费电影| 成人av电影在线播放| 欧美大片顶级少妇| 午夜精品成人在线| 91丨九色丨蝌蚪富婆spa| 精品国产露脸精彩对白| 亚洲国产精品人人做人人爽| 99免费精品在线| 精品系列免费在线观看| 国产不卡高清在线观看视频| 国产一区二区三区久久悠悠色av| 国产精品一线二线三线精华| 91精品国产免费| 一区二区成人在线观看| 91亚洲精品乱码久久久久久蜜桃| 亚洲精品在线免费观看视频| 日本成人中文字幕在线视频| 欧美日韩一区二区在线视频| 亚洲黄色小视频| 色菇凉天天综合网| 亚洲三级电影网站| 91蜜桃网址入口| 亚洲欧美日韩电影| 色婷婷一区二区三区四区|