Browse Source

qcacld-3.0: Add INI support to enable/disable sap rrm

Currently there is no ini to control the rrm support on
SAP.
Add a new ini to enable/disable rrm on SAP.

Change-Id: Idef8da807bc5f8e2b4a1d61997824006e78b0cf6
CRs-Fixed: 2658926
Ashish Kumar Dhanotiya 5 years ago
parent
commit
c6125c65da

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

@@ -2245,6 +2245,7 @@ static void mlme_init_fe_rrm_in_cfg(struct wlan_objmgr_psoc *psoc,
 	qdf_size_t len;
 
 	rrm_config->rrm_enabled = cfg_get(psoc, CFG_RRM_ENABLE);
+	rrm_config->sap_rrm_enabled = cfg_get(psoc, CFG_SAP_RRM_ENABLE);
 	rrm_config->rrm_rand_interval = cfg_get(psoc, CFG_RRM_MEAS_RAND_INTVL);
 
 	qdf_uint8_array_parse(cfg_get(psoc, CFG_RM_CAPABILITY),

+ 27 - 4
components/mlme/dispatcher/inc/cfg_mlme_fe_rrm.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2018, 2020 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
@@ -25,19 +25,19 @@
 
 /*
  * <ini>
- * gRrmEnable - Enable/Disable RRM
+ * gRrmEnable - Enable/Disable RRM on STA
  * @Min: 0
  * @Max: 1
  * @Default: 0
  *
  * This ini is used to controls the capabilities (11 k) included
- * in the capabilities field.
+ * in the capabilities field for STA.
  *
  * Related: None.
  *
  * Supported Feature: 11k
  *
- * Usage: Internal/External
+ * Usage: Internal
  *
  * </ini>
  */
@@ -45,6 +45,28 @@
 				    0, \
 				    "Enable/Disable RRM")
 
+/*
+ * <ini>
+ * sap_rrm_enable - Enable/Disable RRM on SAP
+ * @Min: 0
+ * @Max: 1
+ * @Default: 0
+ *
+ * This ini is used to control the capabilities (11 k) included
+ * in the capabilities field for SAP.
+ *
+ * Related: None.
+ *
+ * Supported Feature: 11k
+ *
+ * Usage: Internal
+ *
+ * </ini>
+ */
+#define CFG_SAP_RRM_ENABLE CFG_INI_BOOL("sap_rrm_enable", \
+					0, \
+					"Enable/Disable RRM on SAP")
+
 /*
  * <ini>
  * gRrmRandnIntvl - Randomization interval
@@ -100,6 +122,7 @@
 
 #define CFG_FE_RRM_ALL \
 	CFG(CFG_RRM_ENABLE) \
+	CFG(CFG_SAP_RRM_ENABLE) \
 	CFG(CFG_RRM_MEAS_RAND_INTVL) \
 	CFG(CFG_RM_CAPABILITY)
 

+ 3 - 1
components/mlme/dispatcher/inc/wlan_mlme_public_struct.h

@@ -2153,12 +2153,14 @@ struct wlan_mlme_fe_wlm {
 
 /**
  * struct wlan_mlme_fe_rrm - RRM related configs
- * @rrm_enabled: Flag to check if RRM is enabled
+ * @rrm_enabled: Flag to check if RRM is enabled for STA
+ * @sap_rrm_enabled: Flag to check if RRM is enabled for SAP
  * @rrm_rand_interval: RRM randomization interval
  * @rm_capability: RM enabled capabilities IE
  */
 struct wlan_mlme_fe_rrm {
 	bool rrm_enabled;
+	bool sap_rrm_enabled;
 	uint8_t rrm_rand_interval;
 	uint8_t rm_capability[MLME_RMENABLEDCAP_MAX_LEN];
 };

+ 1 - 0
core/mac/inc/sir_api.h

@@ -322,6 +322,7 @@ struct fils_join_rsp_params {
 
 struct rrm_config_param {
 	uint8_t rrm_enabled;
+	bool sap_rrm_enabled;
 	uint8_t max_randn_interval;
 	uint8_t rm_capability[RMENABLEDCAP_MAX_LEN];
 };

+ 1 - 1
core/mac/src/pe/sch/sch_beacon_gen.c

@@ -437,7 +437,7 @@ sch_set_fixed_beacon_fields(struct mac_context *mac_ctx, struct pe_session *sess
 			}
 		}
 	}
-	if (mac_ctx->rrm.rrmConfig.rrm_enabled)
+	if (mac_ctx->rrm.rrmConfig.sap_rrm_enabled)
 		populate_dot11f_rrm_ie(mac_ctx, &bcn_2->RRMEnabledCap,
 			session);
 

+ 2 - 0
core/sme/src/rrm/sme_rrm.c

@@ -1686,6 +1686,8 @@ static void rrm_change_default_config_param(struct mac_context *mac)
 {
 	mac->rrm.rrmConfig.rrm_enabled =
 			mac->mlme_cfg->rrm_config.rrm_enabled;
+	mac->rrm.rrmConfig.sap_rrm_enabled =
+			mac->mlme_cfg->rrm_config.sap_rrm_enabled;
 	mac->rrm.rrmConfig.max_randn_interval =
 			mac->mlme_cfg->rrm_config.rrm_rand_interval;