[qca-nss-drv] Corrected message length checks for H2N messages

The message length validation checks for H2N and N2H messages is corrected.

Change-Id: I150131234a4c858fea9ed8da84f848faf9ff385c
Signed-off-by: Suruchi Agarwal <suruchia@codeaurora.org>
diff --git a/nss_tun6rd.c b/nss_tun6rd.c
index aa56670..4f1b322 100644
--- a/nss_tun6rd.c
+++ b/nss_tun6rd.c
@@ -1,6 +1,6 @@
 /*
  **************************************************************************
- * Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2016, The Linux Foundation. All rights reserved.
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
  * above copyright notice and this permission notice appear in all copies.
@@ -37,8 +37,8 @@
 		return;
 	}
 
-	if (ncm->len > sizeof(struct nss_tun6rd_msg)) {
-		nss_warning("%p: tx request for another interface: %d", nss_ctx, ncm->interface);
+	if (nss_cmn_get_msg_len(ncm) > sizeof(struct nss_tun6rd_msg)) {
+		nss_warning("%p: Length of message is greater than required: %d", nss_ctx, nss_cmn_get_msg_len(ncm));
 		return;
 	}
 
@@ -109,8 +109,8 @@
 		return NSS_TX_FAILURE;
 	}
 
-	if (ncm->len > sizeof(struct nss_tun6rd_msg)) {
-		nss_warning("%p: message length is invalid: %d", nss_ctx, ncm->len);
+	if (nss_cmn_get_msg_len(ncm) > sizeof(struct nss_tun6rd_msg)) {
+		nss_warning("%p: message length is invalid: %d", nss_ctx, nss_cmn_get_msg_len(ncm));
 		return NSS_TX_FAILURE;
 	}