1 #ifndef LINUX_26_33_COMPAT_H
2 #define LINUX_26_33_COMPAT_H
4 #include <linux/autoconf.h>
5 #include <linux/version.h>
6 #include <linux/compat_autoconf.h>
8 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
10 #include <linux/skbuff.h>
11 #include <pcmcia/cs_types.h>
12 #include <pcmcia/cistpl.h>
13 #include <pcmcia/ds.h>
14 #include <linux/kfifo.h>
16 #define IFF_DONT_BRIDGE 0x800 /* disallow bridging this ether dev */
17 /* source: include/linux/if.h */
19 #define kparam_block_sysfs_write(a)
20 #define kparam_unblock_sysfs_write(a)
22 /* this will never happen on older kernels */
23 #define NETDEV_POST_INIT 0xffff
25 static inline struct sk_buff *netdev_alloc_skb_ip_align(struct net_device *dev,
28 struct sk_buff *skb = netdev_alloc_skb(dev, length + NET_IP_ALIGN);
30 if (NET_IP_ALIGN && skb)
31 skb_reserve(skb, NET_IP_ALIGN);
35 #define pcmcia_request_window(a, b, c) pcmcia_request_window(&a, b, c)
37 #define pcmcia_map_mem_page(a, b, c) pcmcia_map_mem_page(b, c)
39 /* loop over CIS entries */
40 int pcmcia_loop_tuple(struct pcmcia_device *p_dev, cisdata_t code,
41 int (*loop_tuple) (struct pcmcia_device *p_dev,
46 /* loop over CIS entries */
47 int pccard_loop_tuple(struct pcmcia_socket *s, unsigned int function,
48 cisdata_t code, cisparse_t *parse, void *priv_data,
49 int (*loop_tuple) (tuple_t *tuple,
54 * kfifo_alloc and kfifo_free must be backported manually
56 #define kfifo_in(a, b, c) __kfifo_put(*a, b, c)
57 #define kfifo_out(a, b, c) __kfifo_get(*a, b, c)
58 #define kfifo_len(a) __kfifo_len(*a)
60 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)) */
62 #endif /* LINUX_26_33_COMPAT_H */