net/intel-em-kmod: unbreak on -CURRENT
link_elf_obj: symbol if_multiaddr_array undefined PR: 250918 Approved by: maintainer timeout (3 weeks)
This commit is contained in:
parent
24c6210e9c
commit
04b899fd7c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=556549
@ -17,5 +17,6 @@ MAX_NETMAP_OSVERSION= 1199999 # Doesn't build w/NETMAP on 12
|
||||
MASTERDIR= ${.CURDIR}/../intel-ixl-kmod
|
||||
PKGDIR= ${.CURDIR}
|
||||
DISTINFO_FILE= ${.CURDIR}/distinfo
|
||||
PATCHDIR= ${.CURDIR}/files
|
||||
|
||||
.include "${MASTERDIR}/Makefile"
|
||||
|
98
net/intel-em-kmod/files/patch-base-r353844
Normal file
98
net/intel-em-kmod/files/patch-base-r353844
Normal file
@ -0,0 +1,98 @@
|
||||
https://svnweb.freebsd.org/changeset/base/353844
|
||||
|
||||
--- if_em.c.orig 2020-04-08 15:13:17 UTC
|
||||
+++ if_em.c
|
||||
@@ -2275,7 +2275,11 @@ em_disable_promisc(struct adapter *adapter)
|
||||
if (if_getflags(ifp) & IFF_ALLMULTI)
|
||||
mcnt = MAX_NUM_MULTICAST_ADDRESSES;
|
||||
else
|
||||
+#if __FreeBSD_version > 1300053
|
||||
+ mcnt = if_llmaddr_count(ifp);
|
||||
+#else
|
||||
mcnt = if_multiaddr_count(ifp, MAX_NUM_MULTICAST_ADDRESSES);
|
||||
+#endif
|
||||
/* Don't disable if in MAX groups */
|
||||
if (mcnt < MAX_NUM_MULTICAST_ADDRESSES)
|
||||
reg_rctl &= (~E1000_RCTL_MPE);
|
||||
@@ -2283,7 +2287,21 @@ em_disable_promisc(struct adapter *adapter)
|
||||
E1000_WRITE_REG(&adapter->hw, E1000_RCTL, reg_rctl);
|
||||
}
|
||||
|
||||
+#if __FreeBSD_version > 1300053
|
||||
+static u_int
|
||||
+em_copy_maddr(void *arg, struct sockaddr_dl *sdl, u_int cnt)
|
||||
+{
|
||||
+ u8 *mta = arg;
|
||||
|
||||
+ if (cnt == MAX_NUM_MULTICAST_ADDRESSES)
|
||||
+ return (1);
|
||||
+
|
||||
+ bcopy(LLADDR(sdl), &mta[cnt * ETHER_ADDR_LEN], ETHER_ADDR_LEN);
|
||||
+
|
||||
+ return (1);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
/*********************************************************************
|
||||
* Multicast Update
|
||||
*
|
||||
@@ -2314,7 +2332,11 @@ em_set_multi(struct adapter *adapter)
|
||||
msec_delay(5);
|
||||
}
|
||||
|
||||
+#if __FreeBSD_version > 1300053
|
||||
+ mcnt = if_foreach_llmaddr(ifp, em_copy_maddr, mta);
|
||||
+#else
|
||||
if_multiaddr_array(ifp, mta, &mcnt, MAX_NUM_MULTICAST_ADDRESSES);
|
||||
+#endif
|
||||
|
||||
if (mcnt >= MAX_NUM_MULTICAST_ADDRESSES) {
|
||||
reg_rctl = E1000_READ_REG(&adapter->hw, E1000_RCTL);
|
||||
--- if_lem.c.orig 2020-04-08 15:13:17 UTC
|
||||
+++ if_lem.c
|
||||
@@ -2019,7 +2019,11 @@ lem_disable_promisc(struct adapter *adapter)
|
||||
if (if_getflags(ifp) & IFF_ALLMULTI)
|
||||
mcnt = MAX_NUM_MULTICAST_ADDRESSES;
|
||||
else
|
||||
+#if __FreeBSD_version > 1300053
|
||||
+ mcnt = if_llmaddr_count(ifp);
|
||||
+#else
|
||||
mcnt = if_multiaddr_count(ifp, MAX_NUM_MULTICAST_ADDRESSES);
|
||||
+#endif
|
||||
|
||||
/* Don't disable if in MAX groups */
|
||||
if (mcnt < MAX_NUM_MULTICAST_ADDRESSES)
|
||||
@@ -2028,7 +2032,21 @@ lem_disable_promisc(struct adapter *adapter)
|
||||
E1000_WRITE_REG(&adapter->hw, E1000_RCTL, reg_rctl);
|
||||
}
|
||||
|
||||
+#if __FreeBSD_version > 1300053
|
||||
+static u_int
|
||||
+em_copy_maddr(void *arg, struct sockaddr_dl *sdl, u_int cnt)
|
||||
+{
|
||||
+ u8 *mta = arg;
|
||||
|
||||
+ if (cnt == MAX_NUM_MULTICAST_ADDRESSES)
|
||||
+ return (1);
|
||||
+
|
||||
+ bcopy(LLADDR(sdl), &mta[cnt * ETHER_ADDR_LEN], ETHER_ADDR_LEN);
|
||||
+
|
||||
+ return (1);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
/*********************************************************************
|
||||
* Multicast Update
|
||||
*
|
||||
@@ -2059,7 +2077,11 @@ lem_set_multi(struct adapter *adapter)
|
||||
msec_delay(5);
|
||||
}
|
||||
|
||||
+#if __FreeBSD_version > 1300053
|
||||
+ mcnt = if_foreach_llmaddr(ifp, em_copy_maddr, mta);
|
||||
+#else
|
||||
if_multiaddr_array(ifp, mta, &mcnt, MAX_NUM_MULTICAST_ADDRESSES);
|
||||
+#endif
|
||||
|
||||
if (mcnt >= MAX_NUM_MULTICAST_ADDRESSES) {
|
||||
reg_rctl = E1000_READ_REG(&adapter->hw, E1000_RCTL);
|
Loading…
Reference in New Issue
Block a user