logo       
Google Custom Search
    AddThis Social Bookmark Button

revision 2143 committed: msg#00086

Subject: revision 2143 committed
Project     : madwifi
Revision    : 2143
Author      : proski (Pavel Roskin)
Date        : 2007-02-21 07:58:37 +0100 (Wed, 21 Feb 2007)

Log Message :
Fix for sysctl API changes in Linux 2.6.21

Affected Files:
* branches/madwifi-old-openhal/ath/if_ath.c           updated             
* branches/madwifi-old-openhal/ath_rate/amrr/amrr.c   updated             
* branches/madwifi-old-openhal/ath_rate/onoe/onoe.c   updated             
* branches/madwifi-old-openhal/ath_rate/sample/sample.c  updated             
* branches/madwifi-old-openhal/include/compat.h       updated             
* branches/madwifi-old-openhal/net80211/ieee80211_linux.c  updated             


Modified: branches/madwifi-old-openhal/ath/if_ath.c
===================================================================
--- branches/madwifi-old-openhal/ath/if_ath.c   2007-02-21 06:56:49 UTC (rev 
2142)
+++ branches/madwifi-old-openhal/ath/if_ath.c   2007-02-21 06:58:37 UTC (rev 
2143)
@@ -6567,7 +6567,7 @@
                        sc->sc_sysctls[i].extra1 = sc;
 
        /* and register everything */
-       sc->sc_sysctl_header = register_sysctl_table(sc->sc_sysctls, 1);
+       sc->sc_sysctl_header = ATH_REGISTER_SYSCTL_TABLE(sc->sc_sysctls);
        if (!sc->sc_sysctl_header) {
                printk("%s: failed to register sysctls!\n", sc->sc_dev.name);
                kfree(sc->sc_sysctls);
@@ -6736,7 +6736,7 @@
 
        if (!initialized) {
                ath_sysctl_header =
-                       register_sysctl_table(ath_root_table, 1);
+                       ATH_REGISTER_SYSCTL_TABLE(ath_root_table);
                initialized = 1;
        }
 }

Modified: branches/madwifi-old-openhal/ath_rate/amrr/amrr.c
===================================================================
--- branches/madwifi-old-openhal/ath_rate/amrr/amrr.c   2007-02-21 06:56:49 UTC 
(rev 2142)
+++ branches/madwifi-old-openhal/ath_rate/amrr/amrr.c   2007-02-21 06:58:37 UTC 
(rev 2143)
@@ -584,7 +584,7 @@
 {
        printk(KERN_INFO "%s: %s\n", dev_info, version);
 
-       ath_sysctl_header = register_sysctl_table(ath_root_table, 1);
+       ath_sysctl_header = ATH_REGISTER_SYSCTL_TABLE(ath_root_table);
        return (0);
 }
 module_init(init_ath_rate_amrr);

Modified: branches/madwifi-old-openhal/ath_rate/onoe/onoe.c
===================================================================
--- branches/madwifi-old-openhal/ath_rate/onoe/onoe.c   2007-02-21 06:56:49 UTC 
(rev 2142)
+++ branches/madwifi-old-openhal/ath_rate/onoe/onoe.c   2007-02-21 06:58:37 UTC 
(rev 2143)
@@ -579,7 +579,7 @@
 {
        printk(KERN_INFO "%s: %s\n", dev_info, version);
 
-       ath_sysctl_header = register_sysctl_table(ath_root_table, 1);
+       ath_sysctl_header = ATH_REGISTER_SYSCTL_TABLE(ath_root_table);
        return (0);
 }
 module_init(init_ath_rate_onoe);

Modified: branches/madwifi-old-openhal/ath_rate/sample/sample.c
===================================================================
--- branches/madwifi-old-openhal/ath_rate/sample/sample.c       2007-02-21 
06:56:49 UTC (rev 2142)
+++ branches/madwifi-old-openhal/ath_rate/sample/sample.c       2007-02-21 
06:58:37 UTC (rev 2143)
@@ -1006,7 +1006,7 @@
                        ssc->sysctls[i].extra1 = sc;
 
        /* and register everything */
-       ssc->sysctl_header = register_sysctl_table(ssc->sysctls, 1);
+       ssc->sysctl_header = ATH_REGISTER_SYSCTL_TABLE(ssc->sysctls);
        if (!ssc->sysctl_header) {
                printk("%s: failed to register sysctls for %s!\n", dev_info, 
                       sc->sc_dev.name);
@@ -1090,7 +1090,7 @@
 {
        printk(KERN_INFO "%s: %s\n", dev_info, version);
 
-       ath_sysctl_header = register_sysctl_table(ath_root_table, 1);
+       ath_sysctl_header = ATH_REGISTER_SYSCTL_TABLE(ath_root_table);
        return (0);
 }
 module_init(init_ath_rate_sample);

Modified: branches/madwifi-old-openhal/include/compat.h
===================================================================
--- branches/madwifi-old-openhal/include/compat.h       2007-02-21 06:56:49 UTC 
(rev 2142)
+++ branches/madwifi-old-openhal/include/compat.h       2007-02-21 06:58:37 UTC 
(rev 2143)
@@ -111,4 +111,17 @@
  */
 #define        __FBSDID(_s)
 #define        __KERNEL_RCSID(_n,_s)
+
+/*
+ * Fixes for Linux API changes
+ */
+#ifdef __KERNEL__
+#include <linux/version.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,21)
+#define ATH_REGISTER_SYSCTL_TABLE(t) register_sysctl_table(t, 1)
+#else
+#define ATH_REGISTER_SYSCTL_TABLE(t) register_sysctl_table(t)
+#endif
+#endif
+
 #endif /* _ATH_COMPAT_H_ */

Modified: branches/madwifi-old-openhal/net80211/ieee80211_linux.c
===================================================================
--- branches/madwifi-old-openhal/net80211/ieee80211_linux.c     2007-02-21 
06:56:49 UTC (rev 2142)
+++ branches/madwifi-old-openhal/net80211/ieee80211_linux.c     2007-02-21 
06:58:37 UTC (rev 2143)
@@ -533,7 +533,7 @@
                        ic->ic_sysctls[i].extra1 = ic;
 
        /* and register everything */
-       ic->ic_sysctl_header = register_sysctl_table(ic->ic_sysctls, 1);
+       ic->ic_sysctl_header = ATH_REGISTER_SYSCTL_TABLE(ic->ic_sysctls);
        if (!ic->ic_sysctl_header) {
                printk("%s: failed to register sysctls!\n", ic->ic_procname);
                kfree(ic->ic_sysctls);

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV



Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>