wlan: Add ini to toggle PN replay check
Add ini configuration item to enable or disable HOST PN replay
check for unicast packets.
Change-Id: Icb3be010bac587e9d1d542ec2a3221acccc7069f
CRs-Fixed: 2223327
diff --git a/CORE/HDD/inc/wlan_hdd_cfg.h b/CORE/HDD/inc/wlan_hdd_cfg.h
index 049df4e..aeb035a 100644
--- a/CORE/HDD/inc/wlan_hdd_cfg.h
+++ b/CORE/HDD/inc/wlan_hdd_cfg.h
@@ -1190,6 +1190,11 @@
#define CFG_REORDER_TIME_VO_MAX 1000
#define CFG_REORDER_TIME_VO_DEFAULT 40
+#define CFG_ENABLE_PN_REPLAY_NAME "PNreplayCheck"
+#define CFG_ENABLE_PN_REPLAY_MIN 0
+#define CFG_ENABLE_PN_REPLAY_MAX 1
+#define CFG_ENABLE_PN_REPLAY_DEFAULT 0
+
#if defined WLAN_FEATURE_VOWIFI
#define CFG_RRM_ENABLE_NAME "gRrmEnable"
#define CFG_RRM_ENABLE_MIN (0)
@@ -3456,6 +3461,7 @@
v_U16_t BeReorderAgingTime;
v_U16_t ViReorderAgingTime;
v_U16_t VoReorderAgingTime;
+ v_BOOL_t enablePNReplay;
/* Wowl pattern */
char wowlPattern[1024];
diff --git a/CORE/HDD/src/wlan_hdd_cfg.c b/CORE/HDD/src/wlan_hdd_cfg.c
index 0292ba0..e03363d 100644
--- a/CORE/HDD/src/wlan_hdd_cfg.c
+++ b/CORE/HDD/src/wlan_hdd_cfg.c
@@ -1375,6 +1375,13 @@
CFG_REORDER_TIME_VO_MIN,
CFG_REORDER_TIME_VO_MAX ),
+ REG_VARIABLE( CFG_ENABLE_PN_REPLAY_NAME , WLAN_PARAM_Integer,
+ hdd_config_t, enablePNReplay,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_ENABLE_PN_REPLAY_DEFAULT,
+ CFG_ENABLE_PN_REPLAY_MIN,
+ CFG_ENABLE_PN_REPLAY_MAX ),
+
REG_VARIABLE_STRING( CFG_WOWL_PATTERN_NAME, WLAN_PARAM_String,
hdd_config_t, wowlPattern,
VAR_FLAGS_OPTIONAL,
diff --git a/CORE/TL/inc/wlan_qct_tl.h b/CORE/TL/inc/wlan_qct_tl.h
index 5a0db01..7f0456d 100644
--- a/CORE/TL/inc/wlan_qct_tl.h
+++ b/CORE/TL/inc/wlan_qct_tl.h
@@ -328,6 +328,10 @@
/* Min Threshold for Processing Frames in TL */
v_U8_t uMinFramesProcThres;
+ /* 1 means replay check enable
+ 0 means replay check disable */
+ v_BOOL_t ucIsReplayCheck;
+
/* Re-order Aging Time */
v_U16_t ucReorderAgingTime[WLANTL_MAX_AC];
}WLANTL_ConfigInfoType;
diff --git a/CORE/TL/src/wlan_qct_tl.c b/CORE/TL/src/wlan_qct_tl.c
index 57ddaa9..372a6f7 100644
--- a/CORE/TL/src/wlan_qct_tl.c
+++ b/CORE/TL/src/wlan_qct_tl.c
@@ -722,6 +722,9 @@
pTLCb->tlConfigInfo.uDelayedTriggerFrmInt =
pTLConfig->uDelayedTriggerFrmInt;
+ pTLCb->tlConfigInfo.ucIsReplayCheck =
+ pTLConfig->ucIsReplayCheck;
+
/*------------------------------------------------------------------------
Allocate internal resources
------------------------------------------------------------------------*/
@@ -1523,7 +1526,9 @@
vos_copy_macaddr( &pClientSTA->wSTADesc.vSelfMACAddress, &pwSTADescType->vSelfMACAddress);
/* In volans release L replay check is done at TL */
- pClientSTA->ucIsReplayCheckValid = pwSTADescType->ucIsReplayCheckValid;
+ if (pTLCb->tlConfigInfo.ucIsReplayCheck)
+ pClientSTA->ucIsReplayCheckValid = pwSTADescType->ucIsReplayCheckValid;
+
pClientSTA->ulTotalReplayPacketsDetected = 0;
/*Clear replay counters of the STA on all TIDs*/
for(ucTid = 0; ucTid < WLANTL_MAX_TID ; ucTid++)
diff --git a/CORE/VOSS/src/vos_api.c b/CORE/VOSS/src/vos_api.c
index 3662123..ca67c91 100644
--- a/CORE/VOSS/src/vos_api.c
+++ b/CORE/VOSS/src/vos_api.c
@@ -2671,6 +2671,7 @@
pTLConfig->ucReorderAgingTime[3] = pConfig->VoReorderAgingTime;/*WLANTL_AC_VO*/
pTLConfig->uDelayedTriggerFrmInt = pConfig->DelayedTriggerFrmInt;
pTLConfig->uMinFramesProcThres = pConfig->MinFramesProcThres;
+ pTLConfig->ucIsReplayCheck = pConfig->enablePNReplay;
}