From da81caefe69417a2eddda466bafefe0aa0f66d66 Mon Sep 17 00:00:00 2001 From: solomon Date: Wed, 29 May 2002 17:48:49 +0000 Subject: [PATCH] Applied patches from Tony Likhite: 1) Don't overwrite /etc/wlan.conf if it already exists. 2) support packet socket if it's compiled as a module. --- CHANGES | 2 ++ THANKS | 1 + etc/Makefile | 10 +++++++--- src/prism2/driver/prism2mgmt.c | 4 ++-- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CHANGES b/CHANGES index d467798..ed8f1cc 100644 --- a/CHANGES +++ b/CHANGES @@ -43,6 +43,8 @@ * -------------------------------------------------------------------- 0.1.14 -pre5 + - Don't overwrite /etc/wlan.conf if it already exists. + - Compile sniffing code if packet socket is modularized. - Fix a typo with the init script. - Fix a compile problem with 2.2.x kernels -pre4 diff --git a/THANKS b/THANKS index 2e2f37d..69a8ae3 100644 --- a/THANKS +++ b/THANKS @@ -84,6 +84,7 @@ Tim Fletcher Tim Miller Remy Cool Mike Klar +Tony Likhite [Many, many more. If I've overlooked you and you want to be listed here, send me e-mail and I'll fix it. I _know_ a bunch of linux-wlan contributors diff --git a/etc/Makefile b/etc/Makefile index ac50ef0..7e04f0e 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -64,7 +64,7 @@ all: clean: set -e; for d in $(DIRS); do $(MAKE) -C $$d clean; done - + install: set -e; for d in $(DIRS); do $(MAKE) -C $$d install; done ifeq ($(INSTFIXED), y) @@ -73,9 +73,13 @@ ifeq ($(INSTFIXED), y) fi; \ cp rc.wlan $(TARGET_ROOT_ON_HOST)$(RC_DIR)/init.d/wlan; \ chmod 755 $(TARGET_ROOT_ON_HOST)$(RC_DIR)/init.d/wlan ;\ - if [ ! -d $(TARGET_ROOT_ON_HOST)/etc ]; then \ + if [ ! -f $(TARGET_ROOT_ON_HOST)/etc/wlan.conf ]; then \ + if [ ! -d $(TARGET_ROOT_ON_HOST)/etc ]; then \ mkdir -p $(TARGET_ROOT_ON_HOST)/etc; \ - fi; \ + fi; \ + cp wlan.conf $(TARGET_ROOT_ON_HOST)/etc && \ + chmod 700 $(TARGET_ROOT_ON_HOST)/etc/wlan.conf; \ + fi cp wlan.conf $(TARGET_ROOT_ON_HOST)/etc; \ chmod 700 $(TARGET_ROOT_ON_HOST)/etc/wlan.conf endif diff --git a/src/prism2/driver/prism2mgmt.c b/src/prism2/driver/prism2mgmt.c index 6f67183..e01c4e6 100644 --- a/src/prism2/driver/prism2mgmt.c +++ b/src/prism2/driver/prism2mgmt.c @@ -2311,8 +2311,8 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp) int result = 0; p80211msg_lnxreq_wlansniff_t *msg = msgp; -#ifndef CONFIG_PACKET -#warning "CONFIG_PACKET not enabled, not compiling sniffing/indication code" +#if !defined(CONFIG_PACKET) && !defined(CONFIG_PACKET_MODULE) +#warning "Kernel support for Packet socket disabled, not compiling sniffing/indication code" DBFENTER; msg->resultcode.status = P80211ENUM_msgitem_status_data_ok; msg->resultcode.data = P80211ENUM_resultcode_not_supported;