From nobody Thu Sep 10 09:48:34 2026 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 4hgXtb5gnvz6rm1N for ; Thu, 10 Sep 2026 09:48:39 +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 4hgXtb496Xz4Zxh for ; Thu, 10 Sep 2026 09:48:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789033719; 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=lDOojLJFIragAz7+jiAsg9D9R7k2fJcZnlGi5f0Eqmo=; b=J/PXk1UFXx6+1HmroWQDgepMAgTCVM0F0hXOn/4IMsNum6FlHgH5GX11BWlebMps4VPoKf e1eaSm7Rkd8FxYdwl9V9fZUb4YScIzAUuYkYo5xFqQ1zZSHDRqrpjke4mFLRGlzmJUJiOt i+4KZfQ8r4xg23EhXiTt+Jrw6kgQsDr8vwJ3Ib6HV/2oYl1y0vmVZUR7G8rIw0Kykfp0Fg A9nB3ZwnZPczsauZD+Cqj403DslKy3NkcvvxnuCiFSEsjlDLnQvV/LQOzca2NKw3+qdFVo Z0AhEARcizkC8UTUeqLsXfZTKYPOqtNkmudIrfdvBIwCtJ6rt2US9ASjdAF4Vw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1789033719; b=PibQ4mZP8a/+Jq+q0u8qd6wmYkpt2v9Nc1bfUZuJSh1CExYumUnFBFy1AuVy7Gdfx/M7rf 378zUjbr2jtuBdKkGyqCp6CpMvNYy8lm+lp7fNhCFXi/T8Tpn8uICWT5Z3oOauoxyoEA03 4U82PhmV1IhcYp1WlogbPQa2mAy4oVbzZRaFrFiRVnSwCMszl/TI4BzHjJY9E21bCEy0Tz 35Wi+VIrJNjhbB/FcwDdWImT2g4x8B170oF1YalAHkg65TtwtnvsAuBqp71zSbjDfR19pN +jGhRdYCOVJ+5lTv0LRjLzujof7SM9u5/ewL8mxnDC2qzw8AlKg1QYUgIPQB8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789033719; 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=lDOojLJFIragAz7+jiAsg9D9R7k2fJcZnlGi5f0Eqmo=; b=J+0eQXWv+1L4VcLR/EkBeObFXhzEs6J9jOO7B63DeV/N6TRCYGZrC65F1rn/5RkY6QKkoI 6fIxQtTgSx/EA7onUZc2pp0uR40k9yuDMLwa9DjVJg/DAFD0cI0G8icz6pqT/1v1zQrTUo qAK/xHIzS5NjBGkToPJ/cK4r6ym6fNYKIEb77xvGYRfFRVuzqy5peCnlNitSUOK5X92cNH bc319K1PM5ggGio7AIgF5hFL+Y+xTrjtsYUKusx8baS/6Ael09hH0Eboom9F/6jJQ3HWMW A0CubL4r4m2kfvD9U14nyZwvK1aUHtYomS+OdlC0QlMYa1OZCkILWWoUIA9aNQ== 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 4hgXtb3Cs7zM0X for ; Thu, 10 Sep 2026 09:48:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24c40 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 10 Sep 2026 09:48:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 4eebd438f8b7 - stable/15 - LinuxKPI: 802.11: add more defines, structures, ... 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 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: 4eebd438f8b75d23a7c293d251e7b08de5b86667 Auto-Submitted: auto-generated Date: Thu, 10 Sep 2026 09:48:34 +0000 Message-Id: <6aa27cf2.24c40.79bd94ac@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=4eebd438f8b75d23a7c293d251e7b08de5b86667 commit 4eebd438f8b75d23a7c293d251e7b08de5b86667 Author: Bjoern A. Zeeb AuthorDate: 2026-08-12 14:11:36 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-09-10 09:46:52 +0000 LinuxKPI: 802.11: add more defines, structures, ... Add more defines, structures, sort struct field types, add inline functions (partially implemented) all needed for the upcoming espwl(4) wireless driver. (cherry picked from commit 9b13e6ce5b099af0958a824fa37c70538a8b6d2a) --- .../linuxkpi/common/include/linux/ieee80211.h | 27 +++++++++-- sys/compat/linuxkpi/common/include/linux/nl80211.h | 6 +++ sys/compat/linuxkpi/common/include/net/cfg80211.h | 54 ++++++++++++++++++---- sys/compat/linuxkpi/common/include/net/mac80211.h | 12 ++++- 4 files changed, 84 insertions(+), 15 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/ieee80211.h b/sys/compat/linuxkpi/common/include/linux/ieee80211.h index dede010c57de..a3de8ae9b42f 100644 --- a/sys/compat/linuxkpi/common/include/linux/ieee80211.h +++ b/sys/compat/linuxkpi/common/include/linux/ieee80211.h @@ -1,5 +1,6 @@ /*- * Copyright (c) 2020-2026 The FreeBSD Foundation + * Copyright (c) 2026 Bjoern A. Zeeb * * This software was developed by Björn Zeeb under sponsorship from * the FreeBSD Foundation. @@ -159,6 +160,13 @@ enum ieee80211_vht_max_ampdu_len_exp { IEEE80211_VHT_MAX_AMPDU_1024K = 7, }; +/* 802.11-2020, 9.6.22 VHT Action frame details. */ +enum ieee80211_vht_actioncode { + /* VHT Compressed Beamforming = 0, */ + WLAN_VHT_ACTION_GROUPID_MGMT = 1, + /* Operating Mode Notification = 2, */ +}; + #define IEEE80211_WEP_IV_LEN 3 /* net80211: IEEE80211_WEP_IVLEN */ #define IEEE80211_WEP_ICV_LEN 4 @@ -539,6 +547,7 @@ enum ieee80211_sa_query { enum ieee80211_category { WLAN_CATEGORY_BACK = 3, WLAN_CATEGORY_SA_QUERY = 8, /* net80211::IEEE80211_ACTION_CAT_SA_QUERY */ + WLAN_CATEGORY_VHT = 21, }; /* 80211-2020 9.3.3.2 Format of Management frames */ @@ -563,6 +572,14 @@ struct ieee80211_mgmt { uint16_t listen_interval; uint8_t variable[0]; } __packed assoc_req; + /* 9.3.3.6 Association Response frame format */ + /* 9.3.3.8 Reassociation Response frame format */ + struct { + uint16_t capab_info; + uint16_t status_code; + uint16_t aid; + uint8_t variable[0]; + } __packed assoc_resp, reassoc_resp; /* 9.3.3.10 Probe Request frame format */ struct { uint8_t variable[0]; @@ -731,15 +748,15 @@ struct ieee80211_trigger { /* Table 9-29c-Trigger Type subfield encoding */ enum { IEEE80211_TRIGGER_TYPE_BASIC = 0x0, + IEEE80211_TRIGGER_TYPE_BFRP = 0x1, IEEE80211_TRIGGER_TYPE_MU_BAR = 0x2, + IEEE80211_TRIGGER_TYPE_MU_RTS = 0x3, + IEEE80211_TRIGGER_TYPE_BSRP = 0x4, + IEEE80211_TRIGGER_TYPE_BQRP = 0x6, + IEEE80211_TRIGGER_TYPE_NFRP = 0x7, #if 0 /* Not seen yet. */ - BFRP = 0x1, - MU-RTS = 0x3, - BSRP = 0x4, GCR MU-BAR = 0x5, - BQRP = 0x6, - NFRP = 0x7, /* 0x8..0xf reserved */ #endif IEEE80211_TRIGGER_TYPE_MASK = 0xf diff --git a/sys/compat/linuxkpi/common/include/linux/nl80211.h b/sys/compat/linuxkpi/common/include/linux/nl80211.h index 845ffec4bcba..635ded732d7e 100644 --- a/sys/compat/linuxkpi/common/include/linux/nl80211.h +++ b/sys/compat/linuxkpi/common/include/linux/nl80211.h @@ -1,5 +1,6 @@ /*- * Copyright (c) 2020-2024 The FreeBSD Foundation + * Copyright (c) 2026 Bjoern A. Zeeb * * This software was developed by Björn Zeeb under sponsorship from * the FreeBSD Foundation. @@ -444,6 +445,11 @@ enum nl80211_rxmgmt_flags { NL80211_RXMGMT_FLAG_EXTERNAL_AUTH = BIT(1), }; +enum nl80211_radar_event { + NL80211_RADAR_CAC_FINISHED, + NL80211_RADAR_CAC_STARTED, +}; + #define NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY 16 #define NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY 24 diff --git a/sys/compat/linuxkpi/common/include/net/cfg80211.h b/sys/compat/linuxkpi/common/include/net/cfg80211.h index dedf687d6530..1538f70b58d0 100644 --- a/sys/compat/linuxkpi/common/include/net/cfg80211.h +++ b/sys/compat/linuxkpi/common/include/net/cfg80211.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2020-2026 The FreeBSD Foundation - * Copyright (c) 2021-2022 Bjoern A. Zeeb + * Copyright (c) 2021-2026 Bjoern A. Zeeb * * This software was developed by Björn Zeeb under sponsorship from * the FreeBSD Foundation. @@ -64,6 +64,9 @@ extern int linuxkpi_debug_80211; printf("%s:%d: XXX LKPI80211 IMPROVE " fmt "\n", __func__, __LINE__, ##__VA_ARGS__) #endif +#define wiphy_dbg(_wiphy, _fmt, ...) \ + dev_dbg(&(_wiphy)->dev, _fmt, ##__VA_ARGS__) + enum rfkill_hard_block_reasons { RFKILL_HARD_BLOCK_NOT_OWNER = BIT(0), }; @@ -1023,12 +1026,14 @@ struct ieee80211_iface_limit { }; struct ieee80211_iface_combination { - /* TODO FIXME */ const struct ieee80211_iface_limit *limits; - int n_limits; - int max_interfaces, num_different_channels; - int beacon_int_infra_match, beacon_int_min_gcd; - int radar_detect_widths; + uint32_t num_different_channels; + uint32_t beacon_int_min_gcd; + uint16_t max_interfaces; + uint8_t n_limits; + uint8_t radar_detect_widths; + uint8_t radar_detect_regions; + bool beacon_int_infra_match; }; struct iface_combination_params { @@ -1204,6 +1209,8 @@ struct wiphy { uint8_t nan_supported_bands; struct wiphy_nan_capa nan_capa; + struct list_head wdev_list; + int features, hw_version; int interface_modes, max_match_sets, max_remain_on_channel_duration, max_scan_ssids, max_sched_scan_ie_len, max_sched_scan_plan_interval, max_sched_scan_plan_iterations, max_sched_scan_plans, max_sched_scan_reqs, max_sched_scan_ssids; int num_iftype_ext_capab; @@ -1230,11 +1237,13 @@ struct wiphy { struct wireless_dev { /* XXX TODO, like ic? */ + struct wiphy *wiphy; enum nl80211_iftype iftype; - uint32_t radio_mask; - uint8_t address[ETH_ALEN]; + struct net_device *netdev; - struct wiphy *wiphy; + struct list_head list; + uint8_t address[ETH_ALEN]; + uint32_t radio_mask; }; struct cfg80211_ops { @@ -1554,6 +1563,26 @@ cfg80211_chandef_valid(const struct cfg80211_chan_def *chandef) return (false); } +static inline enum nl80211_channel_type +cfg80211_get_chandef_type(const struct cfg80211_chan_def *chandef) +{ + + switch (chandef->width) { + case NL80211_CHAN_WIDTH_20_NOHT: + return (NL80211_CHAN_NO_HT); + case NL80211_CHAN_WIDTH_20: + return (NL80211_CHAN_HT20); + case NL80211_CHAN_WIDTH_40: + if (chandef->center_freq1 < chandef->chan->center_freq) + return (NL80211_CHAN_HT40MINUS); + return (NL80211_CHAN_HT40PLUS); + default: + WARN_ONCE(1, "%s: invalid chandef width %d\n", + __func__, chandef->width); + return (NL80211_CHAN_NO_HT); + } +} + static inline int cfg80211_chandef_get_width(const struct cfg80211_chan_def *chandef) { @@ -1574,6 +1603,13 @@ cfg80211_chandef_dfs_cac_time(struct wiphy *wiphy, const struct cfg80211_chan_de return (0); } +static inline void +cfg80211_cac_event(struct net_device *netdev, const struct cfg80211_chan_def *chandef, + enum nl80211_radar_event re, gfp_t gfp, unsigned int link_id) +{ + TODO(); +} + static __inline bool cfg80211_chandef_identical(const struct cfg80211_chan_def *chandef_1, const struct cfg80211_chan_def *chandef_2) diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index 5555e14b06f9..83521c2fabaf 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -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. @@ -471,6 +471,7 @@ enum ieee80211_hw_flags { IEEE80211_HW_TX_STATUS_NO_AMPDU_LEN, IEEE80211_HW_HANDLES_QUIET_CSA, IEEE80211_HW_NO_VIRTUAL_MONITOR, + IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING, /* Keep last. */ NUM_IEEE80211_HW_FLAGS @@ -647,6 +648,7 @@ struct ieee80211_rx_status { uint8_t band; uint8_t chains; int8_t chain_signal[IEEE80211_MAX_CHAINS]; + uint8_t antenna; int8_t signal; uint8_t enc_flags; union { @@ -1056,6 +1058,7 @@ struct ieee80211_ops { uint64_t (*get_tsf)(struct ieee80211_hw *, struct ieee80211_vif *); void (*set_tsf)(struct ieee80211_hw *, struct ieee80211_vif *, uint64_t); void (*offset_tsf)(struct ieee80211_hw *, struct ieee80211_vif *, s64); + void (*reset_tsf)(struct ieee80211_hw *, struct ieee80211_vif *); int (*set_bitrate_mask)(struct ieee80211_hw *, struct ieee80211_vif *, const struct cfg80211_bitrate_mask *); void (*set_coverage_class)(struct ieee80211_hw *, int, s16); @@ -2106,6 +2109,13 @@ ieee80211_sta_set_buffered(struct ieee80211_sta *sta, uint8_t tid, bool t) TODO(); } +static inline struct sk_buff * +ieee80211_get_buffered_bc(struct ieee80211_hw *hw, struct ieee80211_vif *vif) +{ + TODO("IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING (espwl)"); + return (NULL); +} + static __inline void ieee80211_sched_scan_results(struct ieee80211_hw *hw) {