From owner-freebsd-net@FreeBSD.ORG Wed Oct 5 14:52:23 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7684106564A; Wed, 5 Oct 2011 14:52:23 +0000 (UTC) (envelope-from lacombar@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 43C5F8FC12; Wed, 5 Oct 2011 14:52:22 +0000 (UTC) Received: by wyj26 with SMTP id 26so2408231wyj.13 for ; Wed, 05 Oct 2011 07:52:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=93gU+76VR4l3MZLMKBJ6QfvSlieyjxcQICLgUhw+DBA=; b=TrMHKPFZZiFUCxkC/ONEwBjIS4KNm8B4tcLNuIKtjFXfve0aP1ov7EWhubrLL9GmiY 3eKyU2DJ/J+Vn3LGEPosYdC/PDql/PXWwgd8A2zTe623RGu0PvElcUBw0fyvOIyJPXYg PykEYMKgRamDqbL2lPMGNTfzTJ3LbJago1n0Q= MIME-Version: 1.0 Received: by 10.227.153.211 with SMTP id l19mr3123129wbw.51.1317826341598; Wed, 05 Oct 2011 07:52:21 -0700 (PDT) Received: by 10.180.103.33 with HTTP; Wed, 5 Oct 2011 07:52:21 -0700 (PDT) In-Reply-To: <20111005130936.GB38162@in-addr.com> References: <201110042008.48915.break19@gmail.com> <201110042054.33599.break19@gmail.com> <201110042132.52788.break19@gmail.com> <20111005130936.GB38162@in-addr.com> Date: Wed, 5 Oct 2011 10:52:21 -0400 Message-ID: From: Arnaud Lacombe To: Gary Palmer Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-net@freebsd.org, Chuck Burns Subject: Re: [urtw] Wifi link dying randomly. reboot required to reconnect. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2011 14:52:23 -0000 Hi, On Wed, Oct 5, 2011 at 9:09 AM, Gary Palmer wrote: > On Tue, Oct 04, 2011 at 09:32:52PM -0500, Chuck Burns wrote: >> On Tuesday, October 04, 2011 8:54:33 PM Chuck Burns wrote: >> >> > I'm not sure how to rebuild just the module with that option URTW_DEBUG >> > enabled.. I'm being told by some to just add the device to my kernel config >> > along with the line "option URTW_DEBUG" .. but if there's a better way, let >> > me know please. >> > >> > Also, I suppose that means if I want the "any" I sysctl >> > hw.usb.urtw.debug=0xffffffff right? Still a bit green with regards to >> > debugging. >> >> I wound up adding "#define URTW_DEBUG" to the top of the if_urtw.c file and >> make install'ing the module from the proper subdirectory.. > > Just wanted to make sure that you unloaded and reloaded the module after > the "make install"? > actually, it is more tricky than that. The sysctl `hw.usb.urtw.debug' only exist when URTW_DEBUG is defined, but the backing variable, `urtw_debug' is only used during attach to initialize `sc->sc_debug'. So setting the sysctl afterward is useless, the only real possibility is either to use the tunable, or directly use the sysctl's variable in DPRINTF(): diff --git a/sys/dev/usb/wlan/if_urtw.c b/sys/dev/usb/wlan/if_urtw.c index 6ae7e16..af8cd79 100644 --- a/sys/dev/usb/wlan/if_urtw.c +++ b/sys/dev/usb/wlan/if_urtw.c @@ -80,7 +80,7 @@ enum { URTW_DEBUG_ANY = 0xffffffff }; #define DPRINTF(sc, m, fmt, ...) do { \ - if (sc->sc_debug & (m)) \ + if (urtw_debug & (m)) \ printf(fmt, __VA_ARGS__); \ } while (0) - Arnaud > Gary > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >