ibmtr.h

来自「linux下用PCMCIA无线网卡虚拟无线AP的程序源码」· C头文件 代码 · 共 50 行

H
50
字号
#ifndef _COMPAT_IBMTR_H#define _COMPAT_IBMTR_H#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,4,0))#include_next <linux/ibmtr.h>#else#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,21))#include <../drivers/net/tokenring/ibmtr.h>#else#include <../drivers/net/ibmtr.h>#endif#endif#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,1,100))extern struct timer_list tr_timer;#endif#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,1,16))#define register_trdev register_netdev#define unregister_trdev unregister_netdev#endif#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,2,0))static inline struct net_device *init_trdev(void *p, int n){    struct net_device *dev;    dev = kmalloc(sizeof(struct net_device), GFP_KERNEL);    if (dev)	memset(dev, 0, sizeof(struct net_device));    return dev;}#endif#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0))  #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,17)) || defined(BLOCKSZ)  #define TR_OLD 0  #else  #define TR_OLD 1  #endif#else  #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,7)) || !defined(ADAPTINTCNTRL)  #define TR_OLD 0  #else  #define TR_OLD 1#endif#endif#endif /* _COMPAT_IBMTR_H */

⌨️ 快捷键说明

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