Update of /cvsroot/madwifi/madwifi/ath
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16505/ath
Modified Files:
if_ath.c if_athvar.h
Log Message:
Add portability shims for syctl handlers to deal with 2.6.8 changing the api.
Submitted by: Volker Gropp
Index: if_ath.c
===================================================================
RCS file: /cvsroot/madwifi/madwifi/ath/if_ath.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** if_ath.c 22 Sep 2004 20:21:32 -0000 1.19
--- if_ath.c 24 Sep 2004 16:45:53 -0000 1.20
***************
*** 4296,4301 ****
static int
! ath_sysctl_halparam(ctl_table *ctl, int write, struct file *filp,
! void *buffer, size_t *lenp)
{
struct ath_softc *sc = ctl->extra1;
--- 4296,4300 ----
static int
! ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl, write, filp, buffer, lenp, ppos)
{
struct ath_softc *sc = ctl->extra1;
***************
*** 4307,4311 ****
ctl->maxlen = sizeof(val);
if (write) {
! ret = proc_dointvec(ctl, write, filp, buffer, lenp);
if (ret == 0) {
switch (ctl->ctl_name) {
--- 4306,4311 ----
ctl->maxlen = sizeof(val);
if (write) {
! ret = ATH_SYSCTL_PROC_DOINTVEC(ctl, write, filp, buffer,
! lenp, ppos);
if (ret == 0) {
switch (ctl->ctl_name) {
***************
*** 4377,4381 ****
return -EINVAL;
}
! ret = proc_dointvec(ctl, write, filp, buffer, lenp);
}
return ret;
--- 4377,4382 ----
return -EINVAL;
}
! ret = ATH_SYSCTL_PROC_DOINTVEC(ctl, write, filp, buffer,
! lenp, ppos);
}
return ret;
Index: if_athvar.h
===================================================================
RCS file: /cvsroot/madwifi/madwifi/ath/if_athvar.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** if_athvar.h 22 Sep 2004 20:12:49 -0000 1.11
--- if_athvar.h 24 Sep 2004 16:45:53 -0000 1.12
***************
*** 91,94 ****
--- 91,111 ----
#endif
+ /*
+ * Deal with the sysctl handler api changing.
+ */
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,8)
+ #define ATH_SYSCTL_DECL(f, ctl, write, filp, buffer, lenp, ppos) \
+ f(ctl_table *ctl, int write, struct file *filp, void *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) */
+ #define ATH_SYSCTL_DECL(f, ctl, write, filp, buffer, lenp, ppos) \
+ f(ctl_table *ctl, int write, struct file *filp, void *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)
+ #endif
+
#define ATH_TIMEOUT 1000
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
|