Date: Tue, 23 Nov 2004 03:51:49 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 65685 for review Message-ID: <200411230351.iAN3pnNQ002311@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=65685 Change 65685 by sam@sam_ebb on 2004/11/23 03:51:02 add a %parent mib variable for finding the associated device (we'll want this for wds and multi-*ssid support) Affected files ... .. //depot/projects/wifi/sys/net80211/ieee80211_freebsd.c#4 edit Differences ... ==== //depot/projects/wifi/sys/net80211/ieee80211_freebsd.c#4 (text+ko) ==== @@ -68,6 +68,15 @@ return 0; } +static int +ieee80211_sysctl_parent(SYSCTL_HANDLER_ARGS) +{ + struct ieee80211com *ic = arg1; + const char *name = ic->ic_ifp->if_xname; + + return SYSCTL_OUT(req, name, strlen(name)); +} + void ieee80211_sysctl_attach(struct ieee80211com *ic) { @@ -84,9 +93,11 @@ } sysctl_ctx_init(ctx); snprintf(num, sizeof(num), "%u", ic->ic_vap); - /* XXX wlan.%d with vap support */ oid = SYSCTL_ADD_NODE(ctx, &SYSCTL_NODE_CHILDREN(_net, wlan), OID_AUTO, num, CTLFLAG_RD, NULL, ""); + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "%parent", CTLFLAG_RD, ic, 0, ieee80211_sysctl_parent, "A", + "parent device"); #ifdef IEEE80211_DEBUG ic->ic_debug = ieee80211_debug; SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200411230351.iAN3pnNQ002311>