From eeadc618fb7e7c62924c8240c7d6c57c9c9d6007 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Tue, 27 May 2008 13:07:18 +0000 Subject: [PATCH] Work with madwifi craptastic drivers. Hopefuly prism54 still works. --- net/iwconfig.sh.Linux.in | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/net/iwconfig.sh.Linux.in b/net/iwconfig.sh.Linux.in index 85b6cb66..31930205 100644 --- a/net/iwconfig.sh.Linux.in +++ b/net/iwconfig.sh.Linux.in @@ -206,9 +206,13 @@ iwconfig_wait_for_association() # Use sysfs if we can if [ -e /sys/class/net/"${IFACE}"/carrier ]; then if [ "$(cat /sys/class/net/"${IFACE}"/carrier)" = "1" ]; then - # Double check we have an ssid. This is mainly for buggy - # prism54 drivers that always set their carrier on :/ - [ -n "$(iwgetid --raw "${IFACE}")" ] && return 0 + # Double check we have an ssid and a non-zero + # mac address. This is mainly for buggy + # 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 else local atest=