The branch main has been updated by olce:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=c1567d49a8320fd23dff9dbce1186f2331538253

commit c1567d49a8320fd23dff9dbce1186f2331538253
Author:     Olivier Certner <[email protected]>
AuthorDate: 2026-03-06 16:33:21 +0000
Commit:     Olivier Certner <[email protected]>
CommitDate: 2026-03-06 17:14:25 +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
---
 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 ea1ba513734a..03ef775205e7 100644
--- a/sys/dev/iwx/if_iwx.c
+++ b/sys/dev/iwx/if_iwx.c
@@ -5819,7 +5819,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__));
@@ -5829,7 +5829,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__));
@@ -5841,7 +5841,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__,

Reply via email to