hwsim tests: Silence modprobe warnings

If module loading isn't enabled (e.g., in VM tests) then
don't try to load/unload the modules.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Johannes Berg 2013-10-30 23:14:55 +01:00 committed by Jouni Malinen
parent 8f946511c9
commit 044dd1c267
2 changed files with 2 additions and 2 deletions

View file

@ -48,7 +48,7 @@ else
fi fi
$DIR/stop-wifi.sh $DIR/stop-wifi.sh
sudo modprobe mac80211_hwsim radios=5 test -f /proc/modules && sudo modprobe mac80211_hwsim radios=5
if [ "$CONCURRENT" = "y" ]; then if [ "$CONCURRENT" = "y" ]; then
sudo iw wlan0 interface add sta0 type station sudo iw wlan0 interface add sta0 type station
sudo iw wlan1 interface add sta1 type station sudo iw wlan1 interface add sta1 type station

View file

@ -67,7 +67,7 @@ for i in /tmp/wpas-wlan0 /tmp/wpas-wlan1 /tmp/wpas-wlan2 /var/run/hostapd-global
fi fi
done done
if grep -q mac80211_hwsim /proc/modules ; then if grep -q mac80211_hwsim /proc/modules 2>/dev/null ; then
sudo rmmod mac80211_hwsim sudo rmmod mac80211_hwsim
sudo rmmod mac80211 sudo rmmod mac80211
sudo rmmod cfg80211 sudo rmmod cfg80211