logo       
Google Custom Search
    AddThis Social Bookmark Button

revision 2666 committed: msg#00037

Subject: revision 2666 committed
Project     : madwifi
Revision    : 2666
Author      : mentor (Matthew W. S. Bell)
Date        : 2007-08-23 15:21:08 +0200 (Thu, 23 Aug 2007)

Log Message :
Print the calling MadWiFi function when debugging HAL register operations

Affected Files:
* trunk/ath/if_ath_hal.h                              updated             
* trunk/ath_hal/ah_os.c                               updated             
* trunk/ath_hal/ah_os.h                               updated             
* trunk/scripts/if_ath_hal_generator.pl               updated             


Modified: trunk/ath/if_ath_hal.h
===================================================================
--- trunk/ath/if_ath_hal.h      2007-08-22 23:43:51 UTC (rev 2665)
+++ trunk/ath/if_ath_hal.h      2007-08-23 13:21:08 UTC (rev 2666)
@@ -45,7 +45,9 @@
 static inline void ath_hal_getmac(struct ath_hal *ah, u_int8_t *a1)
 {
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ah->ah_getMacAddress(ah, a1);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
 }
 
@@ -53,21 +55,22 @@
 {
        HAL_POWER_MODE ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_getPowerMode(ah);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
 
-static inline HAL_BOOL ath_hal_getdiagstate(struct ath_hal *ah, int request,
-                                           const void *args, u_int32_t argsize,
-                                           void **result,
-                                           u_int32_t *resultsize)
+static inline HAL_BOOL ath_hal_getdiagstate(struct ath_hal *ah, int request, 
+               const void *args, u_int32_t argsize, void **result, 
+               u_int32_t *resultsize)
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
-       ret =
-           ah->ah_getDiagState(ah, request, args, argsize, *result,
-                               resultsize);
+       ath_hal_set_function(__func__);
+       ret = ah->ah_getDiagState(ah, request, args, argsize, *result, 
resultsize);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -75,15 +78,19 @@
 static inline void ath_hal_beaconreset(struct ath_hal *ah)
 {
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ah->ah_resetStationBeaconTimers(ah);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
 }
 
-static inline void ath_hal_setcoverageclass(struct ath_hal *ah, u_int8_t a1,
-                                           int a2)
+static inline void ath_hal_setcoverageclass(struct ath_hal *ah, u_int8_t a1, 
+               int a2)
 {
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ah->ah_setCoverageClass(ah, a1, a2);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
 }
 
@@ -91,7 +98,9 @@
 {
        u_int64_t ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_getTsf64(ah);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -99,7 +108,9 @@
 static inline void ath_hal_rxena(struct ath_hal *ah)
 {
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ah->ah_enableReceive(ah);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
 }
 
@@ -107,17 +118,21 @@
 {
        HAL_ANT_SETTING ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_getAntennaSwitch(ah);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
 
-static inline HAL_BOOL ath_hal_gpioset(struct ath_hal *ah, u_int32_t gpio,
-                                      u_int32_t val)
+static inline HAL_BOOL ath_hal_gpioset(struct ath_hal *ah, u_int32_t gpio, 
+               u_int32_t val)
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_gpioSet(ah, gpio, val);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -126,54 +141,65 @@
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_gpioCfgOutput(ah, gpio);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
 
-static inline HAL_BOOL ath_hal_clearmcastfilter(struct ath_hal *ah,
-                                               u_int32_t index)
+static inline HAL_BOOL ath_hal_clearmcastfilter(struct ath_hal *ah, 
+               u_int32_t index)
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_clrMulticastFilterIndex(ah, index);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
 
-static inline void ath_hal_txreqintrdesc(struct ath_hal *ah,
-                                        struct ath_desc *a1)
+static inline void ath_hal_txreqintrdesc(struct ath_hal *ah, 
+               struct ath_desc *a1)
 {
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ah->ah_reqTxIntrDesc(ah, a1);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
 }
 
-static inline void ath_hal_rxmonitor(struct ath_hal *ah,
-                                    const HAL_NODE_STATS *a1, HAL_CHANNEL *a2)
+static inline void ath_hal_rxmonitor(struct ath_hal *ah, 
+               const HAL_NODE_STATS *a1, HAL_CHANNEL *a2)
 {
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ah->ah_rxMonitor(ah, a1, a2);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
 }
 
-static inline HAL_BOOL ath_hal_puttxbuf(struct ath_hal *ah, u_int a1,
-                                       u_int32_t txdp)
+static inline HAL_BOOL ath_hal_puttxbuf(struct ath_hal *ah, u_int a1, 
+               u_int32_t txdp)
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_setTxDP(ah, a1, txdp);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
 
-static inline HAL_BOOL ath_hal_keyset(struct ath_hal *ah, u_int16_t a1,
-                                     const HAL_KEYVAL *a2, const u_int8_t *a3,
-                                     int a4)
+static inline HAL_BOOL ath_hal_keyset(struct ath_hal *ah, u_int16_t a1, 
+               const HAL_KEYVAL *a2, const u_int8_t *a3, int a4)
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_setKeyCacheEntry(ah, a1, a2, a3, a4);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -181,7 +207,9 @@
 static inline void ath_hal_setopmode(struct ath_hal *ah)
 {
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ah->ah_setPCUConfig(ah);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
 }
 
@@ -189,16 +217,20 @@
 {
        HAL_RFGAIN ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_getRfGain(ah);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
 
-static inline void ath_hal_setmcastfilter(struct ath_hal *ah, u_int32_t 
filter0,
-                                         u_int32_t filter1)
+static inline void ath_hal_setmcastfilter(struct ath_hal *ah, 
+               u_int32_t filter0, u_int32_t filter1)
 {
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ah->ah_setMulticastFilter(ah, filter0, filter1);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
 }
 
@@ -206,16 +238,20 @@
 {
        u_int ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_getAckTimeout(ah);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
 
-static inline void ath_hal_beacontimers(struct ath_hal *ah,
-                                       const HAL_BEACON_STATE *a1)
+static inline void ath_hal_beacontimers(struct ath_hal *ah, 
+               const HAL_BEACON_STATE *a1)
 {
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ah->ah_setStationBeaconTimers(ah, a1);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
 }
 
@@ -223,7 +259,9 @@
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_detectCardPresent(ah);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -232,24 +270,30 @@
 {
        u_int ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_getSlotTime(ah);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
 
-static inline void ath_hal_beaconinit(struct ath_hal *ah, u_int32_t nexttbtt,
-                                     u_int32_t intval)
+static inline void ath_hal_beaconinit(struct ath_hal *ah, u_int32_t nexttbtt, 
+               u_int32_t intval)
 {
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ah->ah_beaconInit(ah, nexttbtt, intval);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
 }
 
-static inline void ath_hal_gpiosetintr(struct ath_hal *ah, u_int a1,
-                                      u_int32_t a2)
+static inline void ath_hal_gpiosetintr(struct ath_hal *ah, u_int a1, 
+               u_int32_t a2)
 {
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ah->ah_gpioSetIntr(ah, a1, a2);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
 }
 
@@ -257,28 +301,33 @@
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_releaseTxQueue(ah, q);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
 
-static inline HAL_BOOL ath_hal_keysetmac(struct ath_hal *ah, u_int16_t a1,
-                                        const u_int8_t *a2)
+static inline HAL_BOOL ath_hal_keysetmac(struct ath_hal *ah, u_int16_t a1, 
+               const u_int8_t *a2)
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_setKeyCacheEntryMac(ah, a1, a2);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
 
-static inline HAL_STATUS ath_hal_txprocdesc(struct ath_hal *ah,
-                                           struct ath_desc *a1,
-                                           struct ath_tx_status *a2)
+static inline HAL_STATUS ath_hal_txprocdesc(struct ath_hal *ah, 
+               struct ath_desc *a1, struct ath_tx_status *a2)
 {
        HAL_STATUS ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_procTxDesc(ah, a1, a2);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -287,7 +336,9 @@
 {
        HAL_INT ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_getInterrupts(ah);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -296,17 +347,21 @@
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_setAckTimeout(ah, a1);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
 
-static inline HAL_BOOL ath_hal_setbssidmask(struct ath_hal *ah,
-                                           const u_int8_t *a1)
+static inline HAL_BOOL ath_hal_setbssidmask(struct ath_hal *ah, 
+               const u_int8_t *a1)
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_setBssIdMask(ah, a1);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -315,7 +370,9 @@
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_setAckCTSRate(ah, a1);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -324,17 +381,21 @@
 {
        u_int32_t ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_getRxFilter(ah);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
 
-static inline int16_t ath_hal_get_channel_noise(struct ath_hal *ah,
-                                               HAL_CHANNEL *a1)
+static inline int16_t ath_hal_get_channel_noise(struct ath_hal *ah, 
+               HAL_CHANNEL *a1)
 {
        int16_t ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_getChanNoise(ah, a1);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -343,27 +404,33 @@
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_resetKeyCacheEntry(ah, a1);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
 
-static inline HAL_BOOL ath_hal_setantennaswitch(struct ath_hal *ah,
-                                               HAL_ANT_SETTING a1)
+static inline HAL_BOOL ath_hal_setantennaswitch(struct ath_hal *ah, 
+               HAL_ANT_SETTING a1)
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_setAntennaSwitch(ah, a1);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
 
-static inline HAL_BOOL ath_hal_settxqueueprops(struct ath_hal *ah, int q,
-                                              const HAL_TXQ_INFO *qInfo)
+static inline HAL_BOOL ath_hal_settxqueueprops(struct ath_hal *ah, int q, 
+               const HAL_TXQ_INFO *qInfo)
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_setTxQueueProps(ah, q, qInfo);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -371,49 +438,57 @@
 static inline void ath_hal_putrxbuf(struct ath_hal *ah, u_int32_t rxdp)
 {
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ah->ah_setRxDP(ah, rxdp);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
 }
 
-static inline HAL_BOOL ath_hal_reset(struct ath_hal *ah, HAL_OPMODE a1,
-                                    HAL_CHANNEL *a2, HAL_BOOL bChannelChange,
-                                    HAL_STATUS *status)
+static inline HAL_BOOL ath_hal_reset(struct ath_hal *ah, HAL_OPMODE a1, 
+               HAL_CHANNEL *a2, HAL_BOOL bChannelChange, HAL_STATUS *status)
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_reset(ah, a1, a2, bChannelChange, status);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
 
-static inline HAL_BOOL ath_hal_setdecompmask(struct ath_hal *ah, u_int16_t a1,
-                                            int a2)
+static inline HAL_BOOL ath_hal_setdecompmask(struct ath_hal *ah, u_int16_t a1, 
+               int a2)
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_setDecompMask(ah, a1, a2);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
 
-static inline HAL_BOOL ath_hal_gettxqueueprops(struct ath_hal *ah, int q,
-                                              HAL_TXQ_INFO *qInfo)
+static inline HAL_BOOL ath_hal_gettxqueueprops(struct ath_hal *ah, int q, 
+               HAL_TXQ_INFO *qInfo)
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_getTxQueueProps(ah, q, qInfo);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
 
-static inline HAL_BOOL ath_hal_filltxdesc(struct ath_hal *ah,
-                                         struct ath_desc *a1, u_int segLen,
-                                         HAL_BOOL firstSeg, HAL_BOOL lastSeg,
-                                         const struct ath_desc *a5)
+static inline HAL_BOOL ath_hal_filltxdesc(struct ath_hal *ah, 
+               struct ath_desc *a1, u_int segLen, HAL_BOOL firstSeg, 
+               HAL_BOOL lastSeg, const struct ath_desc *a5)
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_fillTxDesc(ah, a1, segLen, firstSeg, lastSeg, a5);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -422,7 +497,9 @@
 {
        u_int32_t ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_numTxPending(ah, q);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -430,37 +507,42 @@
 static inline void ath_hal_startpcurecv(struct ath_hal *ah)
 {
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ah->ah_startPcuReceive(ah);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
 }
 
 static inline void ath_hal_setdefantenna(struct ath_hal *ah, u_int a1)
 {
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ah->ah_setDefAntenna(ah, a1);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
 }
 
-static inline HAL_BOOL ath_hal_setpower(struct ath_hal *ah, HAL_POWER_MODE 
mode,
-                                       int setChip)
+static inline HAL_BOOL ath_hal_setpower(struct ath_hal *ah, 
+               HAL_POWER_MODE mode, int setChip)
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_setPowerMode(ah, mode, setChip);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
 
-static inline HAL_STATUS ath_hal_rxprocdesc(struct ath_hal *ah,
-                                           struct ath_desc *a1,
-                                           u_int32_t phyAddr,
-                                           struct ath_desc *next,
-                                           u_int64_t tsf,
-                                           struct ath_rx_status *a5)
+static inline HAL_STATUS ath_hal_rxprocdesc(struct ath_hal *ah, 
+               struct ath_desc *a1, u_int32_t phyAddr, struct ath_desc *next, 
+               u_int64_t tsf, struct ath_rx_status *a5)
 {
        HAL_STATUS ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_procRxDesc(ah, a1, phyAddr, next, tsf, a5);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -469,7 +551,9 @@
 {
        u_int ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_getAckCTSRate(ah);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -478,22 +562,23 @@
 {
        u_int32_t ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_getKeyCacheSize(ah);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
 
-static inline HAL_BOOL ath_hal_setupxtxdesc(struct ath_hal *ah,
-                                           struct ath_desc *a1, u_int txRate1,
-                                           u_int txTries1, u_int txRate2,
-                                           u_int txTries2, u_int txRate3,
-                                           u_int txTries3)
+static inline HAL_BOOL ath_hal_setupxtxdesc(struct ath_hal *ah, 
+               struct ath_desc *a1, u_int txRate1, u_int txTries1, 
+               u_int txRate2, u_int txTries2, u_int txRate3, u_int txTries3)
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
-       ret =
-           ah->ah_setupXTxDesc(ah, a1, txRate1, txTries1, txRate2, txTries2,
-                               txRate3, txTries3);
+       ath_hal_set_function(__func__);
+       ret = ah->ah_setupXTxDesc(ah, a1, txRate1, txTries1, txRate2, txTries2, 
+                       txRate3, txTries3);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -502,7 +587,9 @@
 {
        HAL_INT ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_setInterrupts(ah, a1);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -511,25 +598,31 @@
 {
        u_int ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_getCTSTimeout(ah);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
 
-static inline void ath_hal_updatemibcounters(struct ath_hal *ah,
-                                            HAL_MIB_STATS *a1)
+static inline void ath_hal_updatemibcounters(struct ath_hal *ah, 
+               HAL_MIB_STATS *a1)
 {
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ah->ah_updateMibCounters(ah, a1);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
 }
 
-static inline HAL_BOOL ath_hal_calibrate(struct ath_hal *ah, HAL_CHANNEL *a1,
-                                        HAL_BOOL *a2)
+static inline HAL_BOOL ath_hal_calibrate(struct ath_hal *ah, HAL_CHANNEL *a1, 
+               HAL_BOOL *a2)
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_perCalibration(ah, a1, a2);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -538,7 +631,9 @@
 {
        u_int32_t ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_getRxDP(ah);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -547,7 +642,9 @@
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_setTxPowerLimit(ah, a1);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -556,17 +653,21 @@
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_getPendingInterrupts(ah, a1);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
 
-static inline HAL_BOOL ath_hal_updatetxtriglevel(struct ath_hal *ah,
-                                                HAL_BOOL incTrigLevel)
+static inline HAL_BOOL ath_hal_updatetxtriglevel(struct ath_hal *ah, 
+               HAL_BOOL incTrigLevel)
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_updateTxTrigLevel(ah, incTrigLevel);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -575,7 +676,9 @@
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_resetTxQueue(ah, q);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -584,7 +687,9 @@
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_setMacAddress(ah, a1);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -593,17 +698,21 @@
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_setCTSTimeout(ah, a1);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
 
-static inline const HAL_RATE_TABLE *ath_hal_getratetable(struct ath_hal *ah,
-                                                        u_int mode)
+static inline const HAL_RATE_TABLE *ath_hal_getratetable(struct ath_hal *ah, 
+               u_int mode)
 {
        const HAL_RATE_TABLE *ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_getRateTable(ah, mode);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -612,35 +721,42 @@
 {
        u_int32_t ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_getTsf32(ah);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
 
-static inline void ath_hal_mibevent(struct ath_hal *ah,
-                                   const HAL_NODE_STATS *a1)
+static inline void ath_hal_mibevent(struct ath_hal *ah, 
+               const HAL_NODE_STATS *a1)
 {
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ah->ah_procMibEvent(ah, a1);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
 }
 
-static inline void ath_hal_setbeacontimers(struct ath_hal *ah,
-                                          const HAL_BEACON_TIMERS *a1)
+static inline void ath_hal_setbeacontimers(struct ath_hal *ah, 
+               const HAL_BEACON_TIMERS *a1)
 {
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ah->ah_setBeaconTimers(ah, a1);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
 }
 
-static inline HAL_STATUS ath_hal_getcapability(struct ath_hal *ah,
-                                              HAL_CAPABILITY_TYPE a1,
-                                              u_int32_t capability,
-                                              u_int32_t *result)
+static inline HAL_STATUS ath_hal_getcapability(struct ath_hal *ah, 
+               HAL_CAPABILITY_TYPE a1, u_int32_t capability, 
+               u_int32_t *result)
 {
        HAL_STATUS ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_getCapability(ah, a1, capability, result);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -649,17 +765,21 @@
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_radarWait(ah, a1);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
 
-static inline HAL_BOOL ath_hal_setmcastfilterindex(struct ath_hal *ah,
-                                                  u_int32_t index)
+static inline HAL_BOOL ath_hal_setmcastfilterindex(struct ath_hal *ah, 
+               u_int32_t index)
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_setMulticastFilterIndex(ah, index);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -667,7 +787,9 @@
 static inline void ath_hal_getbssidmask(struct ath_hal *ah, u_int8_t *a1)
 {
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ah->ah_getBssIdMask(ah, a1);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
 }
 
@@ -675,7 +797,9 @@
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_isInterruptPending(ah);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -684,7 +808,9 @@
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_startTxDma(ah, a1);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -692,7 +818,9 @@
 static inline void ath_hal_gettxintrtxqs(struct ath_hal *ah, u_int32_t *a1)
 {
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ah->ah_getTxIntrQueue(ah, a1);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
 }
 
@@ -700,7 +828,9 @@
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_setSlotTime(ah, a1);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -708,32 +838,39 @@
 static inline void ath_hal_setledstate(struct ath_hal *ah, HAL_LED_STATE a1)
 {
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ah->ah_setLedState(ah, a1);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
 }
 
-static inline void ath_hal_setassocid(struct ath_hal *ah, const u_int8_t 
*bssid,
-                                     u_int16_t assocId)
+static inline void ath_hal_setassocid(struct ath_hal *ah, 
+               const u_int8_t *bssid, u_int16_t assocId)
 {
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ah->ah_writeAssocid(ah, bssid, assocId);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
 }
 
 static inline void ath_hal_resettsf(struct ath_hal *ah)
 {
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ah->ah_resetTsf(ah);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
 }
 
-static inline HAL_BOOL ath_hal_setuprxdesc(struct ath_hal *ah,
-                                          struct ath_desc *a1, u_int32_t size,
-                                          u_int flags)
+static inline HAL_BOOL ath_hal_setuprxdesc(struct ath_hal *ah, 
+               struct ath_desc *a1, u_int32_t size, u_int flags)
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_setupRxDesc(ah, a1, size, flags);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -741,7 +878,9 @@
 static inline void ath_hal_setrxfilter(struct ath_hal *ah, u_int32_t a1)
 {
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ah->ah_setRxFilter(ah, a1);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
 }
 
@@ -749,7 +888,9 @@
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_isKeyCacheEntryValid(ah, a1);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -757,7 +898,9 @@
 static inline void ath_hal_stoppcurecv(struct ath_hal *ah)
 {
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ah->ah_stopPcuReceive(ah);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
 }
 
@@ -765,19 +908,22 @@
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_stopTxDma(ah, a1);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
 
-static inline HAL_BOOL ath_hal_setcapability(struct ath_hal *ah,
-                                            HAL_CAPABILITY_TYPE a1,
-                                            u_int32_t capability,
-                                            u_int32_t setting, HAL_STATUS *a4)
+static inline HAL_BOOL ath_hal_setcapability(struct ath_hal *ah, 
+               HAL_CAPABILITY_TYPE a1, u_int32_t capability, 
+               u_int32_t setting, HAL_STATUS *a4)
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_setCapability(ah, a1, capability, setting, a4);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -786,7 +932,9 @@
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_stopDmaReceive(ah);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -795,17 +943,21 @@
 {
        u_int32_t ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_getTxDP(ah, a1);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
 
-static inline int ath_hal_setuptxqueue(struct ath_hal *ah, HAL_TX_QUEUE a1,
-                                      const HAL_TXQ_INFO *qInfo)
+static inline int ath_hal_setuptxqueue(struct ath_hal *ah, HAL_TX_QUEUE a1, 
+               const HAL_TXQ_INFO *qInfo)
 {
        int ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_setupTxQueue(ah, a1, qInfo);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -814,7 +966,9 @@
 {
        u_int ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_getDefAntenna(ah);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -823,38 +977,39 @@
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_phyDisable(ah);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
 
-static inline HAL_BOOL ath_hal_setregulatorydomain(struct ath_hal *ah,
-                                                  u_int16_t a1, HAL_STATUS *a2)
+static inline HAL_BOOL ath_hal_setregulatorydomain(struct ath_hal *ah, 
+               u_int16_t a1, HAL_STATUS *a2)
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_setRegulatoryDomain(ah, a1, a2);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
 
-static inline HAL_BOOL ath_hal_setuptxdesc(struct ath_hal *ah,
-                                          struct ath_desc *a1, u_int pktLen,
-                                          u_int hdrLen, HAL_PKT_TYPE type,
-                                          u_int txPower, u_int txRate0,
-                                          u_int txTries0, u_int keyIx,
-                                          u_int antMode, u_int flags,
-                                          u_int rtsctsRate,
-                                          u_int rtsctsDuration,
-                                          u_int compicvLen, u_int compivLen,
-                                          u_int comp)
+static inline HAL_BOOL ath_hal_setuptxdesc(struct ath_hal *ah, 
+               struct ath_desc *a1, u_int pktLen, u_int hdrLen, 
+               HAL_PKT_TYPE type, u_int txPower, u_int txRate0, 
+               u_int txTries0, u_int keyIx, u_int antMode, u_int flags, 
+               u_int rtsctsRate, u_int rtsctsDuration, u_int compicvLen, 
+               u_int compivLen, u_int comp)
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
-       ret =
-           ah->ah_setupTxDesc(ah, a1, pktLen, hdrLen, type, txPower, txRate0,
-                              txTries0, keyIx, antMode, flags, rtsctsRate,
-                              rtsctsDuration, compicvLen, compivLen, comp);
+       ath_hal_set_function(__func__);
+       ret = ah->ah_setupTxDesc(ah, a1, pktLen, hdrLen, type, txPower, 
+                       txRate0, txTries0, keyIx, antMode, flags, rtsctsRate, 
+                       rtsctsDuration, compicvLen, compivLen, comp);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -863,7 +1018,9 @@
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_gpioCfgInput(ah, gpio);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -872,7 +1029,9 @@
 {
        u_int32_t ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_gpioGet(ah, gpio);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }
@@ -881,7 +1040,9 @@
 {
        HAL_BOOL ret;
        ATH_HAL_LOCK_IRQ(ah->ah_sc);
+       ath_hal_set_function(__func__);
        ret = ah->ah_disable(ah);
+       ath_hal_set_function(NULL);
        ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
        return ret;
 }

Modified: trunk/ath_hal/ah_os.c
===================================================================
--- trunk/ath_hal/ah_os.c       2007-08-22 23:43:51 UTC (rev 2665)
+++ trunk/ath_hal/ah_os.c       2007-08-23 13:21:08 UTC (rev 2666)
@@ -321,6 +321,19 @@
 }
 EXPORT_SYMBOL(OS_MARK);
 #elif defined(AH_DEBUG) || defined(AH_REGOPS_FUNC)
+
+#ifdef AH_DEBUG
+/* Store the current function name (should be called by wrapper functions)
+ * useful for debugging and figuring out, which hal function sets which 
+ * registers */
+static char *ath_hal_func = NULL;
+void ath_hal_set_function(const char *name)
+{
+       ath_hal_func = (char *)name;
+}
+EXPORT_SYMBOL(ath_hal_set_function);
+#endif
+
 /*
  * Memory-mapped device register read/write.  These are here
  * as routines when debugging support is enabled and/or when
@@ -338,15 +351,14 @@
 {
 #ifdef AH_DEBUG
        if (ath_hal_debug > 1)
-               ath_hal_printf(ah, "WRITE 0x%x <= 0x%x\n", reg, val);
+               ath_hal_printf(ah, "%s: WRITE 0x%x <= 0x%x\n", 
+                               (ath_hal_func ?: "unknown"), reg, val);
 #endif
        _OS_REG_WRITE(ah, reg, val);
 }
 EXPORT_SYMBOL(ath_hal_reg_write);
 
-/* 
-This should only be called while holding the lock, sc->sc_hal_lock.
-*/
+/* This should only be called while holding the lock, sc->sc_hal_lock. */
 u_int32_t __ahdecl
 ath_hal_reg_read(struct ath_hal *ah, u_int reg)
 {
@@ -355,7 +367,8 @@
        val = _OS_REG_READ(ah, reg);
 #ifdef AH_DEBUG
        if (ath_hal_debug > 1)
-               ath_hal_printf(ah, "READ 0x%x => 0x%x\n", reg, val);
+               ath_hal_printf(ah, "%s: READ 0x%x => 0x%x\n", 
+                               (ath_hal_func ?: "unknown"), reg, val);
 #endif
        return val;
 }

Modified: trunk/ath_hal/ah_os.h
===================================================================
--- trunk/ath_hal/ah_os.h       2007-08-22 23:43:51 UTC (rev 2665)
+++ trunk/ath_hal/ah_os.h       2007-08-23 13:21:08 UTC (rev 2666)
@@ -226,6 +226,12 @@
 #define OS_REG_READ(_ah, _reg)         _OS_REG_READ(_ah, _reg)
 #endif /* AH_DEBUG || AH_REGFUNC || AH_DEBUG_ALQ */
 
+#if defined(AH_DEBUG)
+static inline void ath_hal_set_function(const char *name);
+#else
+static inline void ath_hal_set_function(const char *name) { }
+#endif
+
 #ifdef AH_DEBUG_ALQ
 extern void __ahdecl OS_MARK(struct ath_hal *, u_int id, u_int32_t value);
 #else

Modified: trunk/scripts/if_ath_hal_generator.pl
===================================================================
--- trunk/scripts/if_ath_hal_generator.pl       2007-08-22 23:43:51 UTC (rev 
2665)
+++ trunk/scripts/if_ath_hal_generator.pl       2007-08-23 13:21:08 UTC (rev 
2666)
@@ -329,6 +329,7 @@
             print OUTPUT "\n\t" . format_type($api_return_type) . "ret;";
         }
         print OUTPUT "\n\tATH_HAL_LOCK_IRQ(ah->ah_sc);";
+        print OUTPUT "\n\tath_hal_set_function(__func__);";
         print OUTPUT "\n\t";
         if ( !$ret_void ) {
             print OUTPUT "ret = ";
@@ -342,6 +343,7 @@
             print OUTPUT $names[$j];
         }
         print OUTPUT ");";
+        print OUTPUT "\n\tath_hal_set_function(NULL);";
         print OUTPUT "\n\tATH_HAL_UNLOCK_IRQ(ah->ah_sc);";
         if ( !$ret_void ) {
             print OUTPUT "\n\treturn ret;";

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/



Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>