From nobody Fri Jan 31 23:53:42 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 4YlCQZ5Bbvz5m2vM; Fri, 31 Jan 2025 23:53:42 +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 4YlCQZ1Pqvz3xxx; Fri, 31 Jan 2025 23:53:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738367622; 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=laJPSBpwT3Ayw33uBShFaApDqLJwPC19iKB87zaltlo=; b=UDU+6j6TVnMMeWNdDhF2zkSN+Breoy0H8PuTF2NLRQ+0M6oTSk71fFBBfcFAL5Aj/g7xft XPLCQzjDlbQzXjJL7kzuMPF8Wu5vdEJhqAM3YsGhd/eTLNih/grq4nS7V2G23HnraNP3BB 9ra6FeokaXMqGi9fpOvlcNyEj6fK822Dk7rqRk4SJCv9uYaSbTirpTt5OBSwFSi8cQDsqq V/JMEIkRkRaWlj2xEvaP7T2VImK0yxEJtu7u9A7LPpvPXMF83ik34V3frPhX03DZpdfGeN QHK1uZEMAEBKccF7lVMaN/OyMv1MZhmKJhj2AgqxJ8OhPxrGd0p1IOSC1VOe4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738367622; 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=laJPSBpwT3Ayw33uBShFaApDqLJwPC19iKB87zaltlo=; b=SJDDBC5VHomDL1uIin3F+b4Yl7aNE4lmlg76kng0ZEY54/md+NMJVjt+R1qmgTgeKmoQtA 0bhffMNKn4M72fj+j2JwHUW5Lbhb34Y+qZSsnWZWciruolydh8gaEB97UhUYxbQb2KIN5I OVsuHKSybE6xGtE3aXxfl24WSKNEaLt+Azoge4BnBHo+inIbI6es6L/HnywX+Z70aFDUt8 f2Wm74cNRZwkuz/8cx0qWsaYo4QlcXxiUsdKyWfZNCLs/dqNULbFi+zkeZVYDvSZ8E/21y U0ZYHIc0pL9k4saslwktSrLna1BW+VclkFLcVTgSLCkF5M3YO+yW6CGyFtwonw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738367622; a=rsa-sha256; cv=none; b=Kda2oBHdxEqHGmTKCXuoCoqq7LjNoLs1Fo+vTtrx0EE0oZnLcl+AOpF6ExevYPMkPTfsl9 KUjJ2CKP6i1A2T3KuTr9/EuZl7aH6F7CDb22mn7F/eJkTV5zd3YN0YOczN6wKFnqBMgQoN oF2pezXB3ys8/IcFtdKxdl8JUOiqcs4fMyHfzAmkfZJiDO6hhEqTbfOSlaKe61b45ING2b Pw1Et141z/S5ploPbE/IQzbp/nKcoBMkxsnH+qfV0BcKsNPNS/2wnnlWs8ddX7n1d8TKwq XXB7mSBDayjgEK2wyY9Lhv04RHlVMgJq1WLxwJWg+/42f6OxzrsT0Q2Sq0aAqw== 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 4YlCQZ0rLVzgpV; Fri, 31 Jan 2025 23:53:42 +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 50VNrgpE016973; Fri, 31 Jan 2025 23:53:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50VNrgTp016970; Fri, 31 Jan 2025 23:53:42 GMT (envelope-from git) Date: Fri, 31 Jan 2025 23:53:42 GMT Message-Id: <202501312353.50VNrgTp016970@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: c75a558d0729 - main - LinuxKPI: 802.11: implement ieee80211_get_{he,eht}_iftype_cap{,_vif} 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: c75a558d0729da87ee3c016b57cc8f5ac4fc65d0 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=c75a558d0729da87ee3c016b57cc8f5ac4fc65d0 commit c75a558d0729da87ee3c016b57cc8f5ac4fc65d0 Author: Bjoern A. Zeeb AuthorDate: 2025-01-25 11:46:58 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-01-31 23:53:30 +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 MFC after: 3 days --- 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 fe36f1adf28a..68d135a441c1 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -1609,7 +1609,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) { @@ -2275,14 +2275,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) { @@ -2431,20 +2423,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