[WCNCR00147230] common: add noise info to rx stat

[Description]
Add NOISE info to rx stat

Change-Id: Ia7d4f64025c465dfa2df6de3d8b02265f58be1c2
Feature: ${module/feature}
Signed-off-by: Howie Liu <jen-hao.liu@mediatek.com>
CR-Id: WCNCR00147230
diff --git a/os/linux/gl_wext_priv.c b/os/linux/gl_wext_priv.c
index 1d9bff6..774425b 100644
--- a/os/linux/gl_wext_priv.c
+++ b/os/linux/gl_wext_priv.c
@@ -2218,6 +2218,7 @@
 #define CMD_GET_HIF_INFO	"GET_HIF"
 #define CMD_GET_STA_KEEP_CNT    "KEEPCOUNTER"
 #define CMD_STAT_RESET_CNT      "RESETCOUNTER"
+#define CMD_STAT_NOISE_SEL      "NOISESELECT"
 
 #define CMD_SET_TXPOWER			"SET_TXPOWER"
 #define CMD_COUNTRY				"COUNTRY"
@@ -4122,6 +4123,13 @@
 		RCPI_TO_dBm(prHwWlanInfo->rWtblRxCounter.ucRxRcpi3));
 
 	i4BytesWritten += kalSnprintf(pcCommand + i4BytesWritten, i4TotalLen - i4BytesWritten,
+		"%-20s%s%d %d %d %d\n", "NOISE", " = ",
+		RCPI_TO_dBm(prHwWlanInfo->rWtblRxCounter.ucRxCC0),
+		RCPI_TO_dBm(prHwWlanInfo->rWtblRxCounter.ucRxCC1),
+		RCPI_TO_dBm(prHwWlanInfo->rWtblRxCounter.ucRxCC2),
+		RCPI_TO_dBm(prHwWlanInfo->rWtblRxCounter.ucRxCC3));
+
+	i4BytesWritten += kalSnprintf(pcCommand + i4BytesWritten, i4TotalLen - i4BytesWritten,
 		"%-20s%s%d\n", "LinkSpeed", " = ", u2LinkSpeed);
 
 	/* Last TX Rate */
@@ -4384,6 +4392,10 @@
 		return -1;
 
 	prHwWlanInfo->u4Index = ucWlanIndex;
+	if (strnicmp(apcArgv[1], CMD_STAT_NOISE_SEL, strlen(CMD_STAT_NOISE_SEL)) == 0)
+		prHwWlanInfo->rWtblRxCounter.fgRxCCSel = TRUE;
+	else
+		prHwWlanInfo->rWtblRxCounter.fgRxCCSel = FALSE;
 
 	DBGLOG(REQ, INFO, "MT6632 : index = %d i4TotalLen = %d\n", prHwWlanInfo->u4Index, i4TotalLen);
 
@@ -4742,7 +4754,6 @@
 	return i4BytesWritten;
 }
 
-
 static int priv_driver_get_drv_mcr(IN struct net_device *prNetDev, IN char *pcCommand, IN int i4TotalLen)
 {
 	P_GLUE_INFO_T prGlueInfo = NULL;