msm: ipa3: Add proper check for FNR stats query
In some targets, FnR tethering stats query support is not present. Add changes to check for support present or not before query. Change-Id: I415e019ff0cb01cf09c8ba6cd9fef44ae815c11b Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
This commit is contained in:
parent
3cb33329d4
commit
de4c6e68ce
@ -7150,6 +7150,7 @@ static int ipa3_pre_init(const struct ipa3_plat_drv_res *resource_p,
|
||||
ipa3_ctx->manual_fw_load = resource_p->manual_fw_load;
|
||||
ipa3_ctx->max_num_smmu_cb = resource_p->max_num_smmu_cb;
|
||||
ipa3_ctx->hw_type_index = ipa3_get_hw_type_index();
|
||||
ipa3_ctx->fnr_stats_not_supported = resource_p->fnr_stats_not_supported;
|
||||
|
||||
if (resource_p->gsi_fw_file_name) {
|
||||
ipa3_ctx->gsi_fw_file_name =
|
||||
@ -7961,6 +7962,7 @@ static int get_ipa_dts_configuration(struct platform_device *pdev,
|
||||
ipa_drv_res->is_eth_bridging_supported = false;
|
||||
ipa_drv_res->is_bw_monitor_supported = false;
|
||||
ipa_drv_res->modem_load_ipa_fw = false;
|
||||
ipa_drv_res->fnr_stats_not_supported = false;
|
||||
|
||||
/* Get IPA HW Version */
|
||||
result = of_property_read_u32(pdev->dev.of_node, "qcom,ipa-hw-ver",
|
||||
@ -8255,6 +8257,13 @@ static int get_ipa_dts_configuration(struct platform_device *pdev,
|
||||
ipa_drv_res->modem_load_ipa_fw
|
||||
? "True" : "False");
|
||||
|
||||
ipa_drv_res->fnr_stats_not_supported =
|
||||
of_property_read_bool(pdev->dev.of_node,
|
||||
"qcom,fnr-stats-not-supported");
|
||||
IPADBG(": FnR stats not supported = %s\n",
|
||||
ipa_drv_res->fnr_stats_not_supported
|
||||
? "True" : "False");
|
||||
|
||||
result = of_property_read_string(pdev->dev.of_node,
|
||||
"qcom,use-gsi-ipa-fw", &ipa_drv_res->gsi_fw_file_name);
|
||||
if (!result)
|
||||
|
@ -2153,6 +2153,7 @@ struct ipa3_context {
|
||||
bool is_eth_bridging_supported;
|
||||
bool is_bw_monitor_supported;
|
||||
bool modem_load_ipa_fw;
|
||||
bool fnr_stats_not_supported;
|
||||
};
|
||||
|
||||
struct ipa3_plat_drv_res {
|
||||
@ -2225,6 +2226,7 @@ struct ipa3_plat_drv_res {
|
||||
bool is_eth_bridging_supported;
|
||||
bool is_bw_monitor_supported;
|
||||
bool modem_load_ipa_fw;
|
||||
bool fnr_stats_not_supported;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -4169,7 +4169,8 @@ int rmnet_ipa3_query_tethering_stats_all(
|
||||
} else if (upstream_type == IPA_UPSTEAM_WLAN) {
|
||||
IPAWANDBG_LOW(" query wifi-backhaul stats\n");
|
||||
if (ipa3_ctx_get_type(IPA_HW_TYPE) < IPA_HW_v4_5 ||
|
||||
!ipa3_ctx_get_flag(IPA_HW_STATS_EN)) {
|
||||
!ipa3_ctx_get_flag(IPA_HW_STATS_EN) ||
|
||||
ipa3_ctx->fnr_stats_not_supported) {
|
||||
IPAWANDBG("hw version %d,hw_stats.enabled %d\n",
|
||||
ipa3_ctx_get_type(IPA_HW_TYPE),
|
||||
ipa3_ctx_get_flag(IPA_HW_STATS_EN));
|
||||
|
Loading…
Reference in New Issue
Block a user