5 # First try a minor cycle
7 ESSID=$(/sbin/iwconfig "$WIRELESS" 2>/dev/null |grep ESSID |perl -ne 'm/\"([^\"]+)\"/ && print $1,qq(\n)')
9 if [ -n "$ESSID" ]; then
10 sudo iwconfig "$WIRELESS" essid "$ESSID"
12 if /sbin/iwconfig "$WIRELESS" 2>/dev/null | grep 'Bit Rate'|grep -qv '=1 Mb/s'; then
17 # Failure, so major cycle
19 if [ "$WIRELESS" == "wireless" ]; then
20 if lsmod|grep -q bcm43xx; then
21 sudo modprobe -r bcm43xx;
22 sudo modprobe bcm43xx;