Fixed a potentital bug related to driver unloading.

The bug was much more likely to occur on slower systems.
The bug could occur when trying to load a driver immediately after unloading it.
This commit is contained in:
Matias Barcenas 2017-08-20 18:00:14 -05:00
parent 42d80d438a
commit ff834a64af
1 changed files with 6 additions and 1 deletions

View File

@ -552,6 +552,11 @@ function set_interface() {
# FLUXION 2 had the conditional so I kept it there.
if [ ! "$(echo $wiDriver | egrep 'rt2800|rt73')" ]
then rmmod -f $wiDriver &> $FLUXIONOutputDevice 2>&1
echo -e "$FLUXIONVLine Waiting for interface \"$wiSelected\" to unload..."
while interface_physical "$wiSelected"
do sleep 1
done
fi
fi
@ -575,7 +580,7 @@ function set_interface() {
then modprobe "$wiDriver" &> $FLUXIONOutputDevice 2>&1
fi
echo -e "$FLUXIONVLine Waiting for interface \"$wiSelected\"..."
echo -e "$FLUXIONVLine Waiting for interface \"$wiSelected\" to load..."
while ! interface_physical "$wiSelected"
do sleep 1
done