Show
Ignore:
Timestamp:
06/20/10 14:13:10 (2 years ago)
Author:
proski
Message:

Fix compatibility with kernels 2.6.0, 2.6.1, 2.6.2, 2.6.11 and 2.6.35

References: r4130, r4131, r4132

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • madwifi/branches/madwifi-0.9.4/include/compat.h

    r4103 r4133  
    6666#endif 
    6767 
     68#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,34) 
     69#define netdev_for_each_mc_addr(mclist, dev) \ 
     70        for (mclist = dev->mc_list; mclist; mclist = mclist->next) 
     71#endif 
     72 
     73#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35) 
     74#define ath_netdev_hw_addr dev_mc_list 
     75#define ath_ha_addr(ha) ha->dmi_addr 
     76#else 
     77#define ath_netdev_hw_addr netdev_hw_addr 
     78#define ath_ha_addr(ha) ha->addr 
     79#endif 
     80 
    6881/* 
    6982 * BSD/Linux compatibility shims.  These are used mainly to 
     
    154167#endif 
    155168 
    156 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,27) 
     169#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,27)) || \ 
     170    ((LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) && \ 
     171     ((LINUX_VERSION_CODE < KERNEL_VERSION(2,6,3)))) 
    157172#define netdev_priv(_netdev) ((_netdev)->priv) 
    158173#endif