PERFORCE change 117391 for review

Sam Leffler sam at FreeBSD.org
Wed Apr 4 20:59:25 UTC 2007


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

Change 117391 by sam at sam_ebb on 2007/04/04 20:58:43

	rename getfmediastate to ifmedia_getstate and expose it so
	other modules can use it; this will be needed by the 802.11
	code to do channel promotion

Affected files ...

.. //depot/projects/wifi/sbin/ifconfig/ifconfig.h#14 edit
.. //depot/projects/wifi/sbin/ifconfig/ifmedia.c#13 edit

Differences ...

==== //depot/projects/wifi/sbin/ifconfig/ifconfig.h#14 (text+ko) ====

@@ -140,3 +140,9 @@
 
 typedef void clone_callback_func(int, struct ifreq *);
 void	clone_setcallback(clone_callback_func *);
+
+/*
+ * XXX expose this so modules that neeed to know of any pending
+ * operations on ifmedia can avoid cmd line ordering confusion.
+ */
+struct ifmediareq *ifmedia_getstate(int s);

==== //depot/projects/wifi/sbin/ifconfig/ifmedia.c#13 (text+ko) ====

@@ -184,8 +184,8 @@
 	free(media_list);
 }
 
-static struct ifmediareq *
-getifmediastate(int s)
+struct ifmediareq *
+ifmedia_getstate(int s)
 {
 	static struct ifmediareq *ifmr = NULL;
 	int *mwords;
@@ -249,7 +249,7 @@
 	struct ifmediareq *ifmr;
 	int subtype;
 
-	ifmr = getifmediastate(s);
+	ifmr = ifmedia_getstate(s);
 
 	/*
 	 * We are primarily concerned with the top-level type.
@@ -294,7 +294,7 @@
 	struct ifmediareq *ifmr;
 	int options;
 
-	ifmr = getifmediastate(s);
+	ifmr = ifmedia_getstate(s);
 
 	options = get_media_options(IFM_TYPE(ifmr->ifm_ulist[0]), val);
 
@@ -319,7 +319,7 @@
 	struct ifmediareq *ifmr;
 	int inst;
 
-	ifmr = getifmediastate(s);
+	ifmr = ifmedia_getstate(s);
 
 	inst = atoi(val);
 	if (inst < 0 || inst > IFM_INST_MAX)
@@ -338,7 +338,7 @@
 	struct ifmediareq *ifmr;
 	int mode;
 
-	ifmr = getifmediastate(s);
+	ifmr = ifmedia_getstate(s);
 
 	mode = get_media_mode(IFM_TYPE(ifmr->ifm_ulist[0]), val);
 


More information about the p4-projects mailing list