From 0d741ab4674083248a31f62a05ffbb32e443bb14 Mon Sep 17 00:00:00 2001 From: proski Date: Mon, 28 Sep 2009 23:06:53 +0000 Subject: [PATCH] Adjust for procfs changes in Linux 2.6.32 git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4099 0192ed92-7a03-0410-a25b-9323aeb14dbd --- ath/if_athvar.h | 8 +++++++- net80211/ieee80211_linux.h | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ath/if_athvar.h b/ath/if_athvar.h index 59a8110..612a4db 100644 --- a/ath/if_athvar.h +++ b/ath/if_athvar.h @@ -174,12 +174,18 @@ static inline struct net_device *_alloc_netdev(int sizeof_priv, const char *mask void __user *buffer, size_t *lenp) #define ATH_SYSCTL_PROC_DOINTVEC(ctl, write, filp, buffer, lenp, ppos) \ proc_dointvec(ctl, write, filp, buffer, lenp) -#else /* LINUX_VERSION_CODE < KERNEL_VERSION(2,6,8) */ +#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32) #define ATH_SYSCTL_DECL(f, ctl, write, filp, buffer, lenp, ppos) \ f(ctl_table *ctl, int write, struct file *filp, \ void __user *buffer, size_t *lenp, loff_t *ppos) #define ATH_SYSCTL_PROC_DOINTVEC(ctl, write, filp, buffer, lenp, ppos) \ proc_dointvec(ctl, write, filp, buffer, lenp, ppos) +#else /* Linux 2.6.32+ */ +#define ATH_SYSCTL_DECL(f, ctl, write, filp, buffer, lenp, ppos) \ + f(ctl_table *ctl, int write, \ + void __user *buffer, size_t *lenp, loff_t *ppos) +#define ATH_SYSCTL_PROC_DOINTVEC(ctl, write, filp, buffer, lenp, ppos) \ + proc_dointvec(ctl, write, buffer, lenp, ppos) #endif #define ATH_TIMEOUT 1000 diff --git a/net80211/ieee80211_linux.h b/net80211/ieee80211_linux.h index b6d5422..67aea47 100644 --- a/net80211/ieee80211_linux.h +++ b/net80211/ieee80211_linux.h @@ -595,12 +595,18 @@ static __inline unsigned long msecs_to_jiffies(const unsigned int m) void __user *buffer, size_t *lenp) #define IEEE80211_SYSCTL_PROC_DOINTVEC(ctl, write, filp, buffer, lenp, ppos) \ proc_dointvec(ctl, write, filp, buffer, lenp) -#else +#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32) #define IEEE80211_SYSCTL_DECL(f, ctl, write, filp, buffer, lenp, ppos) \ f(ctl_table *ctl, int write, struct file *filp, \ void __user *buffer, size_t *lenp, loff_t *ppos) #define IEEE80211_SYSCTL_PROC_DOINTVEC(ctl, write, filp, buffer, lenp, ppos) \ proc_dointvec(ctl, write, filp, buffer, lenp, ppos) +#else /* Linux 2.6.32+ */ +#define IEEE80211_SYSCTL_DECL(f, ctl, write, filp, buffer, lenp, ppos) \ + f(ctl_table *ctl, int write, \ + void __user *buffer, size_t *lenp, loff_t *ppos) +#define IEEE80211_SYSCTL_PROC_DOINTVEC(ctl, write, filp, buffer, lenp, ppos) \ + proc_dointvec(ctl, write, buffer, lenp, ppos) #endif void ieee80211_virtfs_latevattach(struct ieee80211vap *);