From owner-p4-projects@FreeBSD.ORG Tue Nov 23 03:51:50 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EFB5F16A4D0; Tue, 23 Nov 2004 03:51:49 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C5B9716A4CE for ; Tue, 23 Nov 2004 03:51:49 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B14BA43D55 for ; Tue, 23 Nov 2004 03:51:49 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iAN3pn3k002314 for ; Tue, 23 Nov 2004 03:51:49 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iAN3pnNQ002311 for perforce@freebsd.org; Tue, 23 Nov 2004 03:51:49 GMT (envelope-from sam@freebsd.org) Date: Tue, 23 Nov 2004 03:51:49 GMT Message-Id: <200411230351.iAN3pnNQ002311@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 65685 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 03:51:50 -0000 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,