ソースを参照

qcacld-3.0: Add ini based control for Beacon Reception stats

Currently, the support for beacon reception stats is only dependent on
the FW.

Add an ini so that the user can also have a control over the stats

Change-Id: I4a1e654b9d1598836378def494b37a997904d77a
CRs-Fixed: 2366473
Sourav Mohapatra 6 年 前
コミット
c55bdf3e26

+ 2 - 0
components/mlme/core/src/wlan_mlme_main.c

@@ -355,6 +355,8 @@ static void mlme_init_generic_cfg(struct wlan_objmgr_psoc *psoc,
 
 	gen->enabled_11h = cfg_default(CFG_11H_SUPPORT_ENABLED);
 	gen->enabled_11d = cfg_default(CFG_11D_SUPPORT_ENABLED);
+	gen->enable_beacon_reception_stats =
+		cfg_get(psoc, CFG_ENABLE_BEACON_RECEPTION_STATS);
 }
 
 static void mlme_init_edca_ani_cfg(struct wlan_mlme_edca_params *edca_params)

+ 25 - 1
components/mlme/dispatcher/inc/cfg_mlme_generic.h

@@ -554,6 +554,29 @@
 				CFG_VALUE_OR_DEFAULT, \
 				"Enable debug log")
 
+/*
+ * <ini>
+ * enable_beacon_reception_stats - Enable disable beacon reception stats
+ * @Min: 0
+ * @Max: 1
+ * @Default: 0
+ *
+ * This ini is used to enable/disable the beacon reception stats collected per
+ * vdev and then sent to the driver to be displayed in sysfs
+ *
+ * Related: None
+ *
+ * Supported Feature: Stats
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+ #define CFG_ENABLE_BEACON_RECEPTION_STATS CFG_INI_BOOL( \
+			"enable_beacon_reception_stats", \
+			0, \
+			"Enable disable beacon reception stats")
+
 #define CFG_GENERIC_ALL \
 	CFG(CFG_ENABLE_DEBUG_PACKET_LOG) \
 	CFG(CFG_PMF_SA_QUERY_MAX_RETRIES) \
@@ -577,6 +600,7 @@
 	CFG(CFG_OPTIMIZE_CA_EVENT) \
 	CFG(CFG_CRASH_FW_TIMEOUT) \
 	CFG(CFG_DROPPED_PKT_DISCONNECT_THRESHOLD) \
-	CFG(CFG_ITO_REPEAT_COUNT)
+	CFG(CFG_ITO_REPEAT_COUNT) \
+	CFG(CFG_ENABLE_BEACON_RECEPTION_STATS)
 
 #endif /* __CFG_MLME_GENERIC_H */

+ 2 - 0
components/mlme/dispatcher/inc/wlan_mlme_public_struct.h

@@ -943,6 +943,7 @@ struct wlan_mlme_chainmask {
  * @debug_packet_log: Debug packet log flags
  * @enabled_11h: enable 11h flag
  * @enabled_11d: enable 11d flag
+ * @enable_beacon_reception_stats: enable beacon reception stats
  */
 struct wlan_mlme_generic {
 	enum band_info band_capability;
@@ -969,6 +970,7 @@ struct wlan_mlme_generic {
 	bool enabled_11h;
 	bool enabled_11d;
 	bool enable_deauth_to_disassoc_map;
+	bool enable_beacon_reception_stats;
 };
 
 /*

+ 3 - 2
core/sme/src/common/sme_api.c

@@ -11917,8 +11917,9 @@ QDF_STATUS sme_beacon_debug_stats_req(
 			return QDF_STATUS_E_FAILURE;
 		}
 
-		if (!mac_ctx->bcn_reception_stats) {
-			sme_err("Beacon Reception stats not supported by FW");
+		if (!mac_ctx->bcn_reception_stats &&
+		    !mac_ctx->mlme_cfg->gen.enable_beacon_reception_stats) {
+			sme_err("Beacon Reception stats not supported");
 			sme_release_global_lock(&mac_ctx->sme);
 			return QDF_STATUS_E_NOSUPPORT;
 		}