diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-08-09 14:02:09 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-09-21 10:29:38 +0200 |
commit | bb80d9df8bac71eedee1a6787ca63aef972a7e48 (patch) | |
tree | 1b5cb9443c5ead5706c35afb618abbbd1592315e /freebsd/sys/dev/usb | |
parent | Update to FreeBSD head 2017-10-01 (diff) | |
download | rtems-libbsd-bb80d9df8bac71eedee1a6787ca63aef972a7e48.tar.bz2 |
Update to FreeBSD head 2017-12-01
Git mirror commit e724f51f811a4b2bd29447f8b85ab5c2f9b88266.
Update #3472.
Diffstat (limited to 'freebsd/sys/dev/usb')
120 files changed, 310 insertions, 122 deletions
diff --git a/freebsd/sys/dev/usb/controller/dwc_otg.c b/freebsd/sys/dev/usb/controller/dwc_otg.c index 421eb77f..abc23ac6 100644 --- a/freebsd/sys/dev/usb/controller/dwc_otg.c +++ b/freebsd/sys/dev/usb/controller/dwc_otg.c @@ -2,6 +2,8 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2015 Daisuke Aoyama. All rights reserved. * Copyright (c) 2012-2015 Hans Petter Selasky. All rights reserved. * Copyright (c) 2010-2011 Aleksandr Rybalko. All rights reserved. diff --git a/freebsd/sys/dev/usb/controller/dwc_otg.h b/freebsd/sys/dev/usb/controller/dwc_otg.h index 7f5ede48..2de0214f 100644 --- a/freebsd/sys/dev/usb/controller/dwc_otg.h +++ b/freebsd/sys/dev/usb/controller/dwc_otg.h @@ -1,5 +1,7 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2012 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/controller/dwc_otg_fdt.c b/freebsd/sys/dev/usb/controller/dwc_otg_fdt.c index 791d9890..1cf96f4c 100644 --- a/freebsd/sys/dev/usb/controller/dwc_otg_fdt.c +++ b/freebsd/sys/dev/usb/controller/dwc_otg_fdt.c @@ -1,6 +1,8 @@ #include <machine/rtems-bsd-kernel-space.h> /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2012 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/controller/dwc_otgreg.h b/freebsd/sys/dev/usb/controller/dwc_otgreg.h index 8b9538ae..3c50ca58 100644 --- a/freebsd/sys/dev/usb/controller/dwc_otgreg.h +++ b/freebsd/sys/dev/usb/controller/dwc_otgreg.h @@ -1,6 +1,8 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2010,2011 Aleksandr Rybalko. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/controller/ehci.c b/freebsd/sys/dev/usb/controller/ehci.c index 9de1491e..557698f6 100644 --- a/freebsd/sys/dev/usb/controller/ehci.c +++ b/freebsd/sys/dev/usb/controller/ehci.c @@ -2,6 +2,8 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * Copyright (c) 2004 The NetBSD Foundation, Inc. All rights reserved. * Copyright (c) 2004 Lennart Augustsson. All rights reserved. diff --git a/freebsd/sys/dev/usb/controller/ehci.h b/freebsd/sys/dev/usb/controller/ehci.h index dd20c0a5..3a5f6781 100644 --- a/freebsd/sys/dev/usb/controller/ehci.h +++ b/freebsd/sys/dev/usb/controller/ehci.h @@ -1,5 +1,7 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-NetBSD + * * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/freebsd/sys/dev/usb/controller/ehcireg.h b/freebsd/sys/dev/usb/controller/ehcireg.h index 2394b2c1..81939e20 100644 --- a/freebsd/sys/dev/usb/controller/ehcireg.h +++ b/freebsd/sys/dev/usb/controller/ehcireg.h @@ -1,5 +1,7 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-NetBSD + * * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/freebsd/sys/dev/usb/controller/musb_otg.c b/freebsd/sys/dev/usb/controller/musb_otg.c index 0f1953b6..16a3adef 100644 --- a/freebsd/sys/dev/usb/controller/musb_otg.c +++ b/freebsd/sys/dev/usb/controller/musb_otg.c @@ -2,6 +2,8 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/controller/musb_otg.h b/freebsd/sys/dev/usb/controller/musb_otg.h index 7fe19a7c..55ab7aa6 100644 --- a/freebsd/sys/dev/usb/controller/musb_otg.h +++ b/freebsd/sys/dev/usb/controller/musb_otg.h @@ -1,5 +1,7 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/controller/ohci.c b/freebsd/sys/dev/usb/controller/ohci.c index 9f0654e3..df1981cc 100644 --- a/freebsd/sys/dev/usb/controller/ohci.c +++ b/freebsd/sys/dev/usb/controller/ohci.c @@ -2,6 +2,8 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * Copyright (c) 1998 The NetBSD Foundation, Inc. All rights reserved. * Copyright (c) 1998 Lennart Augustsson. All rights reserved. diff --git a/freebsd/sys/dev/usb/controller/ohci.h b/freebsd/sys/dev/usb/controller/ohci.h index 69fc9a62..72e825ec 100755 --- a/freebsd/sys/dev/usb/controller/ohci.h +++ b/freebsd/sys/dev/usb/controller/ohci.h @@ -1,5 +1,7 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-NetBSD + * * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/freebsd/sys/dev/usb/controller/ohcireg.h b/freebsd/sys/dev/usb/controller/ohcireg.h index 7f14875c..c6ea4113 100644 --- a/freebsd/sys/dev/usb/controller/ohcireg.h +++ b/freebsd/sys/dev/usb/controller/ohcireg.h @@ -1,5 +1,7 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/freebsd/sys/dev/usb/controller/uhcireg.h b/freebsd/sys/dev/usb/controller/uhcireg.h index 95eae494..fa0e4eb9 100644 --- a/freebsd/sys/dev/usb/controller/uhcireg.h +++ b/freebsd/sys/dev/usb/controller/uhcireg.h @@ -1,5 +1,7 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/freebsd/sys/dev/usb/controller/usb_controller.c b/freebsd/sys/dev/usb/controller/usb_controller.c index 5f198aed..a2633d0d 100644 --- a/freebsd/sys/dev/usb/controller/usb_controller.c +++ b/freebsd/sys/dev/usb/controller/usb_controller.c @@ -2,6 +2,8 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/controller/xhcireg.h b/freebsd/sys/dev/usb/controller/xhcireg.h index 0e588ecb..b49bc09a 100644 --- a/freebsd/sys/dev/usb/controller/xhcireg.h +++ b/freebsd/sys/dev/usb/controller/xhcireg.h @@ -1,6 +1,8 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2010 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/input/atp.c b/freebsd/sys/dev/usb/input/atp.c index 17162411..d0fabe0d 100644 --- a/freebsd/sys/dev/usb/input/atp.c +++ b/freebsd/sys/dev/usb/input/atp.c @@ -1,6 +1,8 @@ #include <machine/rtems-bsd-kernel-space.h> /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2014 Rohit Grover * All rights reserved. * diff --git a/freebsd/sys/dev/usb/input/uep.c b/freebsd/sys/dev/usb/input/uep.c index d7af405f..701c8550 100644 --- a/freebsd/sys/dev/usb/input/uep.c +++ b/freebsd/sys/dev/usb/input/uep.c @@ -1,6 +1,8 @@ #include <machine/rtems-bsd-kernel-space.h> /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright 2010, Gleb Smirnoff <glebius@FreeBSD.org> * All rights reserved. * diff --git a/freebsd/sys/dev/usb/input/uhid.c b/freebsd/sys/dev/usb/input/uhid.c index 6de5944d..90761ab7 100644 --- a/freebsd/sys/dev/usb/input/uhid.c +++ b/freebsd/sys/dev/usb/input/uhid.c @@ -10,6 +10,8 @@ __FBSDID("$FreeBSD$"); /*- + * SPDX-License-Identifier: BSD-2-Clause-NetBSD + * * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/freebsd/sys/dev/usb/input/ukbd.c b/freebsd/sys/dev/usb/input/ukbd.c index d473d1ea..9b1d28fc 100644 --- a/freebsd/sys/dev/usb/input/ukbd.c +++ b/freebsd/sys/dev/usb/input/ukbd.c @@ -5,6 +5,8 @@ __FBSDID("$FreeBSD$"); /*- + * SPDX-License-Identifier: BSD-2-Clause-NetBSD + * * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/freebsd/sys/dev/usb/input/ums.c b/freebsd/sys/dev/usb/input/ums.c index 36c1d1b4..79bc2291 100644 --- a/freebsd/sys/dev/usb/input/ums.c +++ b/freebsd/sys/dev/usb/input/ums.c @@ -1,6 +1,8 @@ #include <machine/rtems-bsd-kernel-space.h> /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * @@ -298,7 +300,7 @@ ums_intr_callback(struct usb_xfer *xfer, usb_error_t error) if ((info->sc_flags & UMS_FLAG_T_AXIS) && (id == info->sc_iid_t)) { - dt -= hid_get_data(buf, len, &info->sc_loc_t); + dt += hid_get_data(buf, len, &info->sc_loc_t); /* T-axis is translated into button presses */ buttons_found |= (1UL << 5) | (1UL << 6); } @@ -334,10 +336,10 @@ ums_intr_callback(struct usb_xfer *xfer, usb_error_t error) /* translate T-axis into button presses until further */ if (dt > 0) { ums_put_queue(sc, 0, 0, 0, 0, buttons); - buttons |= 1UL << 5; + buttons |= 1UL << 6; } else if (dt < 0) { ums_put_queue(sc, 0, 0, 0, 0, buttons); - buttons |= 1UL << 6; + buttons |= 1UL << 5; } sc->sc_status.button = buttons; diff --git a/freebsd/sys/dev/usb/input/usb_rdesc.h b/freebsd/sys/dev/usb/input/usb_rdesc.h index 23ea620b..00eea122 100644 --- a/freebsd/sys/dev/usb/input/usb_rdesc.h +++ b/freebsd/sys/dev/usb/input/usb_rdesc.h @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2000 Nick Hibma <n_hibma@FreeBSD.org> * All rights reserved. * diff --git a/freebsd/sys/dev/usb/input/wsp.c b/freebsd/sys/dev/usb/input/wsp.c index d3eae491..0eb2c024 100644 --- a/freebsd/sys/dev/usb/input/wsp.c +++ b/freebsd/sys/dev/usb/input/wsp.c @@ -1,6 +1,8 @@ #include <machine/rtems-bsd-kernel-space.h> /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2012 Huang Wen Hui * All rights reserved. * diff --git a/freebsd/sys/dev/usb/net/if_aue.c b/freebsd/sys/dev/usb/net/if_aue.c index 06ccd8ce..69951b70 100644 --- a/freebsd/sys/dev/usb/net/if_aue.c +++ b/freebsd/sys/dev/usb/net/if_aue.c @@ -1,6 +1,8 @@ #include <machine/rtems-bsd-kernel-space.h> /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1997, 1998, 1999, 2000 * Bill Paul <wpaul@ee.columbia.edu>. All rights reserved. * diff --git a/freebsd/sys/dev/usb/net/if_auereg.h b/freebsd/sys/dev/usb/net/if_auereg.h index 4d0843eb..dfbaac42 100644 --- a/freebsd/sys/dev/usb/net/if_auereg.h +++ b/freebsd/sys/dev/usb/net/if_auereg.h @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1997, 1998, 1999 * Bill Paul <wpaul@ee.columbia.edu>. All rights reserved. * diff --git a/freebsd/sys/dev/usb/net/if_axe.c b/freebsd/sys/dev/usb/net/if_axe.c index 728f8e3d..b77292ba 100644 --- a/freebsd/sys/dev/usb/net/if_axe.c +++ b/freebsd/sys/dev/usb/net/if_axe.c @@ -1,6 +1,8 @@ #include <machine/rtems-bsd-kernel-space.h> /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1997, 1998, 1999, 2000-2003 * Bill Paul <wpaul@windriver.com>. All rights reserved. * diff --git a/freebsd/sys/dev/usb/net/if_axereg.h b/freebsd/sys/dev/usb/net/if_axereg.h index 64cb2352..2654bbba 100644 --- a/freebsd/sys/dev/usb/net/if_axereg.h +++ b/freebsd/sys/dev/usb/net/if_axereg.h @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1997, 1998, 1999, 2000-2003 * Bill Paul <wpaul@windriver.com>. All rights reserved. * diff --git a/freebsd/sys/dev/usb/net/if_axge.c b/freebsd/sys/dev/usb/net/if_axge.c index 4e6f05b5..fc602b88 100644 --- a/freebsd/sys/dev/usb/net/if_axge.c +++ b/freebsd/sys/dev/usb/net/if_axge.c @@ -1,6 +1,8 @@ #include <machine/rtems-bsd-kernel-space.h> /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2013-2014 Kevin Lo * All rights reserved. * diff --git a/freebsd/sys/dev/usb/net/if_axgereg.h b/freebsd/sys/dev/usb/net/if_axgereg.h index c073610f..542ea6d1 100644 --- a/freebsd/sys/dev/usb/net/if_axgereg.h +++ b/freebsd/sys/dev/usb/net/if_axgereg.h @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2013-2014 Kevin Lo * All rights reserved. * diff --git a/freebsd/sys/dev/usb/net/if_cdce.c b/freebsd/sys/dev/usb/net/if_cdce.c index 777113da..ececc5b3 100644 --- a/freebsd/sys/dev/usb/net/if_cdce.c +++ b/freebsd/sys/dev/usb/net/if_cdce.c @@ -3,6 +3,8 @@ /* $NetBSD: if_cdce.c,v 1.4 2004/10/24 12:50:54 augustss Exp $ */ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul <wpaul@windriver.com> * Copyright (c) 2003-2005 Craig Boston * Copyright (c) 2004 Daniel Hartmeier diff --git a/freebsd/sys/dev/usb/net/if_cdcereg.h b/freebsd/sys/dev/usb/net/if_cdcereg.h index 1bc2d603..26d037c5 100644 --- a/freebsd/sys/dev/usb/net/if_cdcereg.h +++ b/freebsd/sys/dev/usb/net/if_cdcereg.h @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 2003-2005 Craig Boston * All rights reserved. * diff --git a/freebsd/sys/dev/usb/net/if_cue.c b/freebsd/sys/dev/usb/net/if_cue.c index d5152dd4..63846a01 100644 --- a/freebsd/sys/dev/usb/net/if_cue.c +++ b/freebsd/sys/dev/usb/net/if_cue.c @@ -1,6 +1,8 @@ #include <machine/rtems-bsd-kernel-space.h> /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1997, 1998, 1999, 2000 * Bill Paul <wpaul@ee.columbia.edu>. All rights reserved. * diff --git a/freebsd/sys/dev/usb/net/if_cuereg.h b/freebsd/sys/dev/usb/net/if_cuereg.h index ff245c05..b5cccee4 100644 --- a/freebsd/sys/dev/usb/net/if_cuereg.h +++ b/freebsd/sys/dev/usb/net/if_cuereg.h @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1997, 1998, 1999, 2000 * Bill Paul <wpaul@ee.columbia.edu>. All rights reserved. * diff --git a/freebsd/sys/dev/usb/net/if_ipheth.c b/freebsd/sys/dev/usb/net/if_ipheth.c index 2eaf88b8..bb56c294 100644 --- a/freebsd/sys/dev/usb/net/if_ipheth.c +++ b/freebsd/sys/dev/usb/net/if_ipheth.c @@ -1,6 +1,8 @@ #include <machine/rtems-bsd-kernel-space.h> /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2010 Hans Petter Selasky. All rights reserved. * Copyright (c) 2009 Diego Giagio. All rights reserved. * diff --git a/freebsd/sys/dev/usb/net/if_iphethvar.h b/freebsd/sys/dev/usb/net/if_iphethvar.h index 65b0c940..4f990189 100644 --- a/freebsd/sys/dev/usb/net/if_iphethvar.h +++ b/freebsd/sys/dev/usb/net/if_iphethvar.h @@ -1,5 +1,7 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2010 Hans Petter Selasky. All rights reserved. * Copyright (c) 2009 Diego Giagio. All rights reserved. * diff --git a/freebsd/sys/dev/usb/net/if_kue.c b/freebsd/sys/dev/usb/net/if_kue.c index 26e09459..255a83bb 100644 --- a/freebsd/sys/dev/usb/net/if_kue.c +++ b/freebsd/sys/dev/usb/net/if_kue.c @@ -1,6 +1,8 @@ #include <machine/rtems-bsd-kernel-space.h> /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1997, 1998, 1999, 2000 * Bill Paul <wpaul@ee.columbia.edu>. All rights reserved. * diff --git a/freebsd/sys/dev/usb/net/if_kuefw.h b/freebsd/sys/dev/usb/net/if_kuefw.h index 2b055a92..8b799f01 100644 --- a/freebsd/sys/dev/usb/net/if_kuefw.h +++ b/freebsd/sys/dev/usb/net/if_kuefw.h @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1997, 1998, 1999, 2000 * Bill Paul <wpaul@ee.columbia.edu>. All rights reserved. * diff --git a/freebsd/sys/dev/usb/net/if_kuereg.h b/freebsd/sys/dev/usb/net/if_kuereg.h index 16ad044d..2f5d7ccb 100644 --- a/freebsd/sys/dev/usb/net/if_kuereg.h +++ b/freebsd/sys/dev/usb/net/if_kuereg.h @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1997, 1998, 1999, 2000 * Bill Paul <wpaul@ee.columbia.edu>. All rights reserved. * diff --git a/freebsd/sys/dev/usb/net/if_mos.c b/freebsd/sys/dev/usb/net/if_mos.c index 8cac9033..a25e9df6 100644 --- a/freebsd/sys/dev/usb/net/if_mos.c +++ b/freebsd/sys/dev/usb/net/if_mos.c @@ -1,6 +1,8 @@ #include <machine/rtems-bsd-kernel-space.h> /*- + * SPDX-License-Identifier: 0BSD AND BSD-4-Clause + * * Copyright (c) 2011 Rick van der Zwet <info@rickvanderzwet.nl> * * Permission to use, copy, modify, and distribute this software for any diff --git a/freebsd/sys/dev/usb/net/if_mosreg.h b/freebsd/sys/dev/usb/net/if_mosreg.h index c811d552..b8034feb 100644 --- a/freebsd/sys/dev/usb/net/if_mosreg.h +++ b/freebsd/sys/dev/usb/net/if_mosreg.h @@ -32,6 +32,8 @@ */ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1997, 1998, 1999, 2000-2003 * Bill Paul <wpaul@windriver.com>. All rights reserved. * diff --git a/freebsd/sys/dev/usb/net/if_rue.c b/freebsd/sys/dev/usb/net/if_rue.c index e816a190..7b062755 100644 --- a/freebsd/sys/dev/usb/net/if_rue.c +++ b/freebsd/sys/dev/usb/net/if_rue.c @@ -27,6 +27,8 @@ * SUCH DAMAGE. */ /*- + * SPDX-License-Identifier: BSD-4-Clause AND BSD-2-Clause-FreeBSD + * * Copyright (c) 1997, 1998, 1999, 2000 * Bill Paul <wpaul@ee.columbia.edu>. All rights reserved. * diff --git a/freebsd/sys/dev/usb/net/if_ruereg.h b/freebsd/sys/dev/usb/net/if_ruereg.h index c90a9692..688ee24e 100644 --- a/freebsd/sys/dev/usb/net/if_ruereg.h +++ b/freebsd/sys/dev/usb/net/if_ruereg.h @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2001-2003, Shunsuke Akiyama <akiyama@FreeBSD.org>. * All rights reserved. * diff --git a/freebsd/sys/dev/usb/net/if_smsc.c b/freebsd/sys/dev/usb/net/if_smsc.c index 9c028b4e..88ecb618 100644 --- a/freebsd/sys/dev/usb/net/if_smsc.c +++ b/freebsd/sys/dev/usb/net/if_smsc.c @@ -1,6 +1,8 @@ #include <machine/rtems-bsd-kernel-space.h> /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2012 * Ben Gray <bgray@freebsd.org>. * All rights reserved. @@ -1570,8 +1572,9 @@ smsc_fdt_find_eth_node(phandle_t start) /* Traverse through entire tree to find usb ethernet nodes. */ for (node = OF_child(start); node != 0; node = OF_peer(node)) { - if (ofw_bus_node_is_compatible(node, "net,ethernet") && - ofw_bus_node_is_compatible(node, "usb,device")) + if ((ofw_bus_node_is_compatible(node, "net,ethernet") && + ofw_bus_node_is_compatible(node, "usb,device")) || + ofw_bus_node_is_compatible(node, "usb424,ec00")) return (node); child = smsc_fdt_find_eth_node(node); if (child != -1) @@ -1638,6 +1641,37 @@ smsc_fdt_find_eth_node_by_path(phandle_t start) return (-1); } +/* + * Look through known names that can contain mac address + * return 0 if valid MAC address has been found + */ +static int +smsc_fdt_read_mac_property(phandle_t node, unsigned char *mac) +{ + int len; + + /* Check if there is property */ + if ((len = OF_getproplen(node, "local-mac-address")) > 0) { + if (len != ETHER_ADDR_LEN) + return (EINVAL); + + OF_getprop(node, "local-mac-address", mac, + ETHER_ADDR_LEN); + return (0); + } + + if ((len = OF_getproplen(node, "mac-address")) > 0) { + if (len != ETHER_ADDR_LEN) + return (EINVAL); + + OF_getprop(node, "mac-address", mac, + ETHER_ADDR_LEN); + return (0); + } + + return (ENXIO); +} + /** * Get MAC address from FDT blob. Firmware or loader should fill * mac-address or local-mac-address property. Returns 0 if MAC address @@ -1647,37 +1681,22 @@ static int smsc_fdt_find_mac(unsigned char *mac) { phandle_t node, root; - int len; root = OF_finddevice("/"); node = smsc_fdt_find_eth_node(root); + if (node != -1) { + if (smsc_fdt_read_mac_property(node, mac) == 0) + return (0); + } + /* * If it's not FreeBSD FDT blob for RPi, try more * generic .../usb/hub/ethernet */ - if (node == -1) - node = smsc_fdt_find_eth_node_by_path(root); - - if (node != -1) { - /* Check if there is property */ - if ((len = OF_getproplen(node, "local-mac-address")) > 0) { - if (len != ETHER_ADDR_LEN) - return (EINVAL); - - OF_getprop(node, "local-mac-address", mac, - ETHER_ADDR_LEN); - return (0); - } + node = smsc_fdt_find_eth_node_by_path(root); - if ((len = OF_getproplen(node, "mac-address")) > 0) { - if (len != ETHER_ADDR_LEN) - return (EINVAL); - - OF_getprop(node, "mac-address", mac, - ETHER_ADDR_LEN); - return (0); - } - } + if (node != -1) + return smsc_fdt_read_mac_property(node, mac); return (ENXIO); } diff --git a/freebsd/sys/dev/usb/net/if_smscreg.h b/freebsd/sys/dev/usb/net/if_smscreg.h index 31a63828..5ad79b9e 100644 --- a/freebsd/sys/dev/usb/net/if_smscreg.h +++ b/freebsd/sys/dev/usb/net/if_smscreg.h @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2012 * Ben Gray <bgray@freebsd.org>. * All rights reserved. diff --git a/freebsd/sys/dev/usb/net/if_udav.c b/freebsd/sys/dev/usb/net/if_udav.c index b8393abc..21019265 100644 --- a/freebsd/sys/dev/usb/net/if_udav.c +++ b/freebsd/sys/dev/usb/net/if_udav.c @@ -4,6 +4,8 @@ /* $nabe: if_udav.c,v 1.3 2003/08/21 16:57:19 nabe Exp $ */ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 2003 * Shingo WATANABE <nabe@nabechan.org>. All rights reserved. * diff --git a/freebsd/sys/dev/usb/net/if_udavreg.h b/freebsd/sys/dev/usb/net/if_udavreg.h index 7c35829b..d8927006 100644 --- a/freebsd/sys/dev/usb/net/if_udavreg.h +++ b/freebsd/sys/dev/usb/net/if_udavreg.h @@ -2,6 +2,8 @@ /* $nabe: if_udavreg.h,v 1.2 2003/08/21 16:26:40 nabe Exp $ */ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 2003 * Shingo WATANABE <nabe@nabechan.org>. All rights reserved. * diff --git a/freebsd/sys/dev/usb/net/if_ure.c b/freebsd/sys/dev/usb/net/if_ure.c index 89ce723b..0e45a6c9 100644 --- a/freebsd/sys/dev/usb/net/if_ure.c +++ b/freebsd/sys/dev/usb/net/if_ure.c @@ -72,6 +72,7 @@ static const STRUCT_USB_HOST_ID ure_devs[] = { URE_DEV(LENOVO, RTL8153, 0), URE_DEV(REALTEK, RTL8152, URE_FLAG_8152), URE_DEV(REALTEK, RTL8153, 0), + URE_DEV(TPLINK, RTL8153, 0), #undef URE_DEV }; diff --git a/freebsd/sys/dev/usb/net/ruephy.c b/freebsd/sys/dev/usb/net/ruephy.c index af01d23b..d16bc8ae 100644 --- a/freebsd/sys/dev/usb/net/ruephy.c +++ b/freebsd/sys/dev/usb/net/ruephy.c @@ -1,6 +1,8 @@ #include <machine/rtems-bsd-kernel-space.h> /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2001-2003, Shunsuke Akiyama <akiyama@FreeBSD.org>. * All rights reserved. * diff --git a/freebsd/sys/dev/usb/net/ruephyreg.h b/freebsd/sys/dev/usb/net/ruephyreg.h index 01d3cc17..38c508d5 100644 --- a/freebsd/sys/dev/usb/net/ruephyreg.h +++ b/freebsd/sys/dev/usb/net/ruephyreg.h @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2001-2003, Shunsuke Akiyama <akiyama@FreeBSD.org>. * All rights reserved. * diff --git a/freebsd/sys/dev/usb/net/usb_ethernet.c b/freebsd/sys/dev/usb/net/usb_ethernet.c index 32c0fa22..842e7987 100644 --- a/freebsd/sys/dev/usb/net/usb_ethernet.c +++ b/freebsd/sys/dev/usb/net/usb_ethernet.c @@ -2,6 +2,8 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2009 Andrew Thompson (thompsa@FreeBSD.org) * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/net/usb_ethernet.h b/freebsd/sys/dev/usb/net/usb_ethernet.h index d22e5d9b..c7afc650 100644 --- a/freebsd/sys/dev/usb/net/usb_ethernet.h +++ b/freebsd/sys/dev/usb/net/usb_ethernet.h @@ -1,5 +1,7 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/quirk/usb_quirk.c b/freebsd/sys/dev/usb/quirk/usb_quirk.c index 3ea3f3c6..8c9e91cb 100644 --- a/freebsd/sys/dev/usb/quirk/usb_quirk.c +++ b/freebsd/sys/dev/usb/quirk/usb_quirk.c @@ -2,6 +2,8 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-NetBSD + * * Copyright (c) 1998 The NetBSD Foundation, Inc. All rights reserved. * Copyright (c) 1998 Lennart Augustsson. All rights reserved. * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. diff --git a/freebsd/sys/dev/usb/quirk/usb_quirk.h b/freebsd/sys/dev/usb/quirk/usb_quirk.h index bb9fe190..e7f2e02f 100644 --- a/freebsd/sys/dev/usb/quirk/usb_quirk.h +++ b/freebsd/sys/dev/usb/quirk/usb_quirk.h @@ -1,5 +1,7 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/serial/u3g.c b/freebsd/sys/dev/usb/serial/u3g.c index 3582b6d8..0f3933e6 100644 --- a/freebsd/sys/dev/usb/serial/u3g.c +++ b/freebsd/sys/dev/usb/serial/u3g.c @@ -238,6 +238,8 @@ static const STRUCT_USB_HOST_ID u3g_devs[] = { U3G_DEV(DLINK, DWR510, 0), U3G_DEV(DLINK, DWM157_CD, U3GINIT_SCSIEJECT), U3G_DEV(DLINK, DWM157, 0), + U3G_DEV(DLINK, DWM222_CD, U3GINIT_SCSIEJECT), + U3G_DEV(DLINK, DWM222, 0), U3G_DEV(DLINK3, DWM652, 0), U3G_DEV(HP, EV2200, 0), U3G_DEV(HP, HS2300, 0), diff --git a/freebsd/sys/dev/usb/serial/ubsa.c b/freebsd/sys/dev/usb/serial/ubsa.c index 61005fa0..8b6284f0 100644 --- a/freebsd/sys/dev/usb/serial/ubsa.c +++ b/freebsd/sys/dev/usb/serial/ubsa.c @@ -1,6 +1,8 @@ #include <machine/rtems-bsd-kernel-space.h> /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD AND BSD-2-Clause-NetBSD + * * Copyright (c) 2002, Alexander Kabaev <kan.FreeBSD.org>. * All rights reserved. * diff --git a/freebsd/sys/dev/usb/serial/ubser.c b/freebsd/sys/dev/usb/serial/ubser.c index 534c5e75..9fdb1d3a 100644 --- a/freebsd/sys/dev/usb/serial/ubser.c +++ b/freebsd/sys/dev/usb/serial/ubser.c @@ -10,6 +10,8 @@ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD AND BSD-2-Clause-NetBSD + * * Copyright (c) 2001-2002, Shunsuke Akiyama <akiyama@jp.FreeBSD.org>. * All rights reserved. * diff --git a/freebsd/sys/dev/usb/serial/uchcom.c b/freebsd/sys/dev/usb/serial/uchcom.c index 3bee03d9..1e741ccd 100644 --- a/freebsd/sys/dev/usb/serial/uchcom.c +++ b/freebsd/sys/dev/usb/serial/uchcom.c @@ -3,6 +3,8 @@ /* $NetBSD: uchcom.c,v 1.1 2007/09/03 17:57:37 tshiozak Exp $ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD AND BSD-2-Clause-NetBSD + * * Copyright (c) 2007, Takanori Watanabe * All rights reserved. * diff --git a/freebsd/sys/dev/usb/serial/ucycom.c b/freebsd/sys/dev/usb/serial/ucycom.c index 6f83d450..1166d36d 100644 --- a/freebsd/sys/dev/usb/serial/ucycom.c +++ b/freebsd/sys/dev/usb/serial/ucycom.c @@ -4,6 +4,8 @@ __FBSDID("$FreeBSD$"); /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2004 Dag-Erling Coïdan Smørgrav * All rights reserved. * diff --git a/freebsd/sys/dev/usb/serial/ufoma.c b/freebsd/sys/dev/usb/serial/ufoma.c index bcd70308..97ffea63 100644 --- a/freebsd/sys/dev/usb/serial/ufoma.c +++ b/freebsd/sys/dev/usb/serial/ufoma.c @@ -6,6 +6,8 @@ __FBSDID("$FreeBSD$"); #define UFOMA_HANDSFREE /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD AND BSD-2-Clause-NetBSD + * * Copyright (c) 2005, Takanori Watanabe * Copyright (c) 2003, M. Warner Losh <imp@FreeBSD.org>. * All rights reserved. diff --git a/freebsd/sys/dev/usb/serial/uftdi.c b/freebsd/sys/dev/usb/serial/uftdi.c index a40ee4f7..d07c055d 100644 --- a/freebsd/sys/dev/usb/serial/uftdi.c +++ b/freebsd/sys/dev/usb/serial/uftdi.c @@ -3,6 +3,8 @@ /* $NetBSD: uftdi.c,v 1.13 2002/09/23 05:51:23 simonb Exp $ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-NetBSD + * * Copyright (c) 2000 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/freebsd/sys/dev/usb/serial/ugensa.c b/freebsd/sys/dev/usb/serial/ugensa.c index 15f6c9e3..2737227c 100644 --- a/freebsd/sys/dev/usb/serial/ugensa.c +++ b/freebsd/sys/dev/usb/serial/ugensa.c @@ -3,7 +3,9 @@ /* $FreeBSD$ */ /* $NetBSD: ugensa.c,v 1.9.2.1 2007/03/24 14:55:50 yamt Exp $ */ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause-NetBSD + * * Copyright (c) 2004, 2005 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/freebsd/sys/dev/usb/serial/uipaq.c b/freebsd/sys/dev/usb/serial/uipaq.c index b512b0e5..bf746295 100644 --- a/freebsd/sys/dev/usb/serial/uipaq.c +++ b/freebsd/sys/dev/usb/serial/uipaq.c @@ -3,7 +3,9 @@ /* $NetBSD: uipaq.c,v 1.4 2006/11/16 01:33:27 christos Exp $ */ /* $OpenBSD: uipaq.c,v 1.1 2005/06/17 23:50:33 deraadt Exp $ */ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause-NetBSD + * * Copyright (c) 2000-2005 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/freebsd/sys/dev/usb/serial/ulpt.c b/freebsd/sys/dev/usb/serial/ulpt.c index bd2d966a..c966e602 100644 --- a/freebsd/sys/dev/usb/serial/ulpt.c +++ b/freebsd/sys/dev/usb/serial/ulpt.c @@ -6,6 +6,8 @@ __FBSDID("$FreeBSD$"); /* $NetBSD: ulpt.c,v 1.60 2003/10/04 21:19:50 augustss Exp $ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-NetBSD + * * Copyright (c) 1998, 2003 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/freebsd/sys/dev/usb/serial/umcs.c b/freebsd/sys/dev/usb/serial/umcs.c index 5d803e44..8f083ce3 100644 --- a/freebsd/sys/dev/usb/serial/umcs.c +++ b/freebsd/sys/dev/usb/serial/umcs.c @@ -1,6 +1,8 @@ #include <machine/rtems-bsd-kernel-space.h> /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2010 Lev Serebryakov <lev@FreeBSD.org>. * All rights reserved. * diff --git a/freebsd/sys/dev/usb/serial/umcs.h b/freebsd/sys/dev/usb/serial/umcs.h index 8ba57c13..288988c2 100644 --- a/freebsd/sys/dev/usb/serial/umcs.h +++ b/freebsd/sys/dev/usb/serial/umcs.h @@ -1,5 +1,7 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2010 Lev Serebryakov <lev@FreeBSD.org>. * All rights reserved. * diff --git a/freebsd/sys/dev/usb/serial/umct.c b/freebsd/sys/dev/usb/serial/umct.c index 5c00985d..e6877a36 100644 --- a/freebsd/sys/dev/usb/serial/umct.c +++ b/freebsd/sys/dev/usb/serial/umct.c @@ -4,6 +4,8 @@ __FBSDID("$FreeBSD$"); /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2003 Scott Long * All rights reserved. * diff --git a/freebsd/sys/dev/usb/serial/umodem.c b/freebsd/sys/dev/usb/serial/umodem.c index 2d36f125..c64600c8 100644 --- a/freebsd/sys/dev/usb/serial/umodem.c +++ b/freebsd/sys/dev/usb/serial/umodem.c @@ -6,6 +6,8 @@ __FBSDID("$FreeBSD$"); /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD AND BSD-2-Clause-NetBSD + * * Copyright (c) 2003, M. Warner Losh <imp@FreeBSD.org>. * All rights reserved. * diff --git a/freebsd/sys/dev/usb/serial/uplcom.c b/freebsd/sys/dev/usb/serial/uplcom.c index 7ec41e97..2b90e4d6 100644 --- a/freebsd/sys/dev/usb/serial/uplcom.c +++ b/freebsd/sys/dev/usb/serial/uplcom.c @@ -6,6 +6,8 @@ __FBSDID("$FreeBSD$"); /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD AND BSD-2-Clause-NetBSD + * * Copyright (c) 2001-2003, 2005 Shunsuke Akiyama <akiyama@jp.FreeBSD.org>. * All rights reserved. * diff --git a/freebsd/sys/dev/usb/serial/usb_serial.c b/freebsd/sys/dev/usb/serial/usb_serial.c index eb3adabd..46a18d63 100644 --- a/freebsd/sys/dev/usb/serial/usb_serial.c +++ b/freebsd/sys/dev/usb/serial/usb_serial.c @@ -3,6 +3,8 @@ /* $NetBSD: ucom.c,v 1.40 2001/11/13 06:24:54 lukem Exp $ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD AND BSD-2-Clause-NetBSD + * * Copyright (c) 2001-2003, 2005, 2008 * Shunsuke Akiyama <akiyama@jp.FreeBSD.org>. * All rights reserved. diff --git a/freebsd/sys/dev/usb/serial/usb_serial.h b/freebsd/sys/dev/usb/serial/usb_serial.h index 2c53f445..9a5e043e 100644 --- a/freebsd/sys/dev/usb/serial/usb_serial.h +++ b/freebsd/sys/dev/usb/serial/usb_serial.h @@ -2,6 +2,8 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD AND BSD-2-Clause-NetBSD + * * Copyright (c) 2001-2002, Shunsuke Akiyama <akiyama@jp.FreeBSD.org>. * All rights reserved. * diff --git a/freebsd/sys/dev/usb/serial/uvisor.c b/freebsd/sys/dev/usb/serial/uvisor.c index c749b415..18db98c7 100644 --- a/freebsd/sys/dev/usb/serial/uvisor.c +++ b/freebsd/sys/dev/usb/serial/uvisor.c @@ -16,6 +16,8 @@ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-NetBSD + * * Copyright (c) 2000 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/freebsd/sys/dev/usb/serial/uvscom.c b/freebsd/sys/dev/usb/serial/uvscom.c index 04d92a41..f4cc6ee6 100644 --- a/freebsd/sys/dev/usb/serial/uvscom.c +++ b/freebsd/sys/dev/usb/serial/uvscom.c @@ -6,6 +6,8 @@ __FBSDID("$FreeBSD$"); /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2001-2003, 2005 Shunsuke Akiyama <akiyama@jp.FreeBSD.org>. * All rights reserved. * diff --git a/freebsd/sys/dev/usb/storage/umass.c b/freebsd/sys/dev/usb/storage/umass.c index c99874e2..6b488cf7 100644 --- a/freebsd/sys/dev/usb/storage/umass.c +++ b/freebsd/sys/dev/usb/storage/umass.c @@ -4,6 +4,8 @@ __FBSDID("$FreeBSD$"); /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 1999 MAEKAWA Masahide <bishop@rr.iij4u.or.jp>, * Nick Hibma <n_hibma@FreeBSD.org> * All rights reserved. diff --git a/freebsd/sys/dev/usb/ufm_ioctl.h b/freebsd/sys/dev/usb/ufm_ioctl.h index 5a233883..599d36d4 100644 --- a/freebsd/sys/dev/usb/ufm_ioctl.h +++ b/freebsd/sys/dev/usb/ufm_ioctl.h @@ -1,5 +1,7 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2001 M. Warner Losh * All rights reserved. * diff --git a/freebsd/sys/dev/usb/usb.h b/freebsd/sys/dev/usb/usb.h index 95b4f4ac..ff33cf00 100644 --- a/freebsd/sys/dev/usb/usb.h +++ b/freebsd/sys/dev/usb/usb.h @@ -1,5 +1,7 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-NetBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * Copyright (c) 1998 The NetBSD Foundation, Inc. All rights reserved. * Copyright (c) 1998 Lennart Augustsson. All rights reserved. diff --git a/freebsd/sys/dev/usb/usb_bus.h b/freebsd/sys/dev/usb/usb_bus.h index 3ceeb1ef..710436c1 100644 --- a/freebsd/sys/dev/usb/usb_bus.h +++ b/freebsd/sys/dev/usb/usb_bus.h @@ -1,5 +1,7 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/usb_busdma.c b/freebsd/sys/dev/usb/usb_busdma.c index 446e36e6..9a70c687 100644 --- a/freebsd/sys/dev/usb/usb_busdma.c +++ b/freebsd/sys/dev/usb/usb_busdma.c @@ -2,6 +2,8 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/usb_busdma.h b/freebsd/sys/dev/usb/usb_busdma.h index 077bf8b8..d75e67ee 100644 --- a/freebsd/sys/dev/usb/usb_busdma.h +++ b/freebsd/sys/dev/usb/usb_busdma.h @@ -1,5 +1,7 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/usb_cdc.h b/freebsd/sys/dev/usb/usb_cdc.h index 86f35170..d77c24bb 100644 --- a/freebsd/sys/dev/usb/usb_cdc.h +++ b/freebsd/sys/dev/usb/usb_cdc.h @@ -2,6 +2,8 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-NetBSD + * * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/freebsd/sys/dev/usb/usb_controller.h b/freebsd/sys/dev/usb/usb_controller.h index 6a2f6b03..59139e64 100644 --- a/freebsd/sys/dev/usb/usb_controller.h +++ b/freebsd/sys/dev/usb/usb_controller.h @@ -1,5 +1,7 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/usb_core.c b/freebsd/sys/dev/usb/usb_core.c index 3d9daa26..09bfdb2b 100644 --- a/freebsd/sys/dev/usb/usb_core.c +++ b/freebsd/sys/dev/usb/usb_core.c @@ -2,6 +2,8 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/usb_core.h b/freebsd/sys/dev/usb/usb_core.h index 9f52e65a..01018ca9 100644 --- a/freebsd/sys/dev/usb/usb_core.h +++ b/freebsd/sys/dev/usb/usb_core.h @@ -1,5 +1,7 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/usb_debug.c b/freebsd/sys/dev/usb/usb_debug.c index 000319b1..e3a1474e 100644 --- a/freebsd/sys/dev/usb/usb_debug.c +++ b/freebsd/sys/dev/usb/usb_debug.c @@ -2,6 +2,8 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/usb_debug.h b/freebsd/sys/dev/usb/usb_debug.h index e30f2c2c..87c0dcfe 100644 --- a/freebsd/sys/dev/usb/usb_debug.h +++ b/freebsd/sys/dev/usb/usb_debug.h @@ -1,5 +1,7 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/usb_dev.c b/freebsd/sys/dev/usb/usb_dev.c index b0ad9aaf..2b244d80 100644 --- a/freebsd/sys/dev/usb/usb_dev.c +++ b/freebsd/sys/dev/usb/usb_dev.c @@ -2,6 +2,8 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2006-2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/usb_dev.h b/freebsd/sys/dev/usb/usb_dev.h index f87ba53b..ae851153 100644 --- a/freebsd/sys/dev/usb/usb_dev.h +++ b/freebsd/sys/dev/usb/usb_dev.h @@ -1,5 +1,7 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/usb_device.c b/freebsd/sys/dev/usb/usb_device.c index 6a193a75..861f6029 100644 --- a/freebsd/sys/dev/usb/usb_device.c +++ b/freebsd/sys/dev/usb/usb_device.c @@ -2,6 +2,8 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/usb_device.h b/freebsd/sys/dev/usb/usb_device.h index 22e15606..1cf48ea1 100644 --- a/freebsd/sys/dev/usb/usb_device.h +++ b/freebsd/sys/dev/usb/usb_device.h @@ -1,5 +1,7 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/usb_dynamic.c b/freebsd/sys/dev/usb/usb_dynamic.c index c2ca9af6..9eb835ad 100644 --- a/freebsd/sys/dev/usb/usb_dynamic.c +++ b/freebsd/sys/dev/usb/usb_dynamic.c @@ -2,6 +2,8 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/usb_dynamic.h b/freebsd/sys/dev/usb/usb_dynamic.h index e52c46fb..2d46afc8 100644 --- a/freebsd/sys/dev/usb/usb_dynamic.h +++ b/freebsd/sys/dev/usb/usb_dynamic.h @@ -1,5 +1,7 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/usb_endian.h b/freebsd/sys/dev/usb/usb_endian.h index 0bbcb9bf..59761767 100644 --- a/freebsd/sys/dev/usb/usb_endian.h +++ b/freebsd/sys/dev/usb/usb_endian.h @@ -1,5 +1,7 @@ /* $FreeBSD$ */ /* + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/usb_error.c b/freebsd/sys/dev/usb/usb_error.c index 2cc49964..2c58c508 100644 --- a/freebsd/sys/dev/usb/usb_error.c +++ b/freebsd/sys/dev/usb/usb_error.c @@ -2,6 +2,8 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/usb_freebsd.h b/freebsd/sys/dev/usb/usb_freebsd.h index bc5d2422..1eff3e14 100644 --- a/freebsd/sys/dev/usb/usb_freebsd.h +++ b/freebsd/sys/dev/usb/usb_freebsd.h @@ -1,5 +1,7 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/usb_generic.c b/freebsd/sys/dev/usb/usb_generic.c index ae14bae3..29a27d53 100644 --- a/freebsd/sys/dev/usb/usb_generic.c +++ b/freebsd/sys/dev/usb/usb_generic.c @@ -2,6 +2,8 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/usb_generic.h b/freebsd/sys/dev/usb/usb_generic.h index 835ec72a..d03f25cd 100644 --- a/freebsd/sys/dev/usb/usb_generic.h +++ b/freebsd/sys/dev/usb/usb_generic.h @@ -1,5 +1,7 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/usb_handle_request.c b/freebsd/sys/dev/usb/usb_handle_request.c index c6b4db32..458d1fc1 100644 --- a/freebsd/sys/dev/usb/usb_handle_request.c +++ b/freebsd/sys/dev/usb/usb_handle_request.c @@ -2,6 +2,8 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/usb_hid.c b/freebsd/sys/dev/usb/usb_hid.c index 5019aa1a..c2d93f3a 100644 --- a/freebsd/sys/dev/usb/usb_hid.c +++ b/freebsd/sys/dev/usb/usb_hid.c @@ -3,6 +3,8 @@ /* $FreeBSD$ */ /* $NetBSD: hid.c,v 1.17 2001/11/13 06:24:53 lukem Exp $ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-NetBSD + * * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/freebsd/sys/dev/usb/usb_hub.c b/freebsd/sys/dev/usb/usb_hub.c index 0eaeeb60..a0ad462f 100644 --- a/freebsd/sys/dev/usb/usb_hub.c +++ b/freebsd/sys/dev/usb/usb_hub.c @@ -2,6 +2,8 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-NetBSD + * * Copyright (c) 1998 The NetBSD Foundation, Inc. All rights reserved. * Copyright (c) 1998 Lennart Augustsson. All rights reserved. * Copyright (c) 2008-2010 Hans Petter Selasky. All rights reserved. diff --git a/freebsd/sys/dev/usb/usb_hub.h b/freebsd/sys/dev/usb/usb_hub.h index 16430d9b..3d4e0837 100644 --- a/freebsd/sys/dev/usb/usb_hub.h +++ b/freebsd/sys/dev/usb/usb_hub.h @@ -1,5 +1,7 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/usb_ioctl.h b/freebsd/sys/dev/usb/usb_ioctl.h index 683f3e61..7cf90649 100644 --- a/freebsd/sys/dev/usb/usb_ioctl.h +++ b/freebsd/sys/dev/usb/usb_ioctl.h @@ -1,5 +1,7 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * Copyright (c) 1998 The NetBSD Foundation, Inc. All rights reserved. * Copyright (c) 1998 Lennart Augustsson. All rights reserved. diff --git a/freebsd/sys/dev/usb/usb_lookup.c b/freebsd/sys/dev/usb/usb_lookup.c index 533080ef..6f6a763f 100644 --- a/freebsd/sys/dev/usb/usb_lookup.c +++ b/freebsd/sys/dev/usb/usb_lookup.c @@ -2,6 +2,8 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/usb_mbuf.c b/freebsd/sys/dev/usb/usb_mbuf.c index b1cc3276..62c14264 100644 --- a/freebsd/sys/dev/usb/usb_mbuf.c +++ b/freebsd/sys/dev/usb/usb_mbuf.c @@ -2,6 +2,8 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/usb_mbuf.h b/freebsd/sys/dev/usb/usb_mbuf.h index 3b331ffc..2466e2e4 100644 --- a/freebsd/sys/dev/usb/usb_mbuf.h +++ b/freebsd/sys/dev/usb/usb_mbuf.h @@ -1,5 +1,7 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/usb_msctest.c b/freebsd/sys/dev/usb/usb_msctest.c index f0eede28..d8d11eca 100644 --- a/freebsd/sys/dev/usb/usb_msctest.c +++ b/freebsd/sys/dev/usb/usb_msctest.c @@ -2,6 +2,8 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008,2011 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/usb_msctest.h b/freebsd/sys/dev/usb/usb_msctest.h index d3f26c2b..6b5d3283 100644 --- a/freebsd/sys/dev/usb/usb_msctest.h +++ b/freebsd/sys/dev/usb/usb_msctest.h @@ -1,5 +1,7 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/usb_parse.c b/freebsd/sys/dev/usb/usb_parse.c index 776e1f05..638aaf77 100644 --- a/freebsd/sys/dev/usb/usb_parse.c +++ b/freebsd/sys/dev/usb/usb_parse.c @@ -2,6 +2,8 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/usb_pf.h b/freebsd/sys/dev/usb/usb_pf.h index 29fe6ebd..03f7ba98 100644 --- a/freebsd/sys/dev/usb/usb_pf.h +++ b/freebsd/sys/dev/usb/usb_pf.h @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1990, 1991, 1993 * The Regents of the University of California. All rights reserved. * diff --git a/freebsd/sys/dev/usb/usb_process.c b/freebsd/sys/dev/usb/usb_process.c index 88f09804..6c4cc7ad 100644 --- a/freebsd/sys/dev/usb/usb_process.c +++ b/freebsd/sys/dev/usb/usb_process.c @@ -2,6 +2,8 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/usb_process.h b/freebsd/sys/dev/usb/usb_process.h index dd20afd4..7be78917 100644 --- a/freebsd/sys/dev/usb/usb_process.h +++ b/freebsd/sys/dev/usb/usb_process.h @@ -1,5 +1,7 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/usb_request.c b/freebsd/sys/dev/usb/usb_request.c index ef8ed3e6..6be241c2 100644 --- a/freebsd/sys/dev/usb/usb_request.c +++ b/freebsd/sys/dev/usb/usb_request.c @@ -2,6 +2,8 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 1998 The NetBSD Foundation, Inc. All rights reserved. * Copyright (c) 1998 Lennart Augustsson. All rights reserved. * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. diff --git a/freebsd/sys/dev/usb/usb_request.h b/freebsd/sys/dev/usb/usb_request.h index 9f0a4e64..7c653132 100644 --- a/freebsd/sys/dev/usb/usb_request.h +++ b/freebsd/sys/dev/usb/usb_request.h @@ -1,5 +1,7 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/usb_transfer.c b/freebsd/sys/dev/usb/usb_transfer.c index ee80d9bb..7ea25337 100644 --- a/freebsd/sys/dev/usb/usb_transfer.c +++ b/freebsd/sys/dev/usb/usb_transfer.c @@ -2,6 +2,8 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/usb_transfer.h b/freebsd/sys/dev/usb/usb_transfer.h index f035240b..da632a73 100644 --- a/freebsd/sys/dev/usb/usb_transfer.h +++ b/freebsd/sys/dev/usb/usb_transfer.h @@ -1,5 +1,7 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/usb_util.c b/freebsd/sys/dev/usb/usb_util.c index 4d8c9c56..aa705751 100644 --- a/freebsd/sys/dev/usb/usb_util.c +++ b/freebsd/sys/dev/usb/usb_util.c @@ -2,6 +2,8 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/usb_util.h b/freebsd/sys/dev/usb/usb_util.h index 7e52404f..87e54d35 100644 --- a/freebsd/sys/dev/usb/usb_util.h +++ b/freebsd/sys/dev/usb/usb_util.h @@ -1,5 +1,7 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/usbdi.h b/freebsd/sys/dev/usb/usbdi.h index 6ad3e43e..2be8eef1 100644 --- a/freebsd/sys/dev/usb/usbdi.h +++ b/freebsd/sys/dev/usb/usbdi.h @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2009 Andrew Thompson * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/usbdi_util.h b/freebsd/sys/dev/usb/usbdi_util.h index 1e450f8f..d0ee6f9d 100644 --- a/freebsd/sys/dev/usb/usbdi_util.h +++ b/freebsd/sys/dev/usb/usbdi_util.h @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2009 Andrew Thompson * * Redistribution and use in source and binary forms, with or without diff --git a/freebsd/sys/dev/usb/usbhid.h b/freebsd/sys/dev/usb/usbhid.h index 31aa7ea4..8870e291 100644 --- a/freebsd/sys/dev/usb/usbhid.h +++ b/freebsd/sys/dev/usb/usbhid.h @@ -1,5 +1,7 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-NetBSD + * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * Copyright (c) 1998 The NetBSD Foundation, Inc. All rights reserved. * Copyright (c) 1998 Lennart Augustsson. All rights reserved. diff --git a/freebsd/sys/dev/usb/wlan/if_rsu.c b/freebsd/sys/dev/usb/wlan/if_rsu.c index 2415d2f2..179de4e5 100644 --- a/freebsd/sys/dev/usb/wlan/if_rsu.c +++ b/freebsd/sys/dev/usb/wlan/if_rsu.c @@ -73,8 +73,11 @@ __FBSDID("$FreeBSD$"); #include <dev/usb/usbdi.h> #include <rtems/bsd/local/usbdevs.h> +#include <dev/rtwn/if_rtwn_ridx.h> /* XXX */ #include <dev/usb/wlan/if_rsureg.h> +#define RSU_RATE_IS_CCK RTWN_RATE_IS_CCK + #ifdef USB_DEBUG static int rsu_debug = 0; SYSCTL_NODE(_hw_usb, OID_AUTO, rsu, CTLFLAG_RW, 0, "USB rsu"); @@ -2387,44 +2390,6 @@ rsu_rx_frame(struct rsu_softc *sc, struct mbuf *m) rssi = rsu_hwrssi_to_rssi(sc, sc->sc_currssi); } - if (ieee80211_radiotap_active(ic)) { - struct rsu_rx_radiotap_header *tap = &sc->sc_rxtap; - - /* Map HW rate index to 802.11 rate. */ - tap->wr_flags = 0; /* TODO */ - tap->wr_tsft = rsu_get_tsf_high(sc); - if (le32toh(stat->tsf_low) > rsu_get_tsf_low(sc)) - tap->wr_tsft--; - tap->wr_tsft = (uint64_t)htole32(tap->wr_tsft) << 32; - tap->wr_tsft += stat->tsf_low; - - if (rate < 12) { - switch (rate) { - /* CCK. */ - case 0: tap->wr_rate = 2; break; - case 1: tap->wr_rate = 4; break; - case 2: tap->wr_rate = 11; break; - case 3: tap->wr_rate = 22; break; - /* OFDM. */ - case 4: tap->wr_rate = 12; break; - case 5: tap->wr_rate = 18; break; - case 6: tap->wr_rate = 24; break; - case 7: tap->wr_rate = 36; break; - case 8: tap->wr_rate = 48; break; - case 9: tap->wr_rate = 72; break; - case 10: tap->wr_rate = 96; break; - case 11: tap->wr_rate = 108; break; - } - } else { /* MCS0~15. */ - /* Bit 7 set means HT MCS instead of rate. */ - tap->wr_rate = 0x80 | (rate - 12); - } - - tap->wr_dbm_antsignal = rssi; - tap->wr_chan_freq = htole16(ic->ic_curchan->ic_freq); - tap->wr_chan_flags = htole16(ic->ic_curchan->ic_flags); - }; - /* Hardware does Rx TCP checksum offload. */ /* * This flag can be set for some other @@ -2470,65 +2435,34 @@ rsu_rx_frame(struct rsu_softc *sc, struct mbuf *m) rxs.c_nf = -96; /* Rate */ - if (!(rxdw3 & R92S_RXDW3_HTC)) { - switch (rate) { - /* CCK. */ - case 0: - rxs.c_rate = 2; - rxs.c_pktflags |= IEEE80211_RX_F_CCK; - break; - case 1: - rxs.c_rate = 4; - rxs.c_pktflags |= IEEE80211_RX_F_CCK; - break; - case 2: - rxs.c_rate = 11; + if (rate < 12) { + rxs.c_rate = ridx2rate[rate]; + if (RSU_RATE_IS_CCK(rate)) rxs.c_pktflags |= IEEE80211_RX_F_CCK; - break; - case 3: - rxs.c_rate = 22; - rxs.c_pktflags |= IEEE80211_RX_F_CCK; - break; - /* OFDM. */ - case 4: - rxs.c_rate = 12; - rxs.c_pktflags |= IEEE80211_RX_F_OFDM; - break; - case 5: - rxs.c_rate = 18; - rxs.c_pktflags |= IEEE80211_RX_F_OFDM; - break; - case 6: - rxs.c_rate = 24; - rxs.c_pktflags |= IEEE80211_RX_F_OFDM; - break; - case 7: - rxs.c_rate = 36; - rxs.c_pktflags |= IEEE80211_RX_F_OFDM; - break; - case 8: - rxs.c_rate = 48; - rxs.c_pktflags |= IEEE80211_RX_F_OFDM; - break; - case 9: - rxs.c_rate = 72; - rxs.c_pktflags |= IEEE80211_RX_F_OFDM; - break; - case 10: - rxs.c_rate = 96; - rxs.c_pktflags |= IEEE80211_RX_F_OFDM; - break; - case 11: - rxs.c_rate = 108; + else rxs.c_pktflags |= IEEE80211_RX_F_OFDM; - break; - } - } else if (rate >= 12) { /* MCS0~15. */ - /* Bit 7 set means HT MCS instead of rate. */ - rxs.c_rate = (rate - 12); + } else { + rxs.c_rate = IEEE80211_RATE_MCS | (rate - 12); rxs.c_pktflags |= IEEE80211_RX_F_HT; } + if (ieee80211_radiotap_active(ic)) { + struct rsu_rx_radiotap_header *tap = &sc->sc_rxtap; + + /* Map HW rate index to 802.11 rate. */ + tap->wr_flags = 0; /* TODO */ + tap->wr_tsft = rsu_get_tsf_high(sc); + if (le32toh(stat->tsf_low) > rsu_get_tsf_low(sc)) + tap->wr_tsft--; + tap->wr_tsft = (uint64_t)htole32(tap->wr_tsft) << 32; + tap->wr_tsft += stat->tsf_low; + + tap->wr_rate = rxs.c_rate; + tap->wr_dbm_antsignal = rssi; + tap->wr_chan_freq = htole16(ic->ic_curchan->ic_freq); + tap->wr_chan_flags = htole16(ic->ic_curchan->ic_flags); + }; + (void) ieee80211_add_rx_params(m, &rxs); /* Drop descriptor. */ diff --git a/freebsd/sys/dev/usb/wlan/if_uath.c b/freebsd/sys/dev/usb/wlan/if_uath.c index c4ebe5ed..e1aa5ec0 100644 --- a/freebsd/sys/dev/usb/wlan/if_uath.c +++ b/freebsd/sys/dev/usb/wlan/if_uath.c @@ -1,6 +1,8 @@ #include <machine/rtems-bsd-kernel-space.h> /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD AND 0BSD + * * Copyright (c) 2006 Sam Leffler, Errno Consulting * Copyright (c) 2008-2009 Weongyo Jeong <weongyo@freebsd.org> * All rights reserved. diff --git a/freebsd/sys/dev/usb/wlan/if_zydfw.h b/freebsd/sys/dev/usb/wlan/if_zydfw.h index 46f5c2ab..f18442e9 100644 --- a/freebsd/sys/dev/usb/wlan/if_zydfw.h +++ b/freebsd/sys/dev/usb/wlan/if_zydfw.h @@ -1,4 +1,6 @@ /* + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (C) 2001, 2002, 2003,2004 ZyDAS Technology Corporation. * All rights reserved. * |