54 unifi_error(priv,
"unifi_net_data_malloc: Invalid SDIO block size\n");
136 unsigned long buf_address;
151 "unifi_net_dma_align: Allign buffer (0x%p) by %d bytes\n",
156 unifi_error(priv,
"unifi_net_dma_align: Failed (offset=%d)\n", offset);
161 skb_reserve(skb, offset);
169 #ifdef ANDROID_TIMESTAMP
170 static volatile unsigned int printk_cpu =
UINT_MAX;
173 char* print_time(
void )
175 unsigned long long t;
176 unsigned long nanosec_rem;
179 nanosec_rem =
do_div(t, 1000000000);
193 #define DEBUG_BUFFER_SIZE 120
195 #define FORMAT_TRACE(_s, _len, _args, _fmt) \
197 va_start(_args, _fmt); \
198 _len += vsnprintf(&(_s)[_len], \
199 (DEBUG_BUFFER_SIZE - _len), \
202 if (_len >= DEBUG_BUFFER_SIZE) { \
203 (_s)[DEBUG_BUFFER_SIZE - 2] = '\n'; \
204 (_s)[DEBUG_BUFFER_SIZE - 1] = 0; \
212 char s[DEBUG_BUFFER_SIZE];
215 #ifdef ANDROID_TIMESTAMP
228 FORMAT_TRACE(s, len, args, fmt);
237 char s[DEBUG_BUFFER_SIZE];
241 #ifdef ANDROID_TIMESTAMP
255 FORMAT_TRACE(s, len, args, fmt);
265 char s[DEBUG_BUFFER_SIZE];
269 #ifdef ANDROID_TIMESTAMP
283 FORMAT_TRACE(s, len, args, fmt);
290 unifi_info(
void* ospriv,
const char *fmt, ...)
293 char s[DEBUG_BUFFER_SIZE];
297 #ifdef ANDROID_TIMESTAMP
311 FORMAT_TRACE(s, len, args, fmt);
321 char s[DEBUG_BUFFER_SIZE];
325 if (unifi_debug >= level) {
326 #ifdef ANDROID_TIMESTAMP
340 FORMAT_TRACE(s, len, args, fmt);
373 unifi_dump(
void *ospriv,
int level,
const char *
msg,
void *
mem,
u16 len)
377 if (unifi_debug >= level) {
378 #ifdef ANDROID_TIMESTAMP
382 printk(
KERN_ERR "%s unifi: --- dump: %s ---\n", print_time(), msg ? msg :
"");
406 unsigned char *
pdata = (
unsigned char *)mem;
407 #ifdef ANDROID_TIMESTAMP
408 printk(
"timestamp %s \n", print_time());
414 for (i = 0; i <
len; i++) {
419 printk(
" %02X", pdata[i]);
436 unsigned short *
p = (
unsigned short *)mem;
437 #ifdef ANDROID_TIMESTAMP
438 printk(
"timestamp %s \n", print_time());
440 for (i = 0; i <
len; i+=2) {
458 #ifdef CSR_WIFI_HIP_DEBUG_OFFLINE
460 dump_str(
void *mem,
u16 len)
463 unsigned char *pdata = (
unsigned char *)mem;
464 #ifdef ANDROID_TIMESTAMP
465 printk(
"timestamp %s \n", print_time());
467 for (i = 0; i <
len; i++) {