changed Makefile and profiles, added patches for kernel 2.6.24
[openwrt.git] / target / linux / s3c24xx / patches-2.6.24 / 1259-From-fa269b44512a03523b164c3cebc20312748c524b-Mon-Se.patch
1 From 2f36cf3d6a324af5c43f9d6bfded95d7c1a9c532 Mon Sep 17 00:00:00 2001
2 From: Holger Freyther <zecke@openmoko.org>
3 Date: Thu, 7 Aug 2008 16:27:12 +0100
4 Subject: [PATCH] From fa269b44512a03523b164c3cebc20312748c524b Mon Sep 17 00:00:00 2001
5 Subject: [PATCH] [ar6k] Build the wireless driver without DEBUG
6 - Remove DEBUG from the Makefile
7
8 - Do not send events through netlink to userspace. We might
9 need to reevaluate this. But we seem to use wireless_send_event
10 at the right places.
11 (SEND_EVENT_TO_APP)
12
13 - Do not report debug logs to apps
14 (REPORT_DEBUG_LOGS_TO_APP)
15
16 Signed-Off-By: Holger Freyther <zecke@openmoko.org>
17 ---
18 drivers/sdio/function/wlan/ar6000/Makefile | 4 ++--
19 .../sdio/function/wlan/ar6000/ar6000/ar6000_drv.c | 13 +++++++++++++
20 .../sdio/function/wlan/ar6000/ar6000/debug_linux.h | 2 +-
21 drivers/sdio/function/wlan/ar6000/hif/hif.c | 2 +-
22 drivers/sdio/function/wlan/ar6000/htc/htc_send.c | 2 ++
23 drivers/sdio/stack/busdriver/_busdriver.h | 2 +-
24 drivers/sdio/stack/busdriver/sdio_bus_misc.c | 2 +-
25 include/linux/sdio/ctsystem_linux.h | 2 --
26 8 files changed, 21 insertions(+), 8 deletions(-)
27
28 diff --git a/drivers/sdio/function/wlan/ar6000/Makefile b/drivers/sdio/function/wlan/ar6000/Makefile
29 index 810dab6..4dc5109 100644
30 --- a/drivers/sdio/function/wlan/ar6000/Makefile
31 +++ b/drivers/sdio/function/wlan/ar6000/Makefile
32 @@ -4,8 +4,8 @@ PWD := $(shell pwd)
33
34 EXTRA_CFLAGS += -I$(src)/include
35
36 -EXTRA_CFLAGS += -DLINUX -DDEBUG -D__KERNEL__ -DHTC_RAW_INTERFACE\
37 - -DTCMD -DSEND_EVENT_TO_APP -DUSER_KEYS \
38 +EXTRA_CFLAGS += -DLINUX -D__KERNEL__ -DHTC_RAW_INTERFACE\
39 + -DTCMD -DUSER_KEYS \
40 -DNO_SYNC_FLUSH #\
41 -DMULTIPLE_FRAMES_PER_INTERRUPT -DAR6000REV$(REV) \
42 -DBLOCK_TX_PATH_FLAG \
43 diff --git a/drivers/sdio/function/wlan/ar6000/ar6000/ar6000_drv.c b/drivers/sdio/function/wlan/ar6000/ar6000/ar6000_drv.c
44 index dacc00a..93ed978 100644
45 --- a/drivers/sdio/function/wlan/ar6000/ar6000/ar6000_drv.c
46 +++ b/drivers/sdio/function/wlan/ar6000/ar6000/ar6000_drv.c
47 @@ -155,6 +155,9 @@ MODULE_PARM(txcreditintrenable, "0-3i");
48 MODULE_PARM(txcreditintrenableaggregate, "0-3i");
49 #endif
50
51 +#else
52 +unsigned int resetok = 1;
53 +
54 #endif /* DEBUG */
55
56 unsigned int tx_attempt[HTC_MAILBOX_NUM_MAX] = {0};
57 @@ -265,7 +268,9 @@ static struct ar_cookie s_ar_cookie_mem[MAX_COOKIE_NUM];
58 * Flag to govern whether the debug logs should be parsed in the kernel
59 * or reported to the application.
60 */
61 +#ifdef DEBUG
62 #define REPORT_DEBUG_LOGS_TO_APP
63 +#endif
64
65 A_STATUS
66 ar6000_set_host_app_area(AR_SOFTC_T *ar)
67 @@ -874,9 +879,11 @@ static void ar6000_target_failure(void *Instance, A_STATUS Status)
68 sip = TRUE;
69 errEvent.errorVal = WMI_TARGET_COM_ERR |
70 WMI_TARGET_FATAL_ERR;
71 +#ifdef SEND_EVENT_TO_APP
72 ar6000_send_event_to_app(ar, WMI_ERROR_REPORT_EVENTID,
73 (A_UINT8 *)&errEvent,
74 sizeof(WMI_TARGET_ERROR_REPORT_EVENT));
75 +#endif
76 }
77 }
78 }
79 @@ -1026,9 +1033,11 @@ static void ar6000_detect_error(unsigned long ptr)
80 ar->arHBChallengeResp.seqNum = 0;
81 errEvent.errorVal = WMI_TARGET_COM_ERR | WMI_TARGET_FATAL_ERR;
82 AR6000_SPIN_UNLOCK(&ar->arLock, 0);
83 +#ifdef SEND_EVENT_TO_APP
84 ar6000_send_event_to_app(ar, WMI_ERROR_REPORT_EVENTID,
85 (A_UINT8 *)&errEvent,
86 sizeof(WMI_TARGET_ERROR_REPORT_EVENT));
87 +#endif
88 return;
89 }
90
91 @@ -2500,7 +2509,9 @@ ar6000_rssiThreshold_event(AR_SOFTC_T *ar, WMI_RSSI_THRESHOLD_VAL newThreshold,
92 userRssiThold.tag = rssi_map[newThreshold].tag;
93 userRssiThold.rssi = rssi;
94 AR_DEBUG2_PRINTF("rssi Threshold range = %d tag = %d rssi = %d\n", newThreshold, userRssiThold.tag, rssi);
95 +#ifdef SEND_EVENT_TO_APP
96 ar6000_send_event_to_app(ar, WMI_RSSI_THRESHOLD_EVENTID,(A_UINT8 *)&userRssiThold, sizeof(USER_RSSI_THOLD));
97 +#endif
98 }
99
100
101 @@ -2509,8 +2520,10 @@ ar6000_hbChallengeResp_event(AR_SOFTC_T *ar, A_UINT32 cookie, A_UINT32 source)
102 {
103 if (source == APP_HB_CHALLENGE) {
104 /* Report it to the app in case it wants a positive acknowledgement */
105 +#ifdef SEND_EVENT_TO_APP
106 ar6000_send_event_to_app(ar, WMIX_HB_CHALLENGE_RESP_EVENTID,
107 (A_UINT8 *)&cookie, sizeof(cookie));
108 +#endif
109 } else {
110 /* This would ignore the replys that come in after their due time */
111 if (cookie == ar->arHBChallengeResp.seqNum) {
112 diff --git a/drivers/sdio/function/wlan/ar6000/ar6000/debug_linux.h b/drivers/sdio/function/wlan/ar6000/ar6000/debug_linux.h
113 index e62e960..c74e1df 100644
114 --- a/drivers/sdio/function/wlan/ar6000/ar6000/debug_linux.h
115 +++ b/drivers/sdio/function/wlan/ar6000/ar6000/debug_linux.h
116 @@ -77,7 +77,7 @@ enum {
117 extern int debughtc;
118 #else
119 #define AR_DEBUG_PRINTF(flags, args)
120 -#define AR_DEBUG_PRINTBUF(buffer, length)
121 +#define AR_DEBUG_PRINTBUF(buffer, length, desc)
122 #define AR_DEBUG_ASSERT(test)
123 #define AR_DEBUG_LVL_CHECK(lvl) 0
124 #define A_DPRINTF(f, a)
125 diff --git a/drivers/sdio/function/wlan/ar6000/hif/hif.c b/drivers/sdio/function/wlan/ar6000/hif/hif.c
126 index 3d6d792..469b5cc 100644
127 --- a/drivers/sdio/function/wlan/ar6000/hif/hif.c
128 +++ b/drivers/sdio/function/wlan/ar6000/hif/hif.c
129 @@ -86,9 +86,9 @@ static BUS_REQUEST *s_busRequestFreeQueue = NULL;
130 OS_CRITICALSECTION lock;
131 extern A_UINT32 onebitmode;
132 extern A_UINT32 busspeedlow;
133 -extern A_UINT32 debughif;
134
135 #ifdef DEBUG
136 +extern A_UINT32 debughif;
137 #define ATH_DEBUG_ERROR 1
138 #define ATH_DEBUG_WARN 2
139 #define ATH_DEBUG_TRACE 3
140 diff --git a/drivers/sdio/function/wlan/ar6000/htc/htc_send.c b/drivers/sdio/function/wlan/ar6000/htc/htc_send.c
141 index 7792dd6..fd5ef6e 100644
142 --- a/drivers/sdio/function/wlan/ar6000/htc/htc_send.c
143 +++ b/drivers/sdio/function/wlan/ar6000/htc/htc_send.c
144 @@ -425,7 +425,9 @@ static void HTCFlushEndpointTX(HTC_TARGET *target, HTC_ENDPOINT *pEndpoint, HTC_
145
146 void DumpCreditDist(HTC_ENDPOINT_CREDIT_DIST *pEPDist)
147 {
148 +#ifdef DEBUG
149 HTC_ENDPOINT *pEndpoint = (HTC_ENDPOINT *)pEPDist->pHTCReserved;
150 +#endif
151
152 AR_DEBUG_PRINTF(ATH_DEBUG_ANY, ("--- EP : %d ServiceID: 0x%X --------------\n",
153 pEPDist->Endpoint, pEPDist->ServiceID));
154 diff --git a/drivers/sdio/stack/busdriver/_busdriver.h b/drivers/sdio/stack/busdriver/_busdriver.h
155 index a85aed1..28d3960 100644
156 --- a/drivers/sdio/stack/busdriver/_busdriver.h
157 +++ b/drivers/sdio/stack/busdriver/_busdriver.h
158 @@ -301,7 +301,7 @@ static INLINE SDIO_STATUS CallHcdRequest(PSDHCD pHcd) {
159 pHcd->pCurrentRequest->Flags |= SDREQ_FLAGS_FORCE_DEFERRED_COMPLETE;
160 }
161 }
162 - #if DEBUG
163 + #ifdef DEBUG
164 {
165 SDIO_STATUS status;
166 BOOL forceDeferred;
167 diff --git a/drivers/sdio/stack/busdriver/sdio_bus_misc.c b/drivers/sdio/stack/busdriver/sdio_bus_misc.c
168 index c5c7381..d89a596 100644
169 --- a/drivers/sdio/stack/busdriver/sdio_bus_misc.c
170 +++ b/drivers/sdio/stack/busdriver/sdio_bus_misc.c
171 @@ -1977,7 +1977,7 @@ SDIO_STATUS SDQuerySDMMCInfo(PSDDEVICE pDevice)
172 } else {
173 pDevice->pId[0].SDMMC_ManfacturerID = GET_SD_CID_MANFID(CID);
174 pDevice->pId[0].SDMMC_OEMApplicationID = GET_SD_CID_OEMID(CID);
175 -#if DEBUG
176 +#ifdef DEBUG
177 {
178 char pBuf[7];
179
180 diff --git a/include/linux/sdio/ctsystem_linux.h b/include/linux/sdio/ctsystem_linux.h
181 index c9e44f2..2aa4de3 100644
182 --- a/include/linux/sdio/ctsystem_linux.h
183 +++ b/include/linux/sdio/ctsystem_linux.h
184 @@ -202,8 +202,6 @@ typedef struct scatterlist SDDMA_DESCRIPTOR, *PSDDMA_DESCRIPTOR;
185
186 #define DBG_SDIO_MASK (DBG_MASK_NONE | DBG_LEVEL_DEBUG)
187
188 -#define DEBUG 1
189 -
190 #ifdef DEBUG
191
192 #define DBG_ASSERT(test) \
193 --
194 1.5.6.5
195
This page took 0.064153 seconds and 5 git commands to generate.