diff options
author | Holger Freyther <zecke@openmoko.org> | 2008-11-19 17:10:46 +0000 |
---|---|---|
committer | Andy Green <agreen@pads.home.warmcat.com> | 2008-11-19 17:10:46 +0000 |
commit | e19cfdfa7f385ea2601a2faa582d2e78b88ab110 (patch) | |
tree | 74cd85692da3334ee672cbbd390e9666513a336e /drivers/sdio/function/wlan | |
parent | 7acb8fa9c7540a203cfd9b9ef01f737f16a42890 (diff) |
From fa269b44512a03523b164c3cebc20312748c524b Mon Sep 17 00:00:00 2001
Subject: [PATCH] [ar6k] Build the wireless driver without DEBUG
- Remove DEBUG from the Makefile
- Do not send events through netlink to userspace. We might
need to reevaluate this. But we seem to use wireless_send_event
at the right places.
(SEND_EVENT_TO_APP)
- Do not report debug logs to apps
(REPORT_DEBUG_LOGS_TO_APP)
Signed-Off-By: Holger Freyther <zecke@openmoko.org>
Diffstat (limited to 'drivers/sdio/function/wlan')
-rw-r--r-- | drivers/sdio/function/wlan/ar6000/Makefile | 4 | ||||
-rw-r--r-- | drivers/sdio/function/wlan/ar6000/ar6000/ar6000_drv.c | 13 | ||||
-rw-r--r-- | drivers/sdio/function/wlan/ar6000/ar6000/debug_linux.h | 2 | ||||
-rw-r--r-- | drivers/sdio/function/wlan/ar6000/hif/hif.c | 2 | ||||
-rw-r--r-- | drivers/sdio/function/wlan/ar6000/htc/htc_send.c | 2 |
5 files changed, 19 insertions, 4 deletions
diff --git a/drivers/sdio/function/wlan/ar6000/Makefile b/drivers/sdio/function/wlan/ar6000/Makefile index 810dab62fc5..4dc5109e3bd 100644 --- a/drivers/sdio/function/wlan/ar6000/Makefile +++ b/drivers/sdio/function/wlan/ar6000/Makefile @@ -4,8 +4,8 @@ PWD := $(shell pwd) EXTRA_CFLAGS += -I$(src)/include -EXTRA_CFLAGS += -DLINUX -DDEBUG -D__KERNEL__ -DHTC_RAW_INTERFACE\ - -DTCMD -DSEND_EVENT_TO_APP -DUSER_KEYS \ +EXTRA_CFLAGS += -DLINUX -D__KERNEL__ -DHTC_RAW_INTERFACE\ + -DTCMD -DUSER_KEYS \ -DNO_SYNC_FLUSH #\ -DMULTIPLE_FRAMES_PER_INTERRUPT -DAR6000REV$(REV) \ -DBLOCK_TX_PATH_FLAG \ diff --git a/drivers/sdio/function/wlan/ar6000/ar6000/ar6000_drv.c b/drivers/sdio/function/wlan/ar6000/ar6000/ar6000_drv.c index dacc00aedb5..93ed978ae81 100644 --- a/drivers/sdio/function/wlan/ar6000/ar6000/ar6000_drv.c +++ b/drivers/sdio/function/wlan/ar6000/ar6000/ar6000_drv.c @@ -155,6 +155,9 @@ MODULE_PARM(txcreditintrenable, "0-3i"); MODULE_PARM(txcreditintrenableaggregate, "0-3i"); #endif +#else +unsigned int resetok = 1; + #endif /* DEBUG */ unsigned int tx_attempt[HTC_MAILBOX_NUM_MAX] = {0}; @@ -265,7 +268,9 @@ static struct ar_cookie s_ar_cookie_mem[MAX_COOKIE_NUM]; * Flag to govern whether the debug logs should be parsed in the kernel * or reported to the application. */ +#ifdef DEBUG #define REPORT_DEBUG_LOGS_TO_APP +#endif A_STATUS ar6000_set_host_app_area(AR_SOFTC_T *ar) @@ -874,9 +879,11 @@ static void ar6000_target_failure(void *Instance, A_STATUS Status) sip = TRUE; errEvent.errorVal = WMI_TARGET_COM_ERR | WMI_TARGET_FATAL_ERR; +#ifdef SEND_EVENT_TO_APP ar6000_send_event_to_app(ar, WMI_ERROR_REPORT_EVENTID, (A_UINT8 *)&errEvent, sizeof(WMI_TARGET_ERROR_REPORT_EVENT)); +#endif } } } @@ -1026,9 +1033,11 @@ static void ar6000_detect_error(unsigned long ptr) ar->arHBChallengeResp.seqNum = 0; errEvent.errorVal = WMI_TARGET_COM_ERR | WMI_TARGET_FATAL_ERR; AR6000_SPIN_UNLOCK(&ar->arLock, 0); +#ifdef SEND_EVENT_TO_APP ar6000_send_event_to_app(ar, WMI_ERROR_REPORT_EVENTID, (A_UINT8 *)&errEvent, sizeof(WMI_TARGET_ERROR_REPORT_EVENT)); +#endif return; } @@ -2500,7 +2509,9 @@ ar6000_rssiThreshold_event(AR_SOFTC_T *ar, WMI_RSSI_THRESHOLD_VAL newThreshold, userRssiThold.tag = rssi_map[newThreshold].tag; userRssiThold.rssi = rssi; AR_DEBUG2_PRINTF("rssi Threshold range = %d tag = %d rssi = %d\n", newThreshold, userRssiThold.tag, rssi); +#ifdef SEND_EVENT_TO_APP ar6000_send_event_to_app(ar, WMI_RSSI_THRESHOLD_EVENTID,(A_UINT8 *)&userRssiThold, sizeof(USER_RSSI_THOLD)); +#endif } @@ -2509,8 +2520,10 @@ ar6000_hbChallengeResp_event(AR_SOFTC_T *ar, A_UINT32 cookie, A_UINT32 source) { if (source == APP_HB_CHALLENGE) { /* Report it to the app in case it wants a positive acknowledgement */ +#ifdef SEND_EVENT_TO_APP ar6000_send_event_to_app(ar, WMIX_HB_CHALLENGE_RESP_EVENTID, (A_UINT8 *)&cookie, sizeof(cookie)); +#endif } else { /* This would ignore the replys that come in after their due time */ if (cookie == ar->arHBChallengeResp.seqNum) { diff --git a/drivers/sdio/function/wlan/ar6000/ar6000/debug_linux.h b/drivers/sdio/function/wlan/ar6000/ar6000/debug_linux.h index e62e960c5a2..c74e1df9f45 100644 --- a/drivers/sdio/function/wlan/ar6000/ar6000/debug_linux.h +++ b/drivers/sdio/function/wlan/ar6000/ar6000/debug_linux.h @@ -77,7 +77,7 @@ enum { extern int debughtc; #else #define AR_DEBUG_PRINTF(flags, args) -#define AR_DEBUG_PRINTBUF(buffer, length) +#define AR_DEBUG_PRINTBUF(buffer, length, desc) #define AR_DEBUG_ASSERT(test) #define AR_DEBUG_LVL_CHECK(lvl) 0 #define A_DPRINTF(f, a) diff --git a/drivers/sdio/function/wlan/ar6000/hif/hif.c b/drivers/sdio/function/wlan/ar6000/hif/hif.c index 51711574fc9..d04486c35b0 100644 --- a/drivers/sdio/function/wlan/ar6000/hif/hif.c +++ b/drivers/sdio/function/wlan/ar6000/hif/hif.c @@ -86,9 +86,9 @@ static BUS_REQUEST *s_busRequestFreeQueue = NULL; OS_CRITICALSECTION lock; extern A_UINT32 onebitmode; extern A_UINT32 busspeedlow; -extern A_UINT32 debughif; #ifdef DEBUG +extern A_UINT32 debughif; #define ATH_DEBUG_ERROR 1 #define ATH_DEBUG_WARN 2 #define ATH_DEBUG_TRACE 3 diff --git a/drivers/sdio/function/wlan/ar6000/htc/htc_send.c b/drivers/sdio/function/wlan/ar6000/htc/htc_send.c index 7792dd68ab8..fd5ef6e2605 100644 --- a/drivers/sdio/function/wlan/ar6000/htc/htc_send.c +++ b/drivers/sdio/function/wlan/ar6000/htc/htc_send.c @@ -425,7 +425,9 @@ static void HTCFlushEndpointTX(HTC_TARGET *target, HTC_ENDPOINT *pEndpoint, HTC_ void DumpCreditDist(HTC_ENDPOINT_CREDIT_DIST *pEPDist) { +#ifdef DEBUG HTC_ENDPOINT *pEndpoint = (HTC_ENDPOINT *)pEPDist->pHTCReserved; +#endif AR_DEBUG_PRINTF(ATH_DEBUG_ANY, ("--- EP : %d ServiceID: 0x%X --------------\n", pEPDist->Endpoint, pEPDist->ServiceID)); |