]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
Add prism_pci support to hostapd. (thx to bronson).
authorArne Fitzenreiter <arne_f@ipfire.org>
Thu, 7 Jan 2010 00:05:29 +0000 (01:05 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Thu, 7 Jan 2010 00:05:29 +0000 (01:05 +0100)
lfs/hostapd
src/initscripts/init.d/hostapd

index 522e9b3d4caaaf9d5712c65126ec99c5d895ed1d..c881f803c8a9ae5862ee0262bccc8168571f7666 100644 (file)
@@ -32,7 +32,7 @@ DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 PROG       = hostapd
-PAK_VER    = 15
+PAK_VER    = 16
 
 DEPS       = ""
 
index 6e3618954179764f4f0be7515ef4da210107fd0d..0cc95b7b4272240ffa3f9237b1a8360abf01a973 100644 (file)
@@ -40,6 +40,10 @@ case "${1}" in
                elif [ -e "/sys/class/net/$INTERFACE/madwifi_name_type" ]; then
                        DRIVER="MADWIFI"
                        driver="madwifi"
+               elif [ "$(/bin/grep hostap_pci /sys/class/net/$INTERFACE/uevent)" != "" ]; then
+               #PHYSDEVDRIVER=hostap_pci
+                       DRIVER="HOSTAP"
+                       driver="hostap"
                else
                        boot_mesg "Interface $INTERFACE is a not supported wireless device." ${FAILURE}
                        echo_failure
@@ -63,6 +67,12 @@ case "${1}" in
                                /usr/bin/wlanconfig $INTERFACE destroy > /dev/null
                                /usr/bin/wlanconfig $INTERFACE create wlandev wifi0 wlanmode ap > /dev/null
                        fi
+               elif [ "$DRIVER" == "HOSTAP" ]; then
+                       if [ "$(/usr/sbin/iwconfig $INTERFACE | /bin/grep "Mode:Master")" == "" ]; then
+                               boot_mesg "Setting HOSTAP wlan $INTERFACE to Master mode... "
+                               # Set Prism 2.4 Cards to master mode
+                               /usr/bin/iwconfig $INTERFACE mode master > /dev/null
+                       fi
                fi
 
                /usr/sbin/iwconfig $INTERFACE channel $CHANNEL