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>
fi
$DIR/stop-wifi.sh
-sudo modprobe mac80211_hwsim radios=5
+test -f /proc/modules && sudo modprobe mac80211_hwsim radios=5
if [ "$CONCURRENT" = "y" ]; then
sudo iw wlan0 interface add sta0 type station
sudo iw wlan1 interface add sta1 type station
fi
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
sudo rmmod cfg80211