#1956: madwifi-0.9.4 compilation problem for new RHEL5.2 kernel, 2.6.18-92.el5
----------------------------------+-----------------------------------------
      Reporter:  [EMAIL PROTECTED]    |       Owner:        
          Type:  defect           |      Status:  new   
      Priority:  major            |   Milestone:        
     Component:  madwifi: driver  |     Version:  v0.9.4
    Resolution:                   |    Keywords:        
Patch_attached:  0                |  
----------------------------------+-----------------------------------------
Old description:

> Hi,
>
> I just upgraded my laptop to RHEL5.2, kernel 2.6.18-92.el5, yesterday,
> and then got the newest madwifi version, 0.9.4, since 0.9.3 wouldn't
> compile anymore, but 0.9.4 doesn't, either.
> I got the following error:
>
> -----
> [EMAIL PROTECTED] current]# make
> Checking requirements... ok.
> Checking kernel configuration... ok.
> make -C /lib/modules/2.6.18-92.el5/build
> SUBDIRS=/home/local/rpm/wireless/enterasys/madwifi-0.9.4 modules
> make[1]: Entering directory `/usr/src/kernels/2.6.18-92.el5-i686'
>   CC [M]  /home/local/rpm/wireless/enterasys/madwifi-0.9.4/ath/if_ath.o
> In file included from <command line>:1:
> /home/local/rpm/wireless/enterasys/madwifi-0.9.4/ath/../include/compat.h:140:
> error: redefinition of 'skb_end_pointer'
> include/linux/skbuff.h:417: error: previous definition of
> 'skb_end_pointer' was here
> /home/local/rpm/wireless/enterasys/madwifi-0.9.4/ath/../include/compat.h:145:
> error: redefinition of 'skb_tail_pointer'
> include/linux/skbuff.h:835: error: previous definition of
> 'skb_tail_pointer' was here
> /home/local/rpm/wireless/enterasys/madwifi-0.9.4/ath/../include/compat.h:150:
> error: redefinition of 'skb_set_network_header'
> include/linux/skbuff.h:1021: error: previous definition of
> 'skb_set_network_header' was here
> /home/local/rpm/wireless/enterasys/madwifi-0.9.4/ath/../include/compat.h:155:
> error: redefinition of 'skb_reset_network_header'
> include/linux/skbuff.h:1016: error: previous definition of
> 'skb_reset_network_header' was here
> /home/local/rpm/wireless/enterasys/madwifi-0.9.4/ath/../include/compat.h:160:
> error: redefinition of 'skb_mac_header'
> include/linux/skbuff.h:1036: error: previous definition of
> 'skb_mac_header' was here
> /home/local/rpm/wireless/enterasys/madwifi-0.9.4/ath/../include/compat.h:165:
> error: redefinition of 'skb_reset_mac_header'
> include/linux/skbuff.h:1046: error: previous definition of
> 'skb_reset_mac_header' was here
> make[3]: ***
> [/home/local/rpm/wireless/enterasys/madwifi-0.9.4/ath/if_ath.o] Error 1
> make[2]: *** [/home/local/rpm/wireless/enterasys/madwifi-0.9.4/ath] Error
> 2
> make[1]: *** [_module_/home/local/rpm/wireless/enterasys/madwifi-0.9.4]
> Error 2
> make[1]: Leaving directory `/usr/src/kernels/2.6.18-92.el5-i686'
> make: *** [modules] Error 2
> -----
>
> I managed to "fix" it -- well, get it to compile -- by removing the
> KERNEL_VERSION(2,6,22) section from include/compat.h (see below), since
> that's where the errors seem to come from.
>
> Not sure why that was necessary, since this is still kernel 2.6.18, but I
> was just glad it worked, and I'll leave the proper fix to you. :)
>
> Thanks a lot for a great driver,
>
>    Horst Severini
>
> -----
> #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
> #include <linux/skbuff.h>
> static inline unsigned char *skb_end_pointer(const struct sk_buff *skb)
> {
>         return skb->end;
> }
>
> static inline unsigned char *skb_tail_pointer(const struct sk_buff *skb)
> {
>         return skb->tail;
> }
>
> static inline void skb_set_network_header(struct sk_buff *skb, const int
> offset)
> {
>         skb->nh.raw = skb->data + offset;
> }
>
> static inline void skb_reset_network_header(struct sk_buff *skb)
> {
>         skb->nh.raw = skb->data;
> }
>
> static inline unsigned char *skb_mac_header(const struct sk_buff *skb)
> {
>         return skb->mac.raw;
> }
>
> static inline void skb_reset_mac_header(struct sk_buff *skb)
> {
>         skb->mac.raw = skb->data;
> }
> #endif

New description:

 Hi,

 I just upgraded my laptop to RHEL5.2, kernel 2.6.18-92.el5, yesterday, and
 then got the newest madwifi version, 0.9.4, since 0.9.3 wouldn't compile
 anymore, but 0.9.4 doesn't, either.
 I got the following error:

 {{{
 [EMAIL PROTECTED] current]# make
 Checking requirements... ok.
 Checking kernel configuration... ok.
 make -C /lib/modules/2.6.18-92.el5/build
 SUBDIRS=/home/local/rpm/wireless/enterasys/madwifi-0.9.4 modules
 make[1]: Entering directory `/usr/src/kernels/2.6.18-92.el5-i686'
   CC [M]  /home/local/rpm/wireless/enterasys/madwifi-0.9.4/ath/if_ath.o
 In file included from <command line>:1:
 /home/local/rpm/wireless/enterasys/madwifi-0.9.4/ath/../include/compat.h:140:
 error: redefinition of 'skb_end_pointer'
 include/linux/skbuff.h:417: error: previous definition of
 'skb_end_pointer' was here
 /home/local/rpm/wireless/enterasys/madwifi-0.9.4/ath/../include/compat.h:145:
 error: redefinition of 'skb_tail_pointer'
 include/linux/skbuff.h:835: error: previous definition of
 'skb_tail_pointer' was here
 /home/local/rpm/wireless/enterasys/madwifi-0.9.4/ath/../include/compat.h:150:
 error: redefinition of 'skb_set_network_header'
 include/linux/skbuff.h:1021: error: previous definition of
 'skb_set_network_header' was here
 /home/local/rpm/wireless/enterasys/madwifi-0.9.4/ath/../include/compat.h:155:
 error: redefinition of 'skb_reset_network_header'
 include/linux/skbuff.h:1016: error: previous definition of
 'skb_reset_network_header' was here
 /home/local/rpm/wireless/enterasys/madwifi-0.9.4/ath/../include/compat.h:160:
 error: redefinition of 'skb_mac_header'
 include/linux/skbuff.h:1036: error: previous definition of
 'skb_mac_header' was here
 /home/local/rpm/wireless/enterasys/madwifi-0.9.4/ath/../include/compat.h:165:
 error: redefinition of 'skb_reset_mac_header'
 include/linux/skbuff.h:1046: error: previous definition of
 'skb_reset_mac_header' was here
 make[3]: ***
 [/home/local/rpm/wireless/enterasys/madwifi-0.9.4/ath/if_ath.o] Error 1
 make[2]: *** [/home/local/rpm/wireless/enterasys/madwifi-0.9.4/ath] Error
 2
 make[1]: *** [_module_/home/local/rpm/wireless/enterasys/madwifi-0.9.4]
 Error 2
 make[1]: Leaving directory `/usr/src/kernels/2.6.18-92.el5-i686'
 make: *** [modules] Error 2
 }}}

 I managed to "fix" it -- well, get it to compile -- by removing the
 KERNEL_VERSION(2,6,22) section from include/compat.h (see below), since
 that's where the errors seem to come from.

 Not sure why that was necessary, since this is still kernel 2.6.18, but I
 was just glad it worked, and I'll leave the proper fix to you. :)

 Thanks a lot for a great driver,

    Horst Severini

 {{{
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
 #include <linux/skbuff.h>
 static inline unsigned char *skb_end_pointer(const struct sk_buff *skb)
 {
         return skb->end;
 }

 static inline unsigned char *skb_tail_pointer(const struct sk_buff *skb)
 {
         return skb->tail;
 }

 static inline void skb_set_network_header(struct sk_buff *skb, const int
 offset)
 {
         skb->nh.raw = skb->data + offset;
 }

 static inline void skb_reset_network_header(struct sk_buff *skb)
 {
         skb->nh.raw = skb->data;
 }

 static inline unsigned char *skb_mac_header(const struct sk_buff *skb)
 {
         return skb->mac.raw;
 }

 static inline void skb_reset_mac_header(struct sk_buff *skb)
 {
         skb->mac.raw = skb->data;
 }
 #endif
 }}}

-- 
Ticket URL: <https://madwifi.org/ticket/1956#comment:1>
madwifi.org <http://madwifi.org/>
Multiband Atheros Driver for Wireless Fidelity
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Madwifi-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/madwifi-tickets

Reply via email to