diff --git a/tests/hwsim/start-p2p.sh b/tests/hwsim/start-p2p.sh index 2000677ed..f91932fde 100755 --- a/tests/hwsim/start-p2p.sh +++ b/tests/hwsim/start-p2p.sh @@ -2,11 +2,14 @@ DIR="$( cd "$( dirname "$0" )" && pwd )" WPAS=$DIR/../../wpa_supplicant/wpa_supplicant +WLANTEST=$DIR/../../wlantest/wlantest $DIR/stop-wifi.sh sudo modprobe mac80211_hwsim radios=3 mkdir -p $DIR/logs DATE=`date +%s` +sudo ifconfig hwsim0 up +sudo $WLANTEST -i hwsim0 -c -d > $DIR/logs/$DATE-hwsim0 & sudo $WPAS -Dnl80211 -iwlan0 -c $DIR/p2p0.conf -ddKt > $DIR/logs/$DATE-log0 & sudo $WPAS -Dnl80211 -iwlan1 -c $DIR/p2p1.conf -ddKt > $DIR/logs/$DATE-log1 & sudo $WPAS -Dnl80211 -iwlan2 -c $DIR/p2p2.conf -ddKt > $DIR/logs/$DATE-log2 & diff --git a/tests/hwsim/stop-wifi.sh b/tests/hwsim/stop-wifi.sh index d5d93ecfc..8c56803da 100755 --- a/tests/hwsim/stop-wifi.sh +++ b/tests/hwsim/stop-wifi.sh @@ -2,6 +2,10 @@ sudo killall -q hostapd sudo killall -q wpa_supplicant +sudo killall -q wlantest +if grep -q hwsim0 /proc/net/dev; then + sudo ifconfig hwsim0 down +fi if grep -q mac80211_hwsim /proc/modules ; then sudo rmmod mac80211_hwsim fi