From: Sujith Date: Mon, 29 Mar 2010 10:37:14 +0000 (+0530) Subject: ath9k_htc: Fix watchdog pattern parsing X-Git-Tag: firefly_0821_release~9833^2~2087^2~167^2~394 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d5a4c5e3afb9697c8f627b2563f4b8583ef88498;p=firefly-linux-kernel-4.4.55.git ath9k_htc: Fix watchdog pattern parsing Skip beyond the watchdog pattern properly. This fixes occasional failure of the driver to load. Signed-off-by: Sujith Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ath/ath9k/htc_hst.c b/drivers/net/wireless/ath/ath9k/htc_hst.c index 9a48999d0979..30f608bfc567 100644 --- a/drivers/net/wireless/ath/ath9k/htc_hst.c +++ b/drivers/net/wireless/ath/ath9k/htc_hst.c @@ -377,7 +377,7 @@ void ath9k_htc_rx_msg(struct htc_target *htc_handle, if (htc_hdr->flags & HTC_FLAGS_RECV_TRAILER) { if (be32_to_cpu(*(u32 *) skb->data) == 0x00C60000) /* Move past the Watchdog pattern */ - htc_hdr = (struct htc_frame_hdr *) skb->data + 4; + htc_hdr = (struct htc_frame_hdr *)(skb->data + 4); } /* Get the message ID */