Lines 358-363
ret:
Link Here
|
358 |
kfree_skb(skb); |
358 |
kfree_skb(skb); |
359 |
} |
359 |
} |
360 |
|
360 |
|
|
|
361 |
static void ath9k_htc_fw_panic_report(struct htc_target *htc_handle, |
362 |
struct sk_buff *skb) |
363 |
{ |
364 |
uint32_t *pattern = (uint32_t *)skb->data; |
365 |
|
366 |
switch (*pattern) { |
367 |
case 0x33221199: |
368 |
{ |
369 |
struct htc_panic_bad_vaddr *htc_panic; |
370 |
htc_panic = (struct htc_panic_bad_vaddr *) skb->data; |
371 |
dev_err(htc_handle->dev, "ath: firmware panic! " |
372 |
"exccause: 0x%08x; pc: 0x%08x; badvaddr: 0x%08x.\n", |
373 |
htc_panic->exccause, htc_panic->pc, |
374 |
htc_panic->badvaddr); |
375 |
break; |
376 |
} |
377 |
case 0x33221299: |
378 |
{ |
379 |
struct htc_panic_bad_epid *htc_panic; |
380 |
htc_panic = (struct htc_panic_bad_epid *) skb->data; |
381 |
dev_err(htc_handle->dev, "ath: firmware panic! " |
382 |
"bad epid: 0x%08x\n", htc_panic->epid); |
383 |
break; |
384 |
} |
385 |
default: |
386 |
dev_err(htc_handle->dev, "ath: uknown panic pattern!\n"); |
387 |
break; |
388 |
} |
389 |
} |
390 |
|
361 |
/* |
391 |
/* |
362 |
* HTC Messages are handled directly here and the obtained SKB |
392 |
* HTC Messages are handled directly here and the obtained SKB |
363 |
* is freed. |
393 |
* is freed. |
Lines 379-384
void ath9k_htc_rx_msg(struct htc_target *htc_handle,
Link Here
|
379 |
htc_hdr = (struct htc_frame_hdr *) skb->data; |
409 |
htc_hdr = (struct htc_frame_hdr *) skb->data; |
380 |
epid = htc_hdr->endpoint_id; |
410 |
epid = htc_hdr->endpoint_id; |
381 |
|
411 |
|
|
|
412 |
if (epid == 0x99) { |
413 |
ath9k_htc_fw_panic_report(htc_handle, skb); |
414 |
kfree_skb(skb); |
415 |
return; |
416 |
} |
417 |
|
382 |
if (epid >= ENDPOINT_MAX) { |
418 |
if (epid >= ENDPOINT_MAX) { |
383 |
if (pipe_id != USB_REG_IN_PIPE) |
419 |
if (pipe_id != USB_REG_IN_PIPE) |
384 |
dev_kfree_skb_any(skb); |
420 |
dev_kfree_skb_any(skb); |