qcacmn: Set preferred mode per target
Set preferred HW mode by default to HW_MODE_DETECT or HW_MODE_MAX based on target type, also update preferred hw mode and num_band_to_mac accordingly. Change-Id: Iab231b182b54af15d09714e6cf3426c145d4ac3c CRs-Fixed: 2711504
This commit is contained in:
@@ -361,6 +361,37 @@ void init_deinit_derive_band_to_mac_param(
|
||||
}
|
||||
}
|
||||
|
||||
/* if num of mac per band is sent by host then FW will not initialize
|
||||
* its data structure with its default value. Host either have to set
|
||||
* these value as per current HW mode or else these variable should be
|
||||
* initialized to 0.
|
||||
* Ex - If host is sending default HW mode as DBS in INIT_CMDID
|
||||
* then either host should fill both the MACs (mac0 and mac1) or
|
||||
* else don't fill for even a single mac, it should be initialized to
|
||||
* 0 which means FW will initialize its data structures based on its
|
||||
* default value.
|
||||
*/
|
||||
#ifdef FEATURE_NO_DBS_INTRABAND_MCC_SUPPORT
|
||||
static bool is_num_band_to_mac_required(struct wmi_unified *wmi_handle)
|
||||
{
|
||||
bool is_required = true;
|
||||
|
||||
/* For target where interband MCC is not supported, num of
|
||||
* mac should be set to default value i.e. 0
|
||||
*/
|
||||
is_required = (wmi_service_enabled(wmi_handle,
|
||||
wmi_service_dual_band_simultaneous_support) ||
|
||||
!wmi_service_enabled(wmi_handle,
|
||||
wmi_service_no_interband_mcc_support));
|
||||
return is_required;
|
||||
}
|
||||
#else
|
||||
static bool is_num_band_to_mac_required(struct wmi_unified *wmi_handle)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
void init_deinit_prepare_send_init_cmd(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
struct target_psoc_info *tgt_hdl)
|
||||
@@ -391,8 +422,9 @@ void init_deinit_prepare_send_init_cmd(
|
||||
if (info->preferred_hw_mode == WMI_HOST_HW_MODE_SINGLE)
|
||||
init_param.hw_mode_id = WMI_HOST_HW_MODE_MAX;
|
||||
|
||||
init_param.num_band_to_mac = target_psoc_get_num_radios(
|
||||
tgt_hdl);
|
||||
if (is_num_band_to_mac_required(wmi_handle))
|
||||
init_param.num_band_to_mac =
|
||||
target_psoc_get_num_radios(tgt_hdl);
|
||||
|
||||
init_deinit_derive_band_to_mac_param(psoc, tgt_hdl,
|
||||
init_param.band_to_mac);
|
||||
|
@@ -362,6 +362,9 @@ int init_deinit_populate_hw_mode_capability(
|
||||
target_if_info("Preferred mode is not set, use mode id %d\n",
|
||||
selected_mode);
|
||||
target_psoc_set_preferred_hw_mode(tgt_hdl, selected_mode);
|
||||
|
||||
/* Change default DBS hw mode as per selected one */
|
||||
info->target_caps.default_dbs_hw_mode_index = selected_mode;
|
||||
}
|
||||
|
||||
status = get_sar_version(wmi_handle, event, &info->service_ext_param);
|
||||
|
Reference in New Issue
Block a user