git: 815fdbd497ff - stable/15 - iwx: Re-activate the 32-bit boundary cross check on 64-bit architectures
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 06 Mar 2026 17:20:36 UTC
The branch stable/15 has been updated by olce:
URL: https://cgit.FreeBSD.org/src/commit/?id=815fdbd497ff0355d88d42be8bbd2582ccba2b10
commit 815fdbd497ff0355d88d42be8bbd2582ccba2b10
Author: Olivier Certner <olce@FreeBSD.org>
AuthorDate: 2026-03-06 16:33:21 +0000
Commit: Olivier Certner <olce@FreeBSD.org>
CommitDate: 2026-03-06 17:19:59 +0000
iwx: Re-activate the 32-bit boundary cross check on 64-bit architectures
__SIZEOF_*__ is in bytes, not in bits...
Reported by: brooks
Fixes: 35da55c28dbb ("iwx: Fix 32-bit compilation")
MFC after: 1 minute
MFC to: stable/15
Sponsored by: The FreeBSD Foundation
(cherry picked from commit c1567d49a8320fd23dff9dbce1186f2331538253)
---
sys/dev/iwx/if_iwx.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sys/dev/iwx/if_iwx.c b/sys/dev/iwx/if_iwx.c
index 6d12de0753c0..727096cb6419 100644
--- a/sys/dev/iwx/if_iwx.c
+++ b/sys/dev/iwx/if_iwx.c
@@ -5776,7 +5776,7 @@ iwx_tx(struct iwx_softc *sc, struct mbuf *m, struct ieee80211_node *ni)
desc->tbs[0].tb_len = htole16(IWX_FIRST_TB_SIZE);
paddr = htole64(data->cmd_paddr);
memcpy(&desc->tbs[0].addr, &paddr, sizeof(paddr));
-#if __SIZEOF_SIZE_T__ > 32
+#if __SIZEOF_SIZE_T__ > 4
if (data->cmd_paddr >> 32 != (data->cmd_paddr +
le32toh(desc->tbs[0].tb_len)) >> 32)
DPRINTF(("%s: TB0 crosses 32bit boundary\n", __func__));
@@ -5786,7 +5786,7 @@ iwx_tx(struct iwx_softc *sc, struct mbuf *m, struct ieee80211_node *ni)
paddr = htole64(data->cmd_paddr + IWX_FIRST_TB_SIZE);
memcpy(&desc->tbs[1].addr, &paddr, sizeof(paddr));
-#if __SIZEOF_SIZE_T__ > 32
+#if __SIZEOF_SIZE_T__ > 4
if (data->cmd_paddr >> 32 != (data->cmd_paddr +
le32toh(desc->tbs[1].tb_len)) >> 32)
DPRINTF(("%s: TB1 crosses 32bit boundary\n", __func__));
@@ -5798,7 +5798,7 @@ iwx_tx(struct iwx_softc *sc, struct mbuf *m, struct ieee80211_node *ni)
desc->tbs[i + 2].tb_len = htole16(seg->ds_len);
paddr = htole64(seg->ds_addr);
memcpy(&desc->tbs[i + 2].addr, &paddr, sizeof(paddr));
-#if __SIZEOF_SIZE_T__ > 32
+#if __SIZEOF_SIZE_T__ > 4
if (data->cmd_paddr >> 32 != (data->cmd_paddr +
le32toh(desc->tbs[i + 2].tb_len)) >> 32)
DPRINTF(("%s: TB%d crosses 32bit boundary\n", __func__,