PERFORCE change 65685 for review

Sam Leffler sam at FreeBSD.org
Tue Nov 23 03:51:50 GMT 2004


http://perforce.freebsd.org/chv.cgi?CH=65685

Change 65685 by sam at 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,


More information about the p4-projects mailing list