From 7b1a175fc3451ae856834f3eb9f806dd0ae93d8e Mon Sep 17 00:00:00 2001 From: solomon Date: Mon, 26 Aug 2002 13:28:39 +0000 Subject: [PATCH] init script fixes for modprobe path. makefile shuffle. --- CHANGES | 6 +- Configure | 2 +- TODO | 9 +-- etc/rc.wlan | 2 +- src/include/wlan/wlan_compat.h | 139 ++++++++++++--------------------- src/mkmeta/Makefile | 23 ------ src/nwepgen/Makefile | 22 ------ src/prism2/download/Makefile | 14 +--- src/prism2/driver/prism2sta.c | 83 -------------------- src/wlancfg/Makefile | 26 +----- src/wlanctl/Makefile | 27 +------ src/wland/Makefile | 25 +----- 12 files changed, 59 insertions(+), 319 deletions(-) diff --git a/CHANGES b/CHANGES index 01ab0c4..5141442 100644 --- a/CHANGES +++ b/CHANGES @@ -41,8 +41,10 @@ * Intersil Corporation as part of PRISM(R) chipset product development. * * -------------------------------------------------------------------- - - Debian package stuff yanked in favor of the "official" deb packages. - - Rearranged the wireless extension support code a bit. + - Due to new hotplug code, atmel device detection removed + - Further cleanups in wlan_compat.h and non-kernel makefiles + - Debian package stuff yanked in favor of the "official" deb packages + - Rearranged the wireless extension support code a bit - A fix for the promisc/allmulti stuff on USB devices -pre4 - Hotplug support for PCI/PLX/USB widgets diff --git a/Configure b/Configure index 62c04d6..b0e8c5b 100755 --- a/Configure +++ b/Configure @@ -469,7 +469,7 @@ $ECHO "" # Make sure our target architecture is correct WLAN_TARGET_ARCH=$BUILD_ARCH -ask_str "Target Architecture? (i386, ppc, arm, or alpha)" WLAN_TARGET_ARCH +ask_str "Target Architecture? (i386/ppc/arm/alpha/hppa/mips)" WLAN_TARGET_ARCH $ECHO "" diff --git a/TODO b/TODO index 497d7a3..eb9115b 100644 --- a/TODO +++ b/TODO @@ -43,6 +43,7 @@ * -------------------------------------------------------------------- Linux WLAN NG TODO +- Restructure the makefile layout to make it a bit simpler and sane - Add a query of the ifstate. - Move all of the wireless extensions work up to p80211 so that the new MACs will get wireless extensions support for free! @@ -53,7 +54,6 @@ Linux WLAN NG TODO - [USB] Remove driver's port-reset when new primary firmware becomes available. - [USB] Look into multiple posted URBs -- [PCI] Add PCI power management support. - Figure out how to reasonably control powersave - Review changes necessary for static linking to kernel - Update MAC RID to 802.11 MIB mapping document @@ -62,13 +62,6 @@ Linux WLAN NG TODO - Perform a more effective I/O access test and an irq test at initialization time - Detect dead card and perform reset and reinitialization -- Add capability for 802.11 frames up/down the stack. -- Figure out the right way for the following OOB data to ride up and down - the stack: - - rx signal stats - - rx time - - rx/tx DCF/PCF - - rx/tx priority - Add an lnx command to query the rx signal stats: (cumlative should be a weighted average) last beacon rssi diff --git a/etc/rc.wlan b/etc/rc.wlan index d42019b..c6ad5fb 100755 --- a/etc/rc.wlan +++ b/etc/rc.wlan @@ -31,7 +31,7 @@ case "$action" in start) echo -n "Starting WLAN Devices:" - if ! modprobe p80211; then + if ! /sbin/modprobe p80211; then echo "Failed to load p80211.o." exit 1 fi diff --git a/src/include/wlan/wlan_compat.h b/src/include/wlan/wlan_compat.h index 7f336df..3fce56b 100644 --- a/src/include/wlan/wlan_compat.h +++ b/src/include/wlan/wlan_compat.h @@ -104,100 +104,56 @@ /* isn't a real PCMCIA host interface adapter providing all the */ /* card&socket services. */ - -/* LinuxPPC users! uncomment the following line to build for LinuxPPC */ -/* a header file change has created a small problem that will be fixed */ -/* in the next release. For the time being we can't automagically */ -/* detect LinuxPPC */ - -/* #define CONFIG_PPC 1 */ - - -/* Lets try to figure out what we've got. */ +/* Lets try to figure out what we've got. Kernel mode or User mode? */ #if defined(__KERNEL__) #define WLAN_OS WLAN_LINUX_KERNEL - #if defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__i686__) - #define WLAN_CPU_FAMILY WLAN_Ix86 - #define WLAN_CPU_CORE WLAN_I386CORE - #define WLAN_CPU_PART WLAN_I386PART - #define WLAN_SYSARCH WLAN_PCAT - #elif defined(CONFIG_PPC) - #define WLAN_CPU_FAMILY WLAN_PPC - #define WLAN_CPU_CORE WLAN_PPCCORE - #if defined(CONFIG_MBX) - #define WLAN_CPU_PART WLAN_MPC860 - #define WLAN_SYSARCH WLAN_MBX - #elif defined(CONFIG_RPXLITE) - #define WLAN_CPU_PART WLAN_MPC823 - #define WLAN_SYSARCH WLAN_RPX - #elif defined(CONFIG_RPXCLASSIC) - #define WLAN_CPU_PART WLAN_MPC860 - #define WLAN_SYSARCH WLAN_RPX - #else - #define WLAN_CPU_PART WLAN_PPCPART - #define WLAN_SYSARCH WLAN_PMAC - #endif - #elif defined(__arm__) - #define WLAN_CPU_FAMILY WLAN_ARM - #define WLAN_CPU_CORE WLAN_ARMCORE - #define WLAN_CPU_PART WLAN_ARM_PART - #define WLAN_SYSARCH WLAN_SKIFF - #elif defined(__WLAN_ALPHA__) - #define WLAN_CPU_FAMILY WLAN_ALPHA - #define WLAN_CPU_CORE WLAN_ALPHACORE - #define WLAN_CPU_PART WLAN_ALPHAPART - #define WLAN_SYSARCH WLAN_ALPHAARCH - #elif defined(__mips__) - #define WLAN_CPU_FAMILY WLAN_MIPS - #define WLAN_CPU_CORE WLAN_MIPSCORE - #define WLAN_CPU_PART WLAN_MIPSPART - #define WLAN_SYSARCH WLAN_MIPSARCH - #elif defined(__hppa__) - #define WLAN_CPU_FAMILY WLAN_HPPA - #define WLAN_CPU_CORE WLAN_HPPACORE - #define WLAN_CPU_PART WLAN_HPPAPART - #define WLAN_SYSARCH WLAN_HPPAARCH - #else - #error "No CPU identified!" - #endif -#else /* not in kernel mode */ +#else #define WLAN_OS WLAN_LINUX_USER - #if defined(__I386__) - #define WLAN_CPU_FAMILY WLAN_Ix86 - #define WLAN_CPU_CORE WLAN_I386CORE - #define WLAN_CPU_PART WLAN_I386PART - #define WLAN_SYSARCH WLAN_PCAT - #elif defined(__WLAN_PPC__) - #define WLAN_CPU_FAMILY WLAN_PPC - #define WLAN_CPU_CORE WLAN_PPCCORE - #if defined(CONFIG_MBX) - #define WLAN_CPU_PART WLAN_MPC860 - #define WLAN_SYSARCH WLAN_MBX - #elif defined(CONFIG_RPX) - #define WLAN_CPU_PART WLAN_MPC850 - #define WLAN_SYSARCH WLAN_RPX - #else - #define WLAN_CPU_PART WLAN_PPCPART - #define WLAN_SYSARCH WLAN_PMAC - #endif - #elif defined(__arm__) - #define WLAN_CPU_FAMILY WLAN_ARM - #define WLAN_CPU_CORE WLAN_ARMCORE - #define WLAN_CPU_PART WLAN_ARM_PART - #define WLAN_SYSARCH WLAN_SKIFF - #elif defined(__mips__) - #define WLAN_CPU_FAMILY WLAN_MIPS - #define WLAN_CPU_CORE WLAN_MIPSCORE - #define WLAN_CPU_PART WLAN_MIPSPART - #define WLAN_SYSARCH WLAN_MIPSARCH - #elif defined(__hppa__) - #define WLAN_CPU_FAMILY WLAN_HPPA - #define WLAN_CPU_CORE WLAN_HPPACORE - #define WLAN_CPU_PART WLAN_HPPAPART - #define WLAN_SYSARCH WLAN_HPPAARCH +#endif + +#if defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__i686__) + #define WLAN_CPU_FAMILY WLAN_Ix86 + #define WLAN_CPU_CORE WLAN_I386CORE + #define WLAN_CPU_PART WLAN_I386PART + #define WLAN_SYSARCH WLAN_PCAT +#elif defined(__ppc__) + #define WLAN_CPU_FAMILY WLAN_PPC + #define WLAN_CPU_CORE WLAN_PPCCORE + #if defined(CONFIG_MBX) + #define WLAN_CPU_PART WLAN_MPC860 + #define WLAN_SYSARCH WLAN_MBX + #elif defined(CONFIG_RPXLITE) + #define WLAN_CPU_PART WLAN_MPC823 + #define WLAN_SYSARCH WLAN_RPX + #elif defined(CONFIG_RPXCLASSIC) + #define WLAN_CPU_PART WLAN_MPC860 + #define WLAN_SYSARCH WLAN_RPX #else - #error "No CPU identified!" + #define WLAN_CPU_PART WLAN_PPCPART + #define WLAN_SYSARCH WLAN_PMAC #endif +#elif defined(__arm__) + #define WLAN_CPU_FAMILY WLAN_ARM + #define WLAN_CPU_CORE WLAN_ARMCORE + #define WLAN_CPU_PART WLAN_ARM_PART + #define WLAN_SYSARCH WLAN_SKIFF +#elif defined(__alpha__) + #define WLAN_CPU_FAMILY WLAN_ALPHA + #define WLAN_CPU_CORE WLAN_ALPHACORE + #define WLAN_CPU_PART WLAN_ALPHAPART + #define WLAN_SYSARCH WLAN_ALPHAARCH +#elif defined(__mips__) + #define WLAN_CPU_FAMILY WLAN_MIPS + #define WLAN_CPU_CORE WLAN_MIPSCORE + #define WLAN_CPU_PART WLAN_MIPSPART + #define WLAN_SYSARCH WLAN_MIPSARCH +#elif defined(__hppa__) + #define WLAN_CPU_FAMILY WLAN_HPPA + #define WLAN_CPU_CORE WLAN_HPPACORE + #define WLAN_CPU_PART WLAN_HPPAPART + #define WLAN_SYSARCH WLAN_HPPAARCH +#else + #error "No CPU identified!" #endif /* @@ -210,10 +166,11 @@ This may also affect PLX boards and other BE &| PPC platforms; as new ones are discovered, add them below. */ - -#if (((WLAN_SYSARCH == WLAN_PMAC) || (WLAN_SYSARCH == WLAN_SKIFF)) && (WLAN_HOSTIF == WLAN_PCI)) +#if (WLAN_HOSTIF == WLAN_PCI) +#if ((WLAN_SYSARCH == WLAN_PMAC) || (WLAN_SYSARCH == WLAN_SKIFF)) #define PCI_REVERSES_ENDIAN #endif +#endif /*=============================================================*/ /*------ Bit settings -----------------------------------------*/ diff --git a/src/mkmeta/Makefile b/src/mkmeta/Makefile index ca712e5..661cf7b 100644 --- a/src/mkmeta/Makefile +++ b/src/mkmeta/Makefile @@ -70,31 +70,8 @@ ifndef CFLAGS CFLAGS = -g -O2 -Wall -Wstrict-prototypes -pipe endif -# Preprocessor Options (we have some arch/distro dependencies) -ifeq ($(WLAN_TARGET_ARCH), i386) -CPPFLAGS= -I../include -I$(LINUX_SRC)/include \ - -D__LINUX_WLAN__ -D__I386__ -else -ifeq ($(WLAN_TARGET_ARCH), ppc) -CPPFLAGS= -I../include -I$(LINUX_SRC)/include \ - -D__LINUX_WLAN__ -D__WLAN_PPC__ -else -ifeq ($(WLAN_TARGET_ARCH), alpha) -CFLAGS := $(CFLAGS) -mno-fp-regs -ffixed-8 -CPPFLAGS= -I../include -I$(LINUX_SRC)/include \ - -D__LINUX_WLAN__ -D__WLAN_ALPHA__ -else -ifeq ($(WLAN_TARGET_ARCH), arm) -CPPFLAGS= -I../include -I$(LINUX_SRC)/include \ - -D__LINUX_WLAN__ -D__arm__ -else -# this will probably generate an error. New arch's need to be added explicitly CPPFLAGS= -I../include -I$(LINUX_SRC)/include \ -D__LINUX_WLAN__ -endif -endif -endif -endif # Source and obj and target definitions SHSRC= ../shared/p80211types.c \ diff --git a/src/nwepgen/Makefile b/src/nwepgen/Makefile index e076c89..62a85ce 100644 --- a/src/nwepgen/Makefile +++ b/src/nwepgen/Makefile @@ -74,30 +74,8 @@ ifndef CFLAGS CFLAGS = -O2 -Wall -Wstrict-prototypes -pipe endif -# Preprocessor Options (we have some arch/distro dependencies) -ifeq ($(WLAN_TARGET_ARCH), i386) -CPPFLAGS= -I../include -I$(LINUX_SRC)/include \ - -D__LINUX_WLAN__ -D__I386__ -else -ifeq ($(WLAN_TARGET_ARCH), ppc) -CPPFLAGS= -I../include -I$(LINUX_SRC)/include \ - -D__LINUX_WLAN__ -D__WLAN_PPC__ -else -ifeq ($(WLAN_TARGET_ARCH), alpha) -CPPFLAGS= -I../include -I$(LINUX_SRC)/include \ - -D__LINUX_WLAN__ -D__WLAN_ALPHA__ -else -ifeq ($(WLAN_TARGET_ARCH), arm) -CPPFLAGS= -I../include -I$(LINUX_SRC)/include \ - -D__LINUX_WLAN__ -D__arm__ -else -# this will probably generate an error. New arch's need to be added explicitly CPPFLAGS= -I../include -I$(LINUX_SRC)/include \ -D__LINUX_WLAN__ -endif -endif -endif -endif nwepgen: nwepgen.o $(CC) -o nwepgen nwepgen.o diff --git a/src/prism2/download/Makefile b/src/prism2/download/Makefile index e41660a..87ec05b 100644 --- a/src/prism2/download/Makefile +++ b/src/prism2/download/Makefile @@ -76,20 +76,8 @@ ifndef CFLAGS CFLAGS = -g -O2 -Wall -Wstrict-prototypes -pipe endif -# Preprocessor Options (we have some arch/distro dependencies) -ifeq ($(WLAN_TARGET_ARCH), i386) -CPPFLAGS= -I../../include -I../include -I$(LINUX_SRC)/include \ - -D__LINUX_WLAN__ -D__I386__ -else -ifeq ($(WLAN_TARGET_ARCH), ppc) -CPPFLAGS= -I../../include -I../include -I$(LINUX_SRC)/include \ - -D__LINUX_WLAN__ -D__WLAN_PPC__ -else # this will probably generate an error. New arch's need to be added explicitly -CPPFLAGS= -I../../include -I$(LINUX_SRC)/include \ - -D__LINUX_WLAN__ -endif -endif +CPPFLAGS= -I../../include -I$(LINUX_SRC)/include -D__LINUX_WLAN__ SRCS = prism2dl.c diff --git a/src/prism2/driver/prism2sta.c b/src/prism2/driver/prism2sta.c index 445f2a0..7d251ff 100644 --- a/src/prism2/driver/prism2sta.c +++ b/src/prism2/driver/prism2sta.c @@ -449,69 +449,6 @@ static struct usb_device_id usb_prism_tbl[] = { MODULE_DEVICE_TABLE(usb, usb_prism_tbl); -typedef struct usb_prism_dev { - char *name; - UINT16 vendor; - UINT16 device; - UINT32 priv; -} usb_prism_dev_t; - -static usb_prism_dev_t usb_id_tbl[] = { - /* XXXX ATMEL widgets. Unsupported, but listed here so we can detect - and tell the user to look elsewhere for drivers. */ - { - "ATMEL AT76C503A-based USB 802.11b WLAN Adapter", - 0x03eb, - 0x7603, - 1 - }, - { - "ATMEL AT76C503A-based USB 802.11b WLAN Adapter", - 0x03eb, - 0x7604, - 1 - }, - { - "ATMEL AT76C503A-based USB 802.11b WLAN Adapter", - 0x03eb, - 0x7605, - 1 - }, - { - "ATMEL AT76C503A-based USB 802.11b WLAN Adapter", - 0x077b, - 0x2219, - 1 - }, - { - "ATMEL AT76C503A-based USB 802.11b WLAN Adapter", - 0x0b3b, - 0x1612, - 1 - }, - { - "Linksys WUSB11 v1.0-v2.4 USB WLAN Adapter (ATMEL)", - 0x066b, - 0x2211, - 1 - }, - { - "Belkin Wireless USB Network Adapter (ATMEL)", - 0x0d5c, - 0xa002, - 1 - }, - { - "Addtron AWU-120 (ATMEL)", - 0x05dd, - 0xff31, - 1 - }, - - {NULL, 0, 0, 0} - -}; - /* Functions declared here because of ptr references below */ #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)) @@ -3893,33 +3830,13 @@ static void *prism2sta_probe_usb( const struct usb_device_id *id) #endif { - int i; wlandevice_t *wlandev = NULL; hfa384x_t *hw = NULL; prism2sta_priv_t *priv = NULL; int result; DBFENTER; -// XXXXX -#if 0 - /* Check to see if we should claim this device */ - for ( i = 0; usb_id_tbl[i].name != NULL; i++) { - if ( - usb_id_tbl[i].vendor == dev->descriptor.idVendor && - usb_id_tbl[i].device == dev->descriptor.idProduct ) - break; - } - if ( usb_id_tbl[i].name == NULL ) return NULL; - if ( usb_id_tbl[i].priv ) { - WLAN_LOG_ERROR1("%s: ATMEL AT76C503A-based device detected. linux-wlan-ng does not support this chipset. For more information, see the FAQ.\n", dev_info); - return NULL; - } - /* Ok, we're going to claim the device. */ - WLAN_LOG_INFO2("prism2_usb: Attempting to claim device %s " - "with devnum %d\n", - usb_id_tbl[i].name, dev->devnum); -#endif if ((wlandev = create_wlan()) == NULL) { WLAN_LOG_ERROR1("%s: Memory allocation failure.\n", dev_info); result = -EIO; diff --git a/src/wlancfg/Makefile b/src/wlancfg/Makefile index af54afa..ee857a0 100644 --- a/src/wlancfg/Makefile +++ b/src/wlancfg/Makefile @@ -74,31 +74,7 @@ ifndef CFLAGS CFLAGS = -O2 -Wall -Wstrict-prototypes -pipe endif -# Preprocessor Options (we have some arch/distro dependencies) -ifeq ($(WLAN_TARGET_ARCH), i386) -CPPFLAGS= -I../include -I$(LINUX_SRC)/include \ - -D__LINUX_WLAN__ -D__I386__ -else -ifeq ($(WLAN_TARGET_ARCH), ppc) -CPPFLAGS= -I../include -I$(LINUX_SRC)/include \ - -D__LINUX_WLAN__ -D__WLAN_PPC__ -else -ifeq ($(WLAN_TARGET_ARCH), alpha) -CFLAGS := $(CFLAGS) -mno-fp-regs -ffixed-8 -CPPFLAGS= -I../include -I$(LINUX_SRC)/include \ - -D__LINUX_WLAN__ -D__WLAN_ALPHA__ -else -ifeq ($(WLAN_TARGET_ARCH), arm) -CPPFLAGS= -I../include -I$(LINUX_SRC)/include \ - -D__LINUX_WLAN__ -D__arm__ -else -# this will probably generate an error. New arch's need to be added explicitly -CPPFLAGS= -I../include -I$(LINUX_SRC)/include \ - -D__LINUX_WLAN__ -endif -endif -endif -endif +CPPFLAGS= -I../include -I$(LINUX_SRC)/include -D__LINUX_WLAN__ SRCS = ../shared/p80211types.c \ ../shared/p80211meta.c \ diff --git a/src/wlanctl/Makefile b/src/wlanctl/Makefile index c186f86..7bc3cff 100644 --- a/src/wlanctl/Makefile +++ b/src/wlanctl/Makefile @@ -74,32 +74,7 @@ ifndef CFLAGS CFLAGS = -O2 -Wall -Wstrict-prototypes -pipe endif -# Preprocessor Options (we have some arch/distro dependencies) -ifeq ($(WLAN_TARGET_ARCH), i386) -CPPFLAGS= -I../include -I$(LINUX_SRC)/include \ - -D__LINUX_WLAN__ -D__I386__ -else -ifeq ($(WLAN_TARGET_ARCH), ppc) -CPPFLAGS= -I../include -I$(LINUX_SRC)/include \ - -D__LINUX_WLAN__ -D__WLAN_PPC__ -else -ifeq ($(WLAN_TARGET_ARCH), alpha) -CFLAGS := $(CFLAGS) -mno-fp-regs -ffixed-8 -CPPFLAGS= -I../include -I$(LINUX_SRC)/include \ - -D__LINUX_WLAN__ -D__WLAN_ALPHA__ -else -ifeq ($(WLAN_TARGET_ARCH), arm) -CPPFLAGS= -I../include -I$(LINUX_SRC)/include \ - -D__LINUX_WLAN__ -D__arm__ -else -# this will probably generate an error. New arch's need to be added explicitly -CPPFLAGS= -I../include -I$(LINUX_SRC)/include \ - -D__LINUX_WLAN__ -endif -endif -endif -endif - +CPPFLAGS= -I../include -I$(LINUX_SRC)/include -D__LINUX_WLAN__ SRCS = wlanctl.c \ help.c \ diff --git a/src/wland/Makefile b/src/wland/Makefile index b07c9dc..76dab23 100644 --- a/src/wland/Makefile +++ b/src/wland/Makefile @@ -74,30 +74,7 @@ ifndef CFLAGS CFLAGS = -O2 -Wall -Wstrict-prototypes -pipe endif -# Preprocessor Options (we have some arch/distro dependencies) -ifeq ($(WLAN_TARGET_ARCH), i386) -CPPFLAGS= -I../include -I$(LINUX_SRC)/include \ - -D__LINUX_WLAN__ -D__I386__ -else -ifeq ($(WLAN_TARGET_ARCH), ppc) -CPPFLAGS= -I../include -I$(LINUX_SRC)/include \ - -D__LINUX_WLAN__ -D__WLAN_PPC__ -else -ifeq ($(WLAN_TARGET_ARCH), alpha) -CPPFLAGS= -I../include -I$(LINUX_SRC)/include \ - -D__LINUX_WLAN__ -D__WLAN_ALPHA__ -else -ifeq ($(WLAN_TARGET_ARCH), arm) -CPPFLAGS= -I../include -I$(LINUX_SRC)/include \ - -D__LINUX_WLAN__ -D__arm__ -else -# this will probably generate an error. New arch's need to be added explicitly -CPPFLAGS= -I../include -I$(LINUX_SRC)/include \ - -D__LINUX_WLAN__ -endif -endif -endif -endif +CPPFLAGS= -I../include -I$(LINUX_SRC)/include -D__LINUX_WLAN__ SRCS = wland.c \ ../shared/p80211types.c \