Browse Source

qcacld-3.0: Move few INIs' ownership from HDD to Policy manager

INIs
1) g_mark_sap_indoor_as_disable
2) g_sta_sap_scc_on_lte_coex_chan
3) gEnableSAPManadatoryChanList
4) gForce1x1Exception
5) g_sta_sap_scc_on_dfs_chan
6) gDualMacFeatureDisable
7) gEnableOverLapCh
8) gAllowMCCGODiffBI

Ownership of above INIs belong to policy manager, move them from
HDD to Policy manager.

CRs-Fixed: 2351044
Change-Id: I6fe502697cdb9a259b8215ce5b4ad5354cb645fd
Krunal Soni 6 years ago
parent
commit
df29bc4ca5

+ 0 - 230
core/hdd/inc/wlan_hdd_cfg.h

@@ -768,29 +768,6 @@ enum hdd_dot11_mode {
 #define CFG_OKC_FEATURE_ENABLED_MAX                        (1)
 #define CFG_OKC_FEATURE_ENABLED_DEFAULT                    (1)
 
-/*
- * <ini>
- * gForce1x1Exception - force 1x1 when connecting to certain peer
- * @Min: 0
- * @Max: 1
- * @Default: 0
- *
- * This INI when enabled will force 1x1 connection with certain peer.
- *
- *
- * Related: None
- *
- * Supported Feature: connection
- *
- * Usage: External
- *
- * </ini>
- */
-#define CFG_FORCE_1X1_NAME      "gForce1x1Exception"
-#define CFG_FORCE_1X1_MIN       (0)
-#define CFG_FORCE_1X1_MAX       (1)
-#define CFG_FORCE_1X1_DEFAULT   (1)
-
 #ifdef FEATURE_LFR_SUBNET_DETECTION
 /*
  * <ini>
@@ -2096,30 +2073,6 @@ enum hdd_link_speed_rpt_type {
 #define CFG_LINK_SPEED_RSSI_LOW_MAX                (0)
 #define CFG_LINK_SPEED_RSSI_LOW_DEFAULT            (-80)
 
-/*
- * <ini>
- * gEnableOverLapCh - Enables Overlap Channel. If set, allow overlapping
- *                    channels to be selected for the SoftAP
- * @Min: 0
- * @Max: 1
- * @Default: 0
- *
- * This ini is used to set Overlap Channel
- *
- * Related: None
- *
- * Supported Feature: STA
- *
- * Usage: Internal/External
- *
- * </ini>
- */
-
-#define CFG_ENABLE_OVERLAP_CH               "gEnableOverLapCh"
-#define CFG_ENABLE_OVERLAP_CH_MIN           (0)
-#define CFG_ENABLE_OVERLAP_CH_MAX           (1)
-#define CFG_ENABLE_OVERLAP_CH_DEFAULT       (0)
-
 /*
  * <ini>
  * gFwDebugModuleLoglevel - modulized firmware debug log level
@@ -2172,67 +2125,6 @@ enum hdd_link_speed_rpt_type {
 #define HDD_MULTICAST_FILTER_LIST                              0x04
 #define HDD_MULTICAST_FILTER_LIST_CLEAR                        0x05
 
-/*
- * <ini>
- * gEnableSAPManadatoryChanList - Enable SAP Mandatory channel list
- * Options.
- * @Min: 0
- * @Max: 1
- * @Default: 0
- *
- * This ini is used to enable/disable the SAP manadatory chan list
- * 0 - Disable SAP mandatory chan list
- * 1 - Enable SAP mandatory chan list
- *
- * Supported Feature: SAP
- *
- *
- * Usage: Internal/External
- *
- * </ini>
- */
-#define CFG_ENABLE_SAP_MANDATORY_CHAN_LIST       "gEnableSAPManadatoryChanList"
-#define CFG_ENABLE_SAP_MANDATORY_CHAN_LIST_MIN   (0)
-#define CFG_ENABLE_SAP_MANDATORY_CHAN_LIST_MAX   (1)
-#define CFG_ENABLE_SAP_MANDATORY_CHAN_LIST_DEFAULT (0)
-
-/*
- * <ini>
- * gAllowMCCGODiffBI - Allow GO in MCC mode to accept different beacon interval
- * than STA's.
- * @Min: 0
- * @Max: 4
- * @Default: 4
- *
- * This ini is used to allow GO in MCC mode to accept different beacon interval
- * than STA's.
- * Added for Wi-Fi Cert. 5.1.12
- * If gAllowMCCGODiffBI = 1
- *	Set to 1 for WFA certification. GO Beacon interval is not changed.
- *	MCC GO doesn't work well in optimized way. In worst scenario, it may
- *	invite STA disconnection.
- * If gAllowMCCGODiffBI = 2
- *	If set to 2 workaround 1 disassoc all the clients and update beacon
- *	Interval.
- * If gAllowMCCGODiffBI = 3
- *	If set to 3 tear down the P2P link in auto/Non-autonomous -GO case.
- * If gAllowMCCGODiffBI = 4
- *	If set to 4 don't disconnect the P2P client in autonomous/Non-auto-
- *	nomous -GO case update the BI dynamically
- *
- * Related: None.
- *
- * Supported Feature: Concurrency
- *
- * Usage: Internal/External
- *
- * </ini>
- */
-#define CFG_ALLOW_MCC_GO_DIFF_BI_NAME           "gAllowMCCGODiffBI"
-#define CFG_ALLOW_MCC_GO_DIFF_BI_MIN            (0)
-#define CFG_ALLOW_MCC_GO_DIFF_BI_MAX            (4)
-#define CFG_ALLOW_MCC_GO_DIFF_BI_DEFAULT        (4)
-
 #if defined(CONFIG_HL_SUPPORT) && defined(QCA_BAD_PEER_TX_FLOW_CL)
 /*
  * Enable/Disable Bad Peer TX CTL feature
@@ -2740,91 +2632,6 @@ enum hdd_link_speed_rpt_type {
 #define CFG_ETSI13_SRD_CHAN_IN_MASTER_MODE_MIN (0)
 #define CFG_ETSI13_SRD_CHAN_IN_MASTER_MODE_MAX (1)
 
-/*
- *
- * <ini>
- * gDualMacFeatureDisable - Disable Dual MAC feature.
- * @Min: 0
- * @Max: 4
- * @Default: 0
- *
- * This ini is used to enable/disable dual MAC feature.
- * 0 - enable DBS
- * 1 - disable DBS
- * 2 - disable DBS for connection but keep DBS for scan
- * 3 - disable DBS for connection but keep DBS scan with async
- * scan policy disabled
- * 4 - enable DBS for connection as well as for scan with async
- * scan policy disabled
- * 5 - enable DBS for connection but disable DBS for scan.
- * 6 - enable DBS for connection but disable simultaneous scan
- * from upper layer (DBS scan remains enabled in FW).
- *
- * Note: INI item value should match 'enum dbs_support'
- *
- * Related: None.
- *
- * Supported Feature: DBS
- *
- * Usage: Internal/External
- *
- * </ini>
- */
-#define CFG_DUAL_MAC_FEATURE_DISABLE              "gDualMacFeatureDisable"
-#define CFG_DUAL_MAC_FEATURE_DISABLE_MIN          (0)
-#define CFG_DUAL_MAC_FEATURE_DISABLE_MAX          (6)
-#define CFG_DUAL_MAC_FEATURE_DISABLE_DEFAULT      (0)
-
-/*
- * <ini>
- * g_sta_sap_scc_on_dfs_chan - Allow STA+SAP SCC on DFS channel with master
- * mode support disabled.
- * @Min: 0
- * @Max: 1
- * @Default: 0
- *
- * This ini is used to allow STA+SAP SCC on DFS channel with master mode
- * support disabled.
- * 0 - Disallow STA+SAP SCC on DFS channel
- * 1 - Allow STA+SAP SCC on DFS channel with master mode disabled
- *
- * Related: None.
- *
- * Supported Feature: Non-DBS, DBS
- *
- * Usage: Internal/External
- *
- * </ini>
- */
-#define CFG_STA_SAP_SCC_ON_DFS_CHAN              "g_sta_sap_scc_on_dfs_chan"
-#define CFG_STA_SAP_SCC_ON_DFS_CHAN_MIN          (0)
-#define CFG_STA_SAP_SCC_ON_DFS_CHAN_MAX          (1)
-#define CFG_STA_SAP_SCC_ON_DFS_CHAN_DEFAULT      (0)
-
-/*
- * <ini>
- * g_sta_sap_scc_on_lte_coex_chan - Allow STA+SAP SCC on LTE coex channel
- * @Min: 0
- * @Max: 1
- * @Default: 0
- *
- * This ini is used to allow STA+SAP SCC on LTE coex channel
- * 0 - Disallow STA+SAP SCC on LTE coex channel
- * 1 - Allow STA+SAP SCC on LTE coex channel
- *
- * Related: None.
- *
- * Supported Feature: Non-DBS, DBS
- *
- * Usage: Internal/External
- *
- * </ini>
- */
-#define CFG_STA_SAP_SCC_ON_LTE_COEX_CHAN              "g_sta_sap_scc_on_lte_coex_chan"
-#define CFG_STA_SAP_SCC_ON_LTE_COEX_CHAN_MIN          (0)
-#define CFG_STA_SAP_SCC_ON_LTE_COEX_CHAN_MAX          (1)
-#define CFG_STA_SAP_SCC_ON_LTE_COEX_CHAN_DEFAULT      (0)
-
 /*
  * gPNOChannelPrediction will allow user to enable/disable the
  * PNO channel prediction feature.
@@ -2998,32 +2805,6 @@ enum hdd_link_speed_rpt_type {
 #define CFG_INDOOR_CHANNEL_SUPPORT_MAX      (1)
 #define CFG_INDOOR_CHANNEL_SUPPORT_DEFAULT  (0)
 
-/*
- * <ini>
- * g_mark_sap_indoor_as_disable - Enable/Disable Indoor channel
- * @Min: 0
- * @Max: 1
- * @Default: 0
- *
- * This ini is used to mark the Indoor channel as
- * disable when SAP start and revert it on SAP stop,
- * so SAP will not turn on indoor channel and
- * sta will not scan/associate and roam on indoor
- * channels.
- *
- * Related: If g_mark_sap_indoor_as_disable set, turn the
- * indoor channels to disable and update Wiphy & fw.
- *
- * Supported Feature: SAP/STA
- *
- * Usage: External
- *
- * </ini>
- */
-#define CFG_MARK_INDOOR_AS_DISABLE_NAME     "g_mark_sap_indoor_as_disable"
-#define CFG_MARK_INDOOR_AS_DISABLE_MIN      (0)
-#define CFG_MARK_INDOOR_AS_DISABLE_MAX      (1)
-#define CFG_MARK_INDOOR_AS_DISABLE_DEFAULT  (0)
 
 /*
  * <ini>
@@ -4228,7 +4009,6 @@ struct hdd_config {
 	int32_t linkSpeedRssiHigh;
 	int32_t linkSpeedRssiMid;
 	int32_t linkSpeedRssiLow;
-	uint8_t allowMCCGODiffBI;
 	uint8_t thermalMitigationEnable;
 	uint32_t throttlePeriod;
 	uint32_t throttle_dutycycle_level0;
@@ -4286,14 +4066,10 @@ struct hdd_config {
 	uint32_t IpaConfig;
 	bool IpaClkScalingEnable;
 	uint8_t gDisableDfsJapanW53;
-	bool gEnableOverLapCh;
 	bool fRegChangeDefCountry;
 	bool advertiseConcurrentOperation;
-
 	uint8_t enableFwModuleLogLevel[FW_MODULE_LOG_LEVEL_STRING_LENGTH];
 
-	bool enable_sap_mandatory_chan_list;
-
 #ifdef FEATURE_WLAN_FORCE_SAP_SCC
 	uint8_t SapSccChanAvoidance;
 #endif /* FEATURE_WLAN_FORCE_SAP_SCC */
@@ -4310,9 +4086,6 @@ struct hdd_config {
 	uint8_t go_11ac_override;
 	uint8_t max_scan_count;
 	bool etsi13_srd_chan_in_master_mode;
-	uint32_t dual_mac_feature_disable;
-	uint32_t sta_sap_scc_on_dfs_chan;
-	uint32_t sta_sap_scc_on_lte_coex_chan;
 	uint16_t  self_gen_frm_pwr;
 #ifdef FEATURE_WLAN_SCAN_PNO
 	bool pno_channel_prediction;
@@ -4349,8 +4122,6 @@ struct hdd_config {
 	uint8_t adapt_dwell_wifi_act_threshold;
 	bool bug_report_for_no_scan_results;
 	bool indoor_channel_support;
-	/* control marking indoor channel passive to disable */
-	bool force_ssc_disable_indoor_channel;
 	uint16_t sap_tx_leakage_threshold;
 	bool sap_internal_restart;
 	enum restart_beaconing_on_ch_avoid_rule
@@ -4374,7 +4145,6 @@ struct hdd_config {
 	uint32_t mawc_nlo_exp_backoff_ratio;
 	uint32_t mawc_nlo_init_scan_interval;
 	uint32_t mawc_nlo_max_scan_interval;
-	bool is_force_1x1;
 	enum pmo_auto_pwr_detect_failure_mode auto_pwr_save_fail_mode;
 	bool enable_11d_in_world_mode;
 	/* 5G preference parameters for boosting RSSI */

+ 17 - 67
core/hdd/src/wlan_hdd_cfg.c

@@ -147,13 +147,6 @@ struct reg_table_entry g_registry_table[] = {
 		     CFG_AP_ENABLE_PROTECTION_MODE_MIN,
 		     CFG_AP_ENABLE_PROTECTION_MODE_MAX),
 
-	REG_VARIABLE(CFG_ENABLE_SAP_MANDATORY_CHAN_LIST, WLAN_PARAM_Integer,
-		     struct hdd_config, enable_sap_mandatory_chan_list,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_ENABLE_SAP_MANDATORY_CHAN_LIST_DEFAULT,
-		     CFG_ENABLE_SAP_MANDATORY_CHAN_LIST_MIN,
-		     CFG_ENABLE_SAP_MANDATORY_CHAN_LIST_MAX),
-
 	REG_VARIABLE(CFG_DISABLE_PACKET_FILTER, WLAN_PARAM_Integer,
 		     struct hdd_config, disablePacketFilter,
 		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -364,13 +357,6 @@ struct reg_table_entry g_registry_table[] = {
 			     CFG_LINK_SPEED_RSSI_LOW_MAX,
 			     NULL, 0),
 
-	REG_VARIABLE(CFG_ALLOW_MCC_GO_DIFF_BI_NAME, WLAN_PARAM_Integer,
-		     struct hdd_config, allowMCCGODiffBI,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_ALLOW_MCC_GO_DIFF_BI_DEFAULT,
-		     CFG_ALLOW_MCC_GO_DIFF_BI_MIN,
-		     CFG_ALLOW_MCC_GO_DIFF_BI_MAX),
-
 	REG_VARIABLE(CFG_THERMAL_MIGRATION_ENABLE_NAME, WLAN_PARAM_Integer,
 		     struct hdd_config, thermalMitigationEnable,
 		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -535,13 +521,6 @@ struct reg_table_entry g_registry_table[] = {
 		     CFG_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_MIN,
 		     CFG_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_MAX),
 
-	REG_VARIABLE(CFG_ENABLE_OVERLAP_CH, WLAN_PARAM_Integer,
-		     struct hdd_config, gEnableOverLapCh,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK,
-		     CFG_ENABLE_OVERLAP_CH_DEFAULT,
-		     CFG_ENABLE_OVERLAP_CH_MIN,
-		     CFG_ENABLE_OVERLAP_CH_MAX),
-
 	REG_VARIABLE(CFG_REG_CHANGE_DEF_COUNTRY_NAME, WLAN_PARAM_Integer,
 		     struct hdd_config, fRegChangeDefCountry,
 		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -647,27 +626,6 @@ struct reg_table_entry g_registry_table[] = {
 		     CFG_ETSI13_SRD_CHAN_IN_MASTER_MODE_MIN,
 		     CFG_ETSI13_SRD_CHAN_IN_MASTER_MODE_MAX),
 
-	REG_VARIABLE(CFG_DUAL_MAC_FEATURE_DISABLE, WLAN_PARAM_HexInteger,
-		     struct hdd_config, dual_mac_feature_disable,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_DUAL_MAC_FEATURE_DISABLE_DEFAULT,
-		     CFG_DUAL_MAC_FEATURE_DISABLE_MIN,
-		     CFG_DUAL_MAC_FEATURE_DISABLE_MAX),
-
-	REG_VARIABLE(CFG_STA_SAP_SCC_ON_DFS_CHAN, WLAN_PARAM_HexInteger,
-		     struct hdd_config, sta_sap_scc_on_dfs_chan,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_STA_SAP_SCC_ON_DFS_CHAN_DEFAULT,
-		     CFG_STA_SAP_SCC_ON_DFS_CHAN_MIN,
-		     CFG_STA_SAP_SCC_ON_DFS_CHAN_MAX),
-
-	REG_VARIABLE(CFG_STA_SAP_SCC_ON_LTE_COEX_CHAN, WLAN_PARAM_HexInteger,
-		     struct hdd_config, sta_sap_scc_on_lte_coex_chan,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_STA_SAP_SCC_ON_LTE_COEX_CHAN_DEFAULT,
-		     CFG_STA_SAP_SCC_ON_LTE_COEX_CHAN_MIN,
-		     CFG_STA_SAP_SCC_ON_LTE_COEX_CHAN_MAX),
-
 #ifdef FEATURE_WLAN_SCAN_PNO
 	REG_VARIABLE(CFG_PNO_CHANNEL_PREDICTION_NAME, WLAN_PARAM_Integer,
 		     struct hdd_config, pno_channel_prediction,
@@ -828,14 +786,6 @@ struct reg_table_entry g_registry_table[] = {
 		     CFG_INDOOR_CHANNEL_SUPPORT_MIN,
 		     CFG_INDOOR_CHANNEL_SUPPORT_MAX),
 
-	REG_VARIABLE(CFG_MARK_INDOOR_AS_DISABLE_NAME,
-		     WLAN_PARAM_Integer,
-		     struct hdd_config, force_ssc_disable_indoor_channel,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_MARK_INDOOR_AS_DISABLE_DEFAULT,
-		     CFG_MARK_INDOOR_AS_DISABLE_MIN,
-		     CFG_MARK_INDOOR_AS_DISABLE_MAX),
-
 	REG_VARIABLE(CFG_RESTART_BEACONING_ON_CH_AVOID_NAME, WLAN_PARAM_Integer,
 		struct hdd_config, restart_beaconing_on_chan_avoid_event,
 		VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -937,13 +887,6 @@ struct reg_table_entry g_registry_table[] = {
 		CFG_MAWC_NLO_MAX_SCAN_INTERVAL_MIN,
 		CFG_MAWC_NLO_MAX_SCAN_INTERVAL_MAX),
 
-	REG_VARIABLE(CFG_FORCE_1X1_NAME, WLAN_PARAM_Integer,
-		struct hdd_config, is_force_1x1,
-		VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		CFG_FORCE_1X1_DEFAULT,
-		CFG_FORCE_1X1_MIN,
-		CFG_FORCE_1X1_MAX),
-
 	REG_VARIABLE(CFG_ENABLE_11D_IN_WORLD_MODE_NAME, WLAN_PARAM_Integer,
 		     struct hdd_config, enable_11d_in_world_mode,
 		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -2511,10 +2454,6 @@ QDF_STATUS hdd_set_policy_mgr_user_cfg(struct hdd_context *hdd_ctx)
 		hdd_err("unable to get vht_enable2x2");
 
 	user_cfg->sub_20_mhz_enabled = cds_is_sub_20_mhz_enabled();
-	user_cfg->is_sta_sap_scc_allowed_on_dfs_chan =
-		hdd_ctx->config->sta_sap_scc_on_dfs_chan;
-	user_cfg->sta_sap_scc_on_lte_coex_chan =
-		hdd_ctx->config->sta_sap_scc_on_lte_coex_chan;
 	status = policy_mgr_set_user_cfg(hdd_ctx->psoc, user_cfg);
 	qdf_mem_free(user_cfg);
 
@@ -2568,7 +2507,7 @@ static
 QDF_STATUS hdd_set_sme_cfgs_related_to_plcy_mgr(struct hdd_context *hdd_ctx,
 						tSmeConfigParams *sme_cfg)
 {
-	uint8_t mcc_to_scc_switch = 0;
+	uint8_t mcc_to_scc_switch = 0, is_force_1x1 = 0, allow_diff_bi = 0;
 	uint8_t conc_rule1 = 0, conc_rule2 = 0, sta_cxn_5g = 0;
 
 	if (QDF_STATUS_SUCCESS !=
@@ -2603,6 +2542,22 @@ QDF_STATUS hdd_set_sme_cfgs_related_to_plcy_mgr(struct hdd_context *hdd_ctx,
 	}
 	sme_cfg->csrConfig.is_sta_connection_in_5gz_enabled = sta_cxn_5g;
 
+	if (QDF_STATUS_SUCCESS !=
+	    ucfg_policy_mgr_get_force_1x1(hdd_ctx->psoc,
+					  &is_force_1x1)) {
+		hdd_err("can't get force 1x1 flag");
+		return QDF_STATUS_E_FAILURE;
+	}
+	sme_cfg->csrConfig.is_force_1x1 = is_force_1x1;
+
+	if (QDF_STATUS_SUCCESS !=
+	    ucfg_policy_mgr_get_allow_mcc_go_diff_bi(hdd_ctx->psoc,
+						     &allow_diff_bi)) {
+		hdd_err("can't get allow mcc go diff BI flag");
+		return QDF_STATUS_E_FAILURE;
+	}
+	sme_cfg->csrConfig.fAllowMCCGODiffBI = allow_diff_bi;
+
 	return QDF_STATUS_SUCCESS;
 }
 
@@ -2738,8 +2693,6 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx)
 					pConfig->mcc_rts_cts_prot_enable;
 	smeConfig->csrConfig.mcc_bcast_prob_resp_enable =
 					pConfig->mcc_bcast_prob_resp_enable;
-	smeConfig->csrConfig.fAllowMCCGODiffBI = pConfig->allowMCCGODiffBI;
-
 	/* Scan Results Aging Time out value */
 	smeConfig->csrConfig.scanCfgAgingTime = pConfig->scanAgingTimeout;
 
@@ -2802,9 +2755,6 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx)
 			hdd_ctx->config->wlm_latency_flags_low;
 	smeConfig->csrConfig.wlm_latency_flags[3] =
 			hdd_ctx->config->wlm_latency_flags_ultralow;
-
-	smeConfig->csrConfig.is_force_1x1 =
-			hdd_ctx->config->is_force_1x1;
 	hdd_set_sme_cfgs_related_to_plcy_mgr(hdd_ctx, smeConfig);
 	hdd_update_11k_offload_params(hdd_ctx->config,
 					&smeConfig->csrConfig);

+ 6 - 1
core/hdd/src/wlan_hdd_cfg80211.c

@@ -12273,6 +12273,7 @@ int wlan_hdd_cfg80211_init(struct device *dev,
 	int len_5g_ch = 0, num_ch, ch_arr_size;
 	int num_dsrc_ch, len_dsrc_ch, num_srd_ch, len_srd_ch;
 	uint32_t *cipher_suites;
+	uint8_t allow_mcc_go_diff_bi = 0;
 
 	hdd_enter();
 
@@ -12329,6 +12330,10 @@ int wlan_hdd_cfg80211_init(struct device *dev,
 				 | BIT(NL80211_IFTYPE_AP)
 				 | BIT(NL80211_IFTYPE_MONITOR);
 
+	if (QDF_STATUS_SUCCESS !=
+	    ucfg_policy_mgr_get_allow_mcc_go_diff_bi(hdd_ctx->psoc,
+						     &allow_mcc_go_diff_bi))
+		hdd_err("can't get mcc_go_diff_bi value, use default");
 	if (pCfg->advertiseConcurrentOperation) {
 		if (pCfg->enableMCC) {
 			int i;
@@ -12336,7 +12341,7 @@ int wlan_hdd_cfg80211_init(struct device *dev,
 			for (i = 0;
 			     i < ARRAY_SIZE(wlan_hdd_iface_combination);
 			     i++) {
-				if (!pCfg->allowMCCGODiffBI)
+				if (!allow_mcc_go_diff_bi)
 					wlan_hdd_iface_combination[i].
 					beacon_int_infra_match = true;
 			}

+ 65 - 15
core/hdd/src/wlan_hdd_hostapd.c

@@ -2718,6 +2718,7 @@ int hdd_softap_set_channel_change(struct net_device *dev, int target_channel,
 	struct hdd_adapter *sta_adapter;
 	struct hdd_station_ctx *sta_ctx;
 	uint8_t conc_rule1 = 0;
+	uint8_t scc_on_lte_coex = 0;
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);
@@ -2790,6 +2791,15 @@ int hdd_softap_set_channel_change(struct net_device *dev, int target_channel,
 		qdf_atomic_set(&adapter->dfs_radar_found, 0);
 		return -EINVAL;
 	}
+
+	status =
+	ucfg_policy_mgr_get_sta_sap_scc_lte_coex_chnl(hdd_ctx->psoc,
+						      &scc_on_lte_coex);
+	if (!QDF_IS_STATUS_SUCCESS(status)) {
+		hdd_err("can't get STA-SAP SCC on lte coex channel setting");
+		qdf_atomic_set(&adapter->dfs_radar_found, 0);
+		return -EINVAL;
+	}
 	/*
 	 * Post the Channel Change request to SAP.
 	 */
@@ -2797,7 +2807,7 @@ int hdd_softap_set_channel_change(struct net_device *dev, int target_channel,
 		WLAN_HDD_GET_SAP_CTX_PTR(adapter),
 		(uint32_t)target_channel,
 		target_bw,
-		forced && !(hdd_ctx->config->sta_sap_scc_on_lte_coex_chan));
+		forced && !scc_on_lte_coex);
 
 	if (QDF_STATUS_SUCCESS != status) {
 		hdd_err("SAP set channel failed for channel: %d, bw: %d",
@@ -4081,12 +4091,18 @@ QDF_STATUS wlan_hdd_config_acs(struct hdd_context *hdd_ctx,
 	tsap_config_t *sap_config;
 	struct hdd_config *ini_config;
 	mac_handle_t mac_handle;
+	uint8_t is_overlap_enable = 0;
+	QDF_STATUS status;
 
 	mac_handle = hdd_ctx->mac_handle;
 	sap_config = &adapter->session.ap.sap_config;
 	ini_config = hdd_ctx->config;
 
-	sap_config->enOverLapCh = !!hdd_ctx->config->gEnableOverLapCh;
+	status = ucfg_policy_mgr_get_enable_overlap_chnl(hdd_ctx->psoc,
+							 &is_overlap_enable);
+	if (status != QDF_STATUS_SUCCESS)
+		hdd_err("can't get overlap channel INI value, using default");
+	sap_config->enOverLapCh = !!is_overlap_enable;
 
 #ifdef FEATURE_WLAN_AP_AP_ACS_OPTIMIZE
 	hdd_debug("HDD_ACS_SKIP_STATUS = %d", hdd_ctx->skip_acs_scan_status);
@@ -4625,7 +4641,8 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
 	enum dfs_mode mode;
 	struct hdd_adapter *sta_adapter;
 	bool ignore_cac = 0;
-	uint8_t beacon_fixed_len;
+	uint8_t is_overlap_enable = 0, scc_on_dfs_chan = 0;
+	uint8_t beacon_fixed_len, indoor_chnl_marking = 0;
 	int value;
 	bool val;
 	uint32_t tx_leakage_threshold = 0;
@@ -4713,8 +4730,12 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
 		goto free;
 	}
 
+	if (QDF_STATUS_SUCCESS !=
+	    ucfg_policy_mgr_get_indoor_chnl_marking(hdd_ctx->psoc,
+						    &indoor_chnl_marking))
+		hdd_err("can't get indoor channel marking, using default");
 	/* Mark the indoor channel (passive) to disable */
-	if (iniConfig->force_ssc_disable_indoor_channel) {
+	if (indoor_chnl_marking) {
 		hdd_update_indoor_channel(hdd_ctx, true);
 		if (QDF_IS_STATUS_ERROR(
 		    sme_update_channel_list(mac_handle))) {
@@ -4765,9 +4786,13 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
 		hdd_err("ucfg_mlme_get_auto_channel_weight failed, set def");
 
 	pConfig->auto_channel_select_weight = auto_channel_select_weight;
-	ucfg_mlme_get_sap_chn_switch_bcn_count(hdd_ctx->psoc, &value);
+	status = ucfg_mlme_get_sap_chn_switch_bcn_count(hdd_ctx->psoc, &value);
+	if (!QDF_IS_STATUS_SUCCESS(status))
+		hdd_err("ucfg_mlme_get_sap_chn_switch_bcn_count fail, set def");
 	pConfig->sap_chanswitch_beacon_cnt = value;
-	ucfg_mlme_get_sap_channel_switch_mode(hdd_ctx->psoc, &val);
+	status = ucfg_mlme_get_sap_channel_switch_mode(hdd_ctx->psoc, &val);
+	if (!QDF_IS_STATUS_SUCCESS(status))
+		hdd_err("ucfg_mlme_get_sap_channel_switch_mode, set def");
 	pConfig->sap_chanswitch_mode = val;
 
 	/* channel is already set in the set_channel Call back */
@@ -4776,7 +4801,10 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
 	/* Protection parameter to enable or disable */
 	pConfig->protEnabled = iniConfig->apProtEnabled;
 
-	ucfg_mlme_get_sap_chan_switch_rate_enabled(hdd_ctx->psoc, &val);
+	status = ucfg_mlme_get_sap_chan_switch_rate_enabled(hdd_ctx->psoc,
+							    &val);
+	if (!QDF_IS_STATUS_SUCCESS(status))
+		hdd_err("ucfg_mlme_get_sap_chan_switch_rate_enabled, set def");
 	pConfig->chan_switch_hostapd_rate_enabled = val;
 
 	if (QDF_STATUS_SUCCESS ==
@@ -4785,9 +4813,16 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
 		if (mcc_to_scc_switch != QDF_MCC_TO_SCC_SWITCH_DISABLE)
 			pConfig->chan_switch_hostapd_rate_enabled = false;
 	}
-	pConfig->enOverLapCh = iniConfig->gEnableOverLapCh;
+	status = ucfg_policy_mgr_get_enable_overlap_chnl(hdd_ctx->psoc,
+							 &is_overlap_enable);
+	if (!QDF_IS_STATUS_SUCCESS(status))
+		hdd_err("can't get overlap channel INI value, using default");
+	pConfig->enOverLapCh = is_overlap_enable;
 
-	ucfg_mlme_get_sap_reduces_beacon_interval(hdd_ctx->psoc, &value);
+	status = ucfg_mlme_get_sap_reduces_beacon_interval(hdd_ctx->psoc,
+							   &value);
+	if (!QDF_IS_STATUS_SUCCESS(status))
+		hdd_err("ucfg_mlme_get_sap_reduces_beacon_interval fail");
 	pConfig->dtim_period = pBeacon->dtim_period;
 
 	pConfig->reduced_beacon_interval = value;
@@ -4861,10 +4896,20 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
 			goto error;
 		}
 
-		ucfg_mlme_get_dfs_ignore_cac(hdd_ctx->psoc, &ignore_cac);
+		status = ucfg_mlme_get_dfs_ignore_cac(hdd_ctx->psoc,
+						      &ignore_cac);
+		if (!QDF_IS_STATUS_SUCCESS(status))
+			hdd_err("can't get sta-sap scc on dfs chnl, use def");
+		status =
+		ucfg_policy_mgr_get_sta_sap_scc_on_dfs_chnl(hdd_ctx->psoc,
+							    &scc_on_dfs_chan);
+
+		if (!QDF_IS_STATUS_SUCCESS(status))
+			hdd_err("can't get sta-sap scc on dfs chnl, use def");
+
 		if (ignore_cac ||
 		    ((mcc_to_scc_switch != QDF_MCC_TO_SCC_SWITCH_DISABLE) &&
-		    iniConfig->sta_sap_scc_on_dfs_chan))
+		     scc_on_dfs_chan))
 			ignore_cac = 1;
 
 		wlansap_set_dfs_ignore_cac(mac_handle, ignore_cac);
@@ -5062,7 +5107,9 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
 	pConfig->SapMacaddr_acl = eSAP_ACCEPT_UNLESS_DENIED;
 	pConfig->num_accept_mac = 0;
 	pConfig->num_deny_mac = 0;
-	ucfg_policy_mgr_get_conc_rule1(hdd_ctx->psoc, &conc_rule1);
+	status = ucfg_policy_mgr_get_conc_rule1(hdd_ctx->psoc, &conc_rule1);
+	if (!QDF_IS_STATUS_SUCCESS(status))
+		hdd_err("can't get ucfg_policy_mgr_get_conc_rule1, use def");
 #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
 	/*
 	 * We don't want P2PGO to follow STA's channel
@@ -5344,7 +5391,7 @@ error:
 		wlan_hdd_restore_channels(hdd_ctx, true);
 
 	/* Revert the indoor to passive marking if START BSS fails */
-	if (iniConfig->force_ssc_disable_indoor_channel) {
+	if (indoor_chnl_marking) {
 		hdd_update_indoor_channel(hdd_ctx, false);
 		sme_update_channel_list(mac_handle);
 	}
@@ -5707,7 +5754,7 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
 	enum hw_mode_bandwidth channel_width;
 	int status;
 	struct sme_sta_inactivity_timeout  *sta_inactivity_timer;
-	uint8_t channel;
+	uint8_t channel, mandt_chnl_list = 0;
 	bool sta_sap_scc_on_dfs_chan;
 	uint16_t sta_cnt;
 	bool val;
@@ -5758,7 +5805,10 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
 		return -EINVAL;
 	}
 
-	if (policy_mgr_is_sap_mandatory_chan_list_enabled(hdd_ctx->psoc)) {
+	if (QDF_STATUS_SUCCESS !=
+	    ucfg_policy_mgr_get_sap_mandt_chnl(hdd_ctx->psoc, &mandt_chnl_list))
+		hdd_err("can't get mandatory channel list");
+	if (mandt_chnl_list) {
 		if (WLAN_REG_IS_5GHZ_CH(channel)) {
 			hdd_debug("channel %hu, sap mandatory chan list enabled",
 			          channel);

+ 81 - 34
core/hdd/src/wlan_hdd_main.c

@@ -1581,18 +1581,26 @@ static void hdd_update_wiphy_vhtcap(struct hdd_context *hdd_ctx)
  */
 static void hdd_update_hw_dbs_capable(struct hdd_context *hdd_ctx)
 {
-	struct hdd_config *cfg_ini = hdd_ctx->config;
 	uint8_t hw_dbs_capable = 0;
+	uint8_t dual_mac_feature = DISABLE_DBS_CXN_AND_SCAN;
+	QDF_STATUS status;
 
-	if (policy_mgr_is_hw_dbs_capable(hdd_ctx->psoc) &&
-		((cfg_ini->dual_mac_feature_disable ==
-			ENABLE_DBS_CXN_AND_SCAN) ||
-		(cfg_ini->dual_mac_feature_disable ==
-			ENABLE_DBS_CXN_AND_ENABLE_SCAN_WITH_ASYNC_SCAN_OFF) ||
-		(cfg_ini->dual_mac_feature_disable ==
-			ENABLE_DBS_CXN_AND_DISABLE_SIMULTANEOUS_SCAN)))
-		hw_dbs_capable = 1;
-
+	status = ucfg_policy_mgr_get_dual_mac_feature(hdd_ctx->psoc,
+						      &dual_mac_feature);
+	if (status != QDF_STATUS_SUCCESS)
+		hdd_err("can't get dual_mac_feature value");
+	if (policy_mgr_is_hw_dbs_capable(hdd_ctx->psoc)) {
+		switch (dual_mac_feature) {
+		case ENABLE_DBS_CXN_AND_SCAN:
+		case ENABLE_DBS_CXN_AND_ENABLE_SCAN_WITH_ASYNC_SCAN_OFF:
+		case ENABLE_DBS_CXN_AND_DISABLE_SIMULTANEOUS_SCAN:
+			hw_dbs_capable = 1;
+			break;
+		default:
+			hw_dbs_capable = 0;
+			break;
+		}
+	}
 	sme_update_hw_dbs_capable(hdd_ctx->mac_handle, hw_dbs_capable);
 }
 
@@ -2305,6 +2313,7 @@ wlan_hdd_update_dbs_scan_and_fw_mode_config(void)
 	QDF_STATUS status;
 	uint32_t channel_select_logic_conc = 0;
 	struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
+	uint8_t dual_mac_feature = DISABLE_DBS_CXN_AND_SCAN;
 
 	if (!hdd_ctx) {
 		hdd_err("HDD context is NULL");
@@ -2318,15 +2327,26 @@ wlan_hdd_update_dbs_scan_and_fw_mode_config(void)
 	cfg.scan_config = 0;
 	cfg.fw_mode_config = 0;
 	cfg.set_dual_mac_cb = policy_mgr_soc_set_dual_mac_cfg_cb;
+	status =
 	ucfg_policy_mgr_get_chnl_select_plcy(hdd_ctx->psoc,
 					     &channel_select_logic_conc);
+	if (status != QDF_STATUS_SUCCESS) {
+		hdd_err("ucfg_policy_mgr_get_chnl_select_plcy failed, use def");
+		return status;
+	}
+	status =
+	ucfg_policy_mgr_get_dual_mac_feature(hdd_ctx->psoc,
+					     &dual_mac_feature);
+	if (status != QDF_STATUS_SUCCESS) {
+		hdd_err("ucfg_policy_mgr_get_dual_mac_feature failed, use def");
+		return status;
+	}
 
-	if (hdd_ctx->config->dual_mac_feature_disable !=
-	    DISABLE_DBS_CXN_AND_SCAN) {
+	if (dual_mac_feature != DISABLE_DBS_CXN_AND_SCAN) {
 		status = policy_mgr_get_updated_scan_and_fw_mode_config(
 				hdd_ctx->psoc, &cfg.scan_config,
 				&cfg.fw_mode_config,
-				hdd_ctx->config->dual_mac_feature_disable,
+				dual_mac_feature,
 				channel_select_logic_conc);
 
 		if (status != QDF_STATUS_SUCCESS) {
@@ -4574,6 +4594,12 @@ static int hdd_configure_chain_mask(struct hdd_adapter *adapter)
 	struct wma_caps_per_phy non_dbs_phy_cap;
 	struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	bool enable2x2 = false, enable_bt_chain_sep = false;
+	uint8_t dual_mac_feature = DISABLE_DBS_CXN_AND_SCAN;
+
+	status = ucfg_policy_mgr_get_dual_mac_feature(hdd_ctx->psoc,
+						      &dual_mac_feature);
+	if (!QDF_IS_STATUS_SUCCESS(status))
+		hdd_err("unable to get dual mac feature");
 
 	status = ucfg_mlme_get_vht_enable2x2(hdd_ctx->psoc, &enable2x2);
 	if (QDF_IS_STATUS_ERROR(status))
@@ -4586,7 +4612,7 @@ static int hdd_configure_chain_mask(struct hdd_adapter *adapter)
 
 	hdd_debug("enable2x2: %d, lte_coex: %d, disable_DBS: %d",
 		  enable2x2, hdd_ctx->lte_coex_ant_share,
-		  hdd_ctx->config->dual_mac_feature_disable);
+		  dual_mac_feature);
 	hdd_debug("enable_bt_chain_separation %d", enable_bt_chain_sep);
 
 	status = wma_get_caps_for_phyidx_hwmode(&non_dbs_phy_cap,
@@ -4610,10 +4636,9 @@ static int hdd_configure_chain_mask(struct hdd_adapter *adapter)
 		return 0;
 	}
 
-	if (hdd_ctx->config->dual_mac_feature_disable !=
-	    DISABLE_DBS_CXN_AND_SCAN) {
+	if (dual_mac_feature != DISABLE_DBS_CXN_AND_SCAN) {
 		hdd_debug("DBS enabled(%d). skip chain mask programming",
-			  hdd_ctx->config->dual_mac_feature_disable);
+			  dual_mac_feature);
 		return 0;
 	}
 
@@ -8676,6 +8701,7 @@ void hdd_unsafe_channel_restart_sap(struct hdd_context *hdd_ctxt)
 	uint32_t i;
 	bool found = false;
 	uint8_t restart_chan;
+	uint8_t scc_on_lte_coex = 0;
 	bool value;
 	QDF_STATUS status;
 	bool is_acs_support_for_dfs_ltecoex = cfg_default(CFG_USER_ACS_DFS_LTE);
@@ -8693,13 +8719,18 @@ void hdd_unsafe_channel_restart_sap(struct hdd_context *hdd_ctxt)
 		}
 
 		found = false;
+		status =
+		ucfg_policy_mgr_get_sta_sap_scc_lte_coex_chnl(hdd_ctxt->psoc,
+							      &scc_on_lte_coex);
+		if (!QDF_IS_STATUS_SUCCESS(status))
+			hdd_err("can't get scc on lte coex chnl, use def");
 		/*
 		 * If STA+SAP is doing SCC & g_sta_sap_scc_on_lte_coex_chan
 		 * is set, no need to move SAP.
 		 */
 		if (policy_mgr_is_sta_sap_scc(hdd_ctxt->psoc,
 			adapter->session.ap.operating_channel) &&
-			hdd_ctxt->config->sta_sap_scc_on_lte_coex_chan)
+			scc_on_lte_coex)
 			hdd_debug("SAP is allowed on SCC channel, no need to move SAP");
 		else {
 			for (i = 0; i < hdd_ctxt->unsafe_channel_count; i++) {
@@ -9864,6 +9895,7 @@ static int hdd_update_user_config(struct hdd_context *hdd_ctx)
 	struct wlan_objmgr_psoc_user_config *user_config;
 	bool skip_dfs_in_p2p_search = false;
 	uint8_t band_capability;
+	uint8_t dual_mac_feature = DISABLE_DBS_CXN_AND_SCAN;
 	QDF_STATUS status;
 	bool value = false;
 
@@ -9871,13 +9903,17 @@ static int hdd_update_user_config(struct hdd_context *hdd_ctx)
 	if (QDF_IS_STATUS_ERROR(status))
 		return -EIO;
 
+	status = ucfg_policy_mgr_get_dual_mac_feature(hdd_ctx->psoc,
+						      &dual_mac_feature);
+	if (QDF_IS_STATUS_ERROR(status))
+		return -EIO;
+
 	user_config = qdf_mem_malloc(sizeof(*user_config));
 	if (!user_config)
 		return -ENOMEM;
 
 	user_config->dot11_mode = hdd_ctx->config->dot11Mode;
-	user_config->dual_mac_feature_disable =
-		hdd_ctx->config->dual_mac_feature_disable;
+	user_config->dual_mac_feature_disable = dual_mac_feature;
 	user_config->indoor_channel_support =
 		hdd_ctx->config->indoor_channel_support;
 
@@ -10495,9 +10531,6 @@ static int hdd_pre_enable_configure(struct hdd_context *hdd_ctx)
 
 	hdd_init_channel_avoidance(hdd_ctx);
 
-	/* update enable sap mandatory chan list */
-	policy_mgr_enable_disable_sap_mandatory_chan_list(hdd_ctx->psoc,
-			hdd_ctx->config->enable_sap_mandatory_chan_list);
 out:
 	return ret;
 }
@@ -10619,14 +10652,20 @@ int hdd_dbs_scan_selection_init(struct hdd_context *hdd_ctx)
 	struct wmi_dbs_scan_sel_params dbs_scan_params;
 	uint32_t i = 0;
 	uint8_t count = 0, numentries = 0;
+	uint8_t dual_mac_feature;
 	uint8_t dbs_scan_config[CDS_DBS_SCAN_PARAM_PER_CLIENT
 				* CDS_DBS_SCAN_CLIENTS_MAX];
 
+	status = ucfg_policy_mgr_get_dual_mac_feature(hdd_ctx->psoc,
+						      &dual_mac_feature);
+
+	if (status != QDF_STATUS_SUCCESS) {
+		hdd_err("can't get dual mac feature flag");
+		return -EINVAL;
+	}
 	/* check if DBS is enabled or supported */
-	if ((hdd_ctx->config->dual_mac_feature_disable ==
-	     DISABLE_DBS_CXN_AND_SCAN) ||
-	    (hdd_ctx->config->dual_mac_feature_disable ==
-	     ENABLE_DBS_CXN_AND_DISABLE_DBS_SCAN))
+	if ((dual_mac_feature == DISABLE_DBS_CXN_AND_SCAN) ||
+	    (dual_mac_feature == ENABLE_DBS_CXN_AND_DISABLE_DBS_SCAN))
 		return -EINVAL;
 
 	hdd_string_to_u8_array(hdd_ctx->config->dbs_scan_selection,
@@ -10994,7 +11033,7 @@ int hdd_configure_cds(struct hdd_context *hdd_ctx)
 	mac_handle_t mac_handle;
 	bool enable_rts_sifsbursting;
 	uint8_t enable_phy_reg_retention;
-	uint8_t max_mpdus_inampdu;
+	uint8_t max_mpdus_inampdu, is_force_1x1 = 0;
 	uint32_t num_abg_tx_chains = 0;
 	uint16_t num_11b_tx_chains = 0;
 	uint16_t num_11ag_tx_chains = 0;
@@ -11006,8 +11045,12 @@ int hdd_configure_cds(struct hdd_context *hdd_ctx)
 	mac_handle = hdd_ctx->mac_handle;
 
 	hdd_action_oui_send(hdd_ctx);
-
-	if (hdd_ctx->config->is_force_1x1)
+	status = ucfg_policy_mgr_get_force_1x1(hdd_ctx->psoc, &is_force_1x1);
+	if (status != QDF_STATUS_SUCCESS) {
+		hdd_err("Failed to get force 1x1 value");
+		goto out;
+	}
+	if (is_force_1x1)
 		sme_cli_set_command(0, (int)WMI_PDEV_PARAM_SET_IOT_PATTERN,
 				1, PDEV_CMD);
 	/* set chip power save failure detected callback */
@@ -11016,8 +11059,10 @@ int hdd_configure_cds(struct hdd_context *hdd_ctx)
 
 	status = ucfg_get_max_mpdus_inampdu(hdd_ctx->psoc,
 					    &max_mpdus_inampdu);
-	if (status)
-		return status;
+	if (status) {
+		hdd_err("Failed to get max mpdus in ampdu value");
+		goto out;
+	}
 
 	if (max_mpdus_inampdu) {
 		set_value = max_mpdus_inampdu;
@@ -11027,8 +11072,10 @@ int hdd_configure_cds(struct hdd_context *hdd_ctx)
 
 	status = ucfg_get_enable_rts_sifsbursting(hdd_ctx->psoc,
 						  &enable_rts_sifsbursting);
-	if (status)
-		return status;
+	if (status) {
+		hdd_err("Failed to get rts sifs bursting value");
+		goto out;
+	}
 
 	if (enable_rts_sifsbursting) {
 		set_value = enable_rts_sifsbursting;

+ 17 - 6
core/hdd/src/wlan_hdd_regulatory.c

@@ -32,6 +32,7 @@
 #include "cds_utils.h"
 #include "pld_common.h"
 #include <net/cfg80211.h>
+#include "wlan_policy_mgr_ucfg.h"
 
 #define REG_RULE_2412_2462    REG_RULE(2412-10, 2462+10, 40, 0, 20, 0)
 
@@ -207,7 +208,7 @@ void hdd_reset_global_reg_params(void)
 static void reg_program_config_vars(struct hdd_context *hdd_ctx,
 				    struct reg_config_vars *config_vars)
 {
-	uint8_t band_capability = 0;
+	uint8_t band_capability = 0, indoor_chnl_marking = 0;
 	QDF_STATUS status;
 	bool country_priority = 0;
 	bool value = false;
@@ -216,6 +217,11 @@ static void reg_program_config_vars(struct hdd_context *hdd_ctx,
 	if (QDF_IS_STATUS_ERROR(status))
 		hdd_err("Failed to get MLME band cap, defaulting to BAND_ALL");
 
+	status = ucfg_policy_mgr_get_indoor_chnl_marking(hdd_ctx->psoc,
+							 &indoor_chnl_marking);
+	if (QDF_STATUS_SUCCESS != status)
+		hdd_err("can't get indoor channel marking, using default");
+
 	status = ucfg_mlme_is_11d_enabled(hdd_ctx->psoc, &value);
 	if (!QDF_IS_STATUS_SUCCESS(status))
 		hdd_err("Invalid 11d_enable flag");
@@ -228,8 +234,7 @@ static void reg_program_config_vars(struct hdd_context *hdd_ctx,
 	config_vars->dfs_enabled = hdd_ctx->config->enableDFSChnlScan;
 	config_vars->indoor_chan_enabled =
 		hdd_ctx->config->indoor_channel_support;
-	config_vars->force_ssc_disable_indoor_channel =
-		hdd_ctx->config->force_ssc_disable_indoor_channel;
+	config_vars->force_ssc_disable_indoor_channel = indoor_chnl_marking;
 	config_vars->band_capability = band_capability;
 	config_vars->restart_beaconing = hdd_ctx->config->
 		restart_beaconing_on_chan_avoid_event;
@@ -424,10 +429,16 @@ static void hdd_process_regulatory_data(struct hdd_context *hdd_ctx,
 	enum channel_enum chan_enum = CHAN_ENUM_1;
 	struct ieee80211_channel *wiphy_chan, *wiphy_chan_144 = NULL;
 	struct regulatory_channel *cds_chan;
-	uint8_t band_capability;
+	uint8_t band_capability, indoor_chnl_marking = 0;
+	QDF_STATUS status;
 
 	band_capability = hdd_ctx->curr_band;
 
+	status = ucfg_policy_mgr_get_indoor_chnl_marking(hdd_ctx->psoc,
+							 &indoor_chnl_marking);
+	if (QDF_STATUS_SUCCESS != status)
+		hdd_err("can't get indoor channel marking, using default");
+
 	for (band_num = 0; band_num < HDD_NUM_NL80211_BANDS; band_num++) {
 
 		if (wiphy->bands[band_num] == NULL)
@@ -449,8 +460,8 @@ static void hdd_process_regulatory_data(struct hdd_context *hdd_ctx,
 			if (!reset)
 				hdd_modify_wiphy(wiphy, wiphy_chan);
 
-			if (hdd_ctx->config->force_ssc_disable_indoor_channel &&
-			     (wiphy_chan->flags & IEEE80211_CHAN_INDOOR_ONLY))
+			if (indoor_chnl_marking &&
+			    (wiphy_chan->flags & IEEE80211_CHAN_INDOOR_ONLY))
 				cds_chan->chan_flags |=
 					REGULATORY_CHAN_INDOOR_ONLY;
 

+ 13 - 8
core/hdd/src/wlan_hdd_softap_tx_rx.c

@@ -41,6 +41,7 @@
 #include "wlan_p2p_ucfg_api.h"
 #include <wlan_hdd_regulatory.h>
 #include "wlan_ipa_ucfg_api.h"
+#include "wlan_policy_mgr_ucfg.h"
 #include <wma_types.h>
 
 /* Preprocessor definitions and constants */
@@ -1152,29 +1153,33 @@ static QDF_STATUS hdd_softap_deregister_bc_sta(struct hdd_adapter *adapter)
 
 QDF_STATUS hdd_softap_stop_bss(struct hdd_adapter *adapter)
 {
-	QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE;
-	uint8_t sta_id = 0;
+	QDF_STATUS status = QDF_STATUS_E_FAILURE;
+	uint8_t sta_id = 0, indoor_chnl_marking = 0;
 	struct hdd_context *hdd_ctx;
 	struct hdd_ap_ctx *ap_ctx;
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ap_ctx = WLAN_HDD_GET_AP_CTX_PTR(adapter);
 
+	status = ucfg_policy_mgr_get_indoor_chnl_marking(hdd_ctx->psoc,
+							 &indoor_chnl_marking);
+	if (QDF_STATUS_SUCCESS != status)
+		hdd_err("can't get indoor channel marking, using default");
 	/* This is stop bss callback running in scheduler thread so do not
 	 * driver unload in progress check otherwise it can lead to peer
 	 * object leak
 	 */
-	qdf_status = hdd_softap_deregister_bc_sta(adapter);
+	status = hdd_softap_deregister_bc_sta(adapter);
 
-	if (!QDF_IS_STATUS_SUCCESS(qdf_status))
+	if (!QDF_IS_STATUS_SUCCESS(status))
 		hdd_err("Failed to deregister BC sta Id %d",
 			ap_ctx->broadcast_sta_id);
 
 	for (sta_id = 0; sta_id < WLAN_MAX_STA_COUNT; sta_id++) {
 		/* This excludes BC sta as it is already deregistered */
 		if (adapter->sta_info[sta_id].in_use) {
-			qdf_status = hdd_softap_deregister_sta(adapter, sta_id);
-			if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
+			status = hdd_softap_deregister_sta(adapter, sta_id);
+			if (!QDF_IS_STATUS_SUCCESS(status)) {
 				hdd_err("Failed to deregister sta Id %d",
 					sta_id);
 			}
@@ -1184,7 +1189,7 @@ QDF_STATUS hdd_softap_stop_bss(struct hdd_adapter *adapter)
 		wlan_hdd_restore_channels(hdd_ctx, true);
 
 	/*  Mark the indoor channel (passive) to enable  */
-	if (hdd_ctx->config->force_ssc_disable_indoor_channel) {
+	if (indoor_chnl_marking) {
 		hdd_update_indoor_channel(hdd_ctx, false);
 		sme_update_channel_list(hdd_ctx->mac_handle);
 	}
@@ -1201,7 +1206,7 @@ QDF_STATUS hdd_softap_stop_bss(struct hdd_adapter *adapter)
 			hdd_err("WLAN_AP_DISCONNECT event failed");
 	}
 
-	return qdf_status;
+	return status;
 }
 
 QDF_STATUS hdd_softap_change_sta_state(struct hdd_adapter *adapter,

+ 16 - 4
core/hdd/src/wlan_hdd_wext.c

@@ -6175,7 +6175,9 @@ static int __iw_set_three_ints_getnone(struct net_device *dev,
 	int *value = (int *)extra;
 	int sub_cmd = value[0];
 	int ret;
+	uint8_t dual_mac_feature = DISABLE_DBS_CXN_AND_SCAN;
 	struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
+	QDF_STATUS status;
 
 	hdd_enter_dev(dev);
 
@@ -6204,8 +6206,12 @@ static int __iw_set_three_ints_getnone(struct net_device *dev,
 
 	case WE_SET_DUAL_MAC_SCAN_CONFIG:
 		hdd_debug("Ioctl to set dual mac scan config");
-		if (hdd_ctx->config->dual_mac_feature_disable ==
-				DISABLE_DBS_CXN_AND_SCAN) {
+		status =
+		ucfg_policy_mgr_get_dual_mac_feature(hdd_ctx->psoc,
+						     &dual_mac_feature);
+		if (status != QDF_STATUS_SUCCESS)
+			hdd_err("can't get dual mac feature val, use def");
+		if (dual_mac_feature == DISABLE_DBS_CXN_AND_SCAN) {
 			hdd_err("Dual mac feature is disabled from INI");
 			return -EPERM;
 		}
@@ -9177,7 +9183,9 @@ static int __iw_set_two_ints_getnone(struct net_device *dev,
 	int *value = (int *)extra;
 	int sub_cmd = value[0];
 	int ret;
+	uint8_t dual_mac_feature = DISABLE_DBS_CXN_AND_SCAN;
 	struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
+	QDF_STATUS status;
 
 	hdd_enter_dev(dev);
 
@@ -9217,8 +9225,12 @@ static int __iw_set_two_ints_getnone(struct net_device *dev,
 		break;
 	case WE_SET_DUAL_MAC_FW_MODE_CONFIG:
 		hdd_debug("Ioctl to set dual fw mode config");
-		if (hdd_ctx->config->dual_mac_feature_disable ==
-				DISABLE_DBS_CXN_AND_SCAN) {
+		status =
+		ucfg_policy_mgr_get_dual_mac_feature(hdd_ctx->psoc,
+						     &dual_mac_feature);
+		if (status != QDF_STATUS_SUCCESS)
+			hdd_err("can't get dual mac feature val, use def");
+		if (dual_mac_feature == DISABLE_DBS_CXN_AND_SCAN) {
 			hdd_err("Dual mac feature is disabled from INI");
 			return -EPERM;
 		}