From nobody Thu Oct 17 09:16:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XThzd2YpJz5Ylxl; Thu, 17 Oct 2024 09:16:45 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XThzd1m90z4HVG; Thu, 17 Oct 2024 09:16:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729156605; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zL49oYIjqCGcupqXJP6CnMw76Q61Hshv5huAxaslvLw=; b=YNejMiJsFhhc9g8SbbQZWn46Hgqx7aWlxbblQ8E8fYQuxWk8eaWMt++d5Oo9BtWzB13UGT cMfY33FtVIr33rQ9J9E0mnm8yvzAfYHFsNI3spVPs8ZHiV8c+sDvMxrifKqVqPDxBacBDv xb5kvkNTsPfLzc2SMJb3ZKjc+eK+zn4GvHNrrkhkJDj6kAqWUWK2UlEoq/+jWggclwU18e GeDdgC1NPDBAwnzcBGcMMtdOrvfHTkoAuyMEIuO8f5sze92JJJiORlwgF/cDWgiXDganM4 Z5MrQiU4rAqQbk5zhtQlFH6DHli2E0MCz/e0YU/cROxkWbPsd9LgAzYlsHElew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729156605; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zL49oYIjqCGcupqXJP6CnMw76Q61Hshv5huAxaslvLw=; b=yTA6g1Qj5WIZsI3cHJsX7oad9NAb6TBoMJYq+CuLF3RLJeKsKH/AJYBNNfpyt2suqnnoYv FUkyvi4cqO2MuZCYwZcaOni9ErFI6aLTQcAw0+vHLbtIsqM62FYSEpGEz7ey9rhOj++IOr zzu8KcIUg6mw4MgBoGUM6wIo+N6E2X9buRTXW4DsAW5WsWI18yVnz4WvkCDhbF86RvR+Ua fWS9JYhJjFAv+tuOwN9LZW6HnLwgQLpJSwMmRR6tRda92zq7XoMQJ6nMiBLri8o5zfRbQb EjFDJD48zYf7kjEWHn4/jraGF77iUnzx+Rnm0wHN3TpL8hMpBZTWbtwh0P/6Lw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729156605; a=rsa-sha256; cv=none; b=s1csOZlHnShFEILK/v1u3Oo+a8MruEC/HzjMvy7o1HHxn7iDcSLHg5D8hHg1R9OXS6GgBM QZBqiKzbXDVX3rs9gSPi4y9nzydJnoMOFvcKcDftSFmAHjxc9e2YExnGcenJW9P+oPEF2e 7hJ9aazTHBrERLzZeiUyP61CdHNpJX54aFSbK9fDL6gpTwqq9MRgLEL6z+IEWScLbKpsAk Ql6TS1318vBH85TKi4128IVDRm30h9gZWzvWMw7MWyMSKwUMVIWhh80crntvmcloEIM0nr pup9ngsanFUCvmTgS8r+fTt13afk7BW+pzjxF5EUm24NGurt0iCvefAabzc8Wg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XThzd1Mn1zkBn; Thu, 17 Oct 2024 09:16:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49H9Gj3W087627; Thu, 17 Oct 2024 09:16:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49H9GjHa087624; Thu, 17 Oct 2024 09:16:45 GMT (envelope-from git) Date: Thu, 17 Oct 2024 09:16:45 GMT Message-Id: <202410170916.49H9GjHa087624@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: a2d1e07f6451 - stable/14 - rtw89: add man page and hook driver up to the build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a2d1e07f6451fa5d1803e6dba819db2020bf1c31 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=a2d1e07f6451fa5d1803e6dba819db2020bf1c31 commit a2d1e07f6451fa5d1803e6dba819db2020bf1c31 Author: Bjoern A. Zeeb AuthorDate: 2023-04-18 15:17:41 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-10-16 21:49:29 +0000 rtw89: add man page and hook driver up to the build After two years, add the initial man page and hook Realteks rtw89 driver up to the build for more people to test given successful reports. devd.conf is already providing support based on the rtw regex. The driver uses the LinuxKPI compat layer. Firmware is provided by ports: net/wifi-firmware-rtw89-kmod or one of the flavours. People are advised to used fwget(8) to automatically install the correct firmware for their chipset. Please note that for the moment the driver requires a tunable to be set in loader.conf: compat.linuxkpi.skb.mem_limit=1 Many thanks to everyone who in the last two years helped testing, debugged, submitted patches to get the driver to this stage where initial functionality seems working. Sponsored by: The FreeBSD Foundation (cherry picked from commit 310c31d3f04ef9d3ebe598fd076d017a48d0ca0d) --- share/man/man4/Makefile | 1 + share/man/man4/rtw89.4 | 126 ++++++++++++++++++++++++++++++++++++++++++++++++ sys/modules/Makefile | 2 + 3 files changed, 129 insertions(+) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index d4b5e39e94d9..7f6c9a501238 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -474,6 +474,7 @@ MAN= aac.4 \ rtsx.4 \ rtw88.4 \ rtw88fw.4 \ + rtw89.4 \ rtwn.4 \ rtwnfw.4 \ rtwn_pci.4 \ diff --git a/share/man/man4/rtw89.4 b/share/man/man4/rtw89.4 new file mode 100644 index 000000000000..2e1f2676eb8e --- /dev/null +++ b/share/man/man4/rtw89.4 @@ -0,0 +1,126 @@ +.\"- +.\" Copyright (c) 2023-2024 Bjoern A. Zeeb +.\" +.\" 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$ +.\" +.Dd October 10, 2024 +.Dt RTW89 4 +.Os +.Sh NAME +.Nm rtw89 +.Nd Realtek IEEE 802.11ax wireless network driver +.Sh SYNOPSIS +The driver will auto-load without any user interaction using +.Xr devmatch 8 +if enabled in +.Xr rc.conf 5 . +.Pp +Only if auto-loading is explicitly disabled, place the following +lines in +.Xr rc.conf 5 +to manually load the driver as a module at boot time: +.Bd -literal -offset indent +kld_list="${kld_list} if_rtw89" +.Ed +.Pp +It is discouraged to load the driver from +.Xr loader 8 . +.Sh DESCRIPTION +The +.Nm +driver is derived from Realtek's Linux rtw89 driver. +.Pp +This driver requires firmware to be loaded before it will work. +The package +.Pa wifi-firmware-rtw89-kmod +from the +.Pa ports/net/wifi-firmware-rtw89-kmod +port needs to be installed before the driver is loaded. +Otherwise no +.Xr wlan 4 +interface can be created using +.Xr ifconfig 8 . +One should use +.Xr fwget 8 +to install the correct firmware package. +.Pp +The driver uses the +.\" No LinuxKPI man pages so no .Xr here. +.Em linuxkpi_wlan +and +.Em linuxkpi +compat framework to bridge between the Linux and +native +.Fx +driver code as well as to the native +.Xr net80211 4 +wireless stack. +.Pp +While +.Nm +supports all 802.11 a/b/g/n/ac and ax +the compatibility code currently only supports 802.11 a/b/g modes. +Support for 802.11 n/ac is to come. +.Sh LOADER TUNABLES +.Bl -tag -width indent +.It Va compat.linuxkpi.skb.mem_limit +If you are running a 64bit system with more than 4GB of main memory +you need to set this tunable to +.Sy 1 +in +.Xr loader.conf 5 +and reboot once to make it effective. +This tunable will work around a problem with DMA and limit allocations +for network buffer memory to the lower 32bit of physical memory and +make the driver work. +.El +.Sh HARDWARE +The +.Nm +driver supports PCIe devices with the following chipsets: +.Pp +.Bl -tag -width Ds -offset indent -compact +.It Realtek 802.11ax wireless 8851be (RTL8851BE) +.It Realtek 802.11ax wireless 8852ae (RTL8852AE) +.It Realtek 802.11ax wireless 8852be (RTL8852BE) +.It Realtek 802.11ax wireless 8852ce (RTL8852CE) +.El +.Sh BUGS +Certainly. +.Pp +Does not seem to work (reliably) on machines with more than 4GB of +main memory. +See in the +.Sx LOADER TUNABLES +section above. +.Sh SEE ALSO +.Xr wlan 4 , +.Xr fwget 8 , +.Xr ifconfig 8 , +.Xr wpa_supplicant 8 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 14.2 . diff --git a/sys/modules/Makefile b/sys/modules/Makefile index 674ae1a86bc5..45eec38565e2 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -342,6 +342,7 @@ SUBDIR= \ rtsx \ ${_rtw88} \ ${_rtw88fw} \ + ${_rtw89} \ rtwn \ rtwn_pci \ rtwn_usb \ @@ -572,6 +573,7 @@ _rtw88= rtw88 .if ${MK_SOURCELESS_UCODE} != "no" _rtw88fw= rtw88fw .endif +_rtw89= rtw89 _vmware= vmware .endif