diff --git a/umac/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h b/umac/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h index f39b636346..7e8c598ff3 100644 --- a/umac/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h +++ b/umac/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h @@ -64,6 +64,112 @@ typedef const enum policy_mgr_conc_next_action ((channel_select_logic_conc & PM_FW_MODE_STA_P2P_BIT_MASK) >> \ PM_FW_MODE_STA_P2P_BIT_POS) +/** + * policy_mgr_get_allow_mcc_go_diff_bi() - to get information on whether GO + * can have diff BI than STA in MCC + * @psoc: pointer to psoc + * @allow_mcc_go_diff_bi: value to be filled + * + * This API is used to find out whether GO's BI can different than STA in MCC + * scenario + * + * Return: QDF_STATUS_SUCCESS up on success and any other status for failure. + */ +QDF_STATUS +policy_mgr_get_allow_mcc_go_diff_bi(struct wlan_objmgr_psoc *psoc, + uint8_t *allow_mcc_go_diff_bi); +/** + * policy_mgr_get_enable_overlap_chnl() - to find out if overlap channels + * are enabled for SAP + * @psoc: pointer to psoc + * @enable_overlap_chnl: value to be filled + * + * This API is used to find out whether overlap channels are enabled for SAP + * + * Return: QDF_STATUS_SUCCESS up on success and any other status for failure. + */ +QDF_STATUS +policy_mgr_get_enable_overlap_chnl(struct wlan_objmgr_psoc *psoc, + uint8_t *enable_overlap_chnl); +/** + * policy_mgr_get_dual_mac_feature() - to find out if DUAL MAC feature is + * enabled + * @psoc: pointer to psoc + * @dual_mac_feature: value to be filled + * + * This API is used to find out whether dual mac (dual radio) specific feature + * is enabled or not + * + * Return: QDF_STATUS_SUCCESS up on success and any other status for failure. + */ +QDF_STATUS policy_mgr_get_dual_mac_feature(struct wlan_objmgr_psoc *psoc, + uint8_t *dual_mac_feature); +/** + * policy_mgr_get_force_1x1() - to find out if 1x1 connection is enforced + * + * @psoc: pointer to psoc + * @force_1x1: value to be filled + * + * This API is used to find out if 1x1 connection is enforced. + * + * Return: QDF_STATUS_SUCCESS up on success and any other status for failure. + */ +QDF_STATUS policy_mgr_get_force_1x1(struct wlan_objmgr_psoc *psoc, + uint8_t *force_1x1); +/** + * policy_mgr_get_sta_sap_scc_on_dfs_chnl() - to find out if STA and SAP + * SCC is allowed on DFS channel + * @psoc: pointer to psoc + * @sta_sap_scc_on_dfs_chnl: value to be filled + * + * This API is used to find out whether STA and SAP SCC is allowed on + * DFS channels + * + * Return: QDF_STATUS_SUCCESS up on success and any other status for failure. + */ +QDF_STATUS +policy_mgr_get_sta_sap_scc_on_dfs_chnl(struct wlan_objmgr_psoc *psoc, + uint8_t *sta_sap_scc_on_dfs_chnl); +/** + * policy_mgr_get_sta_sap_scc_lte_coex_chnl() - to find out if STA & SAP + * SCC is allowed on LTE COEX + * @psoc: pointer to psoc + * @sta_sap_scc_lte_coex: value to be filled + * + * This API is used to find out whether STA and SAP scc is allowed on LTE COEX + * channel + * + * Return: QDF_STATUS_SUCCESS up on success and any other status for failure. + */ +QDF_STATUS +policy_mgr_get_sta_sap_scc_lte_coex_chnl(struct wlan_objmgr_psoc *psoc, + uint8_t *sta_sap_scc_lte_coex); +/** + * policy_mgr_get_sap_mandt_chnl() - to find out if SAP mandatory channel + * support is enabled + * @psoc: pointer to psoc + * @sap_mandt_chnl: value to be filled + * + * This API is used to find out whether SAP's mandatory channel support + * is enabled + * + * Return: QDF_STATUS_SUCCESS up on success and any other status for failure. + */ +QDF_STATUS policy_mgr_get_sap_mandt_chnl(struct wlan_objmgr_psoc *psoc, + uint8_t *sap_mandt_chnl); +/** + * policy_mgr_get_indoor_chnl_marking() - to get if indoor channel can be + * marked as disabled + * @psoc: pointer to psoc + * @indoor_chnl_marking: value to be filled + * + * This API is used to find out whether indoor channel can be marked as disabled + * + * Return: QDF_STATUS_SUCCESS up on success and any other status for failure. + */ +QDF_STATUS +policy_mgr_get_indoor_chnl_marking(struct wlan_objmgr_psoc *psoc, + uint8_t *indoor_chnl_marking); /** * policy_mgr_get_mcc_scc_switch() - To mcc to scc switch setting from INI * @psoc: pointer to psoc @@ -75,7 +181,7 @@ typedef const enum policy_mgr_conc_next_action * Return: QDF_STATUS_SUCCESS up on success and any other status for failure. */ QDF_STATUS policy_mgr_get_mcc_scc_switch(struct wlan_objmgr_psoc *psoc, - uint8_t *mcc_scc_switch); + uint8_t *mcc_scc_switch); /** * policy_mgr_get_sys_pref() - to get system preference * @psoc: pointer to psoc @@ -87,7 +193,7 @@ QDF_STATUS policy_mgr_get_mcc_scc_switch(struct wlan_objmgr_psoc *psoc, * Return: QDF_STATUS_SUCCESS up on success and any other status for failure. */ QDF_STATUS policy_mgr_get_sys_pref(struct wlan_objmgr_psoc *psoc, - uint8_t *sys_pref); + uint8_t *sys_pref); /** * policy_mgr_set_sys_pref() - to set system preference * @psoc: pointer to psoc @@ -110,7 +216,7 @@ QDF_STATUS policy_mgr_set_sys_pref(struct wlan_objmgr_psoc *psoc, * Return: QDF_STATUS_SUCCESS up on success and any other status for failure. */ QDF_STATUS policy_mgr_get_max_conc_cxns(struct wlan_objmgr_psoc *psoc, - uint8_t *max_conc_cxns); + uint8_t *max_conc_cxns); /** * policy_mgr_get_conc_rule1() - to find out if conc rule1 is enabled * @psoc: pointer to psoc @@ -121,7 +227,7 @@ QDF_STATUS policy_mgr_get_max_conc_cxns(struct wlan_objmgr_psoc *psoc, * Return: QDF_STATUS_SUCCESS up on success and any other status for failure. */ QDF_STATUS policy_mgr_get_conc_rule1(struct wlan_objmgr_psoc *psoc, - uint8_t *conc_rule1); + uint8_t *conc_rule1); /** * policy_mgr_get_conc_rule2() - to find out if conc rule2 is enabled * @psoc: pointer to psoc @@ -132,7 +238,7 @@ QDF_STATUS policy_mgr_get_conc_rule1(struct wlan_objmgr_psoc *psoc, * Return: QDF_STATUS_SUCCESS up on success and any other status for failure. */ QDF_STATUS policy_mgr_get_conc_rule2(struct wlan_objmgr_psoc *psoc, - uint8_t *conc_rule2); + uint8_t *conc_rule2); /** * policy_mgr_get_dbs_selection_plcy() - DBS HW mode selection setting * @psoc: pointer to psoc @@ -143,7 +249,7 @@ QDF_STATUS policy_mgr_get_conc_rule2(struct wlan_objmgr_psoc *psoc, * Return: QDF_STATUS_SUCCESS up on success and any other status for failure. */ QDF_STATUS policy_mgr_get_dbs_selection_plcy(struct wlan_objmgr_psoc *psoc, - uint32_t *dbs_selection_plcy); + uint32_t *dbs_selection_plcy); /** * policy_mgr_get_vdev_priority_list() - to get vdev priority list * @psoc: pointer to psoc @@ -154,7 +260,7 @@ QDF_STATUS policy_mgr_get_dbs_selection_plcy(struct wlan_objmgr_psoc *psoc, * Return: QDF_STATUS_SUCCESS up on success and any other status for failure. */ QDF_STATUS policy_mgr_get_vdev_priority_list(struct wlan_objmgr_psoc *psoc, - uint32_t *vdev_priority_list); + uint32_t *vdev_priority_list); /** * policy_mgr_get_chnl_select_plcy() - to get channel selection policy * @psoc: pointer to psoc @@ -166,7 +272,7 @@ QDF_STATUS policy_mgr_get_vdev_priority_list(struct wlan_objmgr_psoc *psoc, * Return: QDF_STATUS_SUCCESS up on success and any other status for failure. */ QDF_STATUS policy_mgr_get_chnl_select_plcy(struct wlan_objmgr_psoc *psoc, - uint32_t *chnl_select_plcy); + uint32_t *chnl_select_plcy); /** * policy_mgr_get_mcc_adaptive_sch() - to get mcc adaptive scheduler @@ -192,7 +298,7 @@ QDF_STATUS policy_mgr_get_mcc_adaptive_sch(struct wlan_objmgr_psoc *psoc, * Return: QDF_STATUS_SUCCESS up on success and any other status for failure. */ QDF_STATUS policy_mgr_get_sta_cxn_5g_band(struct wlan_objmgr_psoc *psoc, - uint8_t *enable_sta_cxn_5g_band); + uint8_t *enable_sta_cxn_5g_band); /** * policy_mgr_set_concurrency_mode() - To set concurrency mode * @psoc: PSOC object data @@ -2456,19 +2562,6 @@ bool policy_mgr_disallow_mcc(struct wlan_objmgr_psoc *psoc, uint8_t policy_mgr_mode_specific_get_channel( struct wlan_objmgr_psoc *psoc, enum policy_mgr_con_mode mode); -/** - * policy_mgr_enable_disable_sap_mandatory_chan_list() - Update the value of - * enable_sap_mandatory_chan_list - * @psoc: Pointer to soc - * @val: value of enable_sap_mandatory_chan_list - * - * Update the value of enable_sap_mandatory_chan_list - * - * Return: void - */ -void policy_mgr_enable_disable_sap_mandatory_chan_list( - struct wlan_objmgr_psoc *psoc, bool val); - /** * policy_mgr_add_sap_mandatory_chan() - Add chan to SAP mandatory channel * list @@ -2482,18 +2575,6 @@ void policy_mgr_enable_disable_sap_mandatory_chan_list( void policy_mgr_add_sap_mandatory_chan(struct wlan_objmgr_psoc *psoc, uint8_t chan); -/** - * policy_mgr_is_sap_mandatory_chan_list_enabled() - Return the SAP mandatory - * channel list enabled status - * @psoc: Pointer to soc - * - * Get the SAP mandatory channel list enabled status - * - * Return: Enable or Disable - */ -bool policy_mgr_is_sap_mandatory_chan_list_enabled( - struct wlan_objmgr_psoc *psoc); - /** * policy_mgr_get_sap_mandatory_chan_list_len() - Return the SAP mandatory * channel list len diff --git a/umac/cmn_services/policy_mgr/inc/wlan_policy_mgr_cfg.h b/umac/cmn_services/policy_mgr/inc/wlan_policy_mgr_cfg.h index 22900022d0..40f88d80a1 100644 --- a/umac/cmn_services/policy_mgr/inc/wlan_policy_mgr_cfg.h +++ b/umac/cmn_services/policy_mgr/inc/wlan_policy_mgr_cfg.h @@ -288,6 +288,222 @@ CFG_VALUE_OR_DEFAULT, \ "Enable/Disable STA connection in 5G") +/* + * + * 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 + * + * + */ +#define CFG_ALLOW_MCC_GO_DIFF_BI \ +CFG_INI_UINT("gAllowMCCGODiffBI", 0, 4, 4, CFG_VALUE_OR_DEFAULT, \ + "Allow GO in MCC mode to accept different BI than STA's") + +/* + * + * 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 + * + * + */ + +#define CFG_ENABLE_OVERLAP_CH \ +CFG_INI_UINT("gEnableOverLapCh", 0, 1, 0, CFG_VALUE_OR_DEFAULT, \ + "Overlap channels are allowed for SAP when flag is set") + +/* + * + * + * 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 + * + * + */ +#define CFG_DUAL_MAC_FEATURE_DISABLE \ +CFG_INI_UINT("gDualMacFeatureDisable", 0, 6, 0, CFG_VALUE_OR_DEFAULT, \ + "This INI is used to enable/disable Dual MAC feature") + +/* + * + * 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 + * + * + */ + +#define CFG_STA_SAP_SCC_ON_DFS_CHAN \ +CFG_INI_UINT("g_sta_sap_scc_on_dfs_chan", 0, 1, 0, CFG_VALUE_OR_DEFAULT, \ + "Allow STA+SAP SCC on DFS channel with master mode disable") + +/* + * + * 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 + * + * + */ + +#define CFG_FORCE_1X1_FEATURE \ +CFG_INI_UINT("gForce1x1Exception", 0, 1, 1, CFG_VALUE_OR_DEFAULT, \ + "force 1x1 when connecting to certain peer") + +/* + * + * 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 + * + * + */ + +#define CFG_ENABLE_SAP_MANDATORY_CHAN_LIST \ +CFG_INI_UINT("gEnableSAPManadatoryChanList", 0, 1, 0, CFG_VALUE_OR_DEFAULT, \ + "Enable SAP Mandatory channel list") + +/* + * + * 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 + * + * + */ +#define CFG_STA_SAP_SCC_ON_LTE_COEX_CHAN \ +CFG_INI_UINT("g_sta_sap_scc_on_lte_coex_chan", 0, 1, 0, CFG_VALUE_OR_DEFAULT, \ + "Allow STA+SAP SCC on LTE coex channel") + +/* + * + * 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 + * + * + */ + +#define CFG_MARK_INDOOR_AS_DISABLE_FEATURE \ +CFG_INI_UINT("g_mark_sap_indoor_as_disable", 0, 1, 0, CFG_VALUE_OR_DEFAULT, \ + "Enable/Disable Indoor channel") + #define CFG_POLICY_MGR_ALL \ CFG(CFG_MCC_TO_SCC_SWITCH) \ CFG(CFG_CONC_SYS_PREF) \ @@ -298,5 +514,13 @@ CFG(CFG_ENABLE_CONC_RULE1) \ CFG(CFG_ENABLE_CONC_RULE2) \ CFG(CFG_ENABLE_MCC_ADATIVE_SCH_ENABLED_NAME)\ - CFG(CFG_ENABLE_STA_CONNECTION_IN_5GHZ) + CFG(CFG_ENABLE_STA_CONNECTION_IN_5GHZ)\ + CFG(CFG_ENABLE_OVERLAP_CH)\ + CFG(CFG_DUAL_MAC_FEATURE_DISABLE)\ + CFG(CFG_STA_SAP_SCC_ON_DFS_CHAN)\ + CFG(CFG_FORCE_1X1_FEATURE)\ + CFG(CFG_ENABLE_SAP_MANDATORY_CHAN_LIST)\ + CFG(CFG_STA_SAP_SCC_ON_LTE_COEX_CHAN)\ + CFG(CFG_MARK_INDOOR_AS_DISABLE_FEATURE)\ + CFG(CFG_ALLOW_MCC_GO_DIFF_BI) #endif diff --git a/umac/cmn_services/policy_mgr/inc/wlan_policy_mgr_public_struct.h b/umac/cmn_services/policy_mgr/inc/wlan_policy_mgr_public_struct.h index 182afded64..8af1813c7f 100644 --- a/umac/cmn_services/policy_mgr/inc/wlan_policy_mgr_public_struct.h +++ b/umac/cmn_services/policy_mgr/inc/wlan_policy_mgr_public_struct.h @@ -1063,8 +1063,6 @@ enum policy_mgr_pri_id { struct policy_mgr_user_cfg { bool enable2x2; bool sub_20_mhz_enabled; - bool is_sta_sap_scc_allowed_on_dfs_chan; - uint32_t sta_sap_scc_on_lte_coex_chan; }; /** diff --git a/umac/cmn_services/policy_mgr/inc/wlan_policy_mgr_ucfg.h b/umac/cmn_services/policy_mgr/inc/wlan_policy_mgr_ucfg.h index 661eebdec8..76a33edeed 100644 --- a/umac/cmn_services/policy_mgr/inc/wlan_policy_mgr_ucfg.h +++ b/umac/cmn_services/policy_mgr/inc/wlan_policy_mgr_ucfg.h @@ -178,4 +178,110 @@ ucfg_policy_mgr_get_mcc_adaptive_sch(struct wlan_objmgr_psoc *psoc, */ QDF_STATUS ucfg_policy_mgr_get_sta_cxn_5g_band(struct wlan_objmgr_psoc *psoc, uint8_t *enable_sta_cxn_5g_band); +/** + * ucfg_policy_mgr_get_allow_mcc_go_diff_bi() - to get information on whether GO + * can have diff BI than STA in MCC + * @psoc: pointer to psoc + * @allow_mcc_go_diff_bi: value to be filled + * + * This API is used to find out whether GO's BI can different than STA in MCC + * scenario + * + * Return: QDF_STATUS_SUCCESS up on success and any other status for failure. + */ +QDF_STATUS +ucfg_policy_mgr_get_allow_mcc_go_diff_bi(struct wlan_objmgr_psoc *psoc, + uint8_t *allow_mcc_go_diff_bi); +/** + * ucfg_policy_mgr_get_enable_overlap_chnl() - to find out if overlap channels + * are enabled for SAP + * @psoc: pointer to psoc + * @enable_overlap_chnl: value to be filled + * + * This API is used to find out whether overlap channels are enabled for SAP + * + * Return: QDF_STATUS_SUCCESS up on success and any other status for failure. + */ +QDF_STATUS +ucfg_policy_mgr_get_enable_overlap_chnl(struct wlan_objmgr_psoc *psoc, + uint8_t *enable_overlap_chnl); +/** + * ucfg_policy_mgr_get_dual_mac_feature() - to find out if DUAL MAC feature is + * enabled + * @psoc: pointer to psoc + * @dual_mac_feature: value to be filled + * + * This API is used to find out whether dual mac (dual radio) specific feature + * is enabled or not + * + * Return: QDF_STATUS_SUCCESS up on success and any other status for failure. + */ +QDF_STATUS ucfg_policy_mgr_get_dual_mac_feature(struct wlan_objmgr_psoc *psoc, + uint8_t *dual_mac_feature); +/** + * ucfg_policy_mgr_get_force_1x1() - to find out if 1x1 connection is enforced + * + * @psoc: pointer to psoc + * @force_1x1: value to be filled + * + * This API is used to find out if 1x1 connection is enforced. + * + * Return: QDF_STATUS_SUCCESS up on success and any other status for failure. + */ +QDF_STATUS ucfg_policy_mgr_get_force_1x1(struct wlan_objmgr_psoc *psoc, + uint8_t *force_1x1); +/** + * ucfg_policy_mgr_get_sta_sap_scc_on_dfs_chnl() - to find out if STA and SAP + * SCC is allowed on DFS channel + * @psoc: pointer to psoc + * @sta_sap_scc_on_dfs_chnl: value to be filled + * + * This API is used to find out whether STA and SAP SCC is allowed on + * DFS channels + * + * Return: QDF_STATUS_SUCCESS up on success and any other status for failure. + */ +QDF_STATUS +ucfg_policy_mgr_get_sta_sap_scc_on_dfs_chnl(struct wlan_objmgr_psoc *psoc, + uint8_t *sta_sap_scc_on_dfs_chnl); +/** + * ucfg_policy_mgr_get_sta_sap_scc_lte_coex_chnl() - to find out if STA & SAP + * SCC is allowed on LTE COEX + * @psoc: pointer to psoc + * @sta_sap_scc_lte_coex: value to be filled + * + * This API is used to find out whether STA and SAP scc is allowed on LTE COEX + * channel + * + * Return: QDF_STATUS_SUCCESS up on success and any other status for failure. + */ +QDF_STATUS +ucfg_policy_mgr_get_sta_sap_scc_lte_coex_chnl(struct wlan_objmgr_psoc *psoc, + uint8_t *sta_sap_scc_lte_coex); +/** + * ucfg_policy_mgr_get_sap_mandt_chnl() - to find out if SAP mandatory channel + * support is enabled + * @psoc: pointer to psoc + * @sap_mandt_chnl: value to be filled + * + * This API is used to find out whether SAP's mandatory channel support + * is enabled + * + * Return: QDF_STATUS_SUCCESS up on success and any other status for failure. + */ +QDF_STATUS ucfg_policy_mgr_get_sap_mandt_chnl(struct wlan_objmgr_psoc *psoc, + uint8_t *sap_mandt_chnl); +/** + * ucfg_policy_mgr_get_indoor_chnl_marking() - to get if indoor channel can be + * marked as disabled + * @psoc: pointer to psoc + * @indoor_chnl_marking: value to be filled + * + * This API is used to find out whether indoor channel can be marked as disabled + * + * Return: QDF_STATUS_SUCCESS up on success and any other status for failure. + */ +QDF_STATUS +ucfg_policy_mgr_get_indoor_chnl_marking(struct wlan_objmgr_psoc *psoc, + uint8_t *indoor_chnl_marking); #endif //__WLAN_POLICY_MGR_UCFG diff --git a/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c b/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c index f4dc476c01..46bd870cb3 100644 --- a/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c +++ b/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c @@ -3006,20 +3006,6 @@ QDF_STATUS policy_mgr_reset_sap_mandatory_channels( return QDF_STATUS_SUCCESS; } -void policy_mgr_enable_disable_sap_mandatory_chan_list( - struct wlan_objmgr_psoc *psoc, bool val) -{ - struct policy_mgr_psoc_priv_obj *pm_ctx; - - pm_ctx = policy_mgr_get_context(psoc); - if (!pm_ctx) { - policy_mgr_err("Invalid Context"); - return; - } - - pm_ctx->enable_sap_mandatory_chan_list = val; -} - void policy_mgr_add_sap_mandatory_chan(struct wlan_objmgr_psoc *psoc, uint8_t chan) { @@ -3042,20 +3028,6 @@ void policy_mgr_add_sap_mandatory_chan(struct wlan_objmgr_psoc *psoc, = chan; } -bool policy_mgr_is_sap_mandatory_chan_list_enabled( - struct wlan_objmgr_psoc *psoc) -{ - struct policy_mgr_psoc_priv_obj *pm_ctx; - - pm_ctx = policy_mgr_get_context(psoc); - if (!pm_ctx) { - policy_mgr_err("Invalid Context"); - return false; - } - - return pm_ctx->enable_sap_mandatory_chan_list; -} - uint32_t policy_mgr_get_sap_mandatory_chan_list_len( struct wlan_objmgr_psoc *psoc) { diff --git a/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c b/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c index c41b794d0a..27307c51e3 100644 --- a/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c +++ b/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c @@ -36,6 +36,131 @@ /* invalid channel id. */ #define INVALID_CHANNEL_ID 0 +QDF_STATUS +policy_mgr_get_allow_mcc_go_diff_bi(struct wlan_objmgr_psoc *psoc, + uint8_t *allow_mcc_go_diff_bi) +{ + struct policy_mgr_psoc_priv_obj *pm_ctx; + + pm_ctx = policy_mgr_get_context(psoc); + if (!pm_ctx) { + policy_mgr_err("pm_ctx is NULL"); + return QDF_STATUS_E_FAILURE; + } + *allow_mcc_go_diff_bi = pm_ctx->cfg.allow_mcc_go_diff_bi; + + return QDF_STATUS_SUCCESS; +} + +QDF_STATUS +policy_mgr_get_enable_overlap_chnl(struct wlan_objmgr_psoc *psoc, + uint8_t *enable_overlap_chnl) +{ + struct policy_mgr_psoc_priv_obj *pm_ctx; + + pm_ctx = policy_mgr_get_context(psoc); + if (!pm_ctx) { + policy_mgr_err("pm_ctx is NULL"); + return QDF_STATUS_E_FAILURE; + } + *enable_overlap_chnl = pm_ctx->cfg.enable_overlap_chnl; + + return QDF_STATUS_SUCCESS; +} + +QDF_STATUS policy_mgr_get_dual_mac_feature(struct wlan_objmgr_psoc *psoc, + uint8_t *dual_mac_feature) +{ + struct policy_mgr_psoc_priv_obj *pm_ctx; + + pm_ctx = policy_mgr_get_context(psoc); + if (!pm_ctx) { + policy_mgr_err("pm_ctx is NULL"); + return QDF_STATUS_E_FAILURE; + } + *dual_mac_feature = pm_ctx->cfg.dual_mac_feature; + + return QDF_STATUS_SUCCESS; +} + +QDF_STATUS policy_mgr_get_force_1x1(struct wlan_objmgr_psoc *psoc, + uint8_t *force_1x1) +{ + struct policy_mgr_psoc_priv_obj *pm_ctx; + + pm_ctx = policy_mgr_get_context(psoc); + if (!pm_ctx) { + policy_mgr_err("pm_ctx is NULL"); + return QDF_STATUS_E_FAILURE; + } + *force_1x1 = pm_ctx->cfg.is_force_1x1_enable; + + return QDF_STATUS_SUCCESS; +} + +QDF_STATUS +policy_mgr_get_sta_sap_scc_on_dfs_chnl(struct wlan_objmgr_psoc *psoc, + uint8_t *sta_sap_scc_on_dfs_chnl) +{ + struct policy_mgr_psoc_priv_obj *pm_ctx; + + pm_ctx = policy_mgr_get_context(psoc); + if (!pm_ctx) { + policy_mgr_err("pm_ctx is NULL"); + return QDF_STATUS_E_FAILURE; + } + *sta_sap_scc_on_dfs_chnl = pm_ctx->cfg.sta_sap_scc_on_dfs_chnl; + + return QDF_STATUS_SUCCESS; +} + +QDF_STATUS +policy_mgr_get_sta_sap_scc_lte_coex_chnl(struct wlan_objmgr_psoc *psoc, + uint8_t *sta_sap_scc_lte_coex) +{ + struct policy_mgr_psoc_priv_obj *pm_ctx; + + pm_ctx = policy_mgr_get_context(psoc); + if (!pm_ctx) { + policy_mgr_err("pm_ctx is NULL"); + return QDF_STATUS_E_FAILURE; + } + *sta_sap_scc_lte_coex = pm_ctx->cfg.sta_sap_scc_on_lte_coex_chnl; + + return QDF_STATUS_SUCCESS; +} + +QDF_STATUS policy_mgr_get_sap_mandt_chnl(struct wlan_objmgr_psoc *psoc, + uint8_t *sap_mandt_chnl) +{ + struct policy_mgr_psoc_priv_obj *pm_ctx; + + pm_ctx = policy_mgr_get_context(psoc); + if (!pm_ctx) { + policy_mgr_err("pm_ctx is NULL"); + return QDF_STATUS_E_FAILURE; + } + *sap_mandt_chnl = pm_ctx->cfg.sap_mandatory_chnl_enable; + + return QDF_STATUS_SUCCESS; +} + +QDF_STATUS +policy_mgr_get_indoor_chnl_marking(struct wlan_objmgr_psoc *psoc, + uint8_t *indoor_chnl_marking) +{ + struct policy_mgr_psoc_priv_obj *pm_ctx; + + pm_ctx = policy_mgr_get_context(psoc); + if (!pm_ctx) { + policy_mgr_err("pm_ctx is NULL"); + return QDF_STATUS_E_FAILURE; + } + *indoor_chnl_marking = pm_ctx->cfg.mark_indoor_chnl_disable; + + return QDF_STATUS_SUCCESS; +} + QDF_STATUS policy_mgr_get_mcc_scc_switch(struct wlan_objmgr_psoc *psoc, uint8_t *mcc_scc_switch) { @@ -3138,6 +3263,7 @@ bool policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan( struct wlan_objmgr_psoc *psoc) { struct policy_mgr_psoc_priv_obj *pm_ctx; + uint8_t sta_sap_scc_on_dfs_chnl = 0; bool status = false; pm_ctx = policy_mgr_get_context(psoc); @@ -3146,8 +3272,9 @@ bool policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan( return status; } - if (policy_mgr_is_force_scc(psoc) && - pm_ctx->user_cfg.is_sta_sap_scc_allowed_on_dfs_chan) + policy_mgr_get_sta_sap_scc_on_dfs_chnl(psoc, + &sta_sap_scc_on_dfs_chnl); + if (policy_mgr_is_force_scc(psoc) && sta_sap_scc_on_dfs_chnl) status = true; return status; @@ -3385,13 +3512,16 @@ bool policy_mgr_sta_sap_scc_on_lte_coex_chan( struct wlan_objmgr_psoc *psoc) { struct policy_mgr_psoc_priv_obj *pm_ctx; + uint8_t scc_lte_coex = 0; pm_ctx = policy_mgr_get_context(psoc); if (!pm_ctx) { policy_mgr_err("Invalid Context"); return false; } - return pm_ctx->user_cfg.sta_sap_scc_on_lte_coex_chan; + policy_mgr_get_sta_sap_scc_lte_coex_chnl(psoc, &scc_lte_coex); + + return scc_lte_coex; } bool policy_mgr_is_valid_for_channel_switch(struct wlan_objmgr_psoc *psoc, diff --git a/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_i.h b/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_i.h index 5f29c534f7..72b0b6cf8b 100644 --- a/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_i.h +++ b/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_i.h @@ -220,6 +220,14 @@ struct sta_ap_intf_check_work_ctx { * @max_conc_cxns: Max allowed concurrenct active connections * @conc_rule1: concurrency rule1 * @conc_rule2: concurrency rule2 + * @allow_mcc_go_diff_bi: Allow GO and STA diff beacon interval in MCC + * @enable_overlap_chnl: Enable overlap channels for SAP's channel selection + * @dual_mac_feature: To enable/disable dual mac features + * @is_force_1x1_enable: Is 1x1 forced for connection + * @sta_sap_scc_on_dfs_chnl: STA-SAP SCC on DFS channel + * @sta_sap_scc_on_lte_coex_chnl: STA-SAP SCC on LTE Co-ex channel + * @sap_mandatory_chnl_enable: To enable/disable SAP mandatory channels + * @mark_indoor_chnl_disable: Mark indoor channel as disable or enable * @dbs_selection_plcy: DBS selection policy for concurrency * @vdev_priority_list: Priority list for various vdevs * @chnl_select_plcy: Channel selection policy @@ -233,6 +241,14 @@ struct policy_mgr_cfg { uint8_t conc_rule1; uint8_t conc_rule2; uint8_t enable_mcc_adaptive_sch; + uint8_t allow_mcc_go_diff_bi; + uint8_t enable_overlap_chnl; + uint8_t dual_mac_feature; + uint8_t is_force_1x1_enable; + uint8_t sta_sap_scc_on_dfs_chnl; + uint8_t sta_sap_scc_on_lte_coex_chnl; + uint8_t sap_mandatory_chnl_enable; + uint8_t mark_indoor_chnl_disable; uint8_t enable_sta_cxn_5g_band; uint32_t dbs_selection_plcy; uint32_t vdev_priority_list; diff --git a/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_ucfg.c b/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_ucfg.c index 310019ba32..5f4862cdb6 100644 --- a/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_ucfg.c +++ b/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_ucfg.c @@ -44,6 +44,22 @@ static QDF_STATUS policy_mgr_init_cfg(struct wlan_objmgr_psoc *psoc) cfg_get(psoc, CFG_ENABLE_MCC_ADATIVE_SCH_ENABLED_NAME); cfg->enable_sta_cxn_5g_band = cfg_get(psoc, CFG_ENABLE_STA_CONNECTION_IN_5GHZ); + cfg->allow_mcc_go_diff_bi = + cfg_get(psoc, CFG_ALLOW_MCC_GO_DIFF_BI); + cfg->enable_overlap_chnl = + cfg_get(psoc, CFG_ENABLE_OVERLAP_CH); + cfg->dual_mac_feature = + cfg_get(psoc, CFG_DUAL_MAC_FEATURE_DISABLE); + cfg->is_force_1x1_enable = + cfg_get(psoc, CFG_FORCE_1X1_FEATURE); + cfg->sta_sap_scc_on_dfs_chnl = + cfg_get(psoc, CFG_STA_SAP_SCC_ON_DFS_CHAN); + cfg->sta_sap_scc_on_lte_coex_chnl = + cfg_get(psoc, CFG_STA_SAP_SCC_ON_LTE_COEX_CHAN); + cfg->sap_mandatory_chnl_enable = + cfg_get(psoc, CFG_ENABLE_SAP_MANDATORY_CHAN_LIST); + cfg->mark_indoor_chnl_disable = + cfg_get(psoc, CFG_MARK_INDOOR_AS_DISABLE_FEATURE); return QDF_STATUS_SUCCESS; } @@ -144,3 +160,58 @@ QDF_STATUS ucfg_policy_mgr_get_sta_cxn_5g_band(struct wlan_objmgr_psoc *psoc, { return policy_mgr_get_sta_cxn_5g_band(psoc, enable_sta_cxn_5g_band); } + +QDF_STATUS +ucfg_policy_mgr_get_allow_mcc_go_diff_bi(struct wlan_objmgr_psoc *psoc, + uint8_t *allow_mcc_go_diff_bi) +{ + return policy_mgr_get_allow_mcc_go_diff_bi(psoc, allow_mcc_go_diff_bi); +} + +QDF_STATUS +ucfg_policy_mgr_get_enable_overlap_chnl(struct wlan_objmgr_psoc *psoc, + uint8_t *enable_overlap_chnl) +{ + return policy_mgr_get_enable_overlap_chnl(psoc, enable_overlap_chnl); +} + +QDF_STATUS ucfg_policy_mgr_get_dual_mac_feature(struct wlan_objmgr_psoc *psoc, + uint8_t *dual_mac_feature) +{ + return policy_mgr_get_dual_mac_feature(psoc, dual_mac_feature); +} + +QDF_STATUS ucfg_policy_mgr_get_force_1x1(struct wlan_objmgr_psoc *psoc, + uint8_t *force_1x1) +{ + return policy_mgr_get_force_1x1(psoc, force_1x1); +} + +QDF_STATUS +ucfg_policy_mgr_get_sta_sap_scc_on_dfs_chnl(struct wlan_objmgr_psoc *psoc, + uint8_t *sta_sap_scc_on_dfs_chnl) +{ + return policy_mgr_get_sta_sap_scc_on_dfs_chnl(psoc, + sta_sap_scc_on_dfs_chnl); +} + +QDF_STATUS +ucfg_policy_mgr_get_sta_sap_scc_lte_coex_chnl(struct wlan_objmgr_psoc *psoc, + uint8_t *sta_sap_scc_lte_coex) +{ + return policy_mgr_get_sta_sap_scc_lte_coex_chnl(psoc, + sta_sap_scc_lte_coex); +} + +QDF_STATUS ucfg_policy_mgr_get_sap_mandt_chnl(struct wlan_objmgr_psoc *psoc, + uint8_t *sap_mandt_chnl) +{ + return policy_mgr_get_sap_mandt_chnl(psoc, sap_mandt_chnl); +} + +QDF_STATUS +ucfg_policy_mgr_get_indoor_chnl_marking(struct wlan_objmgr_psoc *psoc, + uint8_t *indoor_chnl_marking) +{ + return policy_mgr_get_indoor_chnl_marking(psoc, indoor_chnl_marking); +}