[Madwifi-cvs] revision 2906 committed
Status: Beta
Brought to you by:
otaku
From: Pavel R. <svn...@ma...> - 2007-11-21 22:44:35
|
Project : madwifi Revision : 2906 Author : proski (Pavel Roskin) Date : 2007-11-21 23:44:32 +0100 (Wed, 21 Nov 2007) Log Message : Use void* to keep an address, not u_int32_t Pointers don't fit u_int32_t on 64-bit systems. Besides, conversion from pointers to integers and vice versa should be generally avoided. Affected Files: * madwifi/trunk/ath/if_ath.c updated Modified: madwifi/trunk/ath/if_ath.c =================================================================== --- madwifi/trunk/ath/if_ath.c 2007-11-21 22:23:04 UTC (rev 2905) +++ madwifi/trunk/ath/if_ath.c 2007-11-21 22:44:32 UTC (rev 2906) @@ -11468,10 +11468,11 @@ ath_return_txbuf_locked(struct ath_softc *sc, struct ath_buf **buf) #endif /* #ifdef IEEE80211_DEBUG_REFCNT */ { - u_int32_t bufaddr = 0; + void *bufaddr; + if ((buf == NULL) || ((*buf) == NULL)) return; - bufaddr = (u_int32_t)*buf; + bufaddr = (void *)*buf; #ifdef IEEE80211_DEBUG_REFCNT cleanup_ath_buf_debug(sc, (*buf), BUS_DMA_TODEVICE, func, line); #else @@ -11483,8 +11484,7 @@ DPRINTF(sc, ATH_DEBUG_TXBUF, "[TXBUF=%03d/%03d] %s:%d -> %s:%d returned txbuf %p.\n", ath_get_buffer_count(), ATH_TXBUF, - func, line, __func__, __LINE__, - (void*)bufaddr); + func, line, __func__, __LINE__, bufaddr); #endif /* #ifdef IEEE80211_DEBUG_REFCNT */ if (sc->sc_devstopped) { ++sc->sc_reapcount; |