Work with madwifi craptastic drivers. Hopefuly prism54 still works.

This commit is contained in:
Roy Marples 2008-05-27 13:07:18 +00:00
parent bb069e1618
commit eeadc618fb

View File

@ -206,9 +206,13 @@ iwconfig_wait_for_association()
# Use sysfs if we can # Use sysfs if we can
if [ -e /sys/class/net/"${IFACE}"/carrier ]; then if [ -e /sys/class/net/"${IFACE}"/carrier ]; then
if [ "$(cat /sys/class/net/"${IFACE}"/carrier)" = "1" ]; then if [ "$(cat /sys/class/net/"${IFACE}"/carrier)" = "1" ]; then
# Double check we have an ssid. This is mainly for buggy # Double check we have an ssid and a non-zero
# prism54 drivers that always set their carrier on :/ # mac address. This is mainly for buggy
[ -n "$(iwgetid --raw "${IFACE}")" ] && return 0 # prism54 drivers that always set their
# carrier on or buggy madwifi drivers that
# sometimes have carrier on and ssid set
# without being associated. :/
[ -n "$(iwgetid --raw "${IFACE}")" ] && [ "$(iwgetid --ap --raw "${IFACE}")" != "00:00:00:00:00:00" ] && return 0
fi fi
else else
local atest= local atest=