From: Arne Fitzenreiter Date: Thu, 7 Jan 2010 00:05:29 +0000 (+0100) Subject: Add prism_pci support to hostapd. (thx to bronson). X-Git-Tag: v2.9-beta1~535 X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=commitdiff_plain;h=8d30f4ed0020cac1adfd968045a30af524090fbc Add prism_pci support to hostapd. (thx to bronson). --- diff --git a/lfs/hostapd b/lfs/hostapd index 522e9b3d4c..c881f803c8 100644 --- a/lfs/hostapd +++ b/lfs/hostapd @@ -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 = "" diff --git a/src/initscripts/init.d/hostapd b/src/initscripts/init.d/hostapd index 6e36189541..0cc95b7b42 100644 --- a/src/initscripts/init.d/hostapd +++ b/src/initscripts/init.d/hostapd @@ -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