From nobody Mon Jun 22 05:31:03 2026 X-Original-To: dev-commits-src-main@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 4gkGyJ0cn6z6j9mf for ; Mon, 22 Jun 2026 05:31:04 +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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gkGyH3Hlkz3qHr for ; Mon, 22 Jun 2026 05:31:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1782106263; 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=Qi+pkCAf5k0VHXoQf4KOxr01UfSC87FujMougl5vf2E=; b=dqWp1Gz/XKarXQpYNd0YaAPqw+JB1Qux/5rYrCLBMae3p4R0HI5/yji9dRn04MO/0Oavr/ NKVNVtMz71+glZ72Bd1XMGOg1kQ37slgKUKJK64CvB3r0GvnhJIGgx6wJXDsrOKukak9a0 ys3bwzP6JedbEIVd3sUhVaJZjlntkgNEF7nJZjAg6TyR3BQFqOvseigc4osRvMkU8byogz +10cKLmlJcFW04LVUGXduNdOlXGg36tU4dWq/FCSFuaYIOp5oT20WSnOjA7CiUOOmxuSTd tfilZD/NfPnbKpylxHbzcmTQQjRrnMP9YowKO29x/WfMH/N9yb+PW3a8dvip8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1782106263; a=rsa-sha256; cv=none; b=fwZtAn6HIVTTiVTl9oMRqAyfSjiefGH0mc/chfpFVrmcGweE75MWwvUsQlbq6LZPMG/KMq at7Mz9icL/3kTqLrj00gbgXdqCRZwh2VfNj/LZP569BEEN3zTZgJEXwwJYbNLdqGixwb9F cb6btrok6bG1vzaWMXEYMiqpPa8aUkXc0yv2P5EsjoAK+pv+GK3h62c1+G6znaIv4fKOKu OCSnHqw5TVyi34KBWvZzT3qnORCoWo5WUgRSZiCRry+AkGXBiC8Uo/o0iPsjGpq74RMfTn oTjGjLp7hOpsSd/82rPE5Z9u+QcY+cGMfXTf5sSYoI8jBB7/ct1dYpyAe62SYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1782106263; 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=Qi+pkCAf5k0VHXoQf4KOxr01UfSC87FujMougl5vf2E=; b=UC176zmu4kyPtINGkbCairTpEUnJZkqnVTKj0I7u3j2fj8mHs9I5MWb4KnDpSQIvGGHzin 30PNBL2e0lV2U5r0bTVGZtMRSXL+8yUg5rZRIHlRiq08zuGXVpzQ4FkimhRumrasGwjuEM u/UEOH1Mdg99WJYvhGayjtp8xcVVdcy/MSb+U/vybD4RZySv6Tid8YzykkqPmzOPGyeyLC 9rOZ+vVjrgmeNkH1Nd5btT1j/NpR8uvGcpuBRHmCXjDq/4ahbnTW9V0KbFvH1vMIcsvcX1 c5hp3fIcWSTDFH16SjpspVQ6yGrMjAKfjBwnQl91+toH0G814b38FYGbNSyFHw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gkGyH1l54zZlk for ; Mon, 22 Jun 2026 05:31:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27eaa by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 22 Jun 2026 05:31:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bjoern A. Zeeb Subject: git: d4a529ad0d56 - main - LinuxKPI: 802.11: add 11g check to lkpi_ic_getradiocaps() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/main X-Git-Reftype: branch X-Git-Commit: d4a529ad0d5638ad3e8d27815948b0a7c4628e3f Auto-Submitted: auto-generated Date: Mon, 22 Jun 2026 05:31:03 +0000 Message-Id: <6a38c897.27eaa.8c6f4e3@gitrepo.freebsd.org> The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=d4a529ad0d5638ad3e8d27815948b0a7c4628e3f commit d4a529ad0d5638ad3e8d27815948b0a7c4628e3f Author: Bjoern A. Zeeb AuthorDate: 2026-06-22 00:10:22 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-06-22 01:21:38 +0000 LinuxKPI: 802.11: add 11g check to lkpi_ic_getradiocaps() Replace an early comment with code and add a (simplified) 11g check. We make use of the annotated bitrate flags we added (see lkpi_wiphy_band_annotate()) and check if on the 2GHz band there are any bitrates which are 11g. Upon the first one found we do set the IEEE80211_MODE_11G to announce to net80211 that the 2.4Ghz channels may operate on 11g as well. Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/compat/linuxkpi/common/src/linux_80211.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 6f5e2756f421..95385474840a 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -6732,18 +6732,28 @@ lkpi_ic_getradiocaps(struct ieee80211com *ic, int maxchan, if (hw->wiphy->bands[NL80211_BAND_2GHZ] != NULL) nchans = hw->wiphy->bands[NL80211_BAND_2GHZ]->n_channels; if (nchans > 0) { + struct ieee80211_supported_band *supband; + memset(bands, 0, sizeof(bands)); chan_flags = 0; setbit(bands, IEEE80211_MODE_11B); - /* XXX-BZ unclear how to check for 11g. */ + + /* Check for 11g (simplified). */ + supband = hw->wiphy->bands[NL80211_BAND_2GHZ]; + for (i = 0; i < supband->n_bitrates; i++) { + if ((supband->bitrates[i].flags & + IEEE80211_RATE_MANDATORY_G) != 0) { + setbit(bands, IEEE80211_MODE_11G); + break; + } + } IMPROVE("the bitrates may have flags?"); - setbit(bands, IEEE80211_MODE_11G); lkpi_ic_getradiocaps_ht(ic, hw, bands, &chan_flags, NL80211_BAND_2GHZ); - channels = hw->wiphy->bands[NL80211_BAND_2GHZ]->channels; + channels = supband->channels; for (i = 0; i < nchans && *n < maxchan; i++) { uint32_t nflags = 0; int cflags = chan_flags;