From nobody Tue Apr 05 19:11:52 2022 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 1061E1A8974F; Tue, 5 Apr 2022 19:11:53 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KXy1h6gprz3vrl; Tue, 5 Apr 2022 19:11:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649185912; 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=steuSRqPZwhiAZVymZqZaZYvTUgqWHR9LxFVMEmtDpI=; b=J3xZOtEdbsWVkbVLICZJUZtNXLMaii6xB0ydVo6mrv7cOp2w4q+PCOal6beOFDGtvO2No7 Eq9KNaeLqPAEgAOpnlLmuPHV7aY3aiqt/8ykD1/O4SQOdL9EhIhJTACAqyiqhUatPyX50q ocwhDHuPIM1qwhAVTQeCfb3hXoGaw/xce//5U5/CaqobQ1rdEhYGJ2UURPOnBLOlVRu+de 0HzdJx0fRuqRht19oTVHDehP4gm9XMIDn/SZx8nW4nbaJLqrTjuFCAfZwZOf+88LAoNaEs p6zxegpEg6DYLBH/4QXt6cHz/oBGckKuwbyhKxG30BVhgHmRh8ku3PmoqKHKrQ== 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 C55CF4167; Tue, 5 Apr 2022 19:11:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 235JBqiL097268; Tue, 5 Apr 2022 19:11:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 235JBq5w097267; Tue, 5 Apr 2022 19:11:52 GMT (envelope-from git) Date: Tue, 5 Apr 2022 19:11:52 GMT Message-Id: <202204051911.235JBq5w097267@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: 681b6a95f728 - releng/13.1 - LinuxKPI: 802.11: fix compat code for i386 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: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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/13.1 X-Git-Reftype: branch X-Git-Commit: 681b6a95f728fb78485f65bb98303d804e927f84 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649185912; 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=steuSRqPZwhiAZVymZqZaZYvTUgqWHR9LxFVMEmtDpI=; b=Nltgpqi1rZSWUB8/Zb36xrVpIAfLaAwDWUumxNmpoOL1WbWStckXMdfP9l4b75fMChUGFT uF0lojUu7daNmP+w4RzAMwJ7pCN+sczhzpzPwqWPYhrhaeZXwuPd+g1pkhhuGq3YeHZCYS ToFK6g9HyQ/+ugnCL2sWdnoNua9rwMQnnxleY0nGp70dILpom+qSS0vGpHoxqQBaqCN7u0 LFgfwvYoU8Ibufddxzp6X7E8FZ6/uq/XMvUxJWBXE8vpTWfRZ6AUVeyaef6Spu7TU/TH/f QVpjx5SxzsXtf+t0kbcu74Wey9hFbN4sHnaBgaOSG6HL07asbl//w2jrQGHv1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649185912; a=rsa-sha256; cv=none; b=d1CkO/skc5EodnGlwswgGKER0nBilWiouqf8abBgfiMjZ1HodZx71tfVBiW0zzTrwFg7ir /+37Gd5TiDvzE93uxGTS1WDWFy2CG3t91WR6RNP6R13olhNQpx1RVqDLQ1jq0CRalZcA6h eS5G7g9T1v27AwGn9eFO3T3csPNsGg/hRpikyr8Q+GPUVtgoupKm3C2gFxuPXdnz+q49wX T4XgO3UMmeDGri27S2Ng1/W4X82v0eZl3uOV9oQvRNfrPKIJNqgyRpHrlwLBiqXvOGqu5W jgjX8kAKV6FdJMaUHDLBQ9GFJxq9Baos33VktgI1SFme3thffbLDxt9UjpPspw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch releng/13.1 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=681b6a95f728fb78485f65bb98303d804e927f84 commit 681b6a95f728fb78485f65bb98303d804e927f84 Author: Bjoern A. Zeeb AuthorDate: 2022-03-31 17:29:53 +0000 Commit: Bjoern A. Zeeb CommitDate: 2022-04-05 19:11:00 +0000 LinuxKPI: 802.11: fix compat code for i386 Compiling another driver on i386 revealed two problems: - ieee80211_tx_info.status.status_driver_data space needs to be calculated. While a pointer is 32bit vm_paddr_t is 64 bit on i386 so we didn't fit more than one of these in but needed more space. - the arguments to ieee80211_txq_get_depth() are expected to unsigned long and not uint64_t. No user noticable changes. Sponsored by: The FreeBSD Foundation Approved by: re (gjb) (cherry picked from commit 86220d3cbd500b1018dcdabb0ba70644db438cfd) (cherry picked from commit 2a8e509ba30c6546ceeec49f9447c2e3d21a1d22) --- sys/compat/linuxkpi/common/include/net/mac80211.h | 9 +++++---- sys/compat/linuxkpi/common/src/linux_80211.c | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index 14404d4723f8..4e3342837ddc 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -670,7 +670,7 @@ struct ieee80211_tx_info { uint8_t antenna; uint16_t tx_time; bool is_valid_ack_signal; - void *status_driver_data[2]; /* XXX TODO */ + void *status_driver_data[16 / sizeof(void *)]; /* XXX TODO */ } status; #define IEEE80211_TX_INFO_DRIVER_DATA_SIZE (5 * sizeof(void *)) /* XXX TODO 5? */ void *driver_data[IEEE80211_TX_INFO_DRIVER_DATA_SIZE / sizeof(void *)]; @@ -900,8 +900,8 @@ struct sk_buff *linuxkpi_ieee80211_pspoll_get(struct ieee80211_hw *, struct ieee80211_vif *); struct sk_buff *linuxkpi_ieee80211_nullfunc_get(struct ieee80211_hw *, struct ieee80211_vif *, bool); -void linuxkpi_ieee80211_txq_get_depth(struct ieee80211_txq *, uint64_t *, - uint64_t *); +void linuxkpi_ieee80211_txq_get_depth(struct ieee80211_txq *, unsigned long *, + unsigned long *); struct wireless_dev *linuxkpi_ieee80211_vif_to_wdev(struct ieee80211_vif *); void linuxkpi_ieee80211_connection_loss(struct ieee80211_vif *); void linuxkpi_ieee80211_beacon_loss(struct ieee80211_vif *); @@ -1931,7 +1931,8 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info) } static __inline void -ieee80211_txq_get_depth(struct ieee80211_txq *txq, uint64_t *frame_cnt, uint64_t *byte_cnt) +ieee80211_txq_get_depth(struct ieee80211_txq *txq, unsigned long *frame_cnt, + unsigned long *byte_cnt) { if (frame_cnt == NULL && byte_cnt == NULL) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 3a70d8bbfcab..13ad2908c021 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -4007,11 +4007,11 @@ linuxkpi_ieee80211_tx_dequeue(struct ieee80211_hw *hw, void linuxkpi_ieee80211_txq_get_depth(struct ieee80211_txq *txq, - uint64_t *frame_cnt, uint64_t *byte_cnt) + unsigned long *frame_cnt, unsigned long *byte_cnt) { struct lkpi_txq *ltxq; struct sk_buff *skb; - uint64_t fc, bc; + unsigned long fc, bc; ltxq = TXQ_TO_LTXQ(txq);