Update madwifi to r4003 and switch hal to test-hal
authorArne Fitzenreiter <arne_f@ipfire.org>
Sat, 18 Apr 2009 10:46:07 +0000 (12:46 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sat, 18 Apr 2009 10:46:07 +0000 (12:46 +0200)
fixes at hostapd initskript (set madwifi specific command only if madwifi is configured)
fix setup use wrong macaddress for Wlan if it is an AP-mode

config/rootfiles/core/28/filelists/files
lfs/madwifi
src/initscripts/init.d/hostapd
src/install+setup/install/probenic.sh

index db15fd5c38ec7c6eac0d210865b986daa6de7fed..f0145c443954e010f492f44eaf653d3e8396ee32 100644 (file)
@@ -1,3 +1,4 @@
+bin/probenic.sh
 etc/ntp
 etc/rc.d/init.d/snort
 etc/ssh/moduli
index 5aeb39cec8fe1f200021226854cfb508a49a0b08..e6e7104841acd2e71c61e5c195be002710a7af95 100644 (file)
@@ -24,7 +24,7 @@
 
 include Config
 
-VER        = trunk-r3994-20090410
+VER        = hal-testing-r4003-20090416
 
 THISAPP    = madwifi-$(VER)
 DL_FILE    = $(THISAPP).tar.gz
@@ -44,7 +44,7 @@ objects = $(DL_FILE)
 
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
 
-$(DL_FILE)_MD5 = 9dbd2c1fd3f1aa53f4bdc64531192587
+$(DL_FILE)_MD5 = f9c591f16746a4ac4988ccbfedfe1a85
 
 install : $(TARGET)
 
index 8200c2d353a32373b26772b020a3f3797cb50e74..aa5e13d37a092d16d973d33228d7a81530a95c08 100644 (file)
@@ -5,52 +5,56 @@
 CHANNEL="05"
 TXPOWER="auto"
 INTERFACE="blue0"
+MACMODE="0"
+DRIVER="MADWIFI"
+
 eval $(/usr/local/bin/readhash /var/ipfire/wlanap/settings)
 
 case "${1}" in
        start)
                mkdir -p /var/run/hostapd
-               if [ "$(/usr/sbin/iwconfig $INTERFACE | /bin/grep "Mode:Master")" == "" ]; then
-
-               boot_mesg "Setting wlan $INTERFACE to Master mode... "
 
-               # Set Atheros Cards to master mode
-               if [ -d /proc/net/madwifi/ath0/ ]; then
-                       /usr/bin/wlanconfig ath0 destroy > /dev/null
+               if [ "$DRIVER" == "MADWIFI" ]; then
+                       if [ "$(/usr/sbin/iwconfig $INTERFACE | /bin/grep "Mode:Master")" == "" ]; then
+                               boot_mesg "Setting MADWIFI wlan $INTERFACE to Master mode... "
+                               # Set Atheros Cards to master mode
+                               /usr/bin/wlanconfig $INTERFACE destroy > /dev/null
+                               /usr/bin/wlanconfig $INTERFACE create wlandev wifi0 wlanmode ap > /dev/null
+                       fi
                fi
 
-               /usr/bin/wlanconfig $INTERFACE destroy > /dev/null
-               /usr/bin/wlanconfig $INTERFACE create wlandev wifi0 wlanmode ap > /dev/null
+               boot_mesg "Starting hostapd... "
+               /usr/sbin/iwconfig $INTERFACE channel $CHANNEL
+               /usr/sbin/iwconfig $INTERFACE txpower $TXPOWER
+               /usr/bin/hostapd -P /var/run/hostapd /etc/hostapd.conf </dev/tty12 >/dev/tty12 2>&1 &
+
+               if [ $DRIVER == "MADWIFI" ]; then
+
+                       iwpriv $INTERFACE maccmd 3
+                       if [ $MACMODE != 0 ]; then
+                               FILE="/var/ipfire/wlanap/macfile"
+                               exec < $FILE
+                               while read LINE
+                               do
+                                       iwpriv $INTERFACE addmac $LINE
+                               done
 
-               # Set other cards to master mode
-               #/usr/sbin/iwconfig blue0 mode master
+                               iwpriv $INTERFACE maccmd $MACMODE
+                       fi
+                       # Disable background scann
+                       iwpriv $INTERFACE bgscan 0
+                       # Set beacon interval to 500
+                       iwpriv $INTERFACE bintval 500
                fi
 
                if [ "$(/usr/sbin/iwconfig $INTERFACE | /bin/grep "Mode:Master")" == "" ]; then
                        boot_mesg "Error! Can't set wlan master mode"
                        echo_failure;
-                       exit 1;
+                       exit 0;
                else
                        # enable wlan module of collectd
                        sed -i -e "s|#LoadPlugin wireless|LoadPlugin wireless|g" /etc/collectd.conf
-
-                       boot_mesg "Starting hostapd... "
-                       /usr/sbin/iwconfig $INTERFACE channel $CHANNEL
-                       /usr/sbin/iwconfig $INTERFACE txpower $TXPOWER
-                       /usr/bin/hostapd -P /var/run/hostapd /etc/hostapd.conf </dev/tty12 >/dev/tty12 2>&1 &
-                       evaluate_retval
-               fi
-
-               iwpriv $INTERFACE maccmd 3
-               if [ $MACMODE != 0 ]; then
-                       FILE="/var/ipfire/wlanap/macfile"
-                       exec < $FILE
-                       while read LINE
-                       do
-                               iwpriv $INTERFACE addmac $LINE
-                       done
-
-                       iwpriv $INTERFACE maccmd $MACMODE
+                       echo_ok
                fi
                ;;
 
index 6212f24d09259e6bc79a5fa3760653e70a74e3e8..296eb7c6a3612ea02c86ec0723f54df975afa66d 100644 (file)
@@ -21,4 +21,7 @@
 
 kudzu -qps -c NETWORK | egrep "desc|network.hwaddr|driver" > /var/ipfire/ethernet/scanned_nics 2>/dev/null
 
+# Revert Accesspoint marking at mac address
+sed -i 's|hwaddr: 06:|hwaddr: 00:|g' /var/ipfire/ethernet/scanned_nics
+
 exit 0