Module Name: src
Committed By: riastradh
Date: Thu Mar 3 05:53:04 UTC 2022
Modified Files:
src/sys/dev/usb: if_aue.c if_axe.c if_axen.c if_cue.c if_kue.c if_mos.c
if_mue.c if_smsc.c if_udav.c if_ure.c if_url.c
Log Message:
usbnet drivers: Omit needless uno_mcast locked subroutines.
uno_mcast is now called with the core lock already held so there is
no need for a separate locked subroutine.
To generate a diff of this commit:
cvs rdiff -u -r1.178 -r1.179 src/sys/dev/usb/if_aue.c
cvs rdiff -u -r1.140 -r1.141 src/sys/dev/usb/if_axe.c
cvs rdiff -u -r1.82 -r1.83 src/sys/dev/usb/if_axen.c
cvs rdiff -u -r1.98 -r1.99 src/sys/dev/usb/if_cue.c
cvs rdiff -u -r1.111 -r1.112 src/sys/dev/usb/if_kue.c
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/usb/if_mos.c
cvs rdiff -u -r1.71 -r1.72 src/sys/dev/usb/if_mue.c
cvs rdiff -u -r1.80 -r1.81 src/sys/dev/usb/if_smsc.c
cvs rdiff -u -r1.85 -r1.86 src/sys/dev/usb/if_udav.c
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/usb/if_ure.c
cvs rdiff -u -r1.86 -r1.87 src/sys/dev/usb/if_url.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/usb/if_aue.c
diff -u src/sys/dev/usb/if_aue.c:1.178 src/sys/dev/usb/if_aue.c:1.179
--- src/sys/dev/usb/if_aue.c:1.178 Thu Mar 3 05:52:55 2022
+++ src/sys/dev/usb/if_aue.c Thu Mar 3 05:53:04 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: if_aue.c,v 1.178 2022/03/03 05:52:55 riastradh Exp $ */
+/* $NetBSD: if_aue.c,v 1.179 2022/03/03 05:53:04 riastradh Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -76,7 +76,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.178 2022/03/03 05:52:55 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.179 2022/03/03 05:53:04 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -611,10 +611,10 @@ aue_crc(void *addrv)
}
static void
-aue_setiff_locked(struct usbnet *un)
+aue_uno_mcast(struct ifnet *ifp)
{
+ struct usbnet * const un = ifp->if_softc;
struct aue_softc * const sc = usbnet_softc(un);
- struct ifnet * const ifp = usbnet_ifp(un);
struct ethercom * ec = usbnet_ec(un);
struct ether_multi *enm;
struct ether_multistep step;
@@ -988,7 +988,7 @@ aue_uno_init(struct ifnet *ifp)
rv = usbnet_init_rx_tx(un);
/* Load the multicast filter. */
- aue_setiff_locked(un);
+ aue_uno_mcast(ifp);
/* Enable RX and TX */
aue_csr_write_1(sc, AUE_CTL0, AUE_CTL0_RXSTAT_APPEND | AUE_CTL0_RX_ENB);
@@ -1001,18 +1001,6 @@ aue_uno_init(struct ifnet *ifp)
}
static void
-aue_uno_mcast(struct ifnet *ifp)
-{
-
- AUEHIST_FUNC();
- AUEHIST_CALLARGSN(5, "aue%jd: enter",
- device_unit(((struct usbnet *)(ifp->if_softc))->un_dev),
- 0, 0, 0);
-
- aue_setiff_locked(ifp);
-}
-
-static void
aue_uno_stop(struct ifnet *ifp, int disable)
{
struct usbnet * const un = ifp->if_softc;
Index: src/sys/dev/usb/if_axe.c
diff -u src/sys/dev/usb/if_axe.c:1.140 src/sys/dev/usb/if_axe.c:1.141
--- src/sys/dev/usb/if_axe.c:1.140 Thu Mar 3 05:52:46 2022
+++ src/sys/dev/usb/if_axe.c Thu Mar 3 05:53:04 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: if_axe.c,v 1.140 2022/03/03 05:52:46 riastradh Exp $ */
+/* $NetBSD: if_axe.c,v 1.141 2022/03/03 05:53:04 riastradh Exp $ */
/* $OpenBSD: if_axe.c,v 1.137 2016/04/13 11:03:37 mpi Exp $ */
/*
@@ -87,7 +87,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.140 2022/03/03 05:52:46 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.141 2022/03/03 05:53:04 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -426,11 +426,11 @@ axe_uno_mii_statchg(struct ifnet *ifp)
}
static void
-axe_rcvfilt_locked(struct usbnet *un)
+axe_uno_mcast(struct ifnet *ifp)
{
AXEHIST_FUNC(); AXEHIST_CALLED();
+ struct usbnet * const un = ifp->if_softc;
struct axe_softc * const sc = usbnet_softc(un);
- struct ifnet * const ifp = usbnet_ifp(un);
struct ethercom *ec = usbnet_ec(un);
struct ether_multi *enm;
struct ether_multistep step;
@@ -1301,20 +1301,12 @@ axe_uno_init(struct ifnet *ifp)
axe_cmd(sc, AXE_CMD_RXCTL_WRITE, 0, rxmode, NULL);
/* Accept multicast frame or run promisc. mode */
- axe_rcvfilt_locked(un);
+ axe_uno_mcast(ifp);
return usbnet_init_rx_tx(un);
}
static void
-axe_uno_mcast(struct ifnet *ifp)
-{
- struct usbnet * const un = ifp->if_softc;
-
- axe_rcvfilt_locked(un);
-}
-
-static void
axe_uno_stop(struct ifnet *ifp, int disable)
{
struct usbnet * const un = ifp->if_softc;
Index: src/sys/dev/usb/if_axen.c
diff -u src/sys/dev/usb/if_axen.c:1.82 src/sys/dev/usb/if_axen.c:1.83
--- src/sys/dev/usb/if_axen.c:1.82 Thu Mar 3 05:52:46 2022
+++ src/sys/dev/usb/if_axen.c Thu Mar 3 05:53:04 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: if_axen.c,v 1.82 2022/03/03 05:52:46 riastradh Exp $ */
+/* $NetBSD: if_axen.c,v 1.83 2022/03/03 05:53:04 riastradh Exp $ */
/* $OpenBSD: if_axen.c,v 1.3 2013/10/21 10:10:22 yuo Exp $ */
/*
@@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.82 2022/03/03 05:52:46 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.83 2022/03/03 05:53:04 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -225,9 +225,9 @@ axen_uno_mii_statchg(struct ifnet *ifp)
}
static void
-axen_setiff_locked(struct usbnet *un)
+axen_uno_mcast(struct ifnet *ifp)
{
- struct ifnet * const ifp = usbnet_ifp(un);
+ struct usbnet * const un = ifp->if_softc;
struct ethercom *ec = usbnet_ec(un);
struct ether_multi *enm;
struct ether_multistep step;
@@ -569,14 +569,6 @@ axen_uno_ioctl(struct ifnet *ifp, u_long
return 0;
}
-static void
-axen_uno_mcast(struct ifnet *ifp)
-{
- struct usbnet * const un = ifp->if_softc;
-
- axen_setiff_locked(un);
-}
-
static int
axen_match(device_t parent, cfdata_t match, void *aux)
{
@@ -916,7 +908,7 @@ axen_uno_init(struct ifnet *ifp)
axen_setoe_locked(un);
/* Program promiscuous mode and multicast filters. */
- axen_setiff_locked(un);
+ axen_uno_mcast(ifp);
/* Enable receiver, set RX mode */
axen_cmd(un, AXEN_CMD_MAC_READ2, 2, AXEN_MAC_RXCTL, &wval);
Index: src/sys/dev/usb/if_cue.c
diff -u src/sys/dev/usb/if_cue.c:1.98 src/sys/dev/usb/if_cue.c:1.99
--- src/sys/dev/usb/if_cue.c:1.98 Thu Mar 3 05:52:46 2022
+++ src/sys/dev/usb/if_cue.c Thu Mar 3 05:53:04 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: if_cue.c,v 1.98 2022/03/03 05:52:46 riastradh Exp $ */
+/* $NetBSD: if_cue.c,v 1.99 2022/03/03 05:53:04 riastradh Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -57,7 +57,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_cue.c,v 1.98 2022/03/03 05:52:46 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_cue.c,v 1.99 2022/03/03 05:53:04 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -357,11 +357,11 @@ cue_crc(const char *addr)
}
static void
-cue_setiff_locked(struct usbnet *un)
+cue_uno_mcast(struct ifnet *ifp)
{
+ struct usbnet *un = ifp->if_softc;
struct cue_softc *sc = usbnet_softc(un);
struct ethercom *ec = usbnet_ec(un);
- struct ifnet *ifp = usbnet_ifp(un);
struct ether_multi *enm;
struct ether_multistep step;
uint32_t h, i;
@@ -648,7 +648,7 @@ cue_uno_init(struct ifnet *ifp)
cue_csr_write_1(un, CUE_ETHCTL, ctl);
/* Load the multicast filter. */
- cue_setiff_locked(un);
+ cue_uno_mcast(ifp);
/*
* Set the number of RX and TX buffers that we want
@@ -667,14 +667,6 @@ cue_uno_init(struct ifnet *ifp)
return usbnet_init_rx_tx(un);
}
-static void
-cue_uno_mcast(struct ifnet *ifp)
-{
- struct usbnet * const un = ifp->if_softc;
-
- cue_setiff_locked(un);
-}
-
/* Stop and reset the adapter. */
static void
cue_uno_stop(struct ifnet *ifp, int disable)
Index: src/sys/dev/usb/if_kue.c
diff -u src/sys/dev/usb/if_kue.c:1.111 src/sys/dev/usb/if_kue.c:1.112
--- src/sys/dev/usb/if_kue.c:1.111 Thu Mar 3 05:52:46 2022
+++ src/sys/dev/usb/if_kue.c Thu Mar 3 05:53:04 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: if_kue.c,v 1.111 2022/03/03 05:52:46 riastradh Exp $ */
+/* $NetBSD: if_kue.c,v 1.112 2022/03/03 05:53:04 riastradh Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_kue.c,v 1.111 2022/03/03 05:52:46 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_kue.c,v 1.112 2022/03/03 05:53:04 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -318,11 +318,11 @@ kue_load_fw(struct usbnet *un)
}
static void
-kue_setiff_locked(struct usbnet *un)
+kue_uno_mcast(struct ifnet *ifp)
{
+ struct usbnet * un = ifp->if_softc;
struct ethercom * ec = usbnet_ec(un);
struct kue_softc * sc = usbnet_softc(un);
- struct ifnet * const ifp = usbnet_ifp(un);
struct ether_multi *enm;
struct ether_multistep step;
int i;
@@ -622,19 +622,11 @@ kue_uno_init(struct ifnet *ifp)
kue_setword(un, KUE_CMD_SET_URB_SIZE, 64);
/* Load the multicast filter. */
- kue_setiff_locked(un);
+ kue_uno_mcast(ifp);
return usbnet_init_rx_tx(un);
}
-static void
-kue_uno_mcast(struct ifnet *ifp)
-{
- struct usbnet * const un = ifp->if_softc;
-
- kue_setiff_locked(un);
-}
-
#ifdef _MODULE
#include "ioconf.c"
#endif
Index: src/sys/dev/usb/if_mos.c
diff -u src/sys/dev/usb/if_mos.c:1.14 src/sys/dev/usb/if_mos.c:1.15
--- src/sys/dev/usb/if_mos.c:1.14 Thu Mar 3 05:52:46 2022
+++ src/sys/dev/usb/if_mos.c Thu Mar 3 05:53:04 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: if_mos.c,v 1.14 2022/03/03 05:52:46 riastradh Exp $ */
+/* $NetBSD: if_mos.c,v 1.15 2022/03/03 05:53:04 riastradh Exp $ */
/* $OpenBSD: if_mos.c,v 1.40 2019/07/07 06:40:10 kevlo Exp $ */
/*
@@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_mos.c,v 1.14 2022/03/03 05:52:46 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_mos.c,v 1.15 2022/03/03 05:53:04 riastradh Exp $");
#include <sys/param.h>
@@ -458,9 +458,9 @@ mos_uno_mii_statchg(struct ifnet *ifp)
}
static void
-mos_rcvfilt_locked(struct usbnet *un)
+mos_uno_mcast(struct ifnet *ifp)
{
- struct ifnet *ifp = usbnet_ifp(un);
+ struct usbnet *un = ifp->if_softc;
struct ethercom *ec = usbnet_ec(un);
struct ether_multi *enm;
struct ether_multistep step;
@@ -748,7 +748,7 @@ mos_uno_init(struct ifnet *ifp)
mos_reg_write_1(un, MOS_IPG1, ipgs[1]);
/* Accept multicast frame or run promisc. mode */
- mos_rcvfilt_locked(un);
+ mos_uno_mcast(ifp);
/* Enable receiver and transmitter, bridge controls speed/duplex mode */
rxmode = mos_reg_read_1(un, MOS_CTL);
@@ -759,14 +759,6 @@ mos_uno_init(struct ifnet *ifp)
return usbnet_init_rx_tx(un);
}
-static void
-mos_uno_mcast(struct ifnet *ifp)
-{
- struct usbnet * const un = ifp->if_softc;
-
- mos_rcvfilt_locked(un);
-}
-
void
mos_uno_stop(struct ifnet *ifp, int disable)
{
Index: src/sys/dev/usb/if_mue.c
diff -u src/sys/dev/usb/if_mue.c:1.71 src/sys/dev/usb/if_mue.c:1.72
--- src/sys/dev/usb/if_mue.c:1.71 Thu Mar 3 05:52:46 2022
+++ src/sys/dev/usb/if_mue.c Thu Mar 3 05:53:04 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: if_mue.c,v 1.71 2022/03/03 05:52:46 riastradh Exp $ */
+/* $NetBSD: if_mue.c,v 1.72 2022/03/03 05:53:04 riastradh Exp $ */
/* $OpenBSD: if_mue.c,v 1.3 2018/08/04 16:42:46 jsg Exp $ */
/*
@@ -20,7 +20,7 @@
/* Driver for Microchip LAN7500/LAN7800 chipsets. */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_mue.c,v 1.71 2022/03/03 05:52:46 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_mue.c,v 1.72 2022/03/03 05:53:04 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -92,14 +92,13 @@ static int mue_chip_init(struct usbnet *
static void mue_set_macaddr(struct usbnet *);
static int mue_get_macaddr(struct usbnet *, prop_dictionary_t);
static int mue_prepare_tso(struct usbnet *, struct mbuf *);
-static void mue_setiff_locked(struct usbnet *);
+static void mue_uno_mcast(struct ifnet *);
static void mue_sethwcsum_locked(struct usbnet *);
static void mue_setmtu_locked(struct usbnet *);
static void mue_reset(struct usbnet *);
static void mue_uno_stop(struct ifnet *, int);
static int mue_uno_ioctl(struct ifnet *, u_long, void *);
-static void mue_uno_mcast(struct ifnet *);
static int mue_uno_mii_read_reg(struct usbnet *, int, int, uint16_t *);
static int mue_uno_mii_write_reg(struct usbnet *, int, int, uint16_t);
static void mue_uno_mii_statchg(struct ifnet *);
@@ -997,10 +996,10 @@ mue_prepare_tso(struct usbnet *un, struc
}
static void
-mue_setiff_locked(struct usbnet *un)
+mue_uno_mcast(struct ifnet *ifp)
{
+ struct usbnet *un = ifp->if_softc;
struct ethercom *ec = usbnet_ec(un);
- struct ifnet * const ifp = usbnet_ifp(un);
const uint8_t *enaddr = CLLADDR(ifp->if_sadl);
struct ether_multi *enm;
struct ether_multistep step;
@@ -1242,7 +1241,7 @@ mue_uno_init(struct ifnet *ifp)
mue_set_macaddr(un);
/* Load the multicast filter. */
- mue_setiff_locked(un);
+ mue_uno_mcast(ifp);
/* TCP/UDP checksum offload engines. */
mue_sethwcsum_locked(un);
@@ -1277,14 +1276,6 @@ mue_uno_ioctl(struct ifnet *ifp, u_long
}
static void
-mue_uno_mcast(struct ifnet *ifp)
-{
- struct usbnet * const un = ifp->if_softc;
-
- mue_setiff_locked(un);
-}
-
-static void
mue_reset(struct usbnet *un)
{
if (usbnet_isdying(un))
Index: src/sys/dev/usb/if_smsc.c
diff -u src/sys/dev/usb/if_smsc.c:1.80 src/sys/dev/usb/if_smsc.c:1.81
--- src/sys/dev/usb/if_smsc.c:1.80 Thu Mar 3 05:52:46 2022
+++ src/sys/dev/usb/if_smsc.c Thu Mar 3 05:53:04 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: if_smsc.c,v 1.80 2022/03/03 05:52:46 riastradh Exp $ */
+/* $NetBSD: if_smsc.c,v 1.81 2022/03/03 05:53:04 riastradh Exp $ */
/* $OpenBSD: if_smsc.c,v 1.4 2012/09/27 12:38:11 jsg Exp $ */
/* $FreeBSD: src/sys/dev/usb/net/if_smsc.c,v 1.1 2012/08/15 04:03:55 gonzo Exp $ */
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_smsc.c,v 1.80 2022/03/03 05:52:46 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_smsc.c,v 1.81 2022/03/03 05:53:04 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -411,11 +411,11 @@ smsc_hash(uint8_t addr[ETHER_ADDR_LEN])
}
static void
-smsc_setiff_locked(struct usbnet *un)
+smsc_uno_mcast(struct ifnet *ifp)
{
USMSCHIST_FUNC(); USMSCHIST_CALLED();
+ struct usbnet * const un = ifp->if_softc;
struct smsc_softc * const sc = usbnet_softc(un);
- struct ifnet * const ifp = usbnet_ifp(un);
struct ethercom *ec = usbnet_ec(un);
struct ether_multi *enm;
struct ether_multistep step;
@@ -568,7 +568,7 @@ smsc_uno_init(struct ifnet *ifp)
smsc_reset(sc);
/* Load the multicast filter. */
- smsc_setiff_locked(un);
+ smsc_uno_mcast(ifp);
/* TCP/UDP checksum offload engines. */
smsc_setoe_locked(un);
@@ -757,14 +757,6 @@ smsc_uno_ioctl(struct ifnet *ifp, u_long
return 0;
}
-static void
-smsc_uno_mcast(struct ifnet *ifp)
-{
- struct usbnet * const un = ifp->if_softc;
-
- smsc_setiff_locked(un);
-}
-
static int
smsc_match(device_t parent, cfdata_t match, void *aux)
{
Index: src/sys/dev/usb/if_udav.c
diff -u src/sys/dev/usb/if_udav.c:1.85 src/sys/dev/usb/if_udav.c:1.86
--- src/sys/dev/usb/if_udav.c:1.85 Thu Mar 3 05:52:46 2022
+++ src/sys/dev/usb/if_udav.c Thu Mar 3 05:53:04 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: if_udav.c,v 1.85 2022/03/03 05:52:46 riastradh Exp $ */
+/* $NetBSD: if_udav.c,v 1.86 2022/03/03 05:53:04 riastradh Exp $ */
/* $nabe: if_udav.c,v 1.3 2003/08/21 16:57:19 nabe Exp $ */
/*
@@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_udav.c,v 1.85 2022/03/03 05:52:46 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_udav.c,v 1.86 2022/03/03 05:53:04 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -74,7 +74,6 @@ static int udav_uno_mii_read_reg(struct
static int udav_uno_mii_write_reg(struct usbnet *, int, int, uint16_t);
static void udav_uno_mii_statchg(struct ifnet *);
static int udav_uno_init(struct ifnet *);
-static void udav_setiff_locked(struct usbnet *);
static void udav_reset(struct usbnet *);
static int udav_csr_read(struct usbnet *, int, void *, int);
@@ -501,7 +500,7 @@ udav_uno_init(struct ifnet *ifp)
UDAV_CLRBIT(un, UDAV_RCR, UDAV_RCR_ALL | UDAV_RCR_PRMSC);
/* Load the multicast filter */
- udav_setiff_locked(un);
+ udav_uno_mcast(ifp);
/* Enable RX */
UDAV_SETBIT(un, UDAV_RCR, UDAV_RCR_RXEN);
@@ -576,10 +575,10 @@ udav_chip_init(struct usbnet *un)
(ether_crc32_le((addr), ETHER_ADDR_LEN) & ((1 << UDAV_BITS) - 1))
static void
-udav_setiff_locked(struct usbnet *un)
+udav_uno_mcast(struct ifnet *ifp)
{
+ struct usbnet * const un = ifp->if_softc;
struct ethercom *ec = usbnet_ec(un);
- struct ifnet * const ifp = usbnet_ifp(un);
struct ether_multi *enm;
struct ether_multistep step;
uint8_t hashes[8];
@@ -711,14 +710,6 @@ udav_uno_rx_loop(struct usbnet *un, stru
usbnet_enqueue(un, buf, pkt_len, 0, 0, 0);
}
-static void
-udav_uno_mcast(struct ifnet *ifp)
-{
- struct usbnet * const un = ifp->if_softc;
-
- udav_setiff_locked(un);
-}
-
/* Stop the adapter and free any mbufs allocated to the RX and TX lists. */
static void
udav_uno_stop(struct ifnet *ifp, int disable)
Index: src/sys/dev/usb/if_ure.c
diff -u src/sys/dev/usb/if_ure.c:1.47 src/sys/dev/usb/if_ure.c:1.48
--- src/sys/dev/usb/if_ure.c:1.47 Thu Mar 3 05:52:46 2022
+++ src/sys/dev/usb/if_ure.c Thu Mar 3 05:53:04 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ure.c,v 1.47 2022/03/03 05:52:46 riastradh Exp $ */
+/* $NetBSD: if_ure.c,v 1.48 2022/03/03 05:53:04 riastradh Exp $ */
/* $OpenBSD: if_ure.c,v 1.10 2018/11/02 21:32:30 jcs Exp $ */
/*-
@@ -30,7 +30,7 @@
/* RealTek RTL8152/RTL8153 10/100/Gigabit USB Ethernet device */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ure.c,v 1.47 2022/03/03 05:52:46 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ure.c,v 1.48 2022/03/03 05:53:04 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -331,10 +331,10 @@ ure_uno_miibus_statchg(struct ifnet *ifp
}
static void
-ure_rcvfilt_locked(struct usbnet *un)
+ure_uno_mcast(struct ifnet *ifp)
{
+ struct usbnet *un = ifp->if_softc;
struct ethercom *ec = usbnet_ec(un);
- struct ifnet *ifp = usbnet_ifp(un);
struct ether_multi *enm;
struct ether_multistep step;
uint32_t mchash[2] = { 0, 0 };
@@ -448,7 +448,7 @@ ure_uno_init(struct ifnet *ifp)
~URE_RXDY_GATED_EN);
/* Accept multicast frame or run promisc. mode. */
- ure_rcvfilt_locked(un);
+ ure_uno_mcast(ifp);
return usbnet_init_rx_tx(un);
}
@@ -790,14 +790,6 @@ ure_init_fifo(struct usbnet *un)
URE_TXFIFO_THR_NORMAL);
}
-static void
-ure_uno_mcast(struct ifnet *ifp)
-{
- struct usbnet * const un = ifp->if_softc;
-
- ure_rcvfilt_locked(un);
-}
-
static int
ure_match(device_t parent, cfdata_t match, void *aux)
{
Index: src/sys/dev/usb/if_url.c
diff -u src/sys/dev/usb/if_url.c:1.86 src/sys/dev/usb/if_url.c:1.87
--- src/sys/dev/usb/if_url.c:1.86 Thu Mar 3 05:52:46 2022
+++ src/sys/dev/usb/if_url.c Thu Mar 3 05:53:04 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: if_url.c,v 1.86 2022/03/03 05:52:46 riastradh Exp $ */
+/* $NetBSD: if_url.c,v 1.87 2022/03/03 05:53:04 riastradh Exp $ */
/*
* Copyright (c) 2001, 2002
@@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_url.c,v 1.86 2022/03/03 05:52:46 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_url.c,v 1.87 2022/03/03 05:53:04 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -77,11 +77,10 @@ static unsigned url_uno_tx_prepare(struc
static void url_uno_rx_loop(struct usbnet *, struct usbnet_chain *, uint32_t);
static int url_uno_mii_read_reg(struct usbnet *, int, int, uint16_t *);
static int url_uno_mii_write_reg(struct usbnet *, int, int, uint16_t);
-static void url_uno_mcast(struct ifnet *);
static void url_uno_stop(struct ifnet *, int);
static void url_uno_mii_statchg(struct ifnet *);
static int url_uno_init(struct ifnet *);
-static void url_rcvfilt_locked(struct usbnet *);
+static void url_uno_mcast(struct ifnet *);
static void url_reset(struct usbnet *);
static int url_csr_read_1(struct usbnet *, int);
@@ -393,7 +392,7 @@ url_uno_init(struct ifnet *ifp)
URL_SETBIT2(un, URL_RCR, URL_RCR_TAIL | URL_RCR_AD | URL_RCR_AB);
/* Accept multicast frame or run promisc. mode */
- url_rcvfilt_locked(un);
+ url_uno_mcast(ifp);
/* Enable RX and TX */
URL_SETBIT(un, URL_CR, URL_CR_TE | URL_CR_RE);
@@ -425,9 +424,9 @@ url_reset(struct usbnet *un)
}
static void
-url_rcvfilt_locked(struct usbnet *un)
+url_uno_mcast(struct ifnet *ifp)
{
- struct ifnet * const ifp = usbnet_ifp(un);
+ struct usbnet * const un = ifp->if_softc;
struct ethercom *ec = usbnet_ec(un);
struct ether_multi *enm;
struct ether_multistep step;
@@ -545,14 +544,6 @@ static void url_intr(void)
}
#endif
-static void
-url_uno_mcast(struct ifnet *ifp)
-{
- struct usbnet * const un = ifp->if_softc;
-
- url_rcvfilt_locked(un);
-}
-
/* Stop the adapter and free any mbufs allocated to the RX and TX lists. */
static void
url_uno_stop(struct ifnet *ifp, int disable)