diff --git a/components/mlme/core/src/wlan_mlme_main.c b/components/mlme/core/src/wlan_mlme_main.c
index cfb07fae5e9d..97d1127e0131 100644
--- a/components/mlme/core/src/wlan_mlme_main.c
+++ b/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),
diff --git a/components/mlme/dispatcher/inc/cfg_mlme_fe_rrm.h b/components/mlme/dispatcher/inc/cfg_mlme_fe_rrm.h
index 9a81b7a74363..9ce59b4e9d9a 100644
--- a/components/mlme/dispatcher/inc/cfg_mlme_fe_rrm.h
+++ b/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 @@
/*
*
- * 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
*
*
*/
@@ -45,6 +45,28 @@
0, \
"Enable/Disable RRM")
+/*
+ *
+ * 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
+ *
+ *
+ */
+#define CFG_SAP_RRM_ENABLE CFG_INI_BOOL("sap_rrm_enable", \
+ 0, \
+ "Enable/Disable RRM on SAP")
+
/*
*
* 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)
diff --git a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
index ea4af764fd23..a62c1401a245 100644
--- a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
+++ b/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];
};
diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h
index 7fa8b88bd32b..db8357642216 100644
--- a/core/mac/inc/sir_api.h
+++ b/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];
};
diff --git a/core/mac/src/pe/sch/sch_beacon_gen.c b/core/mac/src/pe/sch/sch_beacon_gen.c
index fc436c7b1d30..74e0d4e2ec64 100644
--- a/core/mac/src/pe/sch/sch_beacon_gen.c
+++ b/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);
diff --git a/core/sme/src/rrm/sme_rrm.c b/core/sme/src/rrm/sme_rrm.c
index b4190fdc06b2..b546308c18e9 100644
--- a/core/sme/src/rrm/sme_rrm.c
+++ b/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;