qcacld-3.0: Add support to convert SAR_V3
Currently host converts SAR_V1 to SAR_V2 if fw supports SAR_V2 and userspace has given SAR_V1 and host does not check if fw supports SAR_V3 but userspace has given SAR_V1. To address this issue add modify code to check if fw supports SAR_V2 or SAR_V3 but userspace has given SAR_V1. Convert SAR_V1 to SAR_V2 in both the cases. CRs-Fixed: 3313783 Change-Id: I37efa41ec65684a9bb362c894878525bd71704a5
This commit is contained in:

committed by
Madan Koyyalamudi

parent
ec4c798f68
commit
215ebfec3c
@@ -548,7 +548,8 @@ hdd_convert_sarv1_to_sarv2(struct hdd_context *hdd_ctx,
|
|||||||
struct sar_limit_cmd_row *row;
|
struct sar_limit_cmd_row *row;
|
||||||
|
|
||||||
hdd_enter();
|
hdd_enter();
|
||||||
if (hdd_ctx->sar_version != SAR_VERSION_2) {
|
if (hdd_ctx->sar_version != SAR_VERSION_2 &&
|
||||||
|
hdd_ctx->sar_version != SAR_VERSION_3) {
|
||||||
hdd_debug("SAR version: %d", hdd_ctx->sar_version);
|
hdd_debug("SAR version: %d", hdd_ctx->sar_version);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -772,13 +773,14 @@ static int __wlan_hdd_set_sar_power_limits(struct wiphy *wiphy,
|
|||||||
QCA_WLAN_VENDOR_ATTR_SAR_LIMITS_SELECT_BDF0 &&
|
QCA_WLAN_VENDOR_ATTR_SAR_LIMITS_SELECT_BDF0 &&
|
||||||
sar_enable <=
|
sar_enable <=
|
||||||
QCA_WLAN_VENDOR_ATTR_SAR_LIMITS_SELECT_BDF4) &&
|
QCA_WLAN_VENDOR_ATTR_SAR_LIMITS_SELECT_BDF4) &&
|
||||||
hdd_ctx->sar_version == SAR_VERSION_2 &&
|
(hdd_ctx->sar_version == SAR_VERSION_2 ||
|
||||||
|
hdd_ctx->sar_version == SAR_VERSION_3) &&
|
||||||
!hdd_ctx->config->enable_sar_conversion) {
|
!hdd_ctx->config->enable_sar_conversion) {
|
||||||
hdd_err("SARV1 to SARV2 is disabled from ini");
|
hdd_err("SARV1 to SARV2 is disabled from ini");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
} else if (sar_enable ==
|
} else if (sar_enable ==
|
||||||
QCA_WLAN_VENDOR_ATTR_SAR_LIMITS_SELECT_V2_0 &&
|
QCA_WLAN_VENDOR_ATTR_SAR_LIMITS_SELECT_V2_0 &&
|
||||||
hdd_ctx->sar_version == SAR_VERSION_1) {
|
hdd_ctx->sar_version == SAR_VERSION_1) {
|
||||||
hdd_err("FW expects SARV1 given command is SARV2");
|
hdd_err("FW expects SARV1 given command is SARV2");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user