aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/s3c24xx/patches-2.6.24/1259-From-fa269b44512a03523b164c3cebc20312748c524b-Mon-Se.patch
blob: 58b7249a7c55062b617c4be4191617087bffb05d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
From 2f36cf3d6a324af5c43f9d6bfded95d7c1a9c532 Mon Sep 17 00:00:00 2001
From: Holger Freyther <zecke@openmoko.org>
Date: Thu, 7 Aug 2008 16:27:12 +0100
Subject: [PATCH] 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>
---
 drivers/sdio/function/wlan/ar6000/Makefile         |    4 ++--
 .../sdio/function/wlan/ar6000/ar6000/ar6000_drv.c  |   13 +++++++++++++
 .../sdio/function/wlan/ar6000/ar6000/debug_linux.h |    2 +-
 drivers/sdio/function/wlan/ar6000/hif/hif.c        |    2 +-
 drivers/sdio/function/wlan/ar6000/htc/htc_send.c   |    2 ++
 drivers/sdio/stack/busdriver/_busdriver.h          |    2 +-
 drivers/sdio/stack/busdriver/sdio_bus_misc.c       |    2 +-
 include/linux/sdio/ctsystem_linux.h                |    2 --
 8 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/drivers/sdio/function/wlan/ar6000/Makefile b/drivers/sdio/function/wlan/ar6000/Makefile
index 810dab6..4dc5109 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 dacc00a..93ed978 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 e62e960..c74e1df 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 3d6d792..469b5cc 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 7792dd6..fd5ef6e 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));
diff --git a/drivers/sdio/stack/busdriver/_busdriver.h b/drivers/sdio/stack/busdriver/_busdriver.h
index a85aed1..28d3960 100644
--- a/drivers/sdio/stack/busdriver/_busdriver.h
+++ b/drivers/sdio/stack/busdriver/_busdriver.h
@@ -301,7 +301,7 @@ static INLINE SDIO_STATUS CallHcdRequest(PSDHCD pHcd) {
             pHcd->pCurrentRequest->Flags |= SDREQ_FLAGS_FORCE_DEFERRED_COMPLETE;
         }
     }
- #if DEBUG
+ #ifdef DEBUG
     {
         SDIO_STATUS status;
         BOOL forceDeferred;
diff --git a/drivers/sdio/stack/busdriver/sdio_bus_misc.c b/drivers/sdio/stack/busdriver/sdio_bus_misc.c
index c5c7381..d89a596 100644
--- a/drivers/sdio/stack/busdriver/sdio_bus_misc.c
+++ b/drivers/sdio/stack/busdriver/sdio_bus_misc.c
@@ -1977,7 +1977,7 @@ SDIO_STATUS SDQuerySDMMCInfo(PSDDEVICE pDevice)
         } else {
             pDevice->pId[0].SDMMC_ManfacturerID = GET_SD_CID_MANFID(CID);
             pDevice->pId[0].SDMMC_OEMApplicationID = GET_SD_CID_OEMID(CID);
-#if DEBUG
+#ifdef DEBUG
             {
                 char pBuf[7];
 
diff --git a/include/linux/sdio/ctsystem_linux.h b/include/linux/sdio/ctsystem_linux.h
index c9e44f2..2aa4de3 100644
--- a/include/linux/sdio/ctsystem_linux.h
+++ b/include/linux/sdio/ctsystem_linux.h
@@ -202,8 +202,6 @@ typedef struct scatterlist SDDMA_DESCRIPTOR, *PSDDMA_DESCRIPTOR;
 
 #define DBG_SDIO_MASK (DBG_MASK_NONE | DBG_LEVEL_DEBUG)
 
-#define DEBUG 1
-
 #ifdef DEBUG
 
 #define DBG_ASSERT(test) \
-- 
1.5.6.5