From owner-svn-src-stable-10@freebsd.org Sun Feb 3 00:36:14 2019 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39A6714AA7E3; Sun, 3 Feb 2019 00:36:14 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CE0DD71508; Sun, 3 Feb 2019 00:36:13 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BE7C5EAA3; Sun, 3 Feb 2019 00:36:13 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x130aDs0065679; Sun, 3 Feb 2019 00:36:13 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x130aDha065678; Sun, 3 Feb 2019 00:36:13 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201902030036.x130aDha065678@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 3 Feb 2019 00:36:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r343691 - in stable: 10/sys/contrib/ipfilter/netinet 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Group: stable-10 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 10/sys/contrib/ipfilter/netinet 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 343691 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CE0DD71508 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.948,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 00:36:14 -0000 Author: cy Date: Sun Feb 3 00:36:12 2019 New Revision: 343691 URL: https://svnweb.freebsd.org/changeset/base/343691 Log: MFC r343600: Document the instance context pointer. Modified: stable/10/sys/contrib/ipfilter/netinet/fil.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/contrib/ipfilter/netinet/fil.c stable/12/sys/contrib/ipfilter/netinet/fil.c Directory Properties: stable/11/ (props changed) stable/12/ (props changed) Modified: stable/10/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- stable/10/sys/contrib/ipfilter/netinet/fil.c Sun Feb 3 00:18:29 2019 (r343690) +++ stable/10/sys/contrib/ipfilter/netinet/fil.c Sun Feb 3 00:36:12 2019 (r343691) @@ -2781,7 +2781,8 @@ ipf_firewall(fin, passp) /* -2 == requires authentication */ /* Kernel: */ /* > 0 == filter error # for packet */ -/* Parameters: ip(I) - pointer to start of IPv4/6 packet */ +/* Parameters: ctx(I) - pointer to the instance context */ +/* ip(I) - pointer to start of IPv4/6 packet */ /* hlen(I) - length of header */ /* ifp(I) - pointer to interface this packet is on */ /* out(I) - 0 == packet going in, 1 == packet going out */ From owner-svn-src-stable-10@freebsd.org Mon Feb 4 03:44:08 2019 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2A7914BD085; Mon, 4 Feb 2019 03:44:08 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 55A5E6B9E1; Mon, 4 Feb 2019 03:44:08 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 313B15C3; Mon, 4 Feb 2019 03:44:08 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x143i8Fo025739; Mon, 4 Feb 2019 03:44:08 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x143i74B025737; Mon, 4 Feb 2019 03:44:07 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902040344.x143i74B025737@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Mon, 4 Feb 2019 03:44:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r343730 - in stable: 10/usr.sbin/ndiscvt 11/usr.sbin/ndiscvt 12/usr.sbin/ndiscvt X-SVN-Group: stable-10 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/usr.sbin/ndiscvt 11/usr.sbin/ndiscvt 12/usr.sbin/ndiscvt X-SVN-Commit-Revision: 343730 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 55A5E6B9E1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.948,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 03:44:08 -0000 Author: avos Date: Mon Feb 4 03:44:07 2019 New Revision: 343730 URL: https://svnweb.freebsd.org/changeset/base/343730 Log: MFC r343576: ndiscvt(8): abort if no IDs were found during conversion. PR: 69268 Submitted by: Modified: stable/10/usr.sbin/ndiscvt/inf.c stable/10/usr.sbin/ndiscvt/ndiscvt.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/usr.sbin/ndiscvt/inf.c stable/11/usr.sbin/ndiscvt/ndiscvt.c stable/12/usr.sbin/ndiscvt/inf.c stable/12/usr.sbin/ndiscvt/ndiscvt.c Directory Properties: stable/11/ (props changed) stable/12/ (props changed) Modified: stable/10/usr.sbin/ndiscvt/inf.c ============================================================================== --- stable/10/usr.sbin/ndiscvt/inf.c Mon Feb 4 02:18:27 2019 (r343729) +++ stable/10/usr.sbin/ndiscvt/inf.c Mon Feb 4 03:44:07 2019 (r343730) @@ -60,9 +60,9 @@ static struct assign (struct assign *); static struct section *find_section (const char *); -static void dump_deviceids_pci (void); -static void dump_deviceids_pcmcia (void); -static void dump_deviceids_usb (void); +static int dump_deviceids_pci (void); +static int dump_deviceids_pcmcia (void); +static int dump_deviceids_usb (void); static void dump_pci_id (const char *); static void dump_pcmcia_id (const char *); static void dump_usb_id (const char *); @@ -83,9 +83,11 @@ inf_parse (FILE *fp, FILE *outfp) yyin = fp; yyparse(); - dump_deviceids_pci(); - dump_deviceids_pcmcia(); - dump_deviceids_usb(); + if (dump_deviceids_pci() == 0 && + dump_deviceids_pcmcia() == 0 && + dump_deviceids_usb() == 0) + return (-1); + fprintf(outfp, "#ifdef NDIS_REGVALS\n"); dump_regvals(); fprintf(outfp, "#endif /* NDIS_REGVALS */\n"); @@ -278,7 +280,7 @@ dump_usb_id(const char *s) fprintf(ofp, "\t\\\n\t{ %s, %s, ", vidstr, pidstr); } -static void +static int dump_deviceids_pci() { struct assign *manf, *dev; @@ -368,10 +370,10 @@ done: fprintf(ofp, "\n\n"); - return; + return (found); } -static void +static int dump_deviceids_pcmcia() { struct assign *manf, *dev; @@ -461,10 +463,10 @@ done: fprintf(ofp, "\n\n"); - return; + return (found); } -static void +static int dump_deviceids_usb() { struct assign *manf, *dev; @@ -554,7 +556,7 @@ done: fprintf(ofp, "\n\n"); - return; + return (found); } static void Modified: stable/10/usr.sbin/ndiscvt/ndiscvt.c ============================================================================== --- stable/10/usr.sbin/ndiscvt/ndiscvt.c Mon Feb 4 02:18:27 2019 (r343729) +++ stable/10/usr.sbin/ndiscvt/ndiscvt.c Mon Feb 4 03:44:07 2019 (r343730) @@ -369,7 +369,8 @@ main(int argc, char *argv[]) err(1, "opening .INF file '%s' failed", inffile); - inf_parse(fp, outfp); + if (inf_parse(fp, outfp) != 0) + errx(1, "creating .INF file - no entries created, are you using the correct files?"); fclose(fp); } From owner-svn-src-stable-10@freebsd.org Tue Feb 5 03:01:15 2019 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1AF6814C5BB5; Tue, 5 Feb 2019 03:01:15 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 52E1589A33; Tue, 5 Feb 2019 03:01:14 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 21B0AFA64; Tue, 5 Feb 2019 03:01:14 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x1531Eha065819; Tue, 5 Feb 2019 03:01:14 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x1531Cw1065810; Tue, 5 Feb 2019 03:01:12 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902050301.x1531Cw1065810@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Tue, 5 Feb 2019 03:01:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r343760 - in stable: 10/sys/dev/usb/wlan 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan X-SVN-Group: stable-10 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/sys/dev/usb/wlan 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan X-SVN-Commit-Revision: 343760 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 52E1589A33 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 03:01:15 -0000 Author: avos Date: Tue Feb 5 03:01:10 2019 New Revision: 343760 URL: https://svnweb.freebsd.org/changeset/base/343760 Log: MFC r343541: Drop some unneeded includes from wireless USB drivers. Modified: stable/10/sys/dev/usb/wlan/if_rsu.c stable/10/sys/dev/usb/wlan/if_rum.c stable/10/sys/dev/usb/wlan/if_run.c stable/10/sys/dev/usb/wlan/if_uath.c stable/10/sys/dev/usb/wlan/if_upgt.c stable/10/sys/dev/usb/wlan/if_ural.c stable/10/sys/dev/usb/wlan/if_urtw.c stable/10/sys/dev/usb/wlan/if_zyd.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/dev/usb/wlan/if_rsu.c stable/11/sys/dev/usb/wlan/if_rum.c stable/11/sys/dev/usb/wlan/if_run.c stable/11/sys/dev/usb/wlan/if_uath.c stable/11/sys/dev/usb/wlan/if_upgt.c stable/11/sys/dev/usb/wlan/if_ural.c stable/11/sys/dev/usb/wlan/if_urtw.c stable/11/sys/dev/usb/wlan/if_zyd.c stable/12/sys/dev/usb/wlan/if_rsu.c stable/12/sys/dev/usb/wlan/if_rum.c stable/12/sys/dev/usb/wlan/if_run.c stable/12/sys/dev/usb/wlan/if_uath.c stable/12/sys/dev/usb/wlan/if_upgt.c stable/12/sys/dev/usb/wlan/if_ural.c stable/12/sys/dev/usb/wlan/if_urtw.c stable/12/sys/dev/usb/wlan/if_zyd.c Directory Properties: stable/11/ (props changed) stable/12/ (props changed) Modified: stable/10/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- stable/10/sys/dev/usb/wlan/if_rsu.c Tue Feb 5 02:33:57 2019 (r343759) +++ stable/10/sys/dev/usb/wlan/if_rsu.c Tue Feb 5 03:01:10 2019 (r343760) @@ -35,12 +35,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include - -#include -#include #include #include Modified: stable/10/sys/dev/usb/wlan/if_rum.c ============================================================================== --- stable/10/sys/dev/usb/wlan/if_rum.c Tue Feb 5 02:33:57 2019 (r343759) +++ stable/10/sys/dev/usb/wlan/if_rum.c Tue Feb 5 03:01:10 2019 (r343760) @@ -41,10 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include - #include #include #include Modified: stable/10/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/10/sys/dev/usb/wlan/if_run.c Tue Feb 5 02:33:57 2019 (r343759) +++ stable/10/sys/dev/usb/wlan/if_run.c Tue Feb 5 03:01:10 2019 (r343760) @@ -42,10 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include - #include #include #include Modified: stable/10/sys/dev/usb/wlan/if_uath.c ============================================================================== --- stable/10/sys/dev/usb/wlan/if_uath.c Tue Feb 5 02:33:57 2019 (r343759) +++ stable/10/sys/dev/usb/wlan/if_uath.c Tue Feb 5 03:01:10 2019 (r343760) @@ -80,10 +80,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include - #include #include #include Modified: stable/10/sys/dev/usb/wlan/if_upgt.c ============================================================================== --- stable/10/sys/dev/usb/wlan/if_upgt.c Tue Feb 5 02:33:57 2019 (r343759) +++ stable/10/sys/dev/usb/wlan/if_upgt.c Tue Feb 5 03:01:10 2019 (r343760) @@ -38,7 +38,6 @@ #include #include -#include #include #include Modified: stable/10/sys/dev/usb/wlan/if_ural.c ============================================================================== --- stable/10/sys/dev/usb/wlan/if_ural.c Tue Feb 5 02:33:57 2019 (r343759) +++ stable/10/sys/dev/usb/wlan/if_ural.c Tue Feb 5 03:01:10 2019 (r343760) @@ -43,10 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include - #include #include #include Modified: stable/10/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- stable/10/sys/dev/usb/wlan/if_urtw.c Tue Feb 5 02:33:57 2019 (r343759) +++ stable/10/sys/dev/usb/wlan/if_urtw.c Tue Feb 5 03:01:10 2019 (r343760) @@ -31,10 +31,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include - #include #include #include Modified: stable/10/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- stable/10/sys/dev/usb/wlan/if_zyd.c Tue Feb 5 02:33:57 2019 (r343759) +++ stable/10/sys/dev/usb/wlan/if_zyd.c Tue Feb 5 03:01:10 2019 (r343760) @@ -42,10 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include - #include #include #include From owner-svn-src-stable-10@freebsd.org Wed Feb 6 01:42:27 2019 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5D6414D7CEC; Wed, 6 Feb 2019 01:42:27 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 69D1674E60; Wed, 6 Feb 2019 01:42:27 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5DFC2265B1; Wed, 6 Feb 2019 01:42:27 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x161gRWa089852; Wed, 6 Feb 2019 01:42:27 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x161gRQI089851; Wed, 6 Feb 2019 01:42:27 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902060142.x161gRQI089851@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 6 Feb 2019 01:42:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r343816 - in stable: 10/sys/dev/usb/wlan 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan X-SVN-Group: stable-10 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/sys/dev/usb/wlan 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan X-SVN-Commit-Revision: 343816 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 69D1674E60 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.950,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 01:42:28 -0000 Author: avos Date: Wed Feb 6 01:42:26 2019 New Revision: 343816 URL: https://svnweb.freebsd.org/changeset/base/343816 Log: MFC r343542: upgt(4): unbreak build with UPGT_DEBUG Modified: stable/10/sys/dev/usb/wlan/if_upgt.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/dev/usb/wlan/if_upgt.c stable/12/sys/dev/usb/wlan/if_upgt.c Directory Properties: stable/11/ (props changed) stable/12/ (props changed) Modified: stable/10/sys/dev/usb/wlan/if_upgt.c ============================================================================== --- stable/10/sys/dev/usb/wlan/if_upgt.c Wed Feb 6 01:34:14 2019 (r343815) +++ stable/10/sys/dev/usb/wlan/if_upgt.c Wed Feb 6 01:42:26 2019 (r343816) @@ -1700,7 +1700,7 @@ upgt_fw_load(struct upgt_softc *sc) data_cmd->buflen = bsize; upgt_bulk_tx(sc, data_cmd); - DPRINTF(sc, UPGT_DEBUG_FW, "FW offset=%d, read=%d, sent=%d\n", + DPRINTF(sc, UPGT_DEBUG_FW, "FW offset=%zu, read=%d, sent=%d\n", offset, n, bsize); bsize = n; } @@ -1857,7 +1857,7 @@ upgt_fw_verify(struct upgt_softc *sc) } DPRINTF(sc, UPGT_DEBUG_FW, - "firmware Boot Record Area found at offset %d\n", offset); + "firmware Boot Record Area found at offset %zu\n", offset); /* * Parse Boot Record Area (BRA) options. From owner-svn-src-stable-10@freebsd.org Wed Feb 6 01:53:03 2019 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E7A314D8615; Wed, 6 Feb 2019 01:53:03 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CAE0B75B45; Wed, 6 Feb 2019 01:53:02 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BE1A12678F; Wed, 6 Feb 2019 01:53:02 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x161r2Oi094976; Wed, 6 Feb 2019 01:53:02 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x161r2OA094975; Wed, 6 Feb 2019 01:53:02 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902060153.x161r2OA094975@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 6 Feb 2019 01:53:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r343818 - in stable: 10/sys/net80211 11/sys/net80211 12/sys/net80211 X-SVN-Group: stable-10 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/sys/net80211 11/sys/net80211 12/sys/net80211 X-SVN-Commit-Revision: 343818 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CAE0B75B45 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 01:53:03 -0000 Author: avos Date: Wed Feb 6 01:53:01 2019 New Revision: 343818 URL: https://svnweb.freebsd.org/changeset/base/343818 Log: MFC r343697: net80211(4): fix rate check when 'roaming' ifconfig(8) option is set to 'auto' Do not try to clear 'basic rate' bit from roamRate; it cannot be here and, actually, this operation clears 'MCS rate' bit instead, breaking comparison for 11n / 11ac modes. Modified: stable/10/sys/net80211/ieee80211_scan_sta.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/net80211/ieee80211_scan_sta.c stable/12/sys/net80211/ieee80211_scan_sta.c Directory Properties: stable/11/ (props changed) stable/12/ (props changed) Modified: stable/10/sys/net80211/ieee80211_scan_sta.c ============================================================================== --- stable/10/sys/net80211/ieee80211_scan_sta.c Wed Feb 6 01:47:22 2019 (r343817) +++ stable/10/sys/net80211/ieee80211_scan_sta.c Wed Feb 6 01:53:01 2019 (r343818) @@ -1311,7 +1311,6 @@ sta_roam_check(struct ieee80211_scan_state *ss, struct curRssi = ic->ic_node_getrssi(ni); if (ucastRate == IEEE80211_FIXED_RATE_NONE) { curRate = ni->ni_txrate; - roamRate &= IEEE80211_RATE_VAL; IEEE80211_DPRINTF(vap, IEEE80211_MSG_ROAM, "%s: currssi %d currate %u roamrssi %d roamrate %u\n", __func__, curRssi, curRate, roamRssi, roamRate); From owner-svn-src-stable-10@freebsd.org Wed Feb 6 02:07:38 2019 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 581CE14D8A6F; Wed, 6 Feb 2019 02:07:38 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EE549765C8; Wed, 6 Feb 2019 02:07:37 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E14952693A; Wed, 6 Feb 2019 02:07:37 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x1627bvV000679; Wed, 6 Feb 2019 02:07:37 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x1627bcT000676; Wed, 6 Feb 2019 02:07:37 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902060207.x1627bcT000676@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 6 Feb 2019 02:07:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r343820 - in stable/10/sys: compat/ndis dev/if_ndis X-SVN-Group: stable-10 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable/10/sys: compat/ndis dev/if_ndis X-SVN-Commit-Revision: 343820 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EE549765C8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 02:07:38 -0000 Author: avos Date: Wed Feb 6 02:07:37 2019 New Revision: 343820 URL: https://svnweb.freebsd.org/changeset/base/343820 Log: MFC r343574: Fix compilation with 'option NDISAPI + device ndis' and without 'device pccard' in the kernel config file. PR: 171532 Reported by: Robert Bonomi Modified: stable/10/sys/compat/ndis/ndis_var.h stable/10/sys/dev/if_ndis/if_ndis.c stable/10/sys/dev/if_ndis/if_ndis_pccard.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/ndis/ndis_var.h ============================================================================== --- stable/10/sys/compat/ndis/ndis_var.h Wed Feb 6 02:06:00 2019 (r343819) +++ stable/10/sys/compat/ndis/ndis_var.h Wed Feb 6 02:07:37 2019 (r343820) @@ -1734,8 +1734,6 @@ extern int ndis_get_supported_oids(void *, ndis_oid ** extern int ndis_send_packets(void *, ndis_packet **, int); extern int ndis_send_packet(void *, ndis_packet *); extern int ndis_convert_res(void *); -extern int ndis_alloc_amem(void *); -extern void ndis_free_amem(void *); extern void ndis_free_packet(ndis_packet *); extern void ndis_free_bufs(ndis_buffer *); extern int ndis_reset_nic(void *); Modified: stable/10/sys/dev/if_ndis/if_ndis.c ============================================================================== --- stable/10/sys/dev/if_ndis/if_ndis.c Wed Feb 6 02:06:00 2019 (r343819) +++ stable/10/sys/dev/if_ndis/if_ndis.c Wed Feb 6 02:07:37 2019 (r343820) @@ -559,15 +559,6 @@ ndis_attach(dev) InitializeListHead(&sc->ndisusb_xferdonelist); callout_init(&sc->ndis_stat_callout, 1); - if (sc->ndis_iftype == PCMCIABus) { - error = ndis_alloc_amem(sc); - if (error) { - device_printf(dev, "failed to allocate " - "attribute memory\n"); - goto fail; - } - } - /* Create sysctl registry nodes */ ndis_create_sysctls(sc); @@ -1078,9 +1069,6 @@ ndis_detach(dev) if (ifp != NULL) if_free(ifp); - - if (sc->ndis_iftype == PCMCIABus) - ndis_free_amem(sc); if (sc->ndis_sc) ndis_destroy_dma(sc); Modified: stable/10/sys/dev/if_ndis/if_ndis_pccard.c ============================================================================== --- stable/10/sys/dev/if_ndis/if_ndis_pccard.c Wed Feb 6 02:06:00 2019 (r343819) +++ stable/10/sys/dev/if_ndis/if_ndis_pccard.c Wed Feb 6 02:07:37 2019 (r343820) @@ -70,6 +70,7 @@ MODULE_DEPEND(ndis, pccard, 1, 1, 1); static int ndis_probe_pccard (device_t); static int ndis_attach_pccard (device_t); +static int ndis_detach_pccard (device_t); static struct resource_list *ndis_get_resource_list (device_t, device_t); static int ndis_devcompare (interface_type, @@ -87,7 +88,7 @@ static device_method_t ndis_methods[] = { /* Device interface */ DEVMETHOD(device_probe, ndis_probe_pccard), DEVMETHOD(device_attach, ndis_attach_pccard), - DEVMETHOD(device_detach, ndis_detach), + DEVMETHOD(device_detach, ndis_detach_pccard), DEVMETHOD(device_shutdown, ndis_shutdown), DEVMETHOD(device_suspend, ndis_suspend), DEVMETHOD(device_resume, ndis_resume), @@ -171,6 +172,50 @@ ndis_probe_pccard(dev) return(ENXIO); } +#define NDIS_AM_RID 3 + +static int +ndis_alloc_amem(struct ndis_softc *sc) +{ + int error, rid; + + rid = NDIS_AM_RID; + sc->ndis_res_am = bus_alloc_resource(sc->ndis_dev, SYS_RES_MEMORY, + &rid, 0UL, ~0UL, 0x1000, RF_ACTIVE); + + if (sc->ndis_res_am == NULL) { + device_printf(sc->ndis_dev, + "failed to allocate attribute memory\n"); + return(ENXIO); + } + sc->ndis_rescnt++; + resource_list_add(&sc->ndis_rl, SYS_RES_MEMORY, rid, + rman_get_start(sc->ndis_res_am), rman_get_end(sc->ndis_res_am), + rman_get_size(sc->ndis_res_am)); + + error = CARD_SET_MEMORY_OFFSET(device_get_parent(sc->ndis_dev), + sc->ndis_dev, rid, 0, NULL); + + if (error) { + device_printf(sc->ndis_dev, + "CARD_SET_MEMORY_OFFSET() returned 0x%x\n", error); + return(error); + } + + error = CARD_SET_RES_FLAGS(device_get_parent(sc->ndis_dev), + sc->ndis_dev, SYS_RES_MEMORY, rid, PCCARD_A_MEM_ATTR); + + if (error) { + device_printf(sc->ndis_dev, + "CARD_SET_RES_FLAGS() returned 0x%x\n", error); + return(error); + } + + sc->ndis_am_rid = rid; + + return(0); +} + /* * Attach the interface. Allocate softc structures, do ifmedia * setup and ethernet/BPF attach. @@ -247,88 +292,40 @@ ndis_attach_pccard(dev) sc->ndis_devidx = devidx; + error = ndis_alloc_amem(sc); + if (error) { + device_printf(dev, "failed to allocate attribute memory\n"); + goto fail; + } + error = ndis_attach(dev); fail: return(error); } -static struct resource_list * -ndis_get_resource_list(dev, child) - device_t dev; - device_t child; +static int +ndis_detach_pccard(device_t dev) { - struct ndis_softc *sc; + struct ndis_softc *sc = device_get_softc(dev); - sc = device_get_softc(dev); - return (&sc->ndis_rl); -} + (void) ndis_detach(dev); -#define NDIS_AM_RID 3 + if (sc->ndis_res_am != NULL) + bus_release_resource(sc->ndis_dev, SYS_RES_MEMORY, + sc->ndis_am_rid, sc->ndis_res_am); + resource_list_free(&sc->ndis_rl); -int -ndis_alloc_amem(arg) - void *arg; -{ - struct ndis_softc *sc; - int error, rid; - - if (arg == NULL) - return(EINVAL); - - sc = arg; - rid = NDIS_AM_RID; - sc->ndis_res_am = bus_alloc_resource(sc->ndis_dev, SYS_RES_MEMORY, - &rid, 0UL, ~0UL, 0x1000, RF_ACTIVE); - - if (sc->ndis_res_am == NULL) { - device_printf(sc->ndis_dev, - "failed to allocate attribute memory\n"); - return(ENXIO); - } - sc->ndis_rescnt++; - resource_list_add(&sc->ndis_rl, SYS_RES_MEMORY, rid, - rman_get_start(sc->ndis_res_am), rman_get_end(sc->ndis_res_am), - rman_get_size(sc->ndis_res_am)); - - error = CARD_SET_MEMORY_OFFSET(device_get_parent(sc->ndis_dev), - sc->ndis_dev, rid, 0, NULL); - - if (error) { - device_printf(sc->ndis_dev, - "CARD_SET_MEMORY_OFFSET() returned 0x%x\n", error); - return(error); - } - - error = CARD_SET_RES_FLAGS(device_get_parent(sc->ndis_dev), - sc->ndis_dev, SYS_RES_MEMORY, rid, PCCARD_A_MEM_ATTR); - - if (error) { - device_printf(sc->ndis_dev, - "CARD_SET_RES_FLAGS() returned 0x%x\n", error); - return(error); - } - - sc->ndis_am_rid = rid; - - return(0); + return (0); } -void -ndis_free_amem(arg) - void *arg; +static struct resource_list * +ndis_get_resource_list(dev, child) + device_t dev; + device_t child; { struct ndis_softc *sc; - if (arg == NULL) - return; - - sc = arg; - - if (sc->ndis_res_am != NULL) - bus_release_resource(sc->ndis_dev, SYS_RES_MEMORY, - sc->ndis_am_rid, sc->ndis_res_am); - resource_list_free(&sc->ndis_rl); - - return; + sc = device_get_softc(dev); + return (&sc->ndis_rl); } From owner-svn-src-stable-10@freebsd.org Wed Feb 6 02:18:13 2019 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA37314D9598; Wed, 6 Feb 2019 02:18:12 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8257F7715B; Wed, 6 Feb 2019 02:18:12 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6BA9426AE9; Wed, 6 Feb 2019 02:18:12 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x162ICAr005980; Wed, 6 Feb 2019 02:18:12 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x162ICVi005979; Wed, 6 Feb 2019 02:18:12 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902060218.x162ICVi005979@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 6 Feb 2019 02:18:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r343821 - in stable: 10/sys/dev/usb/wlan 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan X-SVN-Group: stable-10 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/sys/dev/usb/wlan 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan X-SVN-Commit-Revision: 343821 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8257F7715B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 02:18:13 -0000 Author: avos Date: Wed Feb 6 02:18:11 2019 New Revision: 343821 URL: https://svnweb.freebsd.org/changeset/base/343821 Log: MFC r343681: run(4): fix allocated memory type for ieee80211_node(4) PR: 177366 Modified: stable/10/sys/dev/usb/wlan/if_run.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/dev/usb/wlan/if_run.c stable/12/sys/dev/usb/wlan/if_run.c Directory Properties: stable/11/ (props changed) stable/12/ (props changed) Modified: stable/10/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/10/sys/dev/usb/wlan/if_run.c Wed Feb 6 02:07:37 2019 (r343820) +++ stable/10/sys/dev/usb/wlan/if_run.c Wed Feb 6 02:18:11 2019 (r343821) @@ -1987,7 +1987,8 @@ run_read_eeprom(struct run_softc *sc) static struct ieee80211_node * run_node_alloc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN]) { - return malloc(sizeof (struct run_node), M_DEVBUF, M_NOWAIT | M_ZERO); + return malloc(sizeof (struct run_node), M_80211_NODE, + M_NOWAIT | M_ZERO); } static int From owner-svn-src-stable-10@freebsd.org Wed Feb 6 02:35:57 2019 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E39914D9B4B; Wed, 6 Feb 2019 02:35:57 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3BC2477C56; Wed, 6 Feb 2019 02:35:57 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2D66226E49; Wed, 6 Feb 2019 02:35:57 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x162ZvV1016117; Wed, 6 Feb 2019 02:35:57 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x162ZvfM016116; Wed, 6 Feb 2019 02:35:57 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902060235.x162ZvfM016116@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 6 Feb 2019 02:35:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r343823 - in stable: 10/sys/dev/wtap 11/sys/dev/wtap 12/sys/dev/wtap X-SVN-Group: stable-10 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/sys/dev/wtap 11/sys/dev/wtap 12/sys/dev/wtap X-SVN-Commit-Revision: 343823 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3BC2477C56 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 02:35:57 -0000 Author: avos Date: Wed Feb 6 02:35:56 2019 New Revision: 343823 URL: https://svnweb.freebsd.org/changeset/base/343823 Log: MFC r343682: sys/dev/wtap: Check return value from malloc(..., M_NOWAIT) and drop unneeded cast. Modified: stable/10/sys/dev/wtap/if_wtap.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/dev/wtap/if_wtap.c stable/12/sys/dev/wtap/if_wtap.c Directory Properties: stable/11/ (props changed) stable/12/ (props changed) Modified: stable/10/sys/dev/wtap/if_wtap.c ============================================================================== --- stable/10/sys/dev/wtap/if_wtap.c Wed Feb 6 02:30:14 2019 (r343822) +++ stable/10/sys/dev/wtap/if_wtap.c Wed Feb 6 02:35:56 2019 (r343823) @@ -371,7 +371,7 @@ wtap_vap_delete(struct ieee80211vap *vap) destroy_dev(avp->av_dev); callout_stop(&avp->av_swba); ieee80211_vap_detach(vap); - free((struct wtap_vap*) vap, M_80211_VAP); + free(avp, M_80211_VAP); } /* NB: This function is not used. @@ -744,6 +744,8 @@ wtap_node_alloc(struct ieee80211vap *vap, const uint8_ ni = malloc(sizeof(struct ieee80211_node), M_80211_NODE, M_NOWAIT|M_ZERO); + if (ni == NULL) + return (NULL); ni->ni_txrate = 130; return ni; From owner-svn-src-stable-10@freebsd.org Thu Feb 7 21:37:07 2019 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1536914C4C0A; Thu, 7 Feb 2019 21:37:07 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AFC7E74E26; Thu, 7 Feb 2019 21:37:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A2E6362FF; Thu, 7 Feb 2019 21:37:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x17Lb6vk080987; Thu, 7 Feb 2019 21:37:06 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x17Lb6ew080986; Thu, 7 Feb 2019 21:37:06 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201902072137.x17Lb6ew080986@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 7 Feb 2019 21:37:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r343879 - stable/10/usr.bin/shar X-SVN-Group: stable-10 X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: stable/10/usr.bin/shar X-SVN-Commit-Revision: 343879 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AFC7E74E26 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 21:37:07 -0000 Author: bdrewery Date: Thu Feb 7 21:37:06 2019 New Revision: 343879 URL: https://svnweb.freebsd.org/changeset/base/343879 Log: MFC r343633: Shar files may be seen as binary by grep. Modified: stable/10/usr.bin/shar/shar.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/shar/shar.1 ============================================================================== --- stable/10/usr.bin/shar/shar.1 Thu Feb 7 21:22:01 2019 (r343878) +++ stable/10/usr.bin/shar/shar.1 Thu Feb 7 21:37:06 2019 (r343879) @@ -28,7 +28,7 @@ .\" @(#)shar.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd June 6, 1993 +.Dd January 31, 2019 .Dt SHAR 1 .Os .Sh NAME @@ -103,5 +103,5 @@ Archives produced using this implementation of .Nm may be easily examined with the command: .Bd -literal -offset indent -egrep -v '^[X#]' shar.file +egrep -av '^[X#]' shar.file .Ed From owner-svn-src-stable-10@freebsd.org Thu Feb 7 23:57:29 2019 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC2D314C979F; Thu, 7 Feb 2019 23:57:29 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5BA6183177; Thu, 7 Feb 2019 23:57:29 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 489BA7B4F; Thu, 7 Feb 2019 23:57:29 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x17NvTHo055487; Thu, 7 Feb 2019 23:57:29 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x17NvSvS055485; Thu, 7 Feb 2019 23:57:28 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201902072357.x17NvSvS055485@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 7 Feb 2019 23:57:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r343886 - stable/10/sys/dev/filemon X-SVN-Group: stable-10 X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: stable/10/sys/dev/filemon X-SVN-Commit-Revision: 343886 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5BA6183177 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.93)[-0.930,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 23:57:30 -0000 Author: bdrewery Date: Thu Feb 7 23:57:28 2019 New Revision: 343886 URL: https://svnweb.freebsd.org/changeset/base/343886 Log: MFC r337272: Fix some filemon path logging issues. Modified: stable/10/sys/dev/filemon/filemon.c stable/10/sys/dev/filemon/filemon_wrapper.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/filemon/filemon.c ============================================================================== --- stable/10/sys/dev/filemon/filemon.c Thu Feb 7 23:55:11 2019 (r343885) +++ stable/10/sys/dev/filemon/filemon.c Thu Feb 7 23:57:28 2019 (r343886) @@ -88,7 +88,7 @@ struct filemon { struct ucred *cred; /* Credential of tracer. */ char fname1[MAXPATHLEN]; /* Temporary filename buffer. */ char fname2[MAXPATHLEN]; /* Temporary filename buffer. */ - char msgbufr[1024]; /* Output message buffer. */ + char msgbufr[2*MAXPATHLEN + 100]; /* Output message buffer. */ int error; /* Log write error, returned on close(2). */ u_int refcnt; /* Pointer reference count. */ u_int proccnt; /* Process count. */ @@ -200,8 +200,8 @@ filemon_write_header(struct filemon *filemon) "# filemon version %d\n# Target pid %d\n# Start %ju.%06ju\nV %d\n", FILEMON_VERSION, curproc->p_pid, (uintmax_t)now.tv_sec, (uintmax_t)now.tv_usec, FILEMON_VERSION); - - filemon_output(filemon, filemon->msgbufr, len); + if (len < sizeof(filemon->msgbufr)) + filemon_output(filemon, filemon->msgbufr, len); } /* @@ -268,7 +268,8 @@ filemon_close_log(struct filemon *filemon) "# Stop %ju.%06ju\n# Bye bye\n", (uintmax_t)now.tv_sec, (uintmax_t)now.tv_usec); - filemon_output(filemon, filemon->msgbufr, len); + if (len < sizeof(filemon->msgbufr)) + filemon_output(filemon, filemon->msgbufr, len); fp = filemon->fp; filemon->fp = NULL; Modified: stable/10/sys/dev/filemon/filemon_wrapper.c ============================================================================== --- stable/10/sys/dev/filemon/filemon_wrapper.c Thu Feb 7 23:55:11 2019 (r343885) +++ stable/10/sys/dev/filemon/filemon_wrapper.c Thu Feb 7 23:57:28 2019 (r343886) @@ -37,8 +37,13 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include "opt_compat.h" +static void filemon_output_event(struct filemon *filemon, const char *fmt, ...) + __printflike(2, 3); + static eventhandler_tag filemon_exec_tag; static eventhandler_tag filemon_exit_tag; static eventhandler_tag filemon_fork_tag; @@ -71,11 +76,25 @@ filemon_output(struct filemon *filemon, char *msg, siz filemon->error = error; } +static void +filemon_output_event(struct filemon *filemon, const char *fmt, ...) +{ + va_list ap; + size_t len; + + va_start(ap, fmt); + len = vsnprintf(filemon->msgbufr, sizeof(filemon->msgbufr), fmt, ap); + va_end(ap); + /* The event is truncated but still worth logging. */ + if (len >= sizeof(filemon->msgbufr)) + len = sizeof(filemon->msgbufr) - 1; + filemon_output(filemon, filemon->msgbufr, len); +} + static int filemon_wrapper_chdir(struct thread *td, struct chdir_args *uap) { int error, ret; - size_t len; struct filemon *filemon; if ((ret = sys_chdir(td, uap)) == 0) { @@ -86,11 +105,8 @@ filemon_wrapper_chdir(struct thread *td, struct chdir_ goto copyfail; } - len = snprintf(filemon->msgbufr, - sizeof(filemon->msgbufr), "C %d %s\n", + filemon_output_event(filemon, "C %d %s\n", curproc->p_pid, filemon->fname1); - - filemon_output(filemon, filemon->msgbufr, len); copyfail: filemon_drop(filemon); } @@ -104,16 +120,12 @@ filemon_event_process_exec(void *arg __unused, struct struct image_params *imgp) { struct filemon *filemon; - size_t len; if ((filemon = filemon_proc_get(p)) != NULL) { - len = snprintf(filemon->msgbufr, - sizeof(filemon->msgbufr), "E %d %s\n", + filemon_output_event(filemon, "E %d %s\n", p->p_pid, imgp->execpath != NULL ? imgp->execpath : ""); - filemon_output(filemon, filemon->msgbufr, len); - /* If the credentials changed then cease tracing. */ if (imgp->newcred != NULL && imgp->credential_setid && @@ -140,7 +152,6 @@ static void _filemon_wrapper_openat(struct thread *td, char *upath, int flags, int fd) { int error; - size_t len; struct file *fp; struct filemon *filemon; char *atpath, *freepath; @@ -166,10 +177,8 @@ _filemon_wrapper_openat(struct thread *td, char *upath * XXX: This may be able to come out with * the namecache lookup now. */ - len = snprintf(filemon->msgbufr, - sizeof(filemon->msgbufr), "A %d %s\n", + filemon_output_event(filemon, "A %d %s\n", curproc->p_pid, filemon->fname1); - filemon_output(filemon, filemon->msgbufr, len); /* * Try to resolve the path from the vnode using the * namecache. It may be inaccurate, but better @@ -187,19 +196,15 @@ _filemon_wrapper_openat(struct thread *td, char *upath * to also output an R to distinguish from * O_WRONLY. */ - len = snprintf(filemon->msgbufr, - sizeof(filemon->msgbufr), "R %d %s%s%s\n", + filemon_output_event(filemon, "R %d %s%s%s\n", curproc->p_pid, atpath, atpath[0] != '\0' ? "/" : "", filemon->fname1); - filemon_output(filemon, filemon->msgbufr, len); } - len = snprintf(filemon->msgbufr, - sizeof(filemon->msgbufr), "%c %d %s%s%s\n", + filemon_output_event(filemon, "%c %d %s%s%s\n", (flags & O_ACCMODE) ? 'W':'R', curproc->p_pid, atpath, atpath[0] != '\0' ? "/" : "", filemon->fname1); - filemon_output(filemon, filemon->msgbufr, len); copyfail: filemon_drop(filemon); if (fp != NULL) @@ -234,7 +239,6 @@ static int filemon_wrapper_rename(struct thread *td, struct rename_args *uap) { int error, ret; - size_t len; struct filemon *filemon; if ((ret = sys_rename(td, uap)) == 0) { @@ -247,11 +251,8 @@ filemon_wrapper_rename(struct thread *td, struct renam goto copyfail; } - len = snprintf(filemon->msgbufr, - sizeof(filemon->msgbufr), "M %d '%s' '%s'\n", + filemon_output_event(filemon, "M %d '%s' '%s'\n", curproc->p_pid, filemon->fname1, filemon->fname2); - - filemon_output(filemon, filemon->msgbufr, len); copyfail: filemon_drop(filemon); } @@ -264,7 +265,6 @@ static void _filemon_wrapper_link(struct thread *td, char *upath1, char *upath2) { struct filemon *filemon; - size_t len; int error; if ((filemon = filemon_proc_get(curproc)) != NULL) { @@ -276,11 +276,8 @@ _filemon_wrapper_link(struct thread *td, char *upath1, goto copyfail; } - len = snprintf(filemon->msgbufr, - sizeof(filemon->msgbufr), "L %d '%s' '%s'\n", + filemon_output_event(filemon, "L %d '%s' '%s'\n", curproc->p_pid, filemon->fname1, filemon->fname2); - - filemon_output(filemon, filemon->msgbufr, len); copyfail: filemon_drop(filemon); } @@ -322,15 +319,12 @@ filemon_wrapper_linkat(struct thread *td, struct linka static void filemon_event_process_exit(void *arg __unused, struct proc *p) { - size_t len; struct filemon *filemon; if ((filemon = filemon_proc_get(p)) != NULL) { - len = snprintf(filemon->msgbufr, sizeof(filemon->msgbufr), - "X %d %d\n", p->p_pid, W_EXITCODE(p->p_xstat, 0)); + filemon_output_event(filemon, "X %d %d\n", + p->p_pid, W_EXITCODE(p->p_xstat, 0)); - filemon_output(filemon, filemon->msgbufr, len); - /* * filemon_untrack_processes() may have dropped this p_filemon * already while in filemon_proc_get() before acquiring the @@ -350,7 +344,6 @@ static int filemon_wrapper_unlink(struct thread *td, struct unlink_args *uap) { int error, ret; - size_t len; struct filemon *filemon; if ((ret = sys_unlink(td, uap)) == 0) { @@ -361,11 +354,8 @@ filemon_wrapper_unlink(struct thread *td, struct unlin goto copyfail; } - len = snprintf(filemon->msgbufr, - sizeof(filemon->msgbufr), "D %d %s\n", + filemon_output_event(filemon, "D %d %s\n", curproc->p_pid, filemon->fname1); - - filemon_output(filemon, filemon->msgbufr, len); copyfail: filemon_drop(filemon); } @@ -378,15 +368,11 @@ static void filemon_event_process_fork(void *arg __unused, struct proc *p1, struct proc *p2, int flags __unused) { - size_t len; struct filemon *filemon; if ((filemon = filemon_proc_get(p1)) != NULL) { - len = snprintf(filemon->msgbufr, - sizeof(filemon->msgbufr), "F %d %d\n", + filemon_output_event(filemon, "F %d %d\n", p1->p_pid, p2->p_pid); - - filemon_output(filemon, filemon->msgbufr, len); /* * filemon_untrack_processes() or From owner-svn-src-stable-10@freebsd.org Fri Feb 8 04:48:14 2019 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F49414D40EE; Fri, 8 Feb 2019 04:48:14 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B15B2680BE; Fri, 8 Feb 2019 04:48:13 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A50C0C366; Fri, 8 Feb 2019 04:48:13 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x184mDCj007135; Fri, 8 Feb 2019 04:48:13 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x184mDWd007134; Fri, 8 Feb 2019 04:48:13 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902080448.x184mDWd007134@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Fri, 8 Feb 2019 04:48:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r343894 - in stable: 10/sys/net80211 11/sys/net80211 12/sys/net80211 X-SVN-Group: stable-10 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/sys/net80211 11/sys/net80211 12/sys/net80211 X-SVN-Commit-Revision: 343894 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B15B2680BE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 04:48:14 -0000 Author: avos Date: Fri Feb 8 04:48:12 2019 New Revision: 343894 URL: https://svnweb.freebsd.org/changeset/base/343894 Log: MFC r343683: Do not acquire IEEE80211_LOCK twice in cac_timeout(); reuse locked function instead. It is externally visible since r257065. Modified: stable/10/sys/net80211/ieee80211_dfs.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/net80211/ieee80211_dfs.c stable/12/sys/net80211/ieee80211_dfs.c Directory Properties: stable/11/ (props changed) stable/12/ (props changed) Modified: stable/10/sys/net80211/ieee80211_dfs.c ============================================================================== --- stable/10/sys/net80211/ieee80211_dfs.c Fri Feb 8 04:36:30 2019 (r343893) +++ stable/10/sys/net80211/ieee80211_dfs.c Fri Feb 8 04:48:12 2019 (r343894) @@ -152,8 +152,7 @@ cac_timeout(void *arg) /* XXX clobbers any existing desired channel */ /* NB: dfs->newchan may be NULL, that's ok */ vap->iv_des_chan = dfs->newchan; - /* XXX recursive lock need ieee80211_new_state_locked */ - ieee80211_new_state(vap, IEEE80211_S_SCAN, 0); + ieee80211_new_state_locked(vap, IEEE80211_S_SCAN, 0); } else { if_printf(vap->iv_ifp, "CAC timer on channel %u (%u MHz) expired; " From owner-svn-src-stable-10@freebsd.org Fri Feb 8 10:28:15 2019 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7790014DB860; Fri, 8 Feb 2019 10:28:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 26F187360F; Fri, 8 Feb 2019 10:28:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EBF46FD46; Fri, 8 Feb 2019 10:28:14 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x18ASEh6093852; Fri, 8 Feb 2019 10:28:14 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x18ASEkQ093848; Fri, 8 Feb 2019 10:28:14 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201902081028.x18ASEkQ093848@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 8 Feb 2019 10:28:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r343902 - in stable/10: lib/libsdp usr.sbin/bluetooth/sdpd X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/10: lib/libsdp usr.sbin/bluetooth/sdpd X-SVN-Commit-Revision: 343902 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 26F187360F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.945,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 10:28:15 -0000 Author: hselasky Date: Fri Feb 8 10:28:13 2019 New Revision: 343902 URL: https://svnweb.freebsd.org/changeset/base/343902 Log: MFC r343572: Add support for Audio Sink and Audio Source profiles to sdpd(8). This allows user-space programs like virtual_oss(8) to act as a Bluetooth speaker device. Sponsored by: Mellanox Technologies Added: stable/10/usr.sbin/bluetooth/sdpd/audio_sink.c - copied unchanged from r343572, head/usr.sbin/bluetooth/sdpd/audio_sink.c stable/10/usr.sbin/bluetooth/sdpd/audio_source.c - copied unchanged from r343572, head/usr.sbin/bluetooth/sdpd/audio_source.c Modified: stable/10/lib/libsdp/sdp.h stable/10/usr.sbin/bluetooth/sdpd/Makefile stable/10/usr.sbin/bluetooth/sdpd/profile.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libsdp/sdp.h ============================================================================== --- stable/10/lib/libsdp/sdp.h Fri Feb 8 10:27:02 2019 (r343901) +++ stable/10/lib/libsdp/sdp.h Fri Feb 8 10:28:13 2019 (r343902) @@ -583,6 +583,24 @@ void sdp_print (uint32_t level, uin #define SDP_PDU_SERVICE_UNREGISTER_REQUEST 0x82 #define SDP_PDU_SERVICE_CHANGE_REQUEST 0x83 +struct sdp_audio_sink_profile +{ + uint16_t psm; + uint16_t protover; + uint16_t features; +}; +typedef struct sdp_audio_sink_profile sdp_audio_sink_profile_t; +typedef struct sdp_audio_sink_profile *sdp_audio_sink_profile_p; + +struct sdp_audio_source_profile +{ + uint16_t psm; + uint16_t protover; + uint16_t features; +}; +typedef struct sdp_audio_source_profile sdp_audio_source_profile_t; +typedef struct sdp_audio_source_profile *sdp_audio_source_profile_p; + struct sdp_dun_profile { uint8_t server_channel; Modified: stable/10/usr.sbin/bluetooth/sdpd/Makefile ============================================================================== --- stable/10/usr.sbin/bluetooth/sdpd/Makefile Fri Feb 8 10:27:02 2019 (r343901) +++ stable/10/usr.sbin/bluetooth/sdpd/Makefile Fri Feb 8 10:28:13 2019 (r343902) @@ -3,7 +3,8 @@ PROG= sdpd MAN= sdpd.8 -SRCS= bgd.c dun.c ftrn.c gn.c irmc.c irmc_command.c lan.c log.c \ +SRCS= audio_sink.c audio_source.c \ + bgd.c dun.c ftrn.c gn.c irmc.c irmc_command.c lan.c log.c \ main.c nap.c opush.c panu.c profile.c provider.c sar.c scr.c \ sd.c server.c sp.c srr.c ssar.c ssr.c sur.c uuid.c Copied: stable/10/usr.sbin/bluetooth/sdpd/audio_sink.c (from r343572, head/usr.sbin/bluetooth/sdpd/audio_sink.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.sbin/bluetooth/sdpd/audio_sink.c Fri Feb 8 10:28:13 2019 (r343902, copy of r343572, head/usr.sbin/bluetooth/sdpd/audio_sink.c) @@ -0,0 +1,188 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Hans Petter Selasky + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#define L2CAP_SOCKET_CHECKED +#include +#include +#include +#include "profile.h" +#include "provider.h" + +static int32_t +audio_sink_profile_create_service_class_id_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + static const uint16_t service_classes[] = { + SDP_SERVICE_CLASS_AUDIO_SINK, + }; + + return (common_profile_create_service_class_id_list( + buf, eob, + (uint8_t const *)service_classes, + sizeof(service_classes))); +} + +static int32_t +audio_sink_profile_create_protocol_descriptor_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + provider_p provider = (provider_p) data; + sdp_audio_sink_profile_p audio_sink = (sdp_audio_sink_profile_p) provider->data; + + if (buf + 18 > eob) + return (-1); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(16, buf); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(6, buf); + + SDP_PUT8(SDP_DATA_UUID16, buf); + SDP_PUT16(SDP_UUID_PROTOCOL_L2CAP, buf); + + SDP_PUT8(SDP_DATA_UINT16, buf); + SDP_PUT16(audio_sink->psm, buf); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(6, buf); + + SDP_PUT8(SDP_DATA_UUID16, buf); + SDP_PUT16(SDP_UUID_PROTOCOL_AVDTP, buf); + + SDP_PUT8(SDP_DATA_UINT16, buf); + SDP_PUT16(audio_sink->protover, buf); + + return (18); +} + +static int32_t +audio_sink_profile_create_browse_group_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + + if (buf + 5 > eob) + return (-1); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(3, buf); + + SDP_PUT8(SDP_DATA_UUID16, buf); + SDP_PUT16(SDP_SERVICE_CLASS_PUBLIC_BROWSE_GROUP, buf); + + return (5); +} + +static int32_t +audio_sink_profile_create_bluetooth_profile_descriptor_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + static const uint16_t profile_descriptor_list[] = { + SDP_SERVICE_CLASS_ADVANCED_AUDIO_DISTRIBUTION, + 0x0100 + }; + + return (common_profile_create_bluetooth_profile_descriptor_list( + buf, eob, + (uint8_t const *)profile_descriptor_list, + sizeof(profile_descriptor_list))); +} + +static int32_t +audio_sink_profile_create_service_name( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + static const char service_name[] = "Audio SNK"; + + return (common_profile_create_string8( + buf, eob, + (uint8_t const *)service_name, strlen(service_name))); +} + +static int32_t +audio_sink_create_supported_features( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + provider_p provider = (provider_p) data; + sdp_audio_sink_profile_p audio_sink = (sdp_audio_sink_profile_p) provider->data; + + if (buf + 3 > eob) + return (-1); + + SDP_PUT8(SDP_DATA_UINT16, buf); + SDP_PUT16(audio_sink->features, buf); + + return (3); +} + +static int32_t +audio_sink_profile_valid(uint8_t const *data, uint32_t datalen) +{ + + if (datalen < sizeof(struct sdp_audio_sink_profile)) + return (0); + return (1); +} + +static const attr_t audio_sink_profile_attrs[] = { + {SDP_ATTR_SERVICE_RECORD_HANDLE, + common_profile_create_service_record_handle}, + {SDP_ATTR_SERVICE_CLASS_ID_LIST, + audio_sink_profile_create_service_class_id_list}, + {SDP_ATTR_PROTOCOL_DESCRIPTOR_LIST, + audio_sink_profile_create_protocol_descriptor_list}, + {SDP_ATTR_BROWSE_GROUP_LIST, + audio_sink_profile_create_browse_group_list}, + {SDP_ATTR_LANGUAGE_BASE_ATTRIBUTE_ID_LIST, + common_profile_create_language_base_attribute_id_list}, + {SDP_ATTR_BLUETOOTH_PROFILE_DESCRIPTOR_LIST, + audio_sink_profile_create_bluetooth_profile_descriptor_list}, + {SDP_ATTR_PRIMARY_LANGUAGE_BASE_ID + SDP_ATTR_SERVICE_NAME_OFFSET, + audio_sink_profile_create_service_name}, + {SDP_ATTR_PRIMARY_LANGUAGE_BASE_ID + SDP_ATTR_PROVIDER_NAME_OFFSET, + common_profile_create_service_provider_name}, + {SDP_ATTR_SUPPORTED_FEATURES, + audio_sink_create_supported_features}, + {} /* end entry */ +}; + +profile_t audio_sink_profile_descriptor = { + SDP_SERVICE_CLASS_AUDIO_SINK, + sizeof(sdp_audio_sink_profile_t), + audio_sink_profile_valid, + (attr_t const *const)&audio_sink_profile_attrs +}; Copied: stable/10/usr.sbin/bluetooth/sdpd/audio_source.c (from r343572, head/usr.sbin/bluetooth/sdpd/audio_source.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.sbin/bluetooth/sdpd/audio_source.c Fri Feb 8 10:28:13 2019 (r343902, copy of r343572, head/usr.sbin/bluetooth/sdpd/audio_source.c) @@ -0,0 +1,188 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Hans Petter Selasky + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#define L2CAP_SOCKET_CHECKED +#include +#include +#include +#include "profile.h" +#include "provider.h" + +static int32_t +audio_source_profile_create_service_class_id_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + static const uint16_t service_classes[] = { + SDP_SERVICE_CLASS_AUDIO_SOURCE, + }; + + return (common_profile_create_service_class_id_list( + buf, eob, + (uint8_t const *)service_classes, + sizeof(service_classes))); +} + +static int32_t +audio_source_profile_create_protocol_descriptor_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + provider_p provider = (provider_p) data; + sdp_audio_source_profile_p audio_source = (sdp_audio_source_profile_p) provider->data; + + if (buf + 18 > eob) + return (-1); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(16, buf); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(6, buf); + + SDP_PUT8(SDP_DATA_UUID16, buf); + SDP_PUT16(SDP_UUID_PROTOCOL_L2CAP, buf); + + SDP_PUT8(SDP_DATA_UINT16, buf); + SDP_PUT16(audio_source->psm, buf); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(6, buf); + + SDP_PUT8(SDP_DATA_UUID16, buf); + SDP_PUT16(SDP_UUID_PROTOCOL_AVDTP, buf); + + SDP_PUT8(SDP_DATA_UINT16, buf); + SDP_PUT16(audio_source->protover, buf); + + return (18); +} + +static int32_t +audio_source_profile_create_browse_group_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + + if (buf + 5 > eob) + return (-1); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(3, buf); + + SDP_PUT8(SDP_DATA_UUID16, buf); + SDP_PUT16(SDP_SERVICE_CLASS_PUBLIC_BROWSE_GROUP, buf); + + return (5); +} + +static int32_t +audio_source_profile_create_bluetooth_profile_descriptor_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + static const uint16_t profile_descriptor_list[] = { + SDP_SERVICE_CLASS_ADVANCED_AUDIO_DISTRIBUTION, + 0x0100 + }; + + return (common_profile_create_bluetooth_profile_descriptor_list( + buf, eob, + (uint8_t const *)profile_descriptor_list, + sizeof(profile_descriptor_list))); +} + +static int32_t +audio_source_profile_create_service_name( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + static const char service_name[] = "Audio SRC"; + + return (common_profile_create_string8( + buf, eob, + (uint8_t const *)service_name, strlen(service_name))); +} + +static int32_t +audio_source_create_supported_features( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + provider_p provider = (provider_p) data; + sdp_audio_source_profile_p audio_source = (sdp_audio_source_profile_p) provider->data; + + if (buf + 3 > eob) + return (-1); + + SDP_PUT8(SDP_DATA_UINT16, buf); + SDP_PUT16(audio_source->features, buf); + + return (3); +} + +static int32_t +audio_source_profile_valid(uint8_t const *data, uint32_t datalen) +{ + + if (datalen < sizeof(struct sdp_audio_source_profile)) + return (0); + return (1); +} + +static const attr_t audio_source_profile_attrs[] = { + {SDP_ATTR_SERVICE_RECORD_HANDLE, + common_profile_create_service_record_handle}, + {SDP_ATTR_SERVICE_CLASS_ID_LIST, + audio_source_profile_create_service_class_id_list}, + {SDP_ATTR_PROTOCOL_DESCRIPTOR_LIST, + audio_source_profile_create_protocol_descriptor_list}, + {SDP_ATTR_BROWSE_GROUP_LIST, + audio_source_profile_create_browse_group_list}, + {SDP_ATTR_LANGUAGE_BASE_ATTRIBUTE_ID_LIST, + common_profile_create_language_base_attribute_id_list}, + {SDP_ATTR_BLUETOOTH_PROFILE_DESCRIPTOR_LIST, + audio_source_profile_create_bluetooth_profile_descriptor_list}, + {SDP_ATTR_PRIMARY_LANGUAGE_BASE_ID + SDP_ATTR_SERVICE_NAME_OFFSET, + audio_source_profile_create_service_name}, + {SDP_ATTR_PRIMARY_LANGUAGE_BASE_ID + SDP_ATTR_PROVIDER_NAME_OFFSET, + common_profile_create_service_provider_name}, + {SDP_ATTR_SUPPORTED_FEATURES, + audio_source_create_supported_features}, + {} /* end entry */ +}; + +profile_t audio_source_profile_descriptor = { + SDP_SERVICE_CLASS_AUDIO_SOURCE, + sizeof(sdp_audio_source_profile_t), + audio_source_profile_valid, + (attr_t const *const)&audio_source_profile_attrs +}; Modified: stable/10/usr.sbin/bluetooth/sdpd/profile.c ============================================================================== --- stable/10/usr.sbin/bluetooth/sdpd/profile.c Fri Feb 8 10:27:02 2019 (r343901) +++ stable/10/usr.sbin/bluetooth/sdpd/profile.c Fri Feb 8 10:28:13 2019 (r343902) @@ -45,6 +45,8 @@ profile_p profile_get_descriptor(uint16_t uuid) { + extern profile_t audio_sink_profile_descriptor; + extern profile_t audio_source_profile_descriptor; extern profile_t dun_profile_descriptor; extern profile_t ftrn_profile_descriptor; extern profile_t irmc_profile_descriptor; @@ -57,6 +59,8 @@ profile_get_descriptor(uint16_t uuid) extern profile_t panu_profile_descriptor; static const profile_p profiles[] = { + &audio_sink_profile_descriptor, + &audio_source_profile_descriptor, &dun_profile_descriptor, &ftrn_profile_descriptor, &irmc_profile_descriptor, From owner-svn-src-stable-10@freebsd.org Fri Feb 8 13:57:29 2019 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 688DA14E1888; Fri, 8 Feb 2019 13:57:29 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 08C1B83BEB; Fri, 8 Feb 2019 13:57:29 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F02521A109; Fri, 8 Feb 2019 13:57:28 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x18DvSVX004976; Fri, 8 Feb 2019 13:57:28 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x18DvS8W004975; Fri, 8 Feb 2019 13:57:28 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902081357.x18DvS8W004975@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Fri, 8 Feb 2019 13:57:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r343907 - in stable: 10/sys/dev/ipw 11/sys/dev/ipw 12/sys/dev/ipw X-SVN-Group: stable-10 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/sys/dev/ipw 11/sys/dev/ipw 12/sys/dev/ipw X-SVN-Commit-Revision: 343907 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 08C1B83BEB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 13:57:29 -0000 Author: avos Date: Fri Feb 8 13:57:28 2019 New Revision: 343907 URL: https://svnweb.freebsd.org/changeset/base/343907 Log: MFC r343603: ipw(4): reuse ieee80211_tx_complete function This should partially fix 'netstat -b -I wlan0' output Modified: stable/10/sys/dev/ipw/if_ipw.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/dev/ipw/if_ipw.c stable/12/sys/dev/ipw/if_ipw.c Directory Properties: stable/11/ (props changed) stable/12/ (props changed) Modified: stable/10/sys/dev/ipw/if_ipw.c ============================================================================== --- stable/10/sys/dev/ipw/if_ipw.c Fri Feb 8 13:54:16 2019 (r343906) +++ stable/10/sys/dev/ipw/if_ipw.c Fri Feb 8 13:57:28 2019 (r343907) @@ -1357,10 +1357,7 @@ ipw_release_sbd(struct ipw_softc *sc, struct ipw_soft_ bus_dmamap_unload(sc->txbuf_dmat, sbuf->map); SLIST_INSERT_HEAD(&sc->free_sbuf, sbuf, next); - if (sbuf->m->m_flags & M_TXCB) - ieee80211_process_callback(sbuf->ni, sbuf->m, 0/*XXX*/); - m_freem(sbuf->m); - ieee80211_free_node(sbuf->ni); + ieee80211_tx_complete(sbuf->ni, sbuf->m, 0/*XXX*/); sc->sc_tx_timer = 0; break; From owner-svn-src-stable-10@freebsd.org Fri Feb 8 14:32:28 2019 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E158A14E25D0; Fri, 8 Feb 2019 14:32:27 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 838CA857FC; Fri, 8 Feb 2019 14:32:27 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 775CB1A80E; Fri, 8 Feb 2019 14:32:27 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x18EWRUT025629; Fri, 8 Feb 2019 14:32:27 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x18EWRkH025628; Fri, 8 Feb 2019 14:32:27 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902081432.x18EWRkH025628@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Fri, 8 Feb 2019 14:32:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r343910 - stable/10/sys/dev/bwn X-SVN-Group: stable-10 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: stable/10/sys/dev/bwn X-SVN-Commit-Revision: 343910 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 838CA857FC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_SHORT(-0.94)[-0.941,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 14:32:28 -0000 Author: avos Date: Fri Feb 8 14:32:27 2019 New Revision: 343910 URL: https://svnweb.freebsd.org/changeset/base/343910 Log: MFC r343604: bwn(4): reuse ieee80211_tx_complete function Modified: stable/10/sys/dev/bwn/if_bwn.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/bwn/if_bwn.c ============================================================================== --- stable/10/sys/dev/bwn/if_bwn.c Fri Feb 8 14:31:44 2019 (r343909) +++ stable/10/sys/dev/bwn/if_bwn.c Fri Feb 8 14:32:27 2019 (r343910) @@ -9473,17 +9473,8 @@ bwn_pio_handle_txeof(struct bwn_mac *mac, tq->tq_used -= roundup(tp->tp_m->m_pkthdr.len + BWN_HDRSIZE(mac), 4); tq->tq_free++; - if (tp->tp_ni != NULL) { - /* - * Do any tx complete callback. Note this must - * be done before releasing the node reference. - */ - if (tp->tp_m->m_flags & M_TXCB) - ieee80211_process_callback(tp->tp_ni, tp->tp_m, 0); - ieee80211_free_node(tp->tp_ni); - tp->tp_ni = NULL; - } - m_freem(tp->tp_m); + ieee80211_tx_complete(tp->tp_ni, tp->tp_m, 0); + tp->tp_ni = NULL; tp->tp_m = NULL; TAILQ_INSERT_TAIL(&tq->tq_pktlist, tp, tp_list);