Please note: This project is no longer active. The website is kept online for historic purposes only.
If you´re looking for a Linux driver for your Atheros WLAN device, you should continue here .

Ticket #1315 (closed defect: fixed)

Opened 12 years ago

Last modified 10 years ago

[patch] make madwifi compile with 2.6.22-rc1

Reported by: GrimRC Assigned to:
Priority: major Milestone: version 0.9.4
Component: madwifi: driver Version: v0.9.3
Keywords: 2.6.22 2.6.22-rc1 madwifi-ng 0.9.3 Cc:
Patch is attached: 1 Pending: 0

Description

madwifi-ng 0.9.3 (actually -r3 on Gentoo) not compiling with Linux 2.6.22-rc1 seems to be a known problem, but I can't find a ticket about it. The patch in ticket #1308 fixes one problem, and is included, but this patch also contains some other minor changes, as a struct has changed between 2.6.21 and 2.6.22-rc1.

A good way to pick up the important kernel changes when madwifi is breaking somewhere is to grep patch-2.6.22-rc1 (from kernel.org) for the offending struct, if you happen to update your kernels by patching.

Attachments

madwifi-0.9.3_Linux-2.6.22-rc1.diff (3.6 kB) - added by GrimRC on 05/15/07 17:13:54.
patch to make madwifi 0.9.3 work with Linux 2.6.22-rc1
Madwifi-fixes.patch (0.7 kB) - added by NigelCunningham <nigel@nigel.suspend2.net> on 05/16/07 07:01:38.
Kconfig patch for Madwifi svn 2343.
141-Madwifi-fixes.patch (5.8 kB) - added by NigelCunningham <nigel@nigel.suspend2.net> on 05/18/07 03:59:47.
Patch I used to get Madwifi working with 2.6.22-rc1.
madwifi-compat-0.9.3-2.6.22.patch (5.7 kB) - added by kelmo on 07/15/07 12:30:14.
proposed update for 0.9.3.2

Change History

05/15/07 17:13:54 changed by GrimRC

  • attachment madwifi-0.9.3_Linux-2.6.22-rc1.diff added.

patch to make madwifi 0.9.3 work with Linux 2.6.22-rc1

05/15/07 17:18:00 changed by GrimRC

I forgot to sign-off the patch!

Signed-off-by: GrimRC (Eugene St Leger) <grimrc@yahoo.com>

05/15/07 22:49:47 changed by mentor

  • status changed from new to closed.
  • resolution set to fixed.
  • milestone set to version 0.9.4.

(follow-up: ↓ 5 ) 05/16/07 07:00:24 changed by NigelCunningham <nigel@nigel.suspend2.net>

Well, it does compile, but only because Madwifi gets disabled. I'll attach a patch fixing the Kconfig file, and a log of what still needs doing (not sure how to fix it myself).

Nigel

05/16/07 07:01:38 changed by NigelCunningham <nigel@nigel.suspend2.net>

  • attachment Madwifi-fixes.patch added.

Kconfig patch for Madwifi svn 2343.

05/16/07 07:08:49 changed by NigelCunningham <nigel@nigel.suspend2.net>

After the attached fix and mangling the tests for the version being >= 2.6.22 to be >= 2.6.21 so that they're used for 2.6.22-rc1, I still get the following compilation error (and maybe more I can't see yet)...

Regards,

Nigel

drivers/net/wireless/madwifi/net80211/ieee80211_input.c: In function 'ieee80211_defrag': drivers/net/wireless/madwifi/net80211/ieee80211_input.c:1050: error: invalid operands to binary - drivers/net/wireless/madwifi/net80211/ieee80211_input.c:1054: error: invalid operands to binary - drivers/net/wireless/madwifi/net80211/ieee80211_input.c:1068: warning: passing argument 1 of 'memcpy' makes pointer from integer without a cast drivers/net/wireless/madwifi/net80211/ieee80211_input.c:1068: warning: passing argument 1 of 'builtin_memcpy' makes pointer from integer without a cast drivers/net/wireless/madwifi/net80211/ieee80211_input.c: In function 'ieee80211_deliver_data': drivers/net/wireless/madwifi/net80211/ieee80211_input.c:1140: warning: assignment makes integer from pointer without a cast drivers/net/wireless/madwifi/net80211/ieee80211_input.c:1141: warning: assignment makes integer from pointer without a cast drivers/net/wireless/madwifi/net80211/ieee80211_input.c: In function 'forward_mgmt_to_app': drivers/net/wireless/madwifi/net80211/ieee80211_input.c:2274: warning: assignment makes integer from pointer without a cast drivers/net/wireless/madwifi/net80211/ieee80211_input.c: In function 'ieee80211_deliver_l2uf': drivers/net/wireless/madwifi/net80211/ieee80211_input.c:2558: warning: assignment makes integer from pointer without a cast drivers/net/wireless/madwifi/net80211/ieee80211_input.c: In function 'ath_eth_type_trans': drivers/net/wireless/madwifi/net80211/ieee80211_input.c:3734: warning: assignment makes integer from pointer without a cast drivers/net/wireless/madwifi/net80211/ieee80211_input.c:3747: warning: cast to pointer from integer of different size

(in reply to: ↑ 3 ) 05/16/07 10:38:07 changed by mrenzmann

  • status changed from closed to reopened.
  • resolution deleted.

Replying to NigelCunningham <nigel@nigel.suspend2.net>:

Well, it does compile, but only because Madwifi gets disabled.

Please explain that.

05/16/07 12:49:57 changed by NigelCunningham <nigel@nigel.suspend2.net>

2.6.22-rc1 removes CONFIG_NET_RADIO and adds WLAN_80211 and WLAN_PRE80211. Since Madwifi's Kconfig says it depends on NET_RADIO, there's no way to select it with current svn (the kernel compiles, but without Madwifi being compiled). That's why my patch (above) adds (NET_RADIO WLAN_80211).

Regards,

Nigel

05/16/07 13:17:07 changed by kelmo

Looks like the standalone madwifi build system will compile but a madwifi patched kernel will not.

Madwifi's Makefile check for wireless support:

	@# check wireless extensions support is enabled
	@if [ -z "$(CONFIG_NET_RADIO)$(CONFIG_WIRELESS_EXT)" ]; then \
	    echo "FAILED"; \
	    echo "Please enable wireless extensions."; \
	    exit 1; \
	fi

Madwifi's Kconfig:

config ATHEROS
	tristate "Atheros PCI/Cardbus cards"
	depends on PCI && NET_RADIO

Considering that madwifi does not currently require the mac80211 stack (WLAN_80211) perhaps the patch should be:

Index: patches/2.6/Kconfig
===================================================================
--- patches/2.6/Kconfig (revision 2343)
+++ patches/2.6/Kconfig (working copy)
@@ -3,7 +3,7 @@

 config ATHEROS
        tristate "Atheros PCI/Cardbus cards"
-       depends on PCI && NET_RADIO
+       depends on PCI && (NET_RADIO || WIRELESS_EXT)
        ---help---
          Say Y here if you intend to attach an Atheros Cardbus or PCI
          wireless Ethernet networking card to your computer.  This

05/16/07 13:20:08 changed by nbd@openwrt.org

ATHEROS shouldn't depend on PCI, there's AHB too :)

05/16/07 13:21:50 changed by kelmo

But where is your patch? ;-)

05/17/07 00:34:50 changed by mentor

Maybe:

-       depends on PCI && NET_RADIO
+       depends on PCI && (NET_RADIO || (WIRELESS_EXT && WLAN_PRE80211))

05/18/07 03:58:56 changed by NigelCunningham <nigel@nigel.suspend2.net>

Ok. The compile issues I've seen are due to using 64 bit. There's a patch in vanilla 2.6.22 that changes 64 bit architectures to use offsets. I'll attach a patch I'm using to get it working for me. You'll clearly not want to apply it as is because I've changed 2,6,22 to 2,6,21. Apart from that, though, it should be right. I'm using it right now :)

Not tested on 32 bit.

05/18/07 03:59:47 changed by NigelCunningham <nigel@nigel.suspend2.net>

  • attachment 141-Madwifi-fixes.patch added.

Patch I used to get Madwifi working with 2.6.22-rc1.

05/18/07 21:21:09 changed by mentor

OK, it looks like the patch from GrimRC is not correct (as noted by proski on -devel). So, the code is currently not correct on 2.6.22 - release_versions.

07/14/07 16:32:17 changed by anonymous

I've adapted the patch for current versions of madwifi. You can find it on usrportage.de/uploads/madwifi-hal-0.9.30.13.diff

07/15/07 12:30:14 changed by kelmo

  • attachment madwifi-compat-0.9.3-2.6.22.patch added.

proposed update for 0.9.3.2

07/15/07 12:31:13 changed by kelmo

Attached patch proposed for 0.9.3.2 release.

08/04/07 00:38:56 changed by mrenzmann

Release candidate for 0.9.3.2 is available as a tarball here.

09/22/07 08:24:02 changed by GrimRC

Hi all. I hope my patch didn't mislead anyone. It seemed to work for me on 2.6.22-rc1, when building 'standalone'. I didn't try 'Kconfig'. Maybe the interface kept changing throughout the release candidates? Or maybe I missed stuff?

I think 2.6.22-rc# where # is a number, appears like a 2.6.22 kernel to the code, even though it is not 2.6.22 (yet). I read the LINUX_VERSION_CODE and KERNEL_VERSION macros, and from *what I remember*, they don't take the rc# bit into account at all.

08/13/09 18:58:07 changed by proski

  • status changed from reopened to closed.
  • resolution set to fixed.
  • pending changed.

We are not supporting old release candidates. The issues the patches try to address have been resolved in the subversion repository.