Hi, On Wed, Oct 5, 2011 at 9:09 AM, Gary Palmer <gpal...@freebsd.org> 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: >> <snip> >> > 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-unsubscr...@freebsd.org" > _______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"