From owner-freebsd-gnome@FreeBSD.ORG Wed Apr 23 17:46:48 2008 Return-Path: Delivered-To: gnome@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B53F8106564A; Wed, 23 Apr 2008 17:46:48 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id 519788FC27; Wed, 23 Apr 2008 17:46:48 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id m3NHklZj096570 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 23 Apr 2008 10:46:48 -0700 (PDT) (envelope-from sam@freebsd.org) Message-ID: <480F7607.5050004@freebsd.org> Date: Wed, 23 Apr 2008 10:46:47 -0700 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.9 (X11/20071125) MIME-Version: 1.0 To: Coleman Kane References: <1208971129.6154.13.camel@localhost> <1208971281.6154.18.camel@localhost> <480F735A.4080001@freebsd.org> <1208972527.6154.24.camel@localhost> In-Reply-To: <1208972527.6154.24.camel@localhost> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC-Rhyolite-Metrics: ebb.errno.com; whitelist Cc: gnome@freebsd.org, marcus@freebsd.org Subject: Re: Update to net/gnome-netstatus to support new wlan system in -CURRENT X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Apr 2008 17:46:48 -0000 Coleman Kane wrote: > On Wed, 2008-04-23 at 10:35 -0700, Sam Leffler wrote: > >> Coleman Kane wrote: >> >>> On Wed, 2008-04-23 at 13:18 -0400, Coleman Kane wrote: >>> >>> >>>> Hi, >>>> >>>> I put together some changes to the net/gnome-netstatus applet to allow >>>> it to detect and work with the new wlan interface system that was just >>>> introduced in CURRENT. >>>> >>>> This new code doesn't identify non-wlanN interfaces as wifi anymore. >>>> >>>> I think it may need some help in getting signal-strength detection >>>> properly using the if_ndis driver. Mine keeps telling me that the signal >>>> strength is always 100% no matter where I walk in my apt. >>>> >>>> >>>> >>> Yes, I do mean to actually attach the patch too. >>> >>> >>> >> As I told you previously keying off the ifnet name is a mistake. What >> you can do is check the media status and for any 802.3 interface look >> for a backpointer in the MIB to a parent device that must be marked as >> an 802.11 device. Right now this can be defeated if ifnet is renamed >> such that you cannot identify the wlanX unity # to find the MIB entry >> under net.wlan.X.%parent. >> >> Separately you appear to have added "an", "rum", and "ray". I'm not >> sure what this code does but again using ifnet names is a mistake. In >> 7.x you can do a similar search of the net.wlan.X MIB space using the >> %parent backpointer to identify an 802.11 device. wlandebug.c has crude >> code you can crib (for 7.x). >> >> I don't recall if 6.x has the backpointer in the MIB namespace to use. >> >> Sam >> >> > > The original code was written this way, so I was just mimicking it. Your > idea sounds a lot more stable. The addition of the "rum" and "ray" > interfaces is done by the original patch, as the upstream GNOME code > hadn't been written to expect either of those yet. The "an" device isn't > added, it's part of the surrounding text of the patch. You're looking at > a patch-of-a-patch... > > Anyhow, I'm not the original author but these changes probably make it > better now than it was before (and my netstatus applet works now). I'll > see if I can find some time to re-implement this properly over the > weekend. We might be able to get more iface info in there as well. > > Ok, thanks. FWIW there is a large body of 802.11-related code that should be lifted form various parts of the src tree into a lib80211 or similar. For example there is now an XML database of regulatory domain information that ifconfig uses. UI apps could easily want to use this info along w/ many other bits that are mostly used by ifconfig at the moment. I am happy to work w/ anyone that's interested in this. Sam