-.\" $OpenBSD: rsu.4,v 1.22 2019/11/10 14:10:41 sthen Exp $
+.\" $OpenBSD: rsu.4,v 1.23 2021/10/04 01:33:42 kevlo Exp $
.\"
.\" Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
.\"
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: November 10 2019 $
+.Dd $Mdocdate: October 4 2021 $
.Dt RSU 4
.Os
.Sh NAME
or on boot with
.Xr hostname.if 5 .
.Sh FILES
-The driver needs at least version 1.1 of the following firmware file,
-which is loaded when an interface is attached:
+The adapter needs firmware files to run, which are loaded on demand by
+the driver when the device is attached:
.Pp
.Bl -tag -width Ds -offset indent -compact
-.It Pa /etc/firmware/rsu-rtl8712fw
+.It Pa /etc/firmware/rsu-rtl8712
.El
-.Pp
-A prepackaged version of the firmware can be installed using
-.Xr fw_update 1 .
.Sh HARDWARE
The following adapters should work:
.Pp
-.\" $OpenBSD: rtwn.4,v 1.9 2019/11/10 14:10:41 sthen Exp $
+.\" $OpenBSD: rtwn.4,v 1.10 2021/10/04 01:33:42 kevlo Exp $
.\"
.\" Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
.\" Copyright (c) 2015 Stefan Sperling <stsp@openbsd.org>
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: November 10 2019 $
+.Dd $Mdocdate: October 4 2021 $
.Dt RTWN 4
.Os
.Sh NAME
or on boot with
.Xr hostname.if 5 .
.Sh FILES
-The driver needs at least version 1.0 of the following firmware files,
-which are loaded when an interface is brought up:
+The adapter needs firmware files to run, which are loaded on demand by
+the driver when the device is attached:
.Pp
.Bl -tag -width Ds -offset indent -compact
-.It Pa /etc/firmware/rtwn-rtl8188efw
-.It Pa /etc/firmware/rtwn-rtl8192cfwU
-.It Pa /etc/firmware/rtwn-rtl8192cfwU_B
-.It Pa /etc/firmware/rtwn-rtl8723fw
-.It Pa /etc/firmware/rtwn-rtl8723fw_B
+.It Pa /etc/firmware/rtwn-rtl8188e
+.It Pa /etc/firmware/rtwn-rtl8192cU
+.It Pa /etc/firmware/rtwn-rtl8192cU_B
+.It Pa /etc/firmware/rtwn-rtl8723
+.It Pa /etc/firmware/rtwn-rtl8723_B
.El
-.Pp
-A prepackaged version of the firmware can be installed using
-.Xr fw_update 1 .
.Sh EXAMPLES
The following example scans for available networks:
.Pp
-.\" $OpenBSD: urtwn.4,v 1.50 2021/04/25 15:59:56 stsp Exp $
+.\" $OpenBSD: urtwn.4,v 1.51 2021/10/04 01:33:42 kevlo Exp $
.\"
.\" Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
.\"
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: April 25 2021 $
+.Dd $Mdocdate: October 4 2021 $
.Dt URTWN 4
.Os
.Sh NAME
or on boot with
.Xr hostname.if 5 .
.Sh FILES
-The driver needs at least version 1.1p0 of the following firmware files,
-which are loaded when an interface is attached:
+The adapter needs firmware files to run, which are loaded on demand by
+the driver when the device is attached:
.Pp
.Bl -tag -width Ds -offset indent -compact
-.It Pa /etc/firmware/urtwn-rtl8192cfwT
-.It Pa /etc/firmware/urtwn-rtl8192cfwU
-.It Pa /etc/firmware/urtwn-rtl8192eu_nic
-.It Pa /etc/firmware/urtwn-rtl8723fw
-.It Pa /etc/firmware/urtwn-rtl8188eufw
+.It Pa /etc/firmware/urtwn-rtl8192cT
+.It Pa /etc/firmware/urtwn-rtl8192cU
+.It Pa /etc/firmware/urtwn-rtl8192eu
+.It Pa /etc/firmware/urtwn-rtl8188eu
.El
-.Pp
-A prepackaged version of the firmware can be installed using
-.Xr fw_update 1 .
.Sh HARDWARE
The following adapters should work:
.Pp
-# $OpenBSD: Makefile,v 1.23 2014/07/12 21:56:57 tedu Exp $
+# $OpenBSD: Makefile,v 1.24 2021/10/04 01:33:42 kevlo Exp $
-SUBDIR= afb atmel bnx cirruslogic fxp kue neomagic myx ral rum \
- symbol tigon tht tusb3410 typhoon udl yds zydas
+SUBDIR= afb atmel bnx cirruslogic fxp kue neomagic myx ral rsu rtwn rum \
+ symbol tigon tht tusb3410 typhoon udl urtwn yds zydas
.include <bsd.subdir.mk>
--- /dev/null
+# $OpenBSD: Makefile,v 1.1 2021/10/04 01:33:42 kevlo Exp $
+
+NOPROG=
+NOMAN=
+CC=${HOSTCC}
+
+FIRM= rsu-rtl8712
+
+PROG= build
+
+CLEANFILES+= ${FIRM} ${PROG}
+
+all: ${FIRM}
+
+${FIRM}: build
+ ${.OBJDIR}/build
+
+realinstall:
+
+afterinstall:
+ ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 \
+ ${FIRM} ${DESTDIR}/etc/firmware
+ ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 \
+ ${.CURDIR}/rsu-license ${DESTDIR}/etc/firmware
+
+.include <bsd.prog.mk>
--- /dev/null
+/* $OpenBSD: build.c,v 1.1 2021/10/04 01:33:42 kevlo Exp $ */
+
+/*-
+ * Copyright (c) 2006
+ * Damien Bergamini <damien.bergamini@free.fr>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <sys/types.h>
+
+#include <err.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#include "microcode.h"
+
+static void
+output(const char *name, const uint8_t *ucode, int size)
+{
+ ssize_t rlen;
+ int fd;
+
+ printf("creating %s length %d\n", name, size);
+
+ fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0644);
+ if (fd == -1)
+ err(1, "%s", name);
+
+ rlen = write(fd, ucode, size);
+ if (rlen == -1)
+ err(1, "%s", name);
+ if (rlen != size)
+ errx(1, "%s: short write", name);
+
+ close(fd);
+}
+
+int
+main(void)
+{
+ output("rsu-rtl8712", rtl8712, sizeof rtl8712);
+
+ return 0;
+}
--- /dev/null
+# $OpenBSD: Makefile,v 1.1 2021/10/04 01:33:42 kevlo Exp $
+
+NOPROG=
+NOMAN=
+CC=${HOSTCC}
+
+FIRM= rtwn-rtl8188e rtwn-rtl8192cU rtwn-rtl8192cU_B rtwn-rtl8723 \
+ rtwn-rtl8723_B
+
+PROG= build
+
+CLEANFILES+= ${FIRM} ${PROG}
+
+all: ${FIRM}
+
+${FIRM}: build
+ ${.OBJDIR}/build
+
+realinstall:
+
+afterinstall:
+ ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 \
+ ${FIRM} ${DESTDIR}/etc/firmware
+ ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 \
+ ${.CURDIR}/rtwn-license ${DESTDIR}/etc/firmware
+
+.include <bsd.prog.mk>
--- /dev/null
+/* $OpenBSD: build.c,v 1.1 2021/10/04 01:33:42 kevlo Exp $ */
+
+/*-
+ * Copyright (c) 2006
+ * Damien Bergamini <damien.bergamini@free.fr>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <sys/types.h>
+
+#include <err.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#include "microcode.h"
+
+static void
+output(const char *name, const uint8_t *ucode, int size)
+{
+ ssize_t rlen;
+ int fd;
+
+ printf("creating %s length %d\n", name, size);
+
+ fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0644);
+ if (fd == -1)
+ err(1, "%s", name);
+
+ rlen = write(fd, ucode, size);
+ if (rlen == -1)
+ err(1, "%s", name);
+ if (rlen != size)
+ errx(1, "%s: short write", name);
+
+ close(fd);
+}
+
+int
+main(void)
+{
+ output("rtwn-rtl8188e", rtl8188e, sizeof rtl8188e);
+ output("rtwn-rtl8192cU", rtl8192cU, sizeof rtl8192cU);
+ output("rtwn-rtl8192cU_B", rtl8192cU_B, sizeof rtl8192cU_B);
+ output("rtwn-rtl8723", rtl8723, sizeof rtl8723);
+ output("rtwn-rtl8723_B", rtl8723_B, sizeof rtl8723_B);
+
+ return 0;
+}
--- /dev/null
+# $OpenBSD: Makefile,v 1.1 2021/10/04 01:33:42 kevlo Exp $
+
+NOPROG=
+NOMAN=
+CC=${HOSTCC}
+
+FIRM= urtwn-rtl8188eu urtwn-rtl8192cT urtwn-rtl8192cU urtwn-rtl8192eu
+
+PROG= build
+
+CLEANFILES+= ${FIRM} ${PROG}
+
+all: ${FIRM}
+
+${FIRM}: build
+ ${.OBJDIR}/build
+
+realinstall:
+
+afterinstall:
+ ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 \
+ ${FIRM} ${DESTDIR}/etc/firmware
+ ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 \
+ ${.CURDIR}/urtwn-license ${DESTDIR}/etc/firmware
+
+.include <bsd.prog.mk>
--- /dev/null
+/* $OpenBSD: build.c,v 1.1 2021/10/04 01:33:42 kevlo Exp $ */
+
+/*-
+ * Copyright (c) 2006
+ * Damien Bergamini <damien.bergamini@free.fr>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <sys/types.h>
+
+#include <err.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#include "microcode.h"
+
+static void
+output(const char *name, const uint8_t *ucode, int size)
+{
+ ssize_t rlen;
+ int fd;
+
+ printf("creating %s length %d\n", name, size);
+
+ fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0644);
+ if (fd == -1)
+ err(1, "%s", name);
+
+ rlen = write(fd, ucode, size);
+ if (rlen == -1)
+ err(1, "%s", name);
+ if (rlen != size)
+ errx(1, "%s: short write", name);
+
+ close(fd);
+}
+
+int
+main(void)
+{
+ output("urtwn-rtl8188eu", rtl8188eu, sizeof rtl8188eu);
+ output("urtwn-rtl8192cT", rtl8192cT, sizeof rtl8192cT);
+ output("urtwn-rtl8192cU", rtl8192cU, sizeof rtl8192cU);
+ output("urtwn-rtl8192eu", rtl8192eu, sizeof rtl8192eu);
+
+ return 0;
+}
-/* $OpenBSD: if_rtwn.c,v 1.37 2020/12/12 11:48:53 jan Exp $ */
+/* $OpenBSD: if_rtwn.c,v 1.38 2021/10/04 01:33:42 kevlo Exp $ */
/*-
* Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
int error;
if (sc->sc_sc.chip & RTWN_CHIP_88E)
- name = "rtwn-rtl8188efw";
+ name = "rtwn-rtl8188e";
else if (sc->sc_sc.chip & RTWN_CHIP_23A) {
if (sc->sc_sc.chip & RTWN_CHIP_UMC_A_CUT)
- name = "rtwn-rtl8723fw";
+ name = "rtwn-rtl8723";
else
- name = "rtwn-rtl8723fw_B";
+ name = "rtwn-rtl8723_B";
} else if ((sc->sc_sc.chip & (RTWN_CHIP_UMC_A_CUT | RTWN_CHIP_92C)) ==
RTWN_CHIP_UMC_A_CUT)
- name = "rtwn-rtl8192cfwU";
+ name = "rtwn-rtl8192cU";
else
- name = "rtwn-rtl8192cfwU_B";
+ name = "rtwn-rtl8192cU_B";
error = loadfirmware(name, fw, len);
if (error)
-/* $OpenBSD: if_rsu.c,v 1.49 2021/02/25 02:48:20 dlg Exp $ */
+/* $OpenBSD: if_rsu.c,v 1.50 2021/10/04 01:33:42 kevlo Exp $ */
/*-
* Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
int ntries, error;
/* Read firmware image from the filesystem. */
- if ((error = loadfirmware("rsu-rtl8712fw", &fw, &size)) != 0) {
+ if ((error = loadfirmware("rsu-rtl8712", &fw, &size)) != 0) {
printf("%s: failed loadfirmware of file %s (error %d)\n",
- sc->sc_dev.dv_xname, "rsu-rtl8712fw", error);
+ sc->sc_dev.dv_xname, "rsu-rtl8712", error);
return (error);
}
if (size < sizeof(*hdr)) {
-/* $OpenBSD: if_urtwn.c,v 1.97 2021/04/25 15:59:19 stsp Exp $ */
+/* $OpenBSD: if_urtwn.c,v 1.98 2021/10/04 01:33:42 kevlo Exp $ */
/*-
* Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
int error;
if (sc->sc_sc.chip & RTWN_CHIP_92E)
- name = "urtwn-rtl8192eu_nic";
+ name = "urtwn-rtl8192eu";
else if (sc->sc_sc.chip & RTWN_CHIP_88E)
- name = "urtwn-rtl8188eufw";
+ name = "urtwn-rtl8188eu";
else if ((sc->sc_sc.chip & (RTWN_CHIP_UMC_A_CUT | RTWN_CHIP_92C)) ==
RTWN_CHIP_UMC_A_CUT)
- name = "urtwn-rtl8192cfwU";
+ name = "urtwn-rtl8192cU";
else
- name = "urtwn-rtl8192cfwT";
+ name = "urtwn-rtl8192cT";
error = loadfirmware(name, fw, len);
if (error)