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

📄 os_macros.h

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

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


extern VOID Delay(UINT32 delayInUs);

#include "linux_list.h"
#include <errno.h>
#include <string.h>
#include "endianSwap.h"
#include "os_wireless.h"
#include "agMemory.h"
#include "assert.h"
#include "shimd.h"
#include "os_net_device.h"
#include "include.h"

extern unsigned long current;
typedef int 	s32;
static inline u32 os_time_get()
{
	u32 time = tx_time_get();
	assert(time != 0);
	return time;
}

static inline void OS_SET_THREAD_STATE(int state)
{
	if (state == TASK_INTERRUPTIBLE) {
		//TX_DISABLE
	}
	else if (state == TASK_RUNNING) {
		//TX_RESTORE
	}
}

static inline int os_upload_rx_packet(wlan_private *priv, struct sk_buff *skb)
{
	char	*dataBuf;
	void	*bufDesc;
	int	bufLen;

	WlanShimDGetRxBuf(&dataBuf, &bufLen, &bufDesc);

	if (bufDesc == NULL) {
		PRINTK1("No rxBuf free!");
		return -1;
	}

	assert(skb->len <= bufLen);
	memcpy(dataBuf, skb->data, skb->len);
	WlanShimDRecvPacket(dataBuf, skb->len, bufDesc);

	AGFREE(skb);
	return 0;
}

static inline u8* skb_put(struct sk_buff *skb, u32 len)
{
	u8	*tmp=skb->tail;
	skb->tail += len;
	skb->len = len;
	return tmp;

}
static inline u8* skb_pull(struct sk_buff *skb, u32 len)
{
	skb->len -=len;
	return skb->data += len;	
}



static inline void kfree_skb(struct sk_buff * skb)
{
	if(skb->data)
		AGFREE(skb->data);
	AGFREE(skb);
}


int wlan_do_ioctl(struct net_device *, struct ifreq *, int);
void wireless_send_event(struct net_device *	dev,
			unsigned int		cmd,
			union iwreq_data *	wrqu,
			char *			extra);
void wpa_driver_wext_event_wireless(void *ctx, char *data, int len);

struct net_device *init_dev(struct net_device *	dev,int y);
int PrepareAndSendCommand(wlan_private * priv, u16 cmdno, u16 cmd_option,
		      u16 intoption, WLAN_OID PendingOID,
		      u16 PendingInfo, 
		      void *InfoBuf);


#endif	/* _OS_MACROS_H */

⌨️ 快捷键说明

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