mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
qcacmn: Add chan change HW mode change
Add policy_mgr_get_current_pref_hw_mode_dual_dbs
API for dual dbs HW. In Dual DBS mode HW, it
decides the actual DBS mode when DBS required.
Change-Id: Ic45b09fa49e1ff923f1a2dad50a3ce7e4007a3fd
CRs-Fixed: 2338105
This commit is contained in:
parent
88ddf823c2
commit
e85dfe6956
4 changed files with 53 additions and 1 deletions
|
|
@ -1855,7 +1855,9 @@ QDF_STATUS policy_mgr_set_hw_mode_on_channel_switch(
|
|||
|
||||
action = (*policy_mgr_get_current_pref_hw_mode_ptr)(psoc);
|
||||
if ((action != PM_DBS_DOWNGRADE) &&
|
||||
(action != PM_SINGLE_MAC_UPGRADE)) {
|
||||
(action != PM_SINGLE_MAC_UPGRADE) &&
|
||||
(action != PM_DBS1_DOWNGRADE) &&
|
||||
(action != PM_DBS2_DOWNGRADE)) {
|
||||
policy_mgr_err("Invalid action: %d", action);
|
||||
status = QDF_STATUS_SUCCESS;
|
||||
goto done;
|
||||
|
|
|
|||
|
|
@ -2955,6 +2955,39 @@ enum policy_mgr_conc_next_action
|
|||
return next_action;
|
||||
}
|
||||
|
||||
enum policy_mgr_conc_next_action
|
||||
policy_mgr_get_current_pref_hw_mode_dual_dbs(
|
||||
struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
enum policy_mgr_conc_next_action next_action;
|
||||
struct policy_mgr_psoc_priv_obj *pm_ctx;
|
||||
enum policy_mgr_conc_next_action preferred_dbs;
|
||||
|
||||
pm_ctx = policy_mgr_get_context(psoc);
|
||||
if (!pm_ctx) {
|
||||
policy_mgr_err("Invalid Context");
|
||||
return PM_NOP;
|
||||
}
|
||||
|
||||
next_action = policy_mgr_get_current_pref_hw_mode_dbs_1x1(psoc);
|
||||
policy_mgr_info("next_action %d", next_action);
|
||||
if (next_action != PM_DBS_DOWNGRADE)
|
||||
return next_action;
|
||||
|
||||
preferred_dbs = policy_mgr_get_preferred_dbs_action_table(
|
||||
psoc, INVALID_VDEV_ID, 0, 0);
|
||||
if (preferred_dbs == PM_DBS1) {
|
||||
next_action = PM_DBS1_DOWNGRADE;
|
||||
} else if (preferred_dbs == PM_DBS2) {
|
||||
next_action = PM_DBS2_DOWNGRADE;
|
||||
} else {
|
||||
policy_mgr_err("DBS1 and DBS2 hw mode not supported");
|
||||
return PM_NOP;
|
||||
}
|
||||
policy_mgr_info("preferred_dbs %d", next_action);
|
||||
return next_action;
|
||||
}
|
||||
|
||||
/**
|
||||
* policy_mgr_reset_sap_mandatory_channels() - Reset the SAP mandatory channels
|
||||
*
|
||||
|
|
|
|||
|
|
@ -489,6 +489,20 @@ enum policy_mgr_conc_next_action
|
|||
enum policy_mgr_conc_next_action
|
||||
policy_mgr_get_current_pref_hw_mode_dbs_1x1(
|
||||
struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* policy_mgr_get_current_pref_hw_mode_dual_dbs() - Get the
|
||||
* current preferred hw mode
|
||||
*
|
||||
* Get the preferred hw mode based on the current connection combinations
|
||||
*
|
||||
* Return: No change (PM_NOP), (PM_SINGLE_MAC_UPGRADE),
|
||||
* DBS (PM_DBS1_DOWNGRADE or PM_DBS2_DOWNGRADE)
|
||||
*/
|
||||
enum policy_mgr_conc_next_action
|
||||
policy_mgr_get_current_pref_hw_mode_dual_dbs(
|
||||
struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
QDF_STATUS policy_mgr_reset_sap_mandatory_channels(
|
||||
struct policy_mgr_psoc_priv_obj *pm_ctx);
|
||||
|
||||
|
|
|
|||
|
|
@ -423,6 +423,9 @@ QDF_STATUS policy_mgr_psoc_enable(struct wlan_objmgr_psoc *psoc)
|
|||
if (policy_mgr_is_hw_dbs_2x2_capable(psoc))
|
||||
policy_mgr_get_current_pref_hw_mode_ptr =
|
||||
policy_mgr_get_current_pref_hw_mode_dbs_2x2;
|
||||
else if (policy_mgr_is_2x2_1x1_dbs_capable(psoc))
|
||||
policy_mgr_get_current_pref_hw_mode_ptr =
|
||||
policy_mgr_get_current_pref_hw_mode_dual_dbs;
|
||||
else
|
||||
policy_mgr_get_current_pref_hw_mode_ptr =
|
||||
policy_mgr_get_current_pref_hw_mode_dbs_1x1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue