diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2006-07-24 07:10:13 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2006-07-24 07:10:13 +0000 |
commit | 97212085d92332626ba710eba31a171bc0d38a37 (patch) | |
tree | 53668d63f513188b09c2181c4795ce9f7e80653a | |
parent | 27335d91b487bca2a004f3541bbe402ba3f68faf (diff) |
fix broadcom-wl patchtable
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4247 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | package/broadcom-wl/Makefile | 2 | ||||
-rw-r--r-- | package/broadcom-wl/src/kmod/Makefile | 9 | ||||
-rw-r--r-- | package/broadcom-wl/src/wlc/wlc.c | 9 |
3 files changed, 7 insertions, 13 deletions
diff --git a/package/broadcom-wl/Makefile b/package/broadcom-wl/Makefile index e6f322f4c..068979a2e 100644 --- a/package/broadcom-wl/Makefile +++ b/package/broadcom-wl/Makefile @@ -96,7 +96,7 @@ define wl_template install -d -m0755 $(1)/etc/modules.d echo "wl$(2)" > $(1)/etc/modules.d/20-wl$(2) install -d -m0755 $(1)/lib/modules/$(LINUX_VERSION) - install -m0644 $(PKG_BUILD_DIR)/kmod/wl$(2).o $(1)/lib/modules/$(LINUX_VERSION)/ + install -m0644 $(PKG_BUILD_DIR)/kmod/wl$(2).o $(PKG_BUILD_DIR)/kmod/wl$(2).o.patch $(1)/lib/modules/$(LINUX_VERSION)/ endef define Package/kmod-brcm-wl/install diff --git a/package/broadcom-wl/src/kmod/Makefile b/package/broadcom-wl/src/kmod/Makefile index 9a7cb8981..ec33d8b67 100644 --- a/package/broadcom-wl/src/kmod/Makefile +++ b/package/broadcom-wl/src/kmod/Makefile @@ -13,7 +13,7 @@ EXTRA_CFLAGS += -I$(TOPDIR)/arch/mips/bcm947xx/include -DBCMDRIVER -O_TARGET := wl_link$(MOD_NAME).o +O_TARGET := wl$(MOD_NAME).o obj-y := wl_mod$(MOD_NAME).o obj-y += bcmutils.o hnddma.o linux_osl.o @@ -23,10 +23,9 @@ obj-m := $(O_TARGET) wl_mod$(MOD_NAME).o: wl_apsta$(MOD_NAME).o sed -e 's,eth%d,wl%d\x00,g' < $< > $@ -wl$(MOD_NAME).o: wl_link$(MOD_NAME).o - $(OBJDUMP) -d $< | perl patchtable.pl > patchtable.bin - cat wl_link$(MOD_NAME).o patchtable.bin > $@ +wl$(MOD_NAME).o.patch: wl$(MOD_NAME).o + $(OBJDUMP) -d $< | perl patchtable.pl > $@ -modules: wl$(MOD_NAME).o +modules: wl$(MOD_NAME).o.patch include $(TOPDIR)/Rules.make diff --git a/package/broadcom-wl/src/wlc/wlc.c b/package/broadcom-wl/src/wlc/wlc.c index 99237c095..76096df5c 100644 --- a/package/broadcom-wl/src/wlc/wlc.c +++ b/package/broadcom-wl/src/wlc/wlc.c @@ -128,7 +128,7 @@ static int ptable_init(void) if (ptable[0] == PTABLE_MAGIC) return 0; - glob("/lib/modules/2.4.*/wl.o", 0, NULL, &globbuf); + glob("/lib/modules/2.4.*/wl.o.patch", 0, NULL, &globbuf); if (globbuf.gl_pathv[0] == NULL) return -1; @@ -139,13 +139,8 @@ static int ptable_init(void) if (fstat(fd, &statbuf) < 0) goto failed; - if (statbuf.st_size <= 512) + if (statbuf.st_size < 512) goto failed; - - if (lseek(fd, statbuf.st_size - 512, SEEK_SET) < 0) { - perror("lseek"); - goto failed; - } if (read(fd, ptable, 512) < 512) goto failed; |