svn commit: r277540 - in projects/ifnet/sys: dev/bge dev/msk dev/xl net
Gleb Smirnoff
glebius at FreeBSD.org
Thu Jan 22 23:45:40 UTC 2015
Author: glebius
Date: Thu Jan 22 23:45:38 2015
New Revision: 277540
URL: https://svnweb.freebsd.org/changeset/base/277540
Log:
Substitute if_set(ifp, IF_BAUDRATE, ...) with if_setbaudrate(ifp).
Modified:
projects/ifnet/sys/dev/bge/if_bge.c
projects/ifnet/sys/dev/msk/if_msk.c
projects/ifnet/sys/dev/xl/if_xl.c
projects/ifnet/sys/net/if.c
projects/ifnet/sys/net/if.h
Modified: projects/ifnet/sys/dev/bge/if_bge.c
==============================================================================
--- projects/ifnet/sys/dev/bge/if_bge.c Thu Jan 22 22:04:43 2015 (r277539)
+++ projects/ifnet/sys/dev/bge/if_bge.c Thu Jan 22 23:45:38 2015 (r277540)
@@ -1285,7 +1285,7 @@ bge_miibus_statchg(device_t dev)
sc->bge_link = 0;
if (sc->bge_ifp != NULL) {
- if_set(sc->bge_ifp, IF_BAUDRATE,
+ if_setbaudrate(sc->bge_ifp,
ifmedia_baudrate(mii->mii_media_active));
if_link_state_change(sc->bge_ifp,
ifmedia_link_state(mii->mii_media_status));
Modified: projects/ifnet/sys/dev/msk/if_msk.c
==============================================================================
--- projects/ifnet/sys/dev/msk/if_msk.c Thu Jan 22 22:04:43 2015 (r277539)
+++ projects/ifnet/sys/dev/msk/if_msk.c Thu Jan 22 23:45:38 2015 (r277540)
@@ -581,7 +581,7 @@ msk_miibus_statchg(device_t dev)
GMAC_READ_2(sc, sc_if->msk_port, GM_GP_CTRL);
}
}
- if_set(ifp, IF_BAUDRATE, ifmedia_baudrate(mii->mii_media_active));
+ if_setbaudrate(ifp, ifmedia_baudrate(mii->mii_media_active));
if_link_state_change(ifp, ifmedia_link_state(mii->mii_media_status));
}
Modified: projects/ifnet/sys/dev/xl/if_xl.c
==============================================================================
--- projects/ifnet/sys/dev/xl/if_xl.c Thu Jan 22 22:04:43 2015 (r277539)
+++ projects/ifnet/sys/dev/xl/if_xl.c Thu Jan 22 23:45:38 2015 (r277540)
@@ -478,7 +478,7 @@ xl_miibus_statchg(device_t dev)
}
CSR_WRITE_1(sc, XL_W3_MAC_CTRL, macctl);
if (sc->xl_ifp != NULL) {
- if_set(sc->xl_ifp, IF_BAUDRATE,
+ if_setbaudrate(sc->xl_ifp,
ifmedia_baudrate(mii->mii_media_active));
if_link_state_change(sc->xl_ifp,
ifmedia_link_state(mii->mii_media_status));
Modified: projects/ifnet/sys/net/if.c
==============================================================================
--- projects/ifnet/sys/net/if.c Thu Jan 22 22:04:43 2015 (r277539)
+++ projects/ifnet/sys/net/if.c Thu Jan 22 23:45:38 2015 (r277540)
@@ -1528,9 +1528,6 @@ if_getfeature(if_t ifp, ift_feature f, u
*ptr = NULL;
switch (f) {
- case IF_BAUDRATE:
- *f64 = &ifp->if_baudrate;
- break;
case IF_DRIVER_SOFTC:
*ptr = ifp->if_softc;
break;
@@ -1660,6 +1657,16 @@ if_inc_txcounters(struct ifnet *ifp, str
}
/*
+ * Set the baudrate.
+ */
+void
+if_setbaudrate(struct ifnet *ifp, uint64_t baudrate)
+{
+
+ ifp->if_baudrate = baudrate;
+}
+
+/*
* Copy data from ifnet to userland API structure if_data.
*/
void
Modified: projects/ifnet/sys/net/if.h
==============================================================================
--- projects/ifnet/sys/net/if.h Thu Jan 22 22:04:43 2015 (r277539)
+++ projects/ifnet/sys/net/if.h Thu Jan 22 23:45:38 2015 (r277540)
@@ -575,9 +575,6 @@ typedef enum {
} ift_counter;
typedef enum {
- /* uint64_t */
- IF_BAUDRATE,
- /* pointers */
IF_DRIVER_SOFTC,
IF_LLADDR,
IF_BPF,
@@ -717,6 +714,7 @@ void if_detach(if_t);
void if_mtap(if_t, struct mbuf *, void *, u_int);
void if_inc_counter(if_t, ift_counter, int64_t);
void if_inc_txcounters(if_t, struct mbuf *);
+void if_setbaudrate(if_t, uint64_t);
void if_link_state_change(if_t, int);
void if_set(if_t, ift_feature, uint64_t);
void * if_getsoftc(if_t, ift_feature);
More information about the svn-src-projects
mailing list