From nobody Wed Jun 18 07:17:03 2025 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 4bMZmv4zGDz5yMX0; Wed, 18 Jun 2025 07:17:03 +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 4bMZmv2vjLz3F2b; Wed, 18 Jun 2025 07:17:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1750231023; 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=8LVIYpjgmSCmiWXlqhodXwpMTZ2IXh2ZDT9D6h/q91c=; b=xgdSXNo34iAdVqoAI0/aWhzBAeo1IzSs0ctl4QiAsdp1by907pTcIZo+fYNEMxBc5iZEOv VnI9gsthSNMJ9aaE2S3uX8SKfTbU10Ui7mOYTFVohtUk3Ig9CuG+fUguUkJ2cmGUsP0Z/H Fe4MVgNYZ0byQC6R+GBgdjA0f/nhaVunmSLlfUrj5q2Xl20m9wDSY3GkCJU4K0sfv9Q48d fGG1JcGdbCnSpsWDk1ouTQebvqLXkC1nlMDk2jnugAqbXkfa6Wt1YdZsl5gsaNSjQtcOmf WFtT9PXzqEwL5XcZSdcGDYR2bwZS0lQSJeNt9JC/gr2DWSgu+KvpMdYgR/HWCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1750231023; 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=8LVIYpjgmSCmiWXlqhodXwpMTZ2IXh2ZDT9D6h/q91c=; b=Lp+REa3cTkh/7WMgj9NwxyiAwW8qJO8B6+0zmjPCJlpTWfExezG1J8sFNRS4vbXwU1tB/P 8s3G+u3u36ePrhl/+G6kGs47w9KzZWgU7TdeZRFISilZI2vU5pmSxpguvJV6uWKUUVVtg9 MI/oco4Lw7jCg267+oUkcJZctkHp2i2mUgiD+fOjnREYysSRe1xo47d0qRpfWaKUz49PT2 JrL0PInV3vBam5YLJZYwXygzuOGeC6su+GO81rfQp42sAD4gS/HkAZedREgwnVaKeqJTQS VJmuQ+iCqbe0Z0cL7mbW9Xh5qwdQhPMzZalRSCKgUgEgtbb1tiGVQA/aLX2rTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1750231023; a=rsa-sha256; cv=none; b=S95DoDXeDOKrKfpx8Y8vD3gxFzRXM3HVQuJTXEbhplO1u+UCP7wG/T1rIteJt/QPgTNZ2z 1Q4epYPuG0jcDPMcrj/v/ecdnIqPzgm4Q4c7Vg2lx9j6dtR7jMT6m12jaAzz6+V43PONQz NpecCJMrJxyFKEOxeyXz8GI7u5qjgaV9ppI+6O4mBUbBFIpXraESUbiJUmMPKw38tmL6tG tUxrtiIA32GgCvfHvgKpnHyzbLaq9ccsbpg0/BE++lQbwJf/r4CMCg30C8l+12LtiYbDnI U1eAS81km8YrJyicmx9jq95CZglEzXJ32tJdwr2RtpyQzvAd9mzmiPmjXAcsTA== 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 4bMZmv1m5Fz4QT; Wed, 18 Jun 2025 07:17:03 +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 55I7H3Ps090454; Wed, 18 Jun 2025 07:17:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 55I7H3dR090451; Wed, 18 Jun 2025 07:17:03 GMT (envelope-from git) Date: Wed, 18 Jun 2025 07:17:03 GMT Message-Id: <202506180717.55I7H3dR090451@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: 669062384f55 - stable/14 - linuxkpi.4, linuxkpi_wlan.4: add short man pages and connect to 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: 669062384f5548098bb1c70ca904574aa81a1f98 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=669062384f5548098bb1c70ca904574aa81a1f98 commit 669062384f5548098bb1c70ca904574aa81a1f98 Author: Bjoern A. Zeeb AuthorDate: 2025-06-11 07:47:49 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-06-17 23:19:00 +0000 linuxkpi.4, linuxkpi_wlan.4: add short man pages and connect to build Add brief documentation on LinuxKPI. Add brief documentation on LinuxKPI 802.11 compat so we can refer to something about which features are supported. Sponsored by: The FreeBSD Foundation Reviewed by: dumbbell, ziaee, pauamma_gundo.com Differential Revision: https://reviews.freebsd.org/D50790 (cherry picked from commit bfaec3e6474139c592f39b4adbdbeb35c9026c25) (cherry picked from commit 1563b306d19db25f5bbf071897b60429b192040c) (cherry picked from commit 8b399d613f5420bb7e57be94806e156e4c1579fb) --- share/man/man4/Makefile | 2 + share/man/man4/linuxkpi.4 | 42 +++++++++++++ share/man/man4/linuxkpi_wlan.4 | 130 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 174 insertions(+) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 3521444e29f5..12048cf5fe06 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -280,6 +280,8 @@ MAN= aac.4 \ led.4 \ lge.4 \ ${_linux.4} \ + linuxkpi.4 \ + linuxkpi_wlan.4 \ liquidio.4 \ lm75.4 \ lo.4 \ diff --git a/share/man/man4/linuxkpi.4 b/share/man/man4/linuxkpi.4 new file mode 100644 index 000000000000..cd4135c28d6d --- /dev/null +++ b/share/man/man4/linuxkpi.4 @@ -0,0 +1,42 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2025 The FreeBSD Foundation +.\" +.\" This documentation was written by Bj\xc3\xb6rn Zeeb under sponsorship from +.\" the FreeBSD Foundation. +.\" +.Dd June 13, 2025 +.Dt LINUXKPI 4 +.Os +.Sh NAME +.Nm linuxkpi +.Nd Linux Kernel Programming Interface support +.Sh DESCRIPTION +The +.Nm +kernel module provides a limited KPI (kernel programming interface) to allow +Linux kernel drivers and other Linux kernel code to be compiled on +.Fx +and used along the +.Fx +kernel with little or no modification. +.Pp +While historically +.Em OpenFabrics Enterprise Distribution (Infiniband) , +and certain vendor drivers have used +.Nm . +.Em drm-kmod +for graphics driver support +and +.Xr linuxkpi_wlan 4 +for wireless drivers are prominent consumers. +.Pp +.Nm +is not to be confused with +.Xr linux 4 +which provides limited Linux ABI (application binary interface) compatibility +to allow running Linux application binaries unmodified on +.Fx . +.Sh SEE ALSO +.Xr linuxkpi_wlan 4 diff --git a/share/man/man4/linuxkpi_wlan.4 b/share/man/man4/linuxkpi_wlan.4 new file mode 100644 index 000000000000..e433fc1c8549 --- /dev/null +++ b/share/man/man4/linuxkpi_wlan.4 @@ -0,0 +1,130 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2025 The FreeBSD Foundation +.\" +.\" This documentation was written by Bj\xc3\xb6rn Zeeb under sponsorship from +.\" the FreeBSD Foundation. +.\" +.Dd June 13, 2025 +.Dt LINUXKPI_WLAN 4 +.Os +.Sh NAME +.Nm linuxkpi_wlan +.Nd LinuxKPI 802.11 support +.Sh DESCRIPTION +The +.Nm +kernel module provides an 802.11 compat layer to translate between Linux +802.11 drivers and the native net8011 wireless stack. +It currently supports +.Em mac80211 +based drivers. +Parts of the +.Em cfg80211 +exist but there is no code for net80211 to drive it. +.Pp +.Nm +currently supports the following +.Em wlanmode +operating modes: +.Bl -tag -width monitor -compact +.It Cm sta +client station in an infrastructure bss (IBSS). +.El +.Pp +Compat code for 802.11n (HT) and 802.11ac (VHT) is implemented but +support may vary for different drivers due to different KPI usage. +.Pp +Crypto support for hardware acceleration needs to be enabled using the +.Va compat.linuxkpi.80211.hw_crypto +tunable. +The following cipher suites are supported: +.Bl -tag -width CCMP -compact +.It Cm tkip +Support for +.Xr wlan_tkip 4 +has to be manually enabled using the +.Va compat.linuxkpi.80211.tkip +tunable. +.It Cm ccmp +Support for +.Xr wlan_ccmp 4 +is available. +.El +Further cipher suites will be implemented as soon as +.Xr net80211 4 +grows support. +While it would be possible to implement +.Xr wlan_wep 4 +support, it was decided not to do so given +.Em Wired Equivalent Privacy (WEP) +has been deprecated since 2004. +.Pp +The list of supported drivers includes +.Xr iwlwifi 4 , +.Xr rtw88 4 , +and +.Xr rtw89 4 . +.Sh SYSCTL VARIABLES AND LOADER TUNABLES +The +.Nm +module supports the following +.Xr loader 8 +tunable and read-only +.Xr sysctl 8 +variables: +.Bl -tag -width "compat.linuxkpi.80211.hw_crypto" +.It Va compat.linuxkpi.80211.hw_crypto +Turn on hardware crypto offload support. +Default +.Ql 0 . +.It Va compat.linuxkpi.80211.tkip +Turn on support for +.Xr wlan_tkip 4 +offloading. +Default +.Ql 0 . +.El +.Pp +The +.Nm +module supports the following +.Xr sysctl 8 +variables: +.Bl -tag -width "compat.linuxkpi.80211.IF.dump_stas" +.It Va compat.linuxkpi.80211.debug +If the kernel is compiled with +.Dv IEEE80211_DEBUG +or +.Dv LINUXKPI_DEBUG_80211 +is manually enabled, the sysctl is a bitmask to turn on individual +debug messages. +See +.Pa sys/compat/linuxkpi/common/src/linux_80211.h +for details. +.It Va compat.linuxkpi.80211.IF.dump_stas +Print statistics for a given, associated +.Xr wlan 4 +interface; typically IF would be +.Em wlan0 . +.El +.Sh SEE ALSO +.Xr iwlwifi 4 , +.Xr linuxkpi 4 , +.Xr rtw88 4 , +.Xr rtw89 4 , +.Xr wlan 4 +.Sh HISTORY +The +.Nm +module first appeared in +.Fx 13.1 . +Support for IEEE 802.11n and 802.11ac in +.Nm +first appeared in +.Fx 14.3 . +.Sh AUTHORS +LinuxKPI 802.11 support was developed by +.An Bjoern A. Zeeb +under sponsorship from the FreeBSD Foundation.