Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 165447

Summary: madwifi-ng-0.9.2.1 compile fail with kernel 2.6.20
Product: Gentoo Linux Reporter: Chris Bainbridge (RETIRED) <chrb>
Component: New packagesAssignee: Steev Klimaszewski (RETIRED) <steev>
Status: RESOLVED FIXED    
Severity: normal CC: daniel, dsd, ikelos, Sander.Sweers
Priority: High    
Version: 2006.1   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 163825    
Attachments: patch
An updated madwifi-ng-0.9.2.1-linux-2.6.20.patch

Description Chris Bainbridge (RETIRED) gentoo-dev 2007-02-05 13:53:53 UTC
* Preparing ath_hal module
make -C /usr/src/linux M=/tmp/portage/madwifi-ng-0.9.2.1/work/madwifi-0.9.2.1/ath modules
make[1]: Entering directory `/usr/src/linux-2.6.20'
  HOSTCC  /tmp/portage/madwifi-ng-0.9.2.1/work/madwifi-0.9.2.1/ath/uudecode.o
  CC [M]  /tmp/portage/madwifi-ng-0.9.2.1/work/madwifi-0.9.2.1/ath/ah_osdep.o
  CC [M]  /tmp/portage/madwifi-ng-0.9.2.1/work/madwifi-0.9.2.1/ath/if_ath.o
  CC [M]  /tmp/portage/madwifi-ng-0.9.2.1/work/madwifi-0.9.2.1/ath/if_ath_pci.o
In file included from include/asm/pci.h:6,
                 from include/linux/pci.h:736,
                 from /tmp/portage/madwifi-ng-0.9.2.1/work/madwifi-0.9.2.1/ath/if_ath_pci.h:43,
                 from /tmp/portage/madwifi-ng-0.9.2.1/work/madwifi-0.9.2.1/ath/if_ath.c:86:
include/linux/mm.h:658:1: error: "offset_in_page" redefined
In file included from /tmp/portage/madwifi-ng-0.9.2.1/work/madwifi-0.9.2.1/ath/../net80211/if_media.h:44,
                 from /tmp/portage/madwifi-ng-0.9.2.1/work/madwifi-0.9.2.1/ath/if_ath.c:66:
/tmp/portage/madwifi-ng-0.9.2.1/work/madwifi-0.9.2.1/ath/../net80211/ieee80211_linux.h:427:1: error: this is the location of the previous definition
/tmp/portage/madwifi-ng-0.9.2.1/work/madwifi-0.9.2.1/ath/if_ath.c:417:60: error: macro "INIT_WORK" passed 3 arguments, but takes just 2
/tmp/portage/madwifi-ng-0.9.2.1/work/madwifi-0.9.2.1/ath/if_ath.c: In function 'ath_attach':
/tmp/portage/madwifi-ng-0.9.2.1/work/madwifi-0.9.2.1/ath/if_ath.c:417: error: 'INIT_WORK' undeclared (first use in this function)
/tmp/portage/madwifi-ng-0.9.2.1/work/madwifi-0.9.2.1/ath/if_ath.c:417: error: (Each undeclared identifier is reported only once
/tmp/portage/madwifi-ng-0.9.2.1/work/madwifi-0.9.2.1/ath/if_ath.c:417: error: for each function it appears in.)
Comment 1 Daniel Drake (RETIRED) gentoo-dev 2007-02-05 18:39:52 UTC
Created attachment 109247 [details, diff]
patch

taken from various upstream commits
Comment 2 Chris Bainbridge (RETIRED) gentoo-dev 2007-02-05 20:55:03 UTC
I tried the attached patch, compiles ok, but runtime fails:

ath_hal: module license 'Proprietary' taints kernel.
ath_hal: 0.9.17.2 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)
wlan: 0.8.4.2 (0.9.2.1)
ath_rate_sample: 1.2 (0.9.2.1)
ath_pci: 0.9.4.5 (0.9.2.1)
ACPI: PCI Interrupt 0000:02:02.0[A] -> Link [LNKC] -> GSI 11 (level, low) -> IRQ 11
wifi%d: unable to attach hardware: '' (HAL status 4171240159)

Comment 3 Daniel Drake (RETIRED) gentoo-dev 2007-02-05 21:41:52 UTC
works for me
maybe try current madwifi-ng svn trunk?
Comment 4 Daniel Willmann 2007-02-06 05:36:48 UTC
Compilation works for me but after insmodding ath_pci i get a kernel Oops when insmodding i915 driver.

This is probably related to new workqueue API:

http://madwifi.org/changeset/1891
Comment 5 Daniel Drake (RETIRED) gentoo-dev 2007-02-06 14:35:03 UTC
Your problem is not related to that changeset, as it is included in my patch.

If you have problems, the next thing to try is to reproduce it on madwifi svn trunk.
Comment 6 Chris Bainbridge (RETIRED) gentoo-dev 2007-02-06 15:46:49 UTC
Following the thread here http://madwifi.org/ticket/1048 it looks as thought the binary call interface changed so the regparam option to gcc needs fixing as well. I'll try todays svn snapshot as well.
Comment 7 Chris Bainbridge (RETIRED) gentoo-dev 2007-02-06 16:08:55 UTC
Todays svn r2083 compiles and runs fine, so maybe it would be better to release a version bump than a backported patch.
Comment 8 Mike Auty (RETIRED) gentoo-dev 2007-02-09 22:01:20 UTC
Created attachment 109671 [details, diff]
An updated madwifi-ng-0.9.2.1-linux-2.6.20.patch

I've also been having the "unable to attach hardware" problem.  It appears this was fixed in r1890 (http://madwifi.org/changeset/1890).  Attached is an updated madwifi-ng-0.9.2.1-linux-2.6.20.patch which features this extra fix, and seems to solve the problem...
Comment 9 Mike Auty (RETIRED) gentoo-dev 2007-02-10 00:50:16 UTC
Ok, I just pushed this to the tree, please give it a couple of hours and then try re-emerging madwifi-ng.  If you're still experiencing the "unable to attach hardware" problem, feel free to reopen the bug...  5:)