From nobody Mon Feb 10 14:52:51 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 4Ys6xw3hGkz5mHHH; Mon, 10 Feb 2025 14:52:52 +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 4Ys6xw0mx4z4LWD; Mon, 10 Feb 2025 14:52:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739199172; 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=73j5em+ClFFFAxJtAkYGYm0/3aHY5/6g9KJVPzKpvDQ=; b=reMhmQLQvjQnNXMAgyp3HwX5gY/80u4ESLiGtrYdfiJEr8trwQ++kluIrMZK27e+t3SEmx mJmEVqzKqPsgAoLhpb1HncLO1WB2BNyItGTVmSyWcxcVnADkZwobUCviREL2QnoS3XUH3f pCwOXfbgG/XeSBRBgaE1WKSjdJW46d6Wg9oV1FEpoxNSbx0A9Q+6I6LbSqV1M1G/6QjX0g KlxTCPjUxsITGKnayqwFP9zLKGDybPG8QkSZVLX7bWeCwJen4KAaFe3A9cp7neE+6VJoMM EsWDeo2BXxfpXJ93YRJU/LpYPF0i9Al+PoTFu622CFuHEgC17B4rUD+9JAjdsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739199172; 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=73j5em+ClFFFAxJtAkYGYm0/3aHY5/6g9KJVPzKpvDQ=; b=oCZw5N0IdvFiCB0z1mGv95b9cm/jcmppaaOjdrdzaIOA1D1wSiZ2QQfh6AvkGwDx7s1iqF FRTGKmCSRGLaonW+cillTz1s98GoTFNfwhX77l5q9QPX5NRKptW9tnBQfosPf5jHYv5M1q m6X3SgY9npCKvlFcfRSKjPu1LAbJGzOVfpVgDa5/qFm53hpcPDELIRh9vmIk1NpZ+8eyUB a9GqzuLpROs4o0hsbFlEQ0mPn9XWDYacZNGI95K3UJDBgXyZNM3BpJp5j826VmyMofX1up 3f1lwUxjmmY35YxPNvVeErsaHBVWx1cJs4w/hFezX+gsY5xQmcdIXlIFB/sliQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1739199172; a=rsa-sha256; cv=none; b=kJAODr9t9QjWWMhaBxaIf/TPKI5LdK1iBMJUtCn0NHJpUw/mskOeSBjQDPvm18DmKjsW+g kJkK4itobiNQj/URJBOPenqBFUHU5KBhI89rLpRTY9B6dWiBQOVpURSaFDuzqg7TvZe7S2 Dlu2+L2Tv4Z1bBWEyxQxvey4Wlr2goa6qaaIkVAhk7ypn4yToyWAVefJQhdarjLAwpQ9kY /uL+ZQKKZv0Uq6mPV9bP4aqSZdj32pT/uq+Y1XyIGq4ZBhj/JZXIuQgTyWq3ghfrxnK0kU qFOprhnecgTQ6kd2mvRLEYVVKM2A6JgNpwxN5oQ4FRSzhXFGfNL8L5jIAq1x/Q== 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 4Ys6xw0BhFzX7B; Mon, 10 Feb 2025 14:52:52 +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 51AEqpJJ028275; Mon, 10 Feb 2025 14:52:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 51AEqpn0028272; Mon, 10 Feb 2025 14:52:51 GMT (envelope-from git) Date: Mon, 10 Feb 2025 14:52:51 GMT Message-Id: <202502101452.51AEqpn0028272@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: 1a7956f64b5c - stable/14 - LinuxKPI: 802.11: implement ieee80211_get_{he,eht}_iftype_cap{,_vif} 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/stable/14 X-Git-Reftype: branch X-Git-Commit: 1a7956f64b5cbe912acd49729e18f1f6c1e05607 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=1a7956f64b5cbe912acd49729e18f1f6c1e05607 commit 1a7956f64b5cbe912acd49729e18f1f6c1e05607 Author: Bjoern A. Zeeb AuthorDate: 2025-01-25 11:46:58 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-02-10 14:52:10 +0000 LinuxKPI: 802.11: implement ieee80211_get_{he,eht}_iftype_cap{,_vif} Implement the combination of all four functions, the *_vif versions from mac80211.h as a wrapper to the non-*_vif ones in cfg80211.h. Put the function pairs next to each other and in the right files and harmonize argument naming, etc. Both of them have shown up too often in the todo-tracing to bother enough to implement them now for a time in the future when we will support HE/EHT. Sponsored by: The FreeBSD Foundation (cherry picked from commit c75a558d0729da87ee3c016b57cc8f5ac4fc65d0) --- sys/compat/linuxkpi/common/include/net/cfg80211.h | 34 +++++++++++++++++++++-- sys/compat/linuxkpi/common/include/net/mac80211.h | 26 ++++++++--------- 2 files changed, 42 insertions(+), 18 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/net/cfg80211.h b/sys/compat/linuxkpi/common/include/net/cfg80211.h index 7780b265cf6b..0b6a66033536 100644 --- a/sys/compat/linuxkpi/common/include/net/cfg80211.h +++ b/sys/compat/linuxkpi/common/include/net/cfg80211.h @@ -2073,12 +2073,40 @@ ieee80211_get_sband_iftype_data(const struct ieee80211_supported_band *band, return (NULL); } -static __inline const struct ieee80211_sta_eht_cap * +static inline const struct ieee80211_sta_he_cap * +ieee80211_get_he_iftype_cap(const struct ieee80211_supported_band *band, + enum nl80211_iftype iftype) +{ + const struct ieee80211_sband_iftype_data *iftype_data; + const struct ieee80211_sta_he_cap *he_cap; + + iftype_data = ieee80211_get_sband_iftype_data(band, iftype); + if (iftype_data == NULL) + return (NULL); + + he_cap = NULL; + if (iftype_data->he_cap.has_he) + he_cap = &iftype_data->he_cap; + + return (he_cap); +} + +static inline const struct ieee80211_sta_eht_cap * ieee80211_get_eht_iftype_cap(const struct ieee80211_supported_band *band, enum nl80211_iftype iftype) { - TODO(); - return (NULL); + const struct ieee80211_sband_iftype_data *iftype_data; + const struct ieee80211_sta_eht_cap *eht_cap; + + iftype_data = ieee80211_get_sband_iftype_data(band, iftype); + if (iftype_data == NULL) + return (NULL); + + eht_cap = NULL; + if (iftype_data->eht_cap.has_eht) + eht_cap = &iftype_data->eht_cap; + + return (eht_cap); } static inline bool diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index 3aa383554e93..891277e42541 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -1605,7 +1605,7 @@ ieee80211_csa_finish(struct ieee80211_vif *vif, uint32_t link_id) TODO(); } -static __inline enum nl80211_iftype +static inline enum nl80211_iftype ieee80211_vif_type_p2p(struct ieee80211_vif *vif) { @@ -2271,14 +2271,6 @@ ieee80211_channel_switch_disconnect(struct ieee80211_vif *vif, bool _x) TODO(); } -static __inline const struct ieee80211_sta_he_cap * -ieee80211_get_he_iftype_cap(const struct ieee80211_supported_band *band, - enum nl80211_iftype type) -{ - TODO(); - return (NULL); -} - static __inline void ieee80211_key_mic_failure(struct ieee80211_key_conf *key) { @@ -2427,20 +2419,24 @@ ieee80211_vif_is_mld(const struct ieee80211_vif *vif) return (vif->valid_links != 0); } -static __inline const struct ieee80211_sta_he_cap * +static inline const struct ieee80211_sta_he_cap * ieee80211_get_he_iftype_cap_vif(const struct ieee80211_supported_band *band, struct ieee80211_vif *vif) { - TODO(); - return (NULL); + enum nl80211_iftype iftype; + + iftype = ieee80211_vif_type_p2p(vif); + return (ieee80211_get_he_iftype_cap(band, iftype)); } -static __inline const struct ieee80211_sta_eht_cap * +static inline const struct ieee80211_sta_eht_cap * ieee80211_get_eht_iftype_cap_vif(const struct ieee80211_supported_band *band, struct ieee80211_vif *vif) { - TODO(); - return (NULL); + enum nl80211_iftype iftype; + + iftype = ieee80211_vif_type_p2p(vif); + return (ieee80211_get_eht_iftype_cap(band, iftype)); } static inline uint32_t