Module Name: src
Committed By: mlelstv
Date: Sat Jul 6 07:09:22 UTC 2024
Modified Files:
src/sys/dev/usb: if_cdce.c
Log Message:
There is no link state for CDCE. Pretend that the link is always up so that
programs like dhcpcd will handle the interface.
To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/sys/dev/usb/if_cdce.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_cdce.c
diff -u src/sys/dev/usb/if_cdce.c:1.81 src/sys/dev/usb/if_cdce.c:1.82
--- src/sys/dev/usb/if_cdce.c:1.81 Thu Mar 3 05:56:28 2022
+++ src/sys/dev/usb/if_cdce.c Sat Jul 6 07:09:22 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: if_cdce.c,v 1.81 2022/03/03 05:56:28 riastradh Exp $ */
+/* $NetBSD: if_cdce.c,v 1.82 2024/07/06 07:09:22 mlelstv Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul <[email protected]>
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_cdce.c,v 1.81 2022/03/03 05:56:28 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_cdce.c,v 1.82 2024/07/06 07:09:22 mlelstv Exp $");
#include <sys/param.h>
@@ -251,6 +251,9 @@ cdce_attach(device_t parent, device_t se
usbnet_attach(un);
usbnet_attach_ifp(un, IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST,
0, NULL);
+
+ /* XXX There is no link state, pretend we are always on */
+ if_link_state_change(usbnet_ifp(un), LINK_STATE_UP);
}
static void