From nobody Thu Sep 10 09:48:35 2026 X-Original-To: dev-commits-src-branches@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 4hgXtX0Lmtz6rm5g for ; Thu, 10 Sep 2026 09:48:36 +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 "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hgXtW5Lp9z4ZtV for ; Thu, 10 Sep 2026 09:48:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789033715; 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=AmamQ0h/V++0kvv/J5O0+AQ6dm+mSIDJwZtR6MJbNh4=; b=RMUcGksRuGQiPjMJjNjfwSvrAjgcoQ0+1bKiI30J30QFw8TrQjfcF2WYpphvuq1qSlyCxU +qngLc4PbRjIIu6436eQR+X1BAN9obCgqepWj7eme5gh0DuRWW7RjNYuKDKmkNG6g/7wCd +zYql7YOkc84zb6GGA1u8mPxQIaNZ6rZadeOe3ippo0lXArqt3XLi7Zuh40BDdQR3Z1TQw 8bP/cg+E/arnNnfIC9WQB0ZqmnRHYIiAg/86cch1U8nI+UUJlLbKe++6LRF0vLXO+2IsXH FaKKfUc5qRW4wphXThQpj6xO3XPxo0IvQxkej44nScBqQbtVbJstbKgFjDcuzQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1789033715; b=Kz8l7Cd8gPHzgLcWDY8/V4FU/R2hUy6sEBY7hlxbYsW0i0JsOZ6ZkAZBk3t7XSvhHJlipA iQKupAKVYUs7AitCun0v0TG1pEvnhBNQHyV1PAHWM3QRfTcc+47VX4jLnVdltu2Zge14ps hohG6zUbWIVOCjn0RklviXgKqKYQsb6EuXW3lvMU/S04QgmHY2MyvBD4UPn/WXahSVVAa9 lCq2zxuT5HVS9al5oKaGmk76xqIeEl+x6q4Hs6r85aShH66RDSOsTTiIoEfUdlcV7q9auk 3PElqAbzJOmxRPNiXBQdQ7MfdDzP171hE75211IZ0E/IsyghYVl6iiusc6oTVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789033715; 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=AmamQ0h/V++0kvv/J5O0+AQ6dm+mSIDJwZtR6MJbNh4=; b=WbvYnhlsf0pPcaBnWNCMRHhaFWLP15SWSWXQNhnidagO0emd2JsqpZiaKJuOVFTqhbx3Mz ltrSIhwEb0rdlwHU3jbLeAoSMvjhvLfpo2/cgvHmpIrH37DTm6Q7P86VA+uRfp8Rj4HoOC Rm5XPHOdwRZupzSFwlRAoUDBJ3EPPL4Kb1Z71qsf9kGL1g7I11JTofH89cBGeLaxfWIrSg LMRxZqAf76zMCs7PZzsko+rW7vlISNL5zWbrCiiQI3KcK9SLEVSt4/F+YquOVI8P2hMRoJ MzYhHOHFgllJYRCbMNtMfpgMn5v4BiIYITOVldxaJ0IM+3YQf4DAzrPJHmemjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hgXtW3p00zM33 for ; Thu, 10 Sep 2026 09:48:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25b8e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 10 Sep 2026 09:48:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 83cb0299e280 - stable/15 - LinuxKPI: 802.11: deal with wdev list, and misc List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/15 X-Git-Reftype: branch X-Git-Commit: 83cb0299e2803360277bb24a0bf1da458e6509a9 Auto-Submitted: auto-generated Date: Thu, 10 Sep 2026 09:48:35 +0000 Message-Id: <6aa27cf3.25b8e.3fa17bfd@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=83cb0299e2803360277bb24a0bf1da458e6509a9 commit 83cb0299e2803360277bb24a0bf1da458e6509a9 Author: Bjoern A. Zeeb AuthorDate: 2026-08-12 14:16:40 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-09-10 09:46:52 +0000 LinuxKPI: 802.11: deal with wdev list, and misc Fill in more (lvif) wdev details and add it to the list under the wiphy struct so that iterators at least work and find the (one) device. This is needed for the upcoming espwl(4) driver. misc: add WPI-SMS4 to the list of cipher suits (we won't support it but at least print the name). (cherry picked from commit 3e42109d846766248b7d0d0b077543ffc1a9db22) --- sys/compat/linuxkpi/common/src/linux_80211.c | 29 +++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 0c649bfcbc80..7f9bb9459c6a 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2020-2026 The FreeBSD Foundation - * Copyright (c) 2020-2025 Bjoern A. Zeeb + * Copyright (c) 2020-2026 Bjoern A. Zeeb * * This software was developed by Björn Zeeb under sponsorship from * the FreeBSD Foundation. @@ -1359,6 +1359,8 @@ lkpi_cipher_suite_to_name(uint32_t wlan_cipher_suite) return ("BIP_GMAC_128"); case WLAN_CIPHER_SUITE_BIP_GMAC_256: return ("BIP_GMAC_256"); + case WLAN_CIPHER_SUITE_SMS4: + return ("WPI-SMS4"); default: return ("??"); } @@ -1392,7 +1394,7 @@ lkpi_l80211_to_net80211_cyphers(struct ieee80211com *ic, case WLAN_CIPHER_SUITE_BIP_GMAC_256: return (IEEE80211_CRYPTO_BIP_GMAC_256); default: - ic_printf(ic, "%s: unknown WLAN Cipher Suite %#08x | %u (%s)\n", + ic_printf(ic, "%s: unknown/unsupported WLAN Cipher Suite %#08x | %u (%s)\n", __func__, wlan_cipher_suite >> 8, wlan_cipher_suite & 0xff, lkpi_cipher_suite_to_name(wlan_cipher_suite)); @@ -4349,9 +4351,18 @@ lkpi_ic_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], vif->p2p = false; vif->probe_req_reg = false; vif->type = lkpi_opmode_to_vif_type(opmode); + lvif->wdev.wiphy = hw->wiphy; lvif->wdev.iftype = vif->type; + wiphy_lock(hw->wiphy); + list_add_rcu(&lvif->wdev.list, &hw->wiphy->wdev_list); + wiphy_unlock(hw->wiphy); + memcpy(lvif->wdev.address, mac, IEEE80211_ADDR_LEN); +#if 0 /* Need to fill in other fields as well. */ - IMPROVE(); + struct net_device *netdev; /* When do we create this? */ + uint32_t radio_mask; +#endif + IMPROVE("wdev"); /* Create a chanctx to be used later. */ IMPROVE("lkpi_alloc_lchanctx reserved as many as can be"); @@ -4591,6 +4602,10 @@ lkpi_ic_vap_delete(struct ieee80211vap *vap) TAILQ_REMOVE(&lhw->lvif_head, lvif, lvif_entry); LKPI_80211_LHW_LVIF_UNLOCK(lhw); + wiphy_lock(hw->wiphy); + list_del_rcu(&lvif->wdev.list); + wiphy_unlock(hw->wiphy); + ieee80211_ratectl_deinit(vap); ieee80211_vap_detach(vap); @@ -5081,12 +5096,14 @@ lkpi_ic_scan_start(struct ieee80211com *ic) common_ie_len, hw->wiphy->max_scan_ie_len); } + lvif = VAP_TO_LVIF(vap); + hw_req = malloc(sizeof(*hw_req) + ssids_len + s6ghzlen + chan_len + lhw->supbands * lhw->scan_ie_len + common_ie_len, M_LKPI80211, M_WAITOK | M_ZERO); hw_req->req.flags = 0; /* XXX ??? */ - /* hw_req->req.wdev */ + hw_req->req.wdev = &lvif->wdev; hw_req->req.wiphy = hw->wiphy; hw_req->req.no_cck = false; /* XXX */ @@ -5212,7 +5229,6 @@ lkpi_ic_scan_start(struct ieee80211com *ic) hw_req->req.ie_len = ieend - ie; hw_req->req.scan_start = jiffies; - lvif = VAP_TO_LVIF(vap); vif = LVIF_TO_VIF(lvif); LKPI_80211_LHW_SCAN_LOCK(lhw); @@ -8093,6 +8109,8 @@ lkpi_convert_rx_status(struct ieee80211_hw *hw, struct lkpi_sta *lsta, rx_stats->r_flags |= (IEEE80211_R_C_NF | IEEE80211_R_C_RSSI); } + /* rx_status->antenna */ + /* XXX-NET80211 We are not going to populate c_phytype! */ switch (rx_status->encoding) { @@ -8713,6 +8731,7 @@ linuxkpi_wiphy_new(const struct cfg80211_ops *ops, size_t priv_len) wiphy = LWIPHY_TO_WIPHY(lwiphy); + INIT_LIST_HEAD(&wiphy->wdev_list); mutex_init(&wiphy->mtx); TODO();