Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107134874
D37832.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D37832.diff
View Options
diff --git a/sys/arm64/broadcom/genet/if_genet.c b/sys/arm64/broadcom/genet/if_genet.c
--- a/sys/arm64/broadcom/genet/if_genet.c
+++ b/sys/arm64/broadcom/genet/if_genet.c
@@ -950,7 +950,7 @@
static void
gen_setup_rxfilter(struct gen_softc *sc)
{
- struct ifnet *ifp = sc->ifp;
+ if_t ifp = sc->ifp;
uint32_t cmd, mdf_ctrl;
u_int n;
@@ -966,17 +966,17 @@
n = if_llmaddr_count(ifp) + 2;
if (n > GENET_MAX_MDF_FILTER)
- ifp->if_flags |= IFF_ALLMULTI;
+ if_setflagbits(ifp, IFF_ALLMULTI, 0);
else
- ifp->if_flags &= ~IFF_ALLMULTI;
+ if_setflagbits(ifp, 0, IFF_ALLMULTI);
- if ((ifp->if_flags & (IFF_PROMISC|IFF_ALLMULTI)) != 0) {
+ if ((if_getflags(ifp) & (IFF_PROMISC|IFF_ALLMULTI)) != 0) {
cmd |= GENET_UMAC_CMD_PROMISC;
mdf_ctrl = 0;
} else {
cmd &= ~GENET_UMAC_CMD_PROMISC;
gen_setup_rxfilter_mdf(sc, 0, ether_broadcastaddr);
- gen_setup_rxfilter_mdf(sc, 1, IF_LLADDR(ifp));
+ gen_setup_rxfilter_mdf(sc, 1, if_getlladdr(ifp));
(void) if_foreach_llmaddr(ifp, gen_setup_multi, sc);
mdf_ctrl = (__BIT(GENET_MAX_MDF_FILTER) - 1) &~
(__BIT(GENET_MAX_MDF_FILTER - n) - 1);
@@ -998,7 +998,7 @@
ifp = sc->ifp;
/* Write our unicast address */
- enaddr = IF_LLADDR(ifp);
+ enaddr = if_getlladdr(ifp);
/* Write hardware address */
val = enaddr[3] | (enaddr[2] << 8) | (enaddr[1] << 16) |
(enaddr[0] << 24);
@@ -1084,7 +1084,7 @@
if (m->m_len == sizeof(struct ether_header)) {
m = m_pullup(m, MIN(m->m_pkthdr.len, gen_tx_hdr_min));
if (m == NULL) {
- if (sc->ifp->if_flags & IFF_DEBUG)
+ if (if_getflags(sc->ifp) & IFF_DEBUG)
device_printf(sc->dev,
"header pullup fail\n");
*mp = NULL;
@@ -1098,7 +1098,7 @@
csumdata = m->m_pkthdr.csum_data;
M_PREPEND(m, sizeof(struct statusblock), M_NOWAIT);
if (m == NULL) {
- if (sc->ifp->if_flags & IFF_DEBUG)
+ if (if_getflags(sc->ifp) & IFF_DEBUG)
device_printf(sc->dev, "prepend fail\n");
*mp = NULL;
return (ENOMEM);
@@ -1377,7 +1377,7 @@
(GENET_RX_DESC_STATUS_SOP | GENET_RX_DESC_STATUS_EOP |
GENET_RX_DESC_STATUS_RX_ERROR)) !=
(GENET_RX_DESC_STATUS_SOP | GENET_RX_DESC_STATUS_EOP)) {
- if (ifp->if_flags & IFF_DEBUG)
+ if (if_getflags(ifp) & IFF_DEBUG)
device_printf(sc->dev,
"error/frag %x csum %x\n", status,
sb->rxcsum);
@@ -1388,7 +1388,7 @@
error = gen_newbuf_rx(sc, q, index);
if (error != 0) {
if_inc_counter(ifp, IFCOUNTER_IQDROPS, 1);
- if (ifp->if_flags & IFF_DEBUG)
+ if (if_getflags(ifp) & IFF_DEBUG)
device_printf(sc->dev, "gen_newbuf_rx %d\n",
error);
/* reuse previous mbuf */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 11, 4:12 PM (20 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15755420
Default Alt Text
D37832.diff (2 KB)
Attached To
Mode
D37832: Mechanically convert genet(4) to DrvAPI
Attached
Detach File
Event Timeline
Log In to Comment