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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? am930hw.c

?? wlan_monitor monitor utility for wlan device
?? C
?? 第 1 頁 / 共 4 頁
字號(hào):
/* 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 */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91网址在线看| 制服丝袜日韩国产| 色综合天天在线| 成人网男人的天堂| 顶级嫩模精品视频在线看| 国产精品一区二区在线观看网站 | 日韩成人免费电影| 日韩经典一区二区| 麻豆精品一区二区| 久久av老司机精品网站导航| 久久er99热精品一区二区| 国产精品一级黄| 成人性色生活片| 91视频免费播放| 色又黄又爽网站www久久| 色94色欧美sute亚洲线路一ni | 欧美大片在线观看一区| 久久亚洲私人国产精品va媚药| 精品va天堂亚洲国产| 久久久精品欧美丰满| 中文av一区特黄| 亚洲激情六月丁香| 午夜视频在线观看一区| 男女性色大片免费观看一区二区| 美女在线视频一区| 国产999精品久久久久久绿帽| 成人网男人的天堂| 欧美日韩日本视频| 欧美本精品男人aⅴ天堂| 国产欧美日韩在线观看| 一区二区免费视频| 激情欧美一区二区三区在线观看| 成人精品视频.| 国产精品免费丝袜| 夜夜嗨av一区二区三区四季av| 青青草原综合久久大伊人精品| 国产精品中文字幕日韩精品| 99精品1区2区| 在线播放日韩导航| 国产日韩欧美高清在线| 亚洲www啪成人一区二区麻豆 | 欧美mv日韩mv国产网站app| 久久久久久电影| 一区2区3区在线看| 精品一区二区三区影院在线午夜 | 69av一区二区三区| 国产日韩欧美精品一区| 午夜欧美2019年伦理| 国产精品91一区二区| 欧美亚日韩国产aⅴ精品中极品| ww亚洲ww在线观看国产| 亚洲一区二区三区自拍| 国产福利91精品| 777xxx欧美| 亚洲欧美日韩精品久久久久| 精品一区二区国语对白| 日本韩国欧美三级| 欧美国产日韩精品免费观看| 日本不卡一区二区三区高清视频| www.欧美日韩| 精品处破学生在线二十三| 亚洲最新视频在线播放| 国产成人综合网站| 91精品国产麻豆国产自产在线| 自拍视频在线观看一区二区| 国内国产精品久久| 欧美日产在线观看| 国产精品久久久久桃色tv| 欧美欧美欧美欧美首页| 成人欧美一区二区三区1314| 美腿丝袜亚洲三区| 欧美无砖砖区免费| 亚洲欧洲性图库| 国产69精品久久777的优势| 欧美一级夜夜爽| 亚洲第一搞黄网站| 91麻豆国产在线观看| 欧美精彩视频一区二区三区| 美洲天堂一区二卡三卡四卡视频| 欧美亚洲一区二区三区四区| 自拍偷拍国产亚洲| 粉嫩欧美一区二区三区高清影视| 日韩欧美视频在线| 三级亚洲高清视频| 欧美男同性恋视频网站| 亚洲一二三专区| 日本韩国一区二区三区| 亚洲美女免费在线| 成人动漫视频在线| 日本一区二区电影| 国产·精品毛片| 中文乱码免费一区二区| 成人高清视频免费观看| 国产拍揄自揄精品视频麻豆| 国产美女娇喘av呻吟久久| 欧美xfplay| 国产伦精品一区二区三区免费迷| 欧美第一区第二区| 国产一区二区在线影院| 精品91自产拍在线观看一区| 精品一区二区免费看| 欧美zozozo| 国产成人午夜精品影院观看视频 | 欧美电影在线免费观看| 午夜激情综合网| 欧美久久高跟鞋激| 日韩和的一区二区| 欧美大白屁股肥臀xxxxxx| 毛片av一区二区| 亚洲精品一线二线三线无人区| 极品美女销魂一区二区三区免费 | 精品在线一区二区三区| 欧美精品一区二区不卡 | 欧美一区二区日韩一区二区| 日本成人超碰在线观看| 久久亚洲一区二区三区四区| 国产成人av影院| 亚洲日本在线看| 欧美艳星brazzers| 麻豆一区二区三| 国产日韩欧美一区二区三区综合| 99久久久久免费精品国产| 亚洲综合精品自拍| 日韩欧美一区二区不卡| 国产成人午夜高潮毛片| 综合中文字幕亚洲| 欧美在线一二三| 麻豆精品久久精品色综合| 久久天天做天天爱综合色| 亚洲高清视频的网址| 日韩欧美美女一区二区三区| 国产一区二区三区国产| 中文字幕一区二区三区四区| 欧美唯美清纯偷拍| 久久国产乱子精品免费女| 国产精品天干天干在线综合| 国产精品久久777777| 欧美视频在线观看一区| 老司机一区二区| 中文字幕中文字幕一区二区| 欧美欧美午夜aⅴ在线观看| 国产在线不卡一卡二卡三卡四卡| 1区2区3区国产精品| 69p69国产精品| 99视频精品全部免费在线| 日韩二区三区四区| 国产精品麻豆99久久久久久| 欧美精品丝袜中出| 成人性生交大片免费| 午夜精品久久久久久不卡8050| 国产视频一区二区在线观看| 色成人在线视频| 国产一区二区三区在线观看免费视频| 1区2区3区精品视频| 欧美tickle裸体挠脚心vk| 色综合久久久久综合体| 久久不见久久见免费视频7| 亚洲美女免费在线| 欧美精品一区二区三区久久久| 91网站在线观看视频| 蜜桃视频第一区免费观看| 亚洲欧美激情小说另类| 久久综合久久综合久久| 欧美午夜精品久久久久久孕妇| 国产成人精品一区二| 蜜桃视频第一区免费观看| 一区二区三区四区激情 | 久久爱另类一区二区小说| 亚洲精品国产精华液| 国产欧美日韩在线| 日韩亚洲国产中文字幕欧美| 色婷婷国产精品综合在线观看| 精品亚洲欧美一区| 午夜精品福利久久久| 亚洲人成影院在线观看| 国产亚洲一本大道中文在线| 欧美一区二区三区四区在线观看| 色偷偷成人一区二区三区91| 成人午夜电影小说| 国产一区二三区好的| 久久精品国产在热久久| 日韩不卡一二三区| 一区二区在线观看av| 国产精品女同互慰在线看 | 国产原创一区二区三区| 水野朝阳av一区二区三区| 亚洲一区精品在线| 自拍偷自拍亚洲精品播放| 国产精品区一区二区三区| 久久久精品2019中文字幕之3| 日韩一级二级三级| 91精品国产综合久久精品性色| 色噜噜久久综合| 91网站最新网址| 色94色欧美sute亚洲线路一久| 色综合天天做天天爱| 不卡在线观看av| 不卡的av网站| 波多野结衣在线一区| 不卡电影免费在线播放一区|