On Wed, 2007-02-28 at 17:21 +0000, Robin Cornelius wrote: > d80211 and cfg80211 will compile against a 2.6.20 kernel (i believe > 2.6.18 or better will do). I just got cfg80211 to compile against 2.6.19 on my brothers laptop. With James's changes to build mac80211 against older kernels, this should enable us to actually build the current code against older kernels. There will currently be two restrictions: * no nl80211 * no wiphy renaming The second isn't a problem at all, users just have a bit less convenience then. The first will become more and more of a problem as mac80211 will migrate towards cfg80211, but since it hasn't yet this will allow us some time. To build, I used this sed script first: sed 's/\([a-z0-9_]*\)->ieee80211_ptr/((struct wireless_dev*)(\1->ax25_ptr))/' -i *.c to fix the ieee80211_ptr thing (using ax25_ptr as James did), and then applied the attached patch. Then I built the whole thing with the attached Makefile and loaded the module. I couldn't really test it since I don't have mac80211 building against that right now. johannes
Index: cfg80211/core.c =================================================================== --- cfg80211.orig/core.c 2007-02-28 20:40:40.698908791 +0100 +++ cfg80211/core.c 2007-02-28 20:42:07.624908791 +0100 @@ -146,6 +146,8 @@ { int idx, taken = -1, result; + return -EOPNOTSUPP; + /* prohibit calling the thing phy%d when %d is not its number */ sscanf(newname, PHY_NAME "%n", &idx, &taken); if (taken == strlen(newname) && idx != rdev->idx) @@ -281,7 +283,7 @@ case NETDEV_REGISTER: mutex_lock(&rdev->devlist_mtx); list_add(&((struct wireless_dev*)(dev->ax25_ptr))->list, &rdev->netdev_list); - if (sysfs_create_link(&dev->dev.kobj, &rdev->wiphy.dev.kobj, + if (sysfs_create_link(&dev->class_dev.kobj, &rdev->wiphy.dev.kobj, "phy80211")) { printk(KERN_ERR "wireless: failed to add phy80211 symlink to netdev!\n"); } @@ -290,7 +292,7 @@ break; case NETDEV_UNREGISTER: mutex_lock(&rdev->devlist_mtx); - sysfs_remove_link(&dev->dev.kobj, "phy80211"); + sysfs_remove_link(&dev->class_dev.kobj, "phy80211"); list_del(&((struct wireless_dev*)(dev->ax25_ptr))->list); mutex_unlock(&rdev->devlist_mtx); break;
KVER := $(shell uname -r) KDIR ?= /lib/modules/$(KVER)/build MODPATH := $(DESTDIR)/lib/modules/$(KVER)/kernel/net/wireless/ ifneq ($(KERNELRELEASE),) CONFIG_CFG80211=m CFLAGS+=-I $(PWD) '-Dieee80211_ptr=ax25_ptr' obj-$(CONFIG_CFG80211) += cfg80211.o cfg80211-y += core.o sysfs.o else PWD := $(shell pwd) module: $(MAKE) -C $(KDIR) M=$(PWD) modules endif
Attachment:
signature.asc
Description: This is a digitally signed message part