From nobody Fri Apr 11 21:26:26 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 4ZZ8rM2QqPz5shnX; Fri, 11 Apr 2025 21:26:27 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZZ8rL3yL7z3tgB; Fri, 11 Apr 2025 21:26:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1744406786; 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=dZA+nn5VZOnZjSDw4V4SqalPtLi+N3vsUQ2o4PvOdII=; b=hrD0jiE04EzV9fGPKQEwZRar5HQ1XpucPNKQ+CLx6V+fHbuhmRw7Yx784aeEGdrNgvB4k9 rDdf8HUPy4FRpDsnUp5pKV09oPy14NnFK/g+6b6K6m5SDxjjOHRX/JcwfoKb18hkkbV4zQ FQxPg5521DempkSvOBfwYVphB0ksw/4/y79KSuPBaQaDE4201TzqM1scK+FfotXfhlhP5P sGlSDR8SfOH0+bsvqz/giM2m19lXR0lq8SnLofk9lg+bTdrTDTS37vPkzpNu4+noWjT0qH hOYF7AQEty5Ek8u52BK7DQ6o1cB5E7mVfZZl9YlOwTyun6+lpxpq1N8jCSZEOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1744406786; a=rsa-sha256; cv=none; b=asZsST1hSi+0gdIE2+GOTJp/lq/uf1mpFwcNVfCERllDAUWXmxX5npDAsm0HPVaFI+l7Qr 7iuSEyTnBZuYoKh6RkujgS2qFczvnAKBlYvZLwKfCaCZdRjfou4+2+vxBKnHQP+ebsHwHJ Lliy40jk7G4ApkAYEuahjxld0UXJqCjCah7BpE6CsmYU3ffE/YoZx36MPl/qX3V9PeT+dA ks7gX5szKojLefAAye6HcWi0VKdx3+EOwa4l8gUkQTLoaOoDVSBnrREziluc8GyfltGK02 MysCz/TdvAS4R0hJhUZZYK9YApl8JxwEu9MaATDzjyhE9m/NGZWCanHz5zyrYA== 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=1744406786; 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=dZA+nn5VZOnZjSDw4V4SqalPtLi+N3vsUQ2o4PvOdII=; b=TWlch3wS2yQs7s7jZyWdaNz5oIceh9Mb0+QjKlPP6ogheP5R/gj+vnKx7Nas/CKb7RRqDl 15uKcaBss9BufFIR8kk02nosS1IZltov8Adlu83QS7TKR9TaZBdnPZCLe6rZmnvi94hAxl rYrt1sol0d36TBtpuv1jVzJyb1/hgyWI4SxOlDRYhbXiJpEFS6xGgX9CwKkQrqxME7wnKZ Cshjp59HxwQovoHYEv8rEa8XGI4QlEd0iTBXX6c2hHHPzET4lto/sJIbbDbU5R9Xl3ewON Cv7y+NKrxxE8VVHhI1CKqF9cceH4QZML/JujQVr2+35nwgie9n3YhUc1E/pkDQ== 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 4ZZ8rL3XH6zpgx; Fri, 11 Apr 2025 21:26:26 +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 53BLQQGT078416; Fri, 11 Apr 2025 21:26:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 53BLQQHH078413; Fri, 11 Apr 2025 21:26:26 GMT (envelope-from git) Date: Fri, 11 Apr 2025 21:26:26 GMT Message-Id: <202504112126.53BLQQHH078413@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 5393cd34854e - main - LinuxKPI: 802.11: try to limit VHT (11ac) to 5Ghz 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/main X-Git-Reftype: branch X-Git-Commit: 5393cd34854e1fe23ab214e9f741879fa6bf1193 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=5393cd34854e1fe23ab214e9f741879fa6bf1193 commit 5393cd34854e1fe23ab214e9f741879fa6bf1193 Author: Bjoern A. Zeeb AuthorDate: 2025-04-09 19:22:25 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-04-11 21:26:05 +0000 LinuxKPI: 802.11: try to limit VHT (11ac) to 5Ghz We have multiple reports for iwlwifi firmware crashes where net80211 logged: ieee80211_sta_join: BSS xx:xx:xx:xx:xx:xx: 2GHz channel, VHT info; ignoring Make sure when we sync from net80211 or set state that we only do VHT if we are on the 5Ghz band. This change is likely helpful whether it fixes the originally reported problems or not. Sponsored by: The FreeBSD Foundation Reported by: Jonathan Vasquez (jon xyinn.org) Reported by: Michael Butler (imb protected-networks.net) Reported by: others (fw crash w/o net80211 logging) MFC after: 3 days Tested by: Eirik Øverby (ltning-freebsd-wireless anduin.net) Tested by: lwhsu Tested by: Michael Butler (imb protected-networks.net) Differential Revision: https://reviews.freebsd.org/D49761 --- sys/compat/linuxkpi/common/src/linux_80211.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 65f203c0eec9..12897a38459e 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -442,7 +442,8 @@ lkpi_sta_sync_vht_from_ni(struct ieee80211_sta *sta, struct ieee80211_node *ni) uint16_t rx_mcs_map; uint8_t mcs; - if ((ni->ni_flags & IEEE80211_NODE_VHT) == 0) { + if ((ni->ni_flags & IEEE80211_NODE_VHT) == 0 || + !IEEE80211_IS_CHAN_VHT_5GHZ(ni->ni_chan)) { sta->deflink.vht_cap.vht_supported = false; return; } @@ -1878,7 +1879,7 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int } #endif #ifdef LKPI_80211_VHT - if (IEEE80211_IS_CHAN_VHT(ni->ni_chan)) { + if (IEEE80211_IS_CHAN_VHT_5GHZ(ni->ni_chan)) { #ifdef __notyet__ if (IEEE80211_IS_CHAN_VHT80P80(ni->ni_chan)) chanctx_conf->def.width = NL80211_CHAN_WIDTH_80P80; @@ -3860,7 +3861,8 @@ lkpi_scan_ies_add(uint8_t *p, struct ieee80211_scan_ies *scan_ies, } #endif #if defined(LKPI_80211_VHT) - if ((vap->iv_vht_flags & IEEE80211_FVHT_VHT) != 0) { + if (band == NL80211_BAND_5GHZ && + (vap->iv_vht_flags & IEEE80211_FVHT_VHT) != 0) { struct ieee80211_channel *c; c = ieee80211_ht_adjust_channel(ic, ic->ic_curchan, @@ -5362,7 +5364,7 @@ lkpi_ic_getradiocaps(struct ieee80211com *ic, int maxchan, NL80211_BAND_5GHZ); #ifdef LKPI_80211_VHT - if (hw->wiphy->bands[NL80211_BAND_5GHZ]->vht_cap.vht_supported){ + if (hw->wiphy->bands[NL80211_BAND_5GHZ]->vht_cap.vht_supported) { ic->ic_flags_ext |= IEEE80211_FEXT_VHT; ic->ic_vht_cap.vht_cap_info =