mirror of
https://git.freebsd.org/ports.git
synced 2025-06-17 02:30:44 -04:00
for at least some gigabit NICs (and, I suspect, all of them on FreeBSD). Specifically, I know it doesn't work for Intel gigabit NICs that i use the em(4) driver. This appears to be due to dodgy bitwise math in the upstream code. However, I note that the website given for the upstream code no longer appears to be working, so I'm not sure that there IS an upstream maintainer any longer. PR: ports/190160 Submitted by: Rob Levandowski <robl@macwhiz.com>
19 lines
364 B
C
19 lines
364 B
C
|
|
$FreeBSD$
|
|
|
|
--- src/if_media.c.orig
|
|
+++ src/if_media.c
|
|
@@ -95,8 +95,13 @@
|
|
*
|
|
*/
|
|
|
|
+#if __FreeBSD__ >= 2
|
|
+ type = IFM_TYPE(ifmr.ifm_active);
|
|
+ physical = IFM_SUBTYPE(ifmr.ifm_active);
|
|
+#else
|
|
type = ifmr.ifm_active & 0xf0;
|
|
physical = ifmr.ifm_active & 0x0f;
|
|
+#endif
|
|
|
|
#ifdef MEDIADEBUG
|
|
printf(" all: %6d\n", ifmr.ifm_current);
|