View | Details | Raw Unified | Return to bug 61111 | Differences between
and this patch

Collapse All | Expand All

(-)a/drivers/net/wireless/ath/ath9k/htc_hst.c (+36 lines)
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);
(-)a/drivers/net/wireless/ath/ath9k/htc_hst.h (-1 / +12 lines)
Lines 77-82 struct htc_config_pipe_msg { Link Here
77
	u8 credits;
77
	u8 credits;
78
} __packed;
78
} __packed;
79
79
80
struct htc_panic_bad_vaddr {
81
	__be32 pattern;
82
	__be32 exccause;
83
	__be32 pc;
84
	__be32 badvaddr;
85
} __packed;
86
87
struct htc_panic_bad_epid {
88
	__be32 pattern;
89
	__be32 epid;
90
} __packed;
91
80
struct htc_ep_callbacks {
92
struct htc_ep_callbacks {
81
	void *priv;
93
	void *priv;
82
	void (*tx) (void *, struct sk_buff *, enum htc_endpoint_id, bool txok);
94
	void (*tx) (void *, struct sk_buff *, enum htc_endpoint_id, bool txok);
83
- 

Return to bug 61111