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-dfs/include/compat.h

    r4103 r4133  
    7878#endif 
    7979 
     80#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,34) 
     81#define netdev_for_each_mc_addr(mclist, dev) \ 
     82        for (mclist = dev->mc_list; mclist; mclist = mclist->next) 
     83#endif 
     84 
     85#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35) 
     86#define ath_netdev_hw_addr dev_mc_list 
     87#define ath_ha_addr(ha) ha->dmi_addr 
     88#else 
     89#define ath_netdev_hw_addr netdev_hw_addr 
     90#define ath_ha_addr(ha) ha->addr 
     91#endif 
     92 
    8093/* 
    8194 * BSD/Linux compatibility shims.  These are used mainly to 
     
    176189#endif 
    177190 
    178 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,27) 
     191#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,27)) || \ 
     192    ((LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) && \ 
     193     ((LINUX_VERSION_CODE < KERNEL_VERSION(2,6,3)))) 
    179194#define netdev_priv(_netdev) ((_netdev)->priv) 
    180195#endif