[WCNCR00170019] misc: Add capability v2 event usage.

[Description]
Add capability v2 event usage.

Change-Id: I7a5eba0fd7a7343aaf1677acbb39758c73af387d
Signed-off-by: wayne.guo <wayne.guo@mediatek.com>
CR-Id: WCNCR00170019
Feature: misc
Reviewed-on: http://gerrit.mediatek.inc:8080/1266271
CheckPatch: Check Patch <srv_checkpatch@mediatek.com>
Reviewed-by: Soul Huang <soul.huang@mediatek.com>
Build: srv_neptune_adm <srv_neptune_adm@mediatek.com>
diff --git a/include/nic/adapter.h b/include/nic/adapter.h
index eba76bc..5926010 100644
--- a/include/nic/adapter.h
+++ b/include/nic/adapter.h
@@ -1285,6 +1285,10 @@
 #endif
 	WIFI_FEM_CFG_T rWifiFemCfg;
 	struct CSI_DATA_T rCsiData;
+
+	UINT_8 ucRModeOnlyFlag;
+	UINT_8 ucRModeReserve[7];
+
 };				/* end of _ADAPTER_T */
 
 /*******************************************************************************
diff --git a/include/nic_cmd_event.h b/include/nic_cmd_event.h
index d17ae6a..e627de2 100644
--- a/include/nic_cmd_event.h
+++ b/include/nic_cmd_event.h
@@ -1204,6 +1204,7 @@
 	TAG_CAP_CSUM_OFFLOAD = 0x4,
 #endif
 	TAG_CAP_EFUSE_OFFSET = 0x5,
+	TAG_CAP_R_MODE_CAP = 0xf,
 	TAG_CAP_TOTAL
 } NIC_CAPABILITY_V2_TAG_T;
 
@@ -1228,6 +1229,12 @@
 	UINT_32 u4WlanMacAddr;  /* Efuse Offset 1 */
 };
 
+
+struct _CAP_R_MODE_CAP_T {
+	UINT_8 ucRModeOnlyFlag;     /* 1: R mode only, 0:not R mode only */
+	UINT_8 ucRModeReserve[7];   /* reserve fields for future use */
+};
+
 typedef struct _NIC_TX_RESOURCE_T {
 	UINT_32 u4McuTotalResource;  /* the total usable resource for MCU port */
 	UINT_32 u4McuResourceUnit;   /* the unit of a MCU resource */
@@ -3290,6 +3297,8 @@
 
 WLAN_STATUS nicCmdEventQueryEfuseOffset(IN P_ADAPTER_T prAdapter, IN PUINT_8 pucEventBuf);
 
+WLAN_STATUS nicCmdEventQueryRModeCapability(IN P_ADAPTER_T prAdapter, IN PUINT_8 pucEventBuf);
+
 WLAN_STATUS nicCmdEventQueryNicCoexFeature(IN P_ADAPTER_T prAdapter, IN PUINT_8 pucEventBuf);
 
 #if CFG_TCP_IP_CHKSUM_OFFLOAD
diff --git a/nic/nic_cmd_event.c b/nic/nic_cmd_event.c
index 6f3a578..6e746c9 100644
--- a/nic/nic_cmd_event.c
+++ b/nic/nic_cmd_event.c
@@ -86,6 +86,7 @@
 	{TAG_CAP_CSUM_OFFLOAD, nicCmdEventQueryNicCsumOffload},
 #endif
 	{TAG_CAP_EFUSE_OFFSET, nicCmdEventQueryEfuseOffset},
+	{TAG_CAP_R_MODE_CAP, nicCmdEventQueryRModeCapability}
 };
 
 /*******************************************************************************
@@ -2571,6 +2572,15 @@
 }
 
 
+WLAN_STATUS nicCmdEventQueryRModeCapability(IN P_ADAPTER_T prAdapter, IN PUINT_8 pucEventBuf)
+{
+	struct _CAP_R_MODE_CAP_T *prRModeOffset = (struct _CAP_R_MODE_CAP_T *)pucEventBuf;
+
+	prAdapter->ucRModeOnlyFlag = prRModeOffset->ucRModeOnlyFlag;
+
+	return WLAN_STATUS_SUCCESS;
+}
+
 WLAN_STATUS nicCmdEventQueryNicTxResource(IN P_ADAPTER_T prAdapter, IN PUINT_8 pucEventBuf)
 {
 	P_NIC_TX_RESOURCE_T prTxResource = (P_NIC_TX_RESOURCE_T)pucEventBuf;