diag: Perform CRC check on incoming HDLC encoded packet

Diag driver receives HDLC encoded data from the tools and decodes
them. This patch adds checks to the received data. It discards the
packet if the CRC is not correct.

Change-Id: Ie53056844d6d1e6777d15a339896bf6842cfae64
CRs-Fixed: 519902
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
3 files changed