mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
qcacmn: Add runtime support for Inter-Band MCC
To handle no-inter-band MCC scenarios for dual MAC non-DBS solutions, add changes to detect capability at run-time based on service bits. If the service is set then code for only intra-band MCC will be exercised. Change-Id: I402311fcecfd03bba67fedfb2b52f779f60b81ce CRS-Fixed: 2730374
This commit is contained in:
parent
1081eb4b63
commit
13b4322e3b
2 changed files with 25 additions and 18 deletions
|
|
@ -457,20 +457,6 @@ void target_if_ftm_tx_ops_register(struct wlan_lmac_if_tx_ops *tx_ops)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef FEATURE_NO_DBS_INTRABAND_MCC_SUPPORT
|
||||
static enum wmi_host_hw_mode_config_type
|
||||
target_if_get_default_pref_hw_mode(struct target_psoc_info *psoc_info)
|
||||
{
|
||||
return WMI_HOST_HW_MODE_DETECT;
|
||||
}
|
||||
#else
|
||||
static enum wmi_host_hw_mode_config_type
|
||||
target_if_get_default_pref_hw_mode(struct target_psoc_info *psoc_info)
|
||||
{
|
||||
return WMI_HOST_HW_MODE_MAX;
|
||||
}
|
||||
#endif
|
||||
|
||||
static
|
||||
QDF_STATUS target_if_register_umac_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops)
|
||||
{
|
||||
|
|
@ -610,7 +596,6 @@ QDF_STATUS target_if_free_pdev_tgt_info(struct wlan_objmgr_pdev *pdev)
|
|||
QDF_STATUS target_if_alloc_psoc_tgt_info(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
struct target_psoc_info *tgt_psoc_info;
|
||||
enum wmi_host_hw_mode_config_type hw_mode;
|
||||
|
||||
if (!psoc) {
|
||||
target_if_err("psoc is null");
|
||||
|
|
@ -623,8 +608,7 @@ QDF_STATUS target_if_alloc_psoc_tgt_info(struct wlan_objmgr_psoc *psoc)
|
|||
return QDF_STATUS_E_NOMEM;
|
||||
|
||||
wlan_psoc_set_tgt_if_handle(psoc, tgt_psoc_info);
|
||||
hw_mode = target_if_get_default_pref_hw_mode(tgt_psoc_info);
|
||||
target_psoc_set_preferred_hw_mode(tgt_psoc_info, hw_mode);
|
||||
target_psoc_set_preferred_hw_mode(tgt_psoc_info, WMI_HOST_HW_MODE_MAX);
|
||||
wlan_minidump_log(tgt_psoc_info,
|
||||
sizeof(*tgt_psoc_info), psoc,
|
||||
WLAN_MD_OBJMGR_PSOC_TGT_INFO, "target_psoc_info");
|
||||
|
|
|
|||
|
|
@ -310,6 +310,26 @@ select_preferred_hw_mode(struct target_psoc_info *tgt_hdl,
|
|||
return selected_mode;
|
||||
}
|
||||
|
||||
#ifdef FEATURE_NO_DBS_INTRABAND_MCC_SUPPORT
|
||||
static void init_deinit_change_def_hw_mode(struct target_psoc_info *tgt_hdl,
|
||||
struct wmi_unified *wmi_handle)
|
||||
{
|
||||
struct tgt_info *info = &tgt_hdl->info;
|
||||
|
||||
if ((info->hw_modes.num_modes == 1) &&
|
||||
(info->hw_modes.hw_mode_ids[0] == WMI_HOST_HW_MODE_DBS) &&
|
||||
!wmi_service_enabled(wmi_handle,
|
||||
wmi_service_dual_band_simultaneous_support))
|
||||
target_psoc_set_preferred_hw_mode(tgt_hdl,
|
||||
WMI_HOST_HW_MODE_DETECT);
|
||||
}
|
||||
#else
|
||||
static void init_deinit_change_def_hw_mode(struct target_psoc_info *tgt_hdl,
|
||||
struct wmi_unified *wmi_handle)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
int init_deinit_populate_hw_mode_capability(
|
||||
wmi_unified_t wmi_handle, uint8_t *event,
|
||||
struct target_psoc_info *tgt_hdl)
|
||||
|
|
@ -333,7 +353,6 @@ int init_deinit_populate_hw_mode_capability(
|
|||
info->hw_modes.num_modes = 0;
|
||||
info->hw_mode_cap.hw_mode_id = WMI_HOST_HW_MODE_MAX;
|
||||
|
||||
preferred_mode = target_psoc_get_preferred_hw_mode(tgt_hdl);
|
||||
for (hw_idx = 0; hw_idx < num_hw_modes; hw_idx++) {
|
||||
status = get_hw_mode(wmi_handle, event, hw_idx,
|
||||
&hw_mode_caps[hw_idx]);
|
||||
|
|
@ -353,11 +372,15 @@ int init_deinit_populate_hw_mode_capability(
|
|||
if (status)
|
||||
goto return_exit;
|
||||
|
||||
if (num_hw_modes == 1)
|
||||
init_deinit_change_def_hw_mode(tgt_hdl, wmi_handle);
|
||||
|
||||
selected_mode = select_preferred_hw_mode(tgt_hdl,
|
||||
&hw_mode_caps[hw_idx],
|
||||
selected_mode);
|
||||
}
|
||||
|
||||
preferred_mode = target_psoc_get_preferred_hw_mode(tgt_hdl);
|
||||
if (preferred_mode == WMI_HOST_HW_MODE_DETECT) {
|
||||
target_if_info("Preferred mode is not set, use mode id %d\n",
|
||||
selected_mode);
|
||||
|
|
|
|||
Loading…
Reference in a new issue