Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
can't compile linux-wlan-ng-modules on kernel 2.6.24 [solved
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
jerry arns
Tux's lil' helper
Tux's lil' helper


Joined: 13 Dec 2003
Posts: 95
Location: France

PostPosted: Sun Aug 17, 2008 2:21 am    Post subject: can't compile linux-wlan-ng-modules on kernel 2.6.24 [solved Reply with quote

When trying to compile linux-wlan-ng-modules against kernel 2.6.24, I have the following error:

Code:

/var/tmp/portage/net-wireless/linux-wlan-ng-modules-0.2.8-r1/work/linux-wlan-ng-0.2.8/src/p80211/p80211wext.c:451:2: attention : #warning "get rid of p2mib here"
/var/tmp/portage/net-wireless/linux-wlan-ng-modules-0.2.8-r1/work/linux-wlan-ng-0.2.8/src/p80211/p80211netdev.c: In function ‘p80211netdev_startup’:
/var/tmp/portage/net-wireless/linux-wlan-ng-modules-0.2.8-r1/work/linux-wlan-ng-0.2.8/src/p80211/p80211netdev.c:170: erreur: ‘proc_net’ undeclared (first use in this function)
/var/tmp/portage/net-wireless/linux-wlan-ng-modules-0.2.8-r1/work/linux-wlan-ng-0.2.8/src/p80211/p80211netdev.c:170: erreur: (Each undeclared identifier is reported only once
/var/tmp/portage/net-wireless/linux-wlan-ng-modules-0.2.8-r1/work/linux-wlan-ng-0.2.8/src/p80211/p80211netdev.c:170: erreur: for each function it appears in.)
/var/tmp/portage/net-wireless/linux-wlan-ng-modules-0.2.8-r1/work/linux-wlan-ng-0.2.8/src/p80211/p80211netdev.c: In function ‘p80211netdev_shutdown’:
/var/tmp/portage/net-wireless/linux-wlan-ng-modules-0.2.8-r1/work/linux-wlan-ng-0.2.8/src/p80211/p80211netdev.c:199: erreur: ‘proc_net’ undeclared (first use in this function)
make[2]: *** [/var/tmp/portage/net-wireless/linux-wlan-ng-modules-0.2.8-r1/work/linux-wlan-ng-0.2.8/src/p80211/p80211netdev.o] Erreur 1
make[2]: *** Attente des tâches non terminées....
make[1]: *** [_module_/var/tmp/portage/net-wireless/linux-wlan-ng-modules-0.2.8-r1/work/linux-wlan-ng-0.2.8/src/p80211] Erreur 2
make[1]: quittant le répertoire « /usr/src/linux-2.6.24-gentoo-r3 »
make: *** [default] Erreur 2
 *
 * ERROR: net-wireless/linux-wlan-ng-modules-0.2.8-r1 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 3174:  Called linux-mod_src_compile
 *             environment, line 2435:  Called die
 * The specific snippet of code:
 *               eval "emake HOSTCC=\"$(tc-getBUILD_CC)\"                                   CC=\"$(get-KERNEL_CC)\"                                          LDFLAGS=\"$(get_abi_LDFLAGS)\"                                               ${BUILD_FIXES}                              ${BUILD_PARAMS}                                          ${BUILD_TARGETS} " || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CC="$(get-KERNEL_CC)" LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}";
 *  The die message:
 *   Unable to emake HOSTCC=powerpc-unknown-linux-gnu-gcc CC=powerpc-unknown-linux-gnu-gcc LDFLAGS=  TOUT=/var/tmp/portage/net-wireless/linux-wlan-ng-modules-0.2.8-r1/temp/.tmp_gas_check WLAN_SRC=/var/tmp/portage/net-wireless/linux-wlan-ng-modules-0.2.8-r1/work/linux-wlan-ng-0.2.8/src default
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/log/portage/net-wireless:linux-wlan-ng-modules-0.2.8-r1:20080817-020759.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-wireless/linux-wlan-ng-modules-0.2.8-r1/temp/environment'.
 *


Googling around, it seems that this missing function (proc_net) is exported differently since 2.6.22.

People had issues compiling the CISCO VPN, the madwifi drivers... all this was fixed by patches.

Is there a patch available for linux-wlan-ng-modules ?
_________________
Left handed, right minded.


Last edited by jerry arns on Wed Sep 03, 2008 5:21 am; edited 1 time in total
Back to top
View user's profile Send private message
Jointy
Tux's lil' helper
Tux's lil' helper


Joined: 23 Dec 2005
Posts: 142
Location: Saarbrücken

PostPosted: Sun Aug 17, 2008 7:50 pm    Post subject: Reply with quote

hi,

can you try this patch here:

Code:

Index: src/p80211/p80211netdev.c
===================================================================
--- src/p80211/p80211netdev.c   (revision 1840)
+++ src/p80211/p80211netdev.c   (working copy)
@@ -83,6 +83,11 @@
 #include <net/iw_handler.h>
 #endif
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) )
+#include <net/net_namespace.h>
+#define proc_net init_net.proc_net
+#endif
+
 /*================================================================*/
 /* Project Includes */
 
@@ -938,7 +943,11 @@
       dev->wireless_handlers = &p80211wext_handler_def;
 #endif
 #endif
-         
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) )
+      dev->nd_net = &init_net;
+#endif
+
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,38) )
       dev->tbusy = 1;
       dev->start = 0;
Index: src/prism2/driver/prism2_plx.c
===================================================================
--- src/prism2/driver/prism2_plx.c   (revision 1840)
+++ src/prism2/driver/prism2_plx.c   (working copy)
@@ -228,7 +228,9 @@
    /* Register the wlandev, this gets us a name and registers the
     * linux netdevice.
     */
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
    SET_MODULE_OWNER(wlandev->netdev);
+#endif
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
        SET_NETDEV_DEV(wlandev->netdev, &(pdev->dev));
 #endif
Index: src/prism2/driver/prism2_cs.c
===================================================================
--- src/prism2/driver/prism2_cs.c   (revision 1840)
+++ src/prism2/driver/prism2_cs.c   (working copy)
@@ -517,7 +517,9 @@
 #endif
 
    /* Register the network device and get assigned a name */
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
    SET_MODULE_OWNER(wlandev->netdev);
+#endif
    SET_NETDEV_DEV(wlandev->netdev,  &handle_to_dev(pdev));
    if (register_wlandev(wlandev) != 0) {
       WLAN_LOG_NOTICE("prism2sta_cs: register_wlandev() failed.\n");
@@ -1080,7 +1082,9 @@
    link->dev = &hw->node;
 
    /* Register the network device and get assigned a name */
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
    SET_MODULE_OWNER(wlandev->netdev);
+#endif
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11) )
    SET_NETDEV_DEV(wlandev->netdev,  &handle_to_dev(link->handle));
 #endif
Index: src/prism2/driver/prism2_usb.c
===================================================================
--- src/prism2/driver/prism2_usb.c   (revision 1840)
+++ src/prism2/driver/prism2_usb.c   (working copy)
@@ -132,7 +132,9 @@
    /* Register the wlandev, this gets us a name and registers the
     * linux netdevice.
     */
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
    SET_MODULE_OWNER(wlandev->netdev);
+#endif
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
    SET_NETDEV_DEV(wlandev->netdev, &(interface->dev));
 #endif
Index: src/prism2/driver/prism2_pci.c
===================================================================
--- src/prism2/driver/prism2_pci.c   (revision 1840)
+++ src/prism2/driver/prism2_pci.c   (working copy)
@@ -119,7 +119,9 @@
    /* Register the wlandev, this gets us a name and registers the
     * linux netdevice.
     */
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
    SET_MODULE_OWNER(wlandev->netdev);
+#endif
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
        SET_NETDEV_DEV(wlandev->netdev, &(pdev->dev));
 #endif

_________________
[Host: Arko]
ASUS G1S
http://gentoo-wiki.com/HARDWARE_Asus_G1S
[Host: Pandora]
PIII 1Ghz (133) / 512MB
1x40GB & 60GB (mdRAID1)
Hardened Stage 1 Server
[Host: Plato]
verkauft (OpenSuse 11.0)
Back to top
View user's profile Send private message
jerry arns
Tux's lil' helper
Tux's lil' helper


Joined: 13 Dec 2003
Posts: 95
Location: France

PostPosted: Wed Sep 03, 2008 5:20 am    Post subject: Reply with quote

Thanks, that made the trick, the package now compiles.

I had to build my own patch as yours failed when applied:

Code:

diff -u src/prism2/driver/prism2_cs.c src2/prism2/driver/prism2_cs.c
--- src/prism2/driver/prism2_cs.c       2007-03-19 08:37:00.000000000 -0700
+++ src2/prism2/driver/prism2_cs.c      2008-09-02 22:06:31.000000000 -0700
@@ -517,7 +517,9 @@
 #endif

        /* Register the network device and get assigned a name */
-       SET_MODULE_OWNER(wlandev->netdev);
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
+    SET_MODULE_OWNER(wlandev->netdev);
+#endif
        SET_NETDEV_DEV(wlandev->netdev,  &handle_to_dev(pdev));
        if (register_wlandev(wlandev) != 0) {
                WLAN_LOG_NOTICE("prism2sta_cs: register_wlandev() failed.\n");
@@ -1080,7 +1082,9 @@
        link->dev = &hw->node;

        /* Register the network device and get assigned a name */
-       SET_MODULE_OWNER(wlandev->netdev);
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
+    SET_MODULE_OWNER(wlandev->netdev);
+#endif
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11) )
        SET_NETDEV_DEV(wlandev->netdev,  &handle_to_dev(link->handle));
 #endif
diff -u src/prism2/driver/prism2_pci.c src2/prism2/driver/prism2_pci.c
--- src/prism2/driver/prism2_pci.c      2008-09-02 22:00:00.000000000 -0700
+++ src2/prism2/driver/prism2_pci.c     2008-09-02 22:07:55.000000000 -0700
@@ -119,7 +119,9 @@
        /* Register the wlandev, this gets us a name and registers the
         * linux netdevice.
         */
-       SET_MODULE_OWNER(wlandev->netdev);
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
+    SET_MODULE_OWNER(wlandev->netdev);
+#endif
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
        SET_NETDEV_DEV(wlandev->netdev, &(pdev->dev));
 #endif
diff -u src/prism2/driver/prism2_plx.c src2/prism2/driver/prism2_plx.c
--- src/prism2/driver/prism2_plx.c      2008-09-02 22:00:00.000000000 -0700
+++ src2/prism2/driver/prism2_plx.c     2008-09-02 22:04:47.000000000 -0700
@@ -228,7 +228,9 @@
        /* Register the wlandev, this gets us a name and registers the
         * linux netdevice.
         */
-       SET_MODULE_OWNER(wlandev->netdev);
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
+    SET_MODULE_OWNER(wlandev->netdev);
+#endif
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
        SET_NETDEV_DEV(wlandev->netdev, &(pdev->dev));
 #endif
diff -u src/prism2/driver/prism2_usb.c src2/prism2/driver/prism2_usb.c
--- src/prism2/driver/prism2_usb.c      2007-03-19 08:37:00.000000000 -0700
+++ src2/prism2/driver/prism2_usb.c     2008-09-02 22:07:17.000000000 -0700
@@ -131,7 +131,9 @@
        /* Register the wlandev, this gets us a name and registers the
         * linux netdevice.
         */
-       SET_MODULE_OWNER(wlandev->netdev);
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
+    SET_MODULE_OWNER(wlandev->netdev);
+#endif
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
        SET_NETDEV_DEV(wlandev->netdev, &(interface->dev));
 #endif
diff -u src/p80211/p80211netdev.c src2/p80211/p80211netdev.c
--- src/p80211/p80211netdev.c   2008-09-02 22:00:00.000000000 -0700
+++ src2/p80211/p80211netdev.c  2008-09-02 22:03:06.000000000 -0700
@@ -83,6 +83,10 @@
 #include <net/iw_handler.h>
 #endif

+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) )
+#include <net/net_namespace.h>
+#define proc_net init_net.proc_net
+#endif
 /*================================================================*/
 /* Project Includes */

@@ -937,7 +941,11 @@
                dev->wireless_handlers = &p80211wext_handler_def;
 #endif
 #endif
-
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) )
+      dev->nd_net = &init_net;
+#endif
+
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,38) )
                dev->tbusy = 1;
                dev->start = 0;


Have you consider submitting the patch to the ebuild maintainer ?

I now have test the wireless.
Thanks again
_________________
Left handed, right minded.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum