Selaa lähdekoodia

qcacmn: Ensure the CFR period is multiple of 2ms

Change the minimum CFR periodicity from 0 / 10ms to 0 / 2ms,
and ensure that the period value is multiples of 2ms.

Change-Id: I9112e47d21cbb40c83852e404bac3ce1b48897a4
CRs-Fixed: 2862591
Shwetha G K 4 vuotta sitten
vanhempi
sitoutus
40b24b9e5d

+ 3 - 2
umac/cfr/dispatcher/inc/wlan_cfr_ucfg_api.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2019-2021 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
@@ -24,7 +24,8 @@
 #include <wlan_cfr_public_structs.h>
 #include <wlan_cfr_utils_api.h>
 
-#define MAX_CFR_PRD        (10*60*1000)        /* 10 minutes */
+#define MAX_CFR_PRD  (10 * 60 * 1000)   /* 10 minutes */
+#define CFR_MOD_PRD  2                  /* CFR period to be multiples of 2 ms */
 
 /**
  * ucfg_cfr_start_capture() - function to start cfr capture for connected client

+ 1 - 1
umac/cfr/dispatcher/src/wlan_cfr_ucfg_api.c

@@ -82,7 +82,7 @@ int ucfg_cfr_start_capture(struct wlan_objmgr_pdev *pdev,
 	}
 
 	if ((params->period < 0) || (params->period > MAX_CFR_PRD) ||
-		(params->period % 10)) {
+		(params->period % CFR_MOD_PRD)) {
 		cfr_err("Invalid period value: %d", params->period);
 		return -EINVAL;
 	}