[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: argh -- can't get wireless in someone else's house



On Fri, Feb 08, 2008 at 04:13:54PM -0500, John W. Linville wrote:

> Anyway, s-c-n still doesn't seem to handle mac80211 drivers quite
> right.  I think there is a problem with how it tries to determine
> if the link is "up" (which in this case should be when there is
> an association).  FWIW, I can't get s-c-n to work at all on my
> simple WEP network, but NM and manual configuration work first time,
> everytime...YMMV.

I found a mechanism for patching the ifup scripts that makes s-c-n
work in my environment with a mac80211-based device.  I'm attaching a
file called "network-functions.patch" to this email.  It is generated
against the network-functions file in initscripts-8.60.1 in Fedora 8.

In case you need a tutorial on how to apply it:

	cd /etc/sysconfig/network-scripts
	patch < network-functions.patch

I would recommend a reboot after applying the patch.  Does this help
you to use s-c-n?

Good luck!

John
-- 
John W. Linville
linville redhat com
--- network-functions.orig	2007-04-16 18:21:51.000000000 -0400
+++ network-functions	2008-02-08 16:48:08.000000000 -0500
@@ -308,6 +308,13 @@ check_ethtool ()
    echo $output | LC_ALL=C grep -q "Link detected: no" && return 0 || return 2
 }
 
+check_wireless ()
+{
+   output=`LC_ALL=C ip link show dev $1 2>/dev/null`
+   echo $output | LC_ALL=C grep -q "LOWER_UP" && return 1
+   echo $output | LC_ALL=C grep -q "NO-CARRIER" && return 0 || return 2
+}
+
 
 check_link_down ()
 {
@@ -323,10 +330,12 @@ check_link_down ()
 	    m=$?
 	    check_ethtool $1
 	    e=$?
-	    if [ $m -eq 1 ] || [ $e -eq 1 ] ; then
+	    check_wireless $1
+	    w=$?
+	    if [ $m -eq 1 ] || [ $e -eq 1 ] || [ $w -eq 1 ] ; then
 		return 1
 	    fi
-	    if [ $m -eq 2 ] && [ $e -eq 2 ] ; then
+	    if [ $m -eq 2 ] && [ $e -eq 2 ] && [ $w -eq 2 ] ; then
 		return 1
 	    fi
 	    usleep 500000

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]