qcacmn: Fix DBS & HW mode configurations for policy manager

Fix DBS configuration & HW mode initialization for policy manager as
part of policy manager restructuring.

Change-Id: I0c0ef7797b3251454d86f5980c6e243985075216
CRs-Fixed: 2009818
This commit is contained in:
Tushnim Bhattacharyya 2017-03-23 11:16:40 -07:00 • committed by Sandeep Puligilla
commit 7051ad0768
8 changed files with 715 additions and 30 deletions

View file

@ -771,7 +771,9 @@ struct policy_mgr_sme_cbacks {
* from policy manager
* @sap_restart_chan_switch_cb: Restart SAP
* @wlan_hdd_get_channel_for_sap_restart: Get channel to restart
* SAP
* SAP
* @get_mode_for_non_connected_vdev: Get the mode for a non
* connected vdev
*/
struct policy_mgr_hdd_cbacks {
void (*sap_restart_chan_switch_cb)(struct wlan_objmgr_psoc *psoc,
@ -781,6 +783,9 @@ struct policy_mgr_hdd_cbacks {
struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id, uint8_t *channel,
uint8_t *sec_ch, bool is_restart_sap);
enum policy_mgr_con_mode (*get_mode_for_non_connected_vdev)(
struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id);
};
@ -1696,4 +1701,148 @@ bool policy_mgr_is_mcc_adaptive_scheduler_enabled(
*/
QDF_STATUS policy_mgr_set_user_cfg(struct wlan_objmgr_psoc *psoc,
struct policy_mgr_user_cfg *user_cfg);
/**
* policy_mgr_init_dbs_config() - Function to initialize DBS
* config in policy manager component
* @psoc: PSOC object information
* @scan_config: DBS scan config
* @fw_config: DBS FW config
*
* This function sets the DBS configurations required by policy
* manager
*
* Return: SUCCESS or FAILURE
*
*/
void policy_mgr_init_dbs_config(struct wlan_objmgr_psoc *psoc,
uint32_t scan_config, uint32_t fw_config);
/**
* policy_mgr_update_dbs_scan_config() - Function to update
* DBS scan config in policy manager component
* @psoc: PSOC object information
*
* This function updates the DBS scan configurations required by
* policy manager
*
* Return: SUCCESS or FAILURE
*
*/
void policy_mgr_update_dbs_scan_config(struct wlan_objmgr_psoc *psoc);
/**
* policy_mgr_update_dbs_fw_config() - Function to update DBS FW
* config in policy manager component
* @psoc: PSOC object information
*
* This function updates the DBS FW configurations required by
* policy manager
*
* Return: SUCCESS or FAILURE
*
*/
void policy_mgr_update_dbs_fw_config(struct wlan_objmgr_psoc *psoc);
/**
* policy_mgr_update_dbs_req_config() - Function to update DBS
* request config in policy manager component
* @psoc: PSOC object information
* @scan_config: DBS scan config
* @fw_config: DBS FW config
*
* This function updates DBS request configurations required by
* policy manager
*
* Return: SUCCESS or FAILURE
*
*/
void policy_mgr_update_dbs_req_config(struct wlan_objmgr_psoc *psoc,
uint32_t scan_config, uint32_t fw_mode_config);
/**
* policy_mgr_dump_dbs_hw_mode() - Function to dump DBS config
* @psoc: PSOC object information
*
* This function dumps the DBS configurations
*
* Return: SUCCESS or FAILURE
*
*/
void policy_mgr_dump_dbs_hw_mode(struct wlan_objmgr_psoc *psoc);
/**
* policy_mgr_init_dbs_hw_mode() - Function to initialize DBS HW
* modes in policy manager component
* @psoc: PSOC object information
* @num_dbs_hw_modes: Number of HW modes
* @ev_wlan_dbs_hw_mode_list: HW list
*
* This function to initialize the DBS HW modes in policy
* manager
*
* Return: SUCCESS or FAILURE
*
*/
void policy_mgr_init_dbs_hw_mode(struct wlan_objmgr_psoc *psoc,
uint32_t num_dbs_hw_modes,
uint32_t *ev_wlan_dbs_hw_mode_list);
/**
* policy_mgr_update_hw_mode_list() - Function to initialize DBS
* HW modes in policy manager component
* @psoc: PSOC object information
* @num_dbs_hw_modes: Number of HW modes
* @ev_wlan_dbs_hw_mode_list: HW list
*
* This function to initialize the DBS HW modes in policy
* manager
*
* Return: SUCCESS or FAILURE
*
*/
QDF_STATUS policy_mgr_update_hw_mode_list(struct wlan_objmgr_psoc *psoc,
struct extended_caps *phy_caps);
/**
* policy_mgr_update_hw_mode_index() - Function to update
* current HW mode in policy manager component
* @psoc: PSOC object information
* @new_hw_mode_index: index to new HW mode
*
* This function to update the current HW mode in policy manager
*
* Return: SUCCESS or FAILURE
*
*/
void policy_mgr_update_hw_mode_index(struct wlan_objmgr_psoc *psoc,
uint32_t new_hw_mode_index);
/**
* policy_mgr_update_old_hw_mode_index() - Function to update
* old HW mode in policy manager component
* @psoc: PSOC object information
* @new_hw_mode_index: index to old HW mode
*
* This function to update the old HW mode in policy manager
*
* Return: SUCCESS or FAILURE
*
*/
void policy_mgr_update_old_hw_mode_index(struct wlan_objmgr_psoc *psoc,
uint32_t old_hw_mode_index);
/**
* policy_mgr_update_new_hw_mode_index() - Function to update
* new HW mode in policy manager component
* @psoc: PSOC object information
* @new_hw_mode_index: index to new HW mode
*
* This function to update the new HW mode in policy manager
*
* Return: SUCCESS or FAILURE
*
*/
void policy_mgr_update_new_hw_mode_index(struct wlan_objmgr_psoc *psoc,
uint32_t new_hw_mode_index);
#endif /* __WLAN_POLICY_MGR_API_H */

View file

@ -869,12 +869,14 @@ struct policy_mgr_dual_mac_config {
* @set_hw_mode_cb: HDD set HW mode callback
* @reason: Reason for HW mode change
* @session_id: Session id
* @context: psoc context
*/
struct policy_mgr_hw_mode {
uint32_t hw_mode_index;
void *set_hw_mode_cb;
enum policy_mgr_conn_update_reason reason;
uint32_t session_id;
struct wlan_objmgr_psoc *context;
};
/**
@ -975,8 +977,13 @@ struct dual_mac_config {
/**
* struct policy_mgr_user_cfg - Policy manager user config variables
* @enable_mcc_adaptive_scheduler: Enable MCC adaptive scheduler
* @max_concurrent_active_sessions: User allowed maximum active
* connections
* @conc_system_pref: System preference for PCL table
*/
struct policy_mgr_user_cfg {
uint8_t enable_mcc_adaptive_scheduler;
uint8_t max_concurrent_active_sessions;
uint8_t conc_system_pref;
};
#endif /* __WLAN_POLICY_MGR_PUBLIC_STRUCT_H */