Index: branches/2021Q1/net/aquantia-atlantic-kmod/Makefile =================================================================== --- branches/2021Q1/net/aquantia-atlantic-kmod/Makefile (revision 566275) +++ branches/2021Q1/net/aquantia-atlantic-kmod/Makefile (revision 566276) @@ -1,25 +1,26 @@ # $FreeBSD$ PORTNAME= aquantia-atlantic-kmod PORTVERSION= 0.0.5 +PORTREVISION= 1 CATEGORIES= net MAINTAINER= koobs@FreeBSD.org COMMENT= Aquantia AQtion (Atlantic) Network Driver (Development Preview) LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE USES= kmod uidfix USE_GITHUB= yes GH_ACCOUNT= Aquantia GH_PROJECT= aqtion-freebsd GH_TAGNAME= 4816644 # Strip -Werror from sys/conf/kmod.mk MAKE_ENV= WERROR="" PLIST_FILES= ${KMODDIR}/if_atlantic.ko .include Index: branches/2021Q1/net/aquantia-atlantic-kmod/files/patch-aq__hw.c =================================================================== --- branches/2021Q1/net/aquantia-atlantic-kmod/files/patch-aq__hw.c (nonexistent) +++ branches/2021Q1/net/aquantia-atlantic-kmod/files/patch-aq__hw.c (revision 566276) @@ -0,0 +1,30 @@ +Upstream PR: +https://github.com/Aquantia/aqtion-freebsd/pull/11 + +--- aq_hw.c.orig 2019-09-24 14:45:34 UTC ++++ aq_hw.c +@@ -160,7 +160,7 @@ static int aq_hw_init_ucp(struct aq_hw *hw) + unsigned int rnd = 0; + unsigned int ucp_0x370 = 0; + +- rnd = random(); ++ rnd = arc4random(); + + ucp_0x370 = 0x02020202 | (0xFEFEFEFE & rnd); + AQ_WRITE_REG(hw, AQ_HW_UCP_0X370_REG, ucp_0x370); +@@ -307,7 +307,6 @@ int aq_hw_get_mac_permanent(struct aq_hw *hw, u8 *mac + + /* Couldn't get MAC address from HW. Use auto-generated one. */ + if ((mac[0] & 1) || ((mac[0] | mac[1] | mac[2]) == 0)) { +- u64 seed = get_cyclecount(); + u16 rnd; + u32 h = 0; + u32 l = 0; +@@ -315,7 +314,6 @@ int aq_hw_get_mac_permanent(struct aq_hw *hw, u8 *mac + printf("atlantic: HW MAC address %x:%x:%x:%x:%x:%x is multicast or empty MAC", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); + printf("atlantic: Use random MAC address"); + +- srandom(seed); + rnd = random(); + + /* chip revision */ Property changes on: branches/2021Q1/net/aquantia-atlantic-kmod/files/patch-aq__hw.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2021Q1/net/aquantia-atlantic-kmod/files/patch-aq__main.c =================================================================== --- branches/2021Q1/net/aquantia-atlantic-kmod/files/patch-aq__main.c (nonexistent) +++ branches/2021Q1/net/aquantia-atlantic-kmod/files/patch-aq__main.c (revision 566276) @@ -0,0 +1,61 @@ +Upstream PR: +https://github.com/Aquantia/aqtion-freebsd/pull/11 + +--- aq_main.c.orig 2019-09-24 14:45:34 UTC ++++ aq_main.c +@@ -735,6 +735,23 @@ static uint64_t aq_if_get_counter(if_ctx_t ctx, ift_co + } + } + ++#if __FreeBSD_version >= 1300054 ++static u_int aq_mc_filter_apply(void *arg, struct sockaddr_dl *dl, int count) ++{ ++ struct aq_dev *softc = arg; ++ struct aq_hw *hw = &softc->hw; ++ u8 *mac_addr = NULL; ++ ++ if (count == AQ_HW_MAC_MAX) ++ return (0); ++ ++ mac_addr = LLADDR(dl); ++ aq_hw_mac_addr_set(hw, mac_addr, count + 1); ++ ++ aq_log_detail("set %d mc address %6D", count + 1, mac_addr, ":"); ++ return (1); ++} ++#else + static int aq_mc_filter_apply(void *arg, struct ifmultiaddr *ifma, int count) + { + struct aq_dev *softc = arg; +@@ -752,6 +769,7 @@ static int aq_mc_filter_apply(void *arg, struct ifmult + aq_log_detail("set %d mc address %6D", count + 1, mac_addr, ":"); + return (1); + } ++#endif + + static bool aq_is_mc_promisc_required(struct aq_dev *softc) + { +@@ -764,15 +782,22 @@ static void aq_if_multi_set(if_ctx_t ctx) + struct ifnet *ifp = iflib_get_ifp(ctx); + struct aq_hw *hw = &softc->hw; + AQ_DBG_ENTER(); +- ++#if __FreeBSD_version >= 1300054 ++ softc->mcnt = if_llmaddr_count(iflib_get_ifp(ctx)); ++#else + softc->mcnt = if_multiaddr_count(iflib_get_ifp(ctx), AQ_HW_MAC_MAX); ++#endif + if (softc->mcnt >= AQ_HW_MAC_MAX) + { + aq_hw_set_promisc(hw, !!(ifp->if_flags & IFF_PROMISC), + aq_is_vlan_promisc_required(softc), + !!(ifp->if_flags & IFF_ALLMULTI) || aq_is_mc_promisc_required(softc)); + }else{ ++#if __FreeBSD_version >= 1300054 ++ if_foreach_llmaddr(iflib_get_ifp(ctx), aq_mc_filter_apply, softc); ++#else + if_multi_apply(iflib_get_ifp(ctx), aq_mc_filter_apply, softc); ++#endif + } + AQ_DBG_EXIT(0); + } Property changes on: branches/2021Q1/net/aquantia-atlantic-kmod/files/patch-aq__main.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2021Q1 =================================================================== --- branches/2021Q1 (revision 566275) +++ branches/2021Q1 (revision 566276) Property changes on: branches/2021Q1 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r564758