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

📄 os_headers.h

📁 marvell wifi driver GSPI-8385-LINUX-OMAP1510-5.0.10.p0-144-src.rar
💻 H
字号:
#ifndef _OS_HEADERS_H
#define _OS_HEADERS_H

#ifndef __ATTRIB_ALIGN__
#define __ATTRIB_ALIGN__ __attribute__((aligned(4)))
#endif

#ifndef __ATTRIB_PACK__
#define __ATTRIB_PACK__ __attribute__ ((packed))
#endif

#include	"linux_list.h"

#define wait_queue_head_t	TX_EVENT_FLAGS_GROUP
#define spinlock_t		TX_SEMAPHORE
#define WLAN_DRV_TIMER		TX_TIMER
#define PWLAN_DRV_TIMER		TX_TIMER*

#define sdspi_notifier_t	mmc_notifier_rec_t
#define sdspi_notifier_fn_p	mmc_notifier_fn_t
#define SDSPI_REG_TYPE_USER	MMC_REG_TYPE_USER	
#define sdspi_card_p		mmc_card_t		
#define if_dnld_ready		msd25_dnld_ready	
#define register_user(x)	sdio_register(SDSPI_REG_TYPE_USER, x, 0)
#define unregister_user(x)	sdio_unregister(SDSPI_REG_TYPE_USER, x)
#define sdio_free_irq(x, y)	sdio_free_irq(x)
#define cpu_to_le16		le16_to_cpu
#define cpu_to_le32		le32_to_cpu

#define IW_EV_LCP_LEN		(sizeof(struct iw_event) - sizeof(union iwreq_data))
#define OS_INTERRUPT_SAVE_AREA	TX_INTERRUPT_SAVE_AREA
#define OS_INT_DISABLE		TX_DISABLE
#define OS_INT_RESTORE		TX_RESTORE

#define OS_FREE_LOCK(x)		TX_SEMAPHORE_DELETE(x)

#ifdef DBG_PRINTF
#define	printk(x...)		dprintf(x)
#else
#define printk(x...)        ((void)0)
#endif

#define HZ		100

#define kmalloc(x, y)	AGMALLOC(x, SCRATCHALLOC)
#define kfree		AGFREE

#define udelay(x)	SYS_DELAY(x)
#define mdelay(x);	{	\
				if((x)<10)	\
					TX_THREAD_SLEEP(x);	\
				else	\
					TX_THREAD_SLEEP((x)/10);	\
			}\


#define init_waitqueue_head(x); 							\
{ 											\
	if((x) == (&priv->adapter->scan_q)) 						\
		TX_EVENT_FLAGS_CREATE(x, "scan_q"); 					\
	else 										\
		TX_EVENT_FLAGS_CREATE(x, "cmdwait_q");	 				\
}


#define ConfigureThreadPriority();	{ 						\
	int temp; 									\
											\
	tx_thread_priority_change(&priv->MainThread.txThread, THR_PRI_NORMAL, &temp); 	\
}

#define unregister_netdev(x);	{ 							\
	AGFREE(x); 									\
	x = NULL; 									\
}
										
#define wake_up_interruptible(x) 							\
			TX_EVENT_FLAGS_SET(x, KTHREAD_WAIT_FLAG, TX_OR)
	
#define interruptible_sleep_on_timeout(x, y) { 						\
	u32	flags; 									\
	TX_EVENT_FLAGS_GET(x, KTHREAD_WAIT_FLAG, TX_OR_CLEAR, &flags, 1000); 		\
}
	
#define interruptible_sleep_on(x) { 							\
	u32 flags; 									\
	TX_EVENT_FLAGS_GET(x, KTHREAD_WAIT_FLAG, TX_OR_CLEAR, &flags, 			\
							TX_WAIT_FOREVER); 		\
}

#define wait_event_interruptible(x, y) { 						\
	u32 flags = 0; 									\
	int ret; 									\
	ret = TX_EVENT_FLAGS_GET(&x, KTHREAD_WAIT_FLAG, TX_OR_CLEAR, &flags, 		\
							TX_WAIT_FOREVER); 		\
}


#define spin_lock_init(x) { \
	if((x) == &Adapter->CurrentTxLock) \
		TX_SEMAPHORE_CREATE(x, "CurrentTxLock", 1); \
	else if((x) == &Adapter->QueueSpinLock) \
		TX_SEMAPHORE_CREATE(x, "QueueSpinLock", 1); \
}

#define schedule();	{	\
		u32 flags;	\
		TX_EVENT_FLAGS_GET(&thread->waitQ, KTHREAD_WAIT_FLAG, 	\
					TX_AND_CLEAR, &flags, TX_WAIT_FOREVER);	\
	}
#define spin_lock_irqsave(x, y)		TX_SEMAPHORE_GET(x, TX_WAIT_FOREVER)
#define spin_unlock_irqrestore(x, y)	TX_SEMAPHORE_PUT(x)
#define os_sched_timeout(x)		TX_THREAD_SLEEP((x)/10)
#define cli();				TX_DISABLE;
#define sti();				TX_RESTORE;
#define wait_queue_t			int
#define netif_wake_queue(x)		/* defined to nothing */
#define netif_carrier_on(x)		/* defined to nothing */
#define netif_start_queue(x)		/* defined to nothing */
#define netif_stop_queue(x)		/* defined to nothing */
#define netif_carrier_off(x)		/* defined to nothing */

#define sema_init(X, Y)			/* defined to nothing */
#define KERN_ERR			/* defined to nothing */
#define KERN_NOTICE			/* defined to nothing */
#define KERN_DEBUG			/* defined to nothing */
#define KERN_INFO			/* defined to nothing */
#define KERN_ALERT			/* defined to nothing */
#define init_waitqueue_entry(x,y)	/* defined to nothing */
#define add_wait_queue(x,y)		/* defined to nothing */
#define remove_wait_queue(x,y)		/* defined to nothing */
#define MODULE_DESCRIPTION(x)		/* defined to nothing */
#define MODULE_LICENSE(x)		/* defined to nothing */
#define MODULE_AUTHOR(x)		/* defined to nothing */
#define SET_MODULE_OWNER(x)		/* defined to nothing */	
#define MOD_INC_USE_COUNT		/* defined to nothing */		
#define MOD_DEC_USE_COUNT		/* defined to nothing */		
#define module_init(x)			/* defined to nothing */
#define module_exit(x)			/* defined to nothing */
#define UpdateTransStart(x)		/* defined to nothing */

#define netif_queue_stopped(x)		0

#define TASK_INTERRUPTIBLE		1
#define TASK_RUNNING			2

#include 	"tx_api.h"
#include 	"marvellTypeMap.h"
#include	"os_net_device.h"

#endif /* _OS_HEADERS_H */

⌨️ 快捷键说明

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