Browse Source

qcacld-3.0: Move DBS/vdev/channel selection related INIs to plcy mgr

As part of new INI/CFG model, move dbs_selection_policy,
vdev_priority_list, channel_select_logic_conc INIs'
ownership from HDD to policy manager.

CRs-Fixed: 2324393
Change-Id: I8b38916d92931ef9cd1727481740bc61cad8f808
Krunal Soni 6 years ago
parent
commit
13b50f8014
3 changed files with 3 additions and 124 deletions
  1. 0 95
      core/hdd/inc/wlan_hdd_cfg.h
  2. 0 25
      core/hdd/src/wlan_hdd_cfg.c
  3. 3 4
      core/hdd/src/wlan_hdd_main.c

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

@@ -4913,71 +4913,6 @@ enum hdd_link_speed_rpt_type {
 #define CFG_ENABLE_NON_DFS_CHAN_ON_RADAR_MAX       (1)
 #define CFG_ENABLE_NON_DFS_CHAN_ON_RADAR_DEFAULT   (0)
 
-/*
- * <ini>
- * dbs_selection_policy - Configure dbs selection policy.
- * @Min: 0
- * @Max: 3
- * @Default: 0
- *
- *  set band preference or Vdev preference.
- *      bit[0] = 0: 5G 2x2 preferred to select 2x2 5G + 1x1 2G DBS mode.
- *      bit[0] = 1: 2G 2x2 preferred to select 2x2 2G + 1x1 5G DBS mode.
- *      bit[1] = 1: vdev priority enabled. The INI "vdev_priority_list" will
- * specify the vdev priority.
- *      bit[1] = 0: vdev priority disabled.
- * This INI only take effect for Genoa dual DBS hw.
- *
- * Supported Feature: DBS
- *
- * Usage: Internal/External
- *
- * </ini>
- */
-#define CFG_DBS_SELECTION_POLICY               "dbs_selection_policy"
-#define CFG_DBS_SELECTION_POLICY_MIN           (0)
-#define CFG_DBS_SELECTION_POLICY_MAX           (0x3)
-#define CFG_DBS_SELECTION_POLICY_DEFAULT       (0)
-
-/*
- * <ini>
- * vdev_priority_list - Configure vdev priority list.
- * @Min: 0
- * @Max: 0x4444
- * @Default: 0x4321
- *
- * @vdev_priority_list: vdev priority list
- *      bit[0-3]: pri_id (policy_mgr_pri_id) of highest priority
- *      bit[4-7]: pri_id (policy_mgr_pri_id) of second priority
- *      bit[8-11]: pri_id (policy_mgr_pri_id) of third priority
- *      bit[12-15]: pri_id (policy_mgr_pri_id) of fourth priority
- *      example: 0x4321 - CLI < GO < SAP < STA
- *      vdev priority id mapping:
- *        PM_STA_PRI_ID = 1,
- *        PM_SAP_PRI_ID = 2,
- *        PM_P2P_GO_PRI_ID = 3,
- *        PM_P2P_CLI_PRI_ID = 4,
- * When the previous INI "dbs_selection_policy" bit[1]=1, which means
- * the vdev 2x2 prioritization enabled. Then this INI will be used to
- * specify the vdev type priority list. For example :
- * dbs_selection_policy=0x2
- * vdev_priority_list=0x4312
- * means: default preference 2x2 band is 5G, vdev 2x2 prioritization enabled.
- * And the priority list is CLI < GO < STA < SAP
- *
- * This INI only take effect for Genoa dual DBS hw.
- *
- * Supported Feature: DBS
- *
- * Usage: Internal/External
- *
- * </ini>
- */
-#define CFG_VDEV_PRIORITY_LIST               "vdev_priority_list"
-#define CFG_VDEV_PRIORITY_LIST_MIN           (0)
-#define CFG_VDEV_PRIORITY_LIST_MAX           (0x4444)
-#define CFG_VDEV_PRIORITY_LIST_DEFAULT       (0x4321)
-
 /*
  * <ini>
  * TSOEnable - Control to enable tso feature
@@ -6793,33 +6728,6 @@ enum hdd_link_speed_rpt_type {
 #define CFG_DTIM_SELECTION_DIVERSITY_MAX     (30)
 #define CFG_DTIM_SELECTION_DIVERSITY_DEFAULT (5)
 
-/*
- * <ini>
- * channel_select_logic_conc - Set channel selection logic
- * for different concurrency combinations to DBS or inter band
- * MCC. Default is DBS for STA+STA and STA+P2P.
- * @Min: 0x00000000
- * @Max: 0xFFFFFFFF
- * @Default: 0x00000000
- *
- * 0 - inter-band MCC
- * 1 - DBS
- *
- * BIT 0: STA+STA
- * BIT 1: STA+P2P
- * BIT 2-31: Reserved
- *
- * Supported Feature: STA+STA, STA+P2P
- *
- * Usage: External
- *
- * </ini>
- */
-#define CFG_CHANNEL_SELECT_LOGIC_CONC_NAME    "channel_select_logic_conc"
-#define CFG_CHANNEL_SELECT_LOGIC_CONC_MIN     (0x00000000)
-#define CFG_CHANNEL_SELECT_LOGIC_CONC_MAX     (0xFFFFFFFF)
-#define CFG_CHANNEL_SELECT_LOGIC_CONC_DEFAULT (0x00000003)
-
 /*
  * <ini>
  * gTxSchDelay - Enable/Disable Tx sch delay
@@ -7648,8 +7556,6 @@ struct hdd_config {
 	uint8_t sap_11ac_override;
 	uint8_t go_11ac_override;
 	uint8_t prefer_non_dfs_on_radar;
-	uint32_t dbs_selection_policy;
-	uint32_t vdev_priority_list;
 	bool tso_enable;
 	bool lro_enable;
 	bool gro_enable;
@@ -7798,7 +7704,6 @@ struct hdd_config {
 	uint32_t neighbor_report_offload_max_req_cap;
 	bool action_oui_enable;
 	uint8_t action_oui_str[ACTION_OUI_MAXIMUM_ID][ACTION_OUI_MAX_STR_LEN];
-	uint32_t channel_select_logic_conc;
 	uint16_t wmi_wq_watchdog_timeout;
 	bool enable_bt_chain_separation;
 	uint8_t enable_tx_sch_delay;

+ 0 - 25
core/hdd/src/wlan_hdd_cfg.c

@@ -2074,20 +2074,6 @@ struct reg_table_entry g_registry_table[] = {
 		     CFG_ENABLE_NON_DFS_CHAN_ON_RADAR_MIN,
 		     CFG_ENABLE_NON_DFS_CHAN_ON_RADAR_MAX),
 
-	REG_VARIABLE(CFG_DBS_SELECTION_POLICY, WLAN_PARAM_Integer,
-		     struct hdd_config, dbs_selection_policy,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_DBS_SELECTION_POLICY_DEFAULT,
-		     CFG_DBS_SELECTION_POLICY_MIN,
-		     CFG_DBS_SELECTION_POLICY_MAX),
-
-	REG_VARIABLE(CFG_VDEV_PRIORITY_LIST, WLAN_PARAM_Integer,
-		     struct hdd_config, vdev_priority_list,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_VDEV_PRIORITY_LIST_DEFAULT,
-		     CFG_VDEV_PRIORITY_LIST_MIN,
-		     CFG_VDEV_PRIORITY_LIST_MAX),
-
 	REG_VARIABLE(CFG_TSO_ENABLED_NAME, WLAN_PARAM_Integer,
 		     struct hdd_config, tso_enable,
 		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -2807,13 +2793,6 @@ struct reg_table_entry g_registry_table[] = {
 		     CFG_DTIM_SELECTION_DIVERSITY_MIN,
 		     CFG_DTIM_SELECTION_DIVERSITY_MAX),
 
-	REG_VARIABLE(CFG_CHANNEL_SELECT_LOGIC_CONC_NAME, WLAN_PARAM_HexInteger,
-		     struct hdd_config, channel_select_logic_conc,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_CHANNEL_SELECT_LOGIC_CONC_DEFAULT,
-		     CFG_CHANNEL_SELECT_LOGIC_CONC_MIN,
-		     CFG_CHANNEL_SELECT_LOGIC_CONC_MAX),
-
 	REG_VARIABLE(CFG_TX_SCH_DELAY_NAME,
 		     WLAN_PARAM_Integer,
 		     struct hdd_config, enable_tx_sch_delay,
@@ -4253,12 +4232,8 @@ QDF_STATUS hdd_set_policy_mgr_user_cfg(struct hdd_context *hdd_ctx)
 	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->channel_select_logic_conc =
-		hdd_ctx->config->channel_select_logic_conc;
 	user_cfg->sta_sap_scc_on_lte_coex_chan =
 		hdd_ctx->config->sta_sap_scc_on_lte_coex_chan;
-	user_cfg->dbs_selection_policy = hdd_ctx->config->dbs_selection_policy;
-	user_cfg->vdev_priority_list = hdd_ctx->config->vdev_priority_list;
 	status = policy_mgr_set_user_cfg(hdd_ctx->psoc, user_cfg);
 	qdf_mem_free(user_cfg);
 

+ 3 - 4
core/hdd/src/wlan_hdd_main.c

@@ -2110,7 +2110,7 @@ wlan_hdd_update_dbs_scan_and_fw_mode_config(void)
 {
 	struct policy_mgr_dual_mac_config cfg = {0};
 	QDF_STATUS status;
-	uint32_t channel_select_logic_conc;
+	uint32_t channel_select_logic_conc = 0;
 	struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
 
 	if (!hdd_ctx) {
@@ -2125,9 +2125,8 @@ 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;
-
-	channel_select_logic_conc = hdd_ctx->config->
-						channel_select_logic_conc;
+	ucfg_policy_mgr_get_chnl_select_plcy(hdd_ctx->psoc,
+					     &channel_select_logic_conc);
 
 	if (hdd_ctx->config->dual_mac_feature_disable !=
 	    DISABLE_DBS_CXN_AND_SCAN) {