From nobody Thu May 8 21:23:30 2025 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 4ZtlVV5B9Wz5vdmJ; Thu, 08 May 2025 21:23:30 +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 4ZtlVV281Wz3RNL; Thu, 08 May 2025 21:23:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746739410; 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=XLcztczoEIgiDwdTX7gmmIJ1Y+ykYyKZ12x36hd9Nzk=; b=XdWHC/6gkTHmLT0XJTG2FaNUxUZ1o6aKpl7fppWD/DbgB9CpKpbnY+VxajCSnPgv1SgUhf IW8Irm4MnmG4xiJpilASnWCrldeTx0OIOqiQtLAZR5P3djRlY5leOr00jdyFWV8jhnx/+v ehgRjGfJzi0PhqvWm1R32mVm90yI3fCAGwTmxDUm+ddkr9tbKg3DDGG1ZSZTMtANKs9Qgm iVD4Ie9vSOQuEymJkNrEuSY9TK7eZ1bEp5LAGDXFJem2HtB8SBED0aXJB992A8k88oUsNq WQPkYuK4rZbjk0OuJBwJWGXV82v7qRMqMbogWf8/ISghusi23iPHZ7w3MR3nXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746739410; 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=XLcztczoEIgiDwdTX7gmmIJ1Y+ykYyKZ12x36hd9Nzk=; b=r5JvLSPim6sFyDTy+Y0g6rWQnRAH4YkwceMN/UGGYV1ElgOxbxv/56urLLV/Rg1g/+hMwr 6gjbyKZVnjdsEMSuQ+Ig6JE8ts8uCdQf3+aleFPg3SLg9ADlantMWQAB+5CzJmD80cnlv1 0Rc9dpuPiE1gZHd6jVYdemgGfd2nDragEKdc+uqC503NmiCkFYzLGdxMwSCxZcALD+uPLy Sp9fssRboxNV6A4oG/ld2ZAJyuqvjWmucMMJSsJwYbh3FWvcrQz5ZQx+SPtxTKxGuzqe7h p55QCoJ3iwmsFrbiU2mPPq9Yda5GOiKMRH1eviw5dEP2eh6GNOWEjCaj/+8bXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746739410; a=rsa-sha256; cv=none; b=n4VfM/Fy3b3HUJG1ma13wNGspxy1eg1CK1DIUVwor0jVtKrsUNYsqPsDns7MCbrUUHyZok tTeaZgTCQys8Ab9xijTI0TvwCGmge1FAEAeGm9E+zooZV/Ba6gmhVeY8DDfIF3lmGizjya +0GAcBVBKIPJDQv9unw7y4EBnQx2JZWBbrLre5CS7eQSdzSMKTs2NE47nSUaKQWOq1r9/Z v0qkIXSEKesFHKz4vKVh1J7PPjGHAI6J7wDmXhqmdYA3U9GIpZJz8QC1k9LAvF0gKqB5fI c1QZd0zX4lPkX4cZrJJ1/uA3jMPaJKSbl3ChMC+mloARToauob21Gn4Hwh50fA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4ZtlVV1hX7zXyD; Thu, 08 May 2025 21:23:30 +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 548LNUC6073183; Thu, 8 May 2025 21:23:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 548LNUHi073179; Thu, 8 May 2025 21:23:30 GMT (envelope-from git) Date: Thu, 8 May 2025 21:23:30 GMT Message-Id: <202505082123.548LNUHi073179@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: 873c0ea6482f - releng/14.3 - LinuxKPI: 802.11: header updates for mt76 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 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/releng/14.3 X-Git-Reftype: branch X-Git-Commit: 873c0ea6482f38ea572ad3d5c494a261fed536fb Auto-Submitted: auto-generated The branch releng/14.3 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=873c0ea6482f38ea572ad3d5c494a261fed536fb commit 873c0ea6482f38ea572ad3d5c494a261fed536fb Author: Bjoern A. Zeeb AuthorDate: 2025-05-02 20:13:33 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-05-08 21:22:53 +0000 LinuxKPI: 802.11: header updates for mt76 Add more structs, fields, flags, defines. Sponsored by: The FreeBSD Foundation Approved by: re (cperciva) (cherry picked from commit 675e6b1c68ba71af1853952f7df4d84399340009) (cherry picked from commit 6a0dbc0a1246c9825f0892bb6dd957f5d081057a) --- .../linuxkpi/common/include/linux/ieee80211.h | 6 ++ sys/compat/linuxkpi/common/include/net/cfg80211.h | 96 +++++++++++++++------- sys/compat/linuxkpi/common/include/net/mac80211.h | 36 ++++++-- 3 files changed, 100 insertions(+), 38 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/ieee80211.h b/sys/compat/linuxkpi/common/include/linux/ieee80211.h index 8a33ad002e09..396204c3c484 100644 --- a/sys/compat/linuxkpi/common/include/linux/ieee80211.h +++ b/sys/compat/linuxkpi/common/include/linux/ieee80211.h @@ -295,6 +295,7 @@ enum ieee80211_ac_numbers { #define IEEE80211_HT_MCS_MASK_LEN 10 #define IEEE80211_MLD_MAX_NUM_LINKS 15 +#define IEEE80211_MLD_CAP_OP_MAX_SIMUL_LINKS 0xf #define IEEE80211_MLD_CAP_OP_TID_TO_LINK_MAP_NEG_SUPP 0x0060 #define IEEE80211_MLD_CAP_OP_TID_TO_LINK_MAP_NEG_SUPP_SAME 1 @@ -427,6 +428,7 @@ enum ieee80211_tx_control_flags { IEEE80211_TX_CTRL_PORT_CTRL_PROTO = BIT(0), IEEE80211_TX_CTRL_PS_RESPONSE = BIT(1), IEEE80211_TX_CTRL_RATE_INJECT = BIT(2), + IEEE80211_TX_CTRL_DONT_USE_RATE_MASK = BIT(3), IEEE80211_TX_CTRL_MLO_LINK = 0xF0000000, /* This is IEEE80211_LINK_UNSPECIFIED on the high bits. */ }; @@ -493,6 +495,10 @@ enum ieee80211_category { WLAN_CATEGORY_SA_QUERY = 8, /* net80211::IEEE80211_ACTION_CAT_SA_QUERY */ }; +struct ieee80211_he_6ghz_capa { + uint16_t capa; +}; + /* 80211-2020 9.3.3.2 Format of Management frames */ struct ieee80211_mgmt { __le16 frame_control; diff --git a/sys/compat/linuxkpi/common/include/net/cfg80211.h b/sys/compat/linuxkpi/common/include/net/cfg80211.h index aae60983f5f6..1e4f917a2796 100644 --- a/sys/compat/linuxkpi/common/include/net/cfg80211.h +++ b/sys/compat/linuxkpi/common/include/net/cfg80211.h @@ -744,6 +744,8 @@ struct linuxkpi_ieee80211_regdomain { #define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_4 0x20 #define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_MASK 0x40 #define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_MASK 0x80 +#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_5 0x80 +#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_5 0x80 #define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_ABOVE_80MHZ_2 0x1 #define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_2 0x2 @@ -931,11 +933,6 @@ struct ieee80211_he_obss_pd { uint8_t partial_bssid_bitmap[8]; }; -struct ieee80211_sta_he_6ghz_capa { - /* TODO FIXME */ - int capa; -}; - struct ieee80211_eht_mcs_nss_supp_20mhz_only { union { struct { @@ -989,7 +986,7 @@ struct ieee80211_sband_iftype_data { /* TODO FIXME */ enum nl80211_iftype types_mask; struct ieee80211_sta_he_cap he_cap; - struct ieee80211_sta_he_6ghz_capa he_6ghz_capa; + struct ieee80211_he_6ghz_capa he_6ghz_capa; struct ieee80211_sta_eht_cap eht_cap; struct { const uint8_t *data; @@ -1182,6 +1179,18 @@ enum cfg80211_regulatory { REGULATORY_COUNTRY_IE_FOLLOW_POWER = BIT(6), }; +struct wiphy_radio_freq_range { + uint32_t start_freq; + uint32_t end_freq; +}; + +struct wiphy_radio { + int n_freq_range; + int n_iface_combinations; + const struct wiphy_radio_freq_range *freq_range; + const struct ieee80211_iface_combination *iface_combinations; +}; + enum wiphy_flags { WIPHY_FLAG_AP_UAPSD = BIT(0), WIPHY_FLAG_HAS_CHANNEL_SWITCH = BIT(1), @@ -1246,6 +1255,9 @@ struct wiphy { uint8_t available_antennas_rx; uint8_t available_antennas_tx; + int n_radio; + const struct wiphy_radio *radio; + 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; @@ -1259,6 +1271,7 @@ struct wiphy { unsigned long ext_features[BITS_TO_LONGS(NUM_NL80211_EXT_FEATURES)]; struct dentry *debugfsdir; + const struct wiphy_wowlan_support *wowlan; struct cfg80211_wowlan *wowlan_config; /* Lower layer (driver/mac80211) specific data. */ @@ -1271,8 +1284,9 @@ struct wiphy { struct wireless_dev { /* XXX TODO, like ic? */ - int iftype; - int address; + enum nl80211_iftype iftype; + uint32_t radio_mask; + uint8_t address[ETH_ALEN]; struct net_device *netdev; struct wiphy *wiphy; }; @@ -1542,6 +1556,43 @@ cfg80211_chandef_create(struct cfg80211_chan_def *chandef, }; } +static __inline bool +cfg80211_chandef_valid(const struct cfg80211_chan_def *chandef) +{ + TODO(); + return (false); +} + +static __inline bool +cfg80211_chandef_dfs_usable(struct wiphy *wiphy, const struct cfg80211_chan_def *chandef) +{ + TODO(); + return (false); +} + +static __inline unsigned int +cfg80211_chandef_dfs_cac_time(struct wiphy *wiphy, const struct cfg80211_chan_def *chandef) +{ + TODO(); + return (0); +} + +static __inline bool +cfg80211_chandef_identical(const struct cfg80211_chan_def *chandef_1, + const struct cfg80211_chan_def *chandef_2) +{ + TODO(); + return (false); +} + +static __inline bool +cfg80211_chandef_usable(struct wiphy *wiphy, + const struct cfg80211_chan_def *chandef, uint32_t flags) +{ + TODO(); + return (false); +} + static __inline void cfg80211_bss_iter(struct wiphy *wiphy, struct cfg80211_chan_def *chandef, void (*iterfunc)(struct wiphy *, struct cfg80211_bss *, void *), void *data) @@ -2077,27 +2128,6 @@ cfg80211_find_ext_ie(uint8_t eid, const uint8_t *p, size_t len) return (NULL); } -static __inline bool -cfg80211_chandef_valid(const struct cfg80211_chan_def *chandef) -{ - TODO(); - return (false); -} - -static __inline bool -cfg80211_chandef_dfs_usable(struct wiphy *wiphy, const struct cfg80211_chan_def *chandef) -{ - TODO(); - return (false); -} - -static __inline unsigned int -cfg80211_chandef_dfs_cac_time(struct wiphy *wiphy, const struct cfg80211_chan_def *chandef) -{ - TODO(); - return (0); -} - static inline void _ieee80211_set_sband_iftype_data(struct ieee80211_supported_band *band, struct ieee80211_sband_iftype_data *iftype_data, size_t nitems) @@ -2189,6 +2219,14 @@ cfg80211_get_iftype_ext_capa(struct wiphy *wiphy, enum nl80211_iftype iftype) return (NULL); } +static inline uint16_t +ieee80211_get_he_6ghz_capa(const struct ieee80211_supported_band *sband, + enum nl80211_iftype iftype) +{ + TODO(); + return (0); +} + static inline int nl80211_chan_width_to_mhz(enum nl80211_chan_width width) { diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index c6cdcbc43269..f8eb180d63a1 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -473,6 +473,7 @@ enum ieee80211_hw_flags { IEEE80211_HW_DISALLOW_PUNCTURING_5GHZ, IEEE80211_HW_TX_STATUS_NO_AMPDU_LEN, IEEE80211_HW_HANDLES_QUIET_CSA, + IEEE80211_HW_NO_VIRTUAL_MONITOR, /* Keep last. */ NUM_IEEE80211_HW_FLAGS @@ -708,9 +709,10 @@ struct ieee80211_sta_rates { /* XXX TODO */ /* XXX some _rcu thing */ struct { - int idx; - int flags; - } rate[1]; /* XXX what is the real number? */ + uint8_t idx; + uint8_t count; + uint16_t flags; + } rate[4]; /* XXX what is the real number? */ }; struct ieee80211_sta_txpwr { @@ -734,7 +736,7 @@ struct ieee80211_link_sta { struct ieee80211_sta_ht_cap ht_cap; struct ieee80211_sta_vht_cap vht_cap; struct ieee80211_sta_he_cap he_cap; - struct ieee80211_sta_he_6ghz_capa he_6ghz_capa; + struct ieee80211_he_6ghz_capa he_6ghz_capa; struct ieee80211_sta_eht_cap eht_cap; uint8_t rx_nss; enum ieee80211_sta_rx_bw bandwidth; @@ -1093,7 +1095,7 @@ struct ieee80211_ops { void (*update_vif_offload)(struct ieee80211_hw *, struct ieee80211_vif *); - int (*get_txpower)(struct ieee80211_hw *, struct ieee80211_vif *, int *); + int (*get_txpower)(struct ieee80211_hw *, struct ieee80211_vif *, unsigned int, int *); int (*get_stats)(struct ieee80211_hw *, struct ieee80211_low_level_stats *); int (*set_radar_background)(struct ieee80211_hw *, struct cfg80211_chan_def *); @@ -1870,13 +1872,13 @@ ieee80211_rate_set_vht(struct ieee80211_tx_rate *r, uint8_t mcs, uint8_t nss) } static inline uint8_t -ieee80211_rate_get_vht_nss(struct ieee80211_tx_rate *r) +ieee80211_rate_get_vht_nss(const struct ieee80211_tx_rate *r) { return (((r->idx >> 4) & 0x07) + 1); } static inline uint8_t -ieee80211_rate_get_vht_mcs(struct ieee80211_tx_rate *r) +ieee80211_rate_get_vht_mcs(const struct ieee80211_tx_rate *r) { return (r->idx & 0x0f); } @@ -2180,12 +2182,27 @@ ieee80211_queue_work(struct ieee80211_hw *hw, struct work_struct *w) linuxkpi_ieee80211_queue_work(hw, w); } +static __inline bool +ieee80211_tx_prepare_skb(struct ieee80211_hw *hw, struct ieee80211_vif *vif, + struct sk_buff *skb, enum nl80211_band band, struct ieee80211_sta **sta) +{ + TODO(); + return (false); +} + static __inline void ieee80211_tx_status_skb(struct ieee80211_hw *hw, struct sk_buff *skb) { linuxkpi_ieee80211_tx_status(hw, skb); } +static inline void +ieee80211_tx_status_noskb(struct ieee80211_hw *hw, struct ieee80211_sta *sta, + struct ieee80211_tx_info *info) +{ + TODO(); +} + static __inline void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw, struct sk_buff *skb) { @@ -2267,7 +2284,8 @@ ieee80211_txq_may_transmit(struct ieee80211_hw *hw, struct ieee80211_txq *txq) } static __inline void -ieee80211_radar_detected(struct ieee80211_hw *hw) +ieee80211_radar_detected(struct ieee80211_hw *hw, + struct ieee80211_chanctx_conf *chanctx_conf) { TODO(); } @@ -2327,7 +2345,7 @@ ieee80211_get_tx_rates(struct ieee80211_vif *vif, struct ieee80211_sta *sta, } static __inline void -ieee80211_color_change_finish(struct ieee80211_vif *vif) +ieee80211_color_change_finish(struct ieee80211_vif *vif, uint8_t link_id) { TODO(); }