Merge remote-tracking branch 'origin/Bitra.LA.3.2.1-target' into fp4t-target-0414
diff --git a/qcwcn/wifi_hal/wificonfig.cpp b/qcwcn/wifi_hal/wificonfig.cpp
index ee11c54..533942a 100644
--- a/qcwcn/wifi_hal/wificonfig.cpp
+++ b/qcwcn/wifi_hal/wificonfig.cpp
@@ -402,6 +402,9 @@
wifi_handle wifiHandle = getWifiHandle(handle);
u32 bdf_file = 0;
+ /* The set(0~4) we will read in bdwlan.bin */
+ u32 set_sar_number = 1;
+ u32 chip_mimo_number = 2;
ALOGV("%s : power scenario:%d", __FUNCTION__, scenario);
wifiConfigCommand = new WiFiConfigCommand(
@@ -439,19 +442,25 @@
switch (scenario) {
case WIFI_POWER_SCENARIO_VOICE_CALL:
case WIFI_POWER_SCENARIO_ON_HEAD_CELL_OFF:
- bdf_file = QCA_WLAN_VENDOR_ATTR_SAR_LIMITS_SELECT_BDF0;
+ // bdf_file = QCA_WLAN_VENDOR_ATTR_SAR_LIMITS_SELECT_BDF0;
+ bdf_file = QCA_WLAN_VENDOR_ATTR_SAR_LIMITS_SELECT_NONE;
+ set_sar_number = 1;
break;
case WIFI_POWER_SCENARIO_ON_HEAD_CELL_ON:
- bdf_file = QCA_WLAN_VENDOR_ATTR_SAR_LIMITS_SELECT_BDF1;
+ // bdf_file = QCA_WLAN_VENDOR_ATTR_SAR_LIMITS_SELECT_BDF1;
+ bdf_file = QCA_WLAN_VENDOR_ATTR_SAR_LIMITS_SELECT_V2_0;
+ set_sar_number = 0;
break;
case WIFI_POWER_SCENARIO_ON_BODY_CELL_OFF:
bdf_file = QCA_WLAN_VENDOR_ATTR_SAR_LIMITS_SELECT_BDF2;
+ set_sar_number = 3;
break;
case WIFI_POWER_SCENARIO_ON_BODY_CELL_ON:
bdf_file = QCA_WLAN_VENDOR_ATTR_SAR_LIMITS_SELECT_BDF3;
+ set_sar_number = 2;
break;
default:
@@ -460,9 +469,19 @@
goto cleanup;
}
+ wifiConfigCommand->put_u32(QCA_WLAN_VENDOR_ATTR_SAR_LIMITS_NUM_SPECS, chip_mimo_number);
+ struct nlattr *nlData_spec, *nlData_spec_attr;
+ nlData_spec = wifiConfigCommand->attr_start(QCA_WLAN_VENDOR_ATTR_SAR_LIMITS_SPEC);
+ for (int i = 0; i < chip_mimo_number; i++) {
+ nlData_spec_attr = wifiConfigCommand->attr_start(QCA_WLAN_VENDOR_ATTR_SAR_LIMITS_SPEC_POWER_LIMIT_INDEX);
+ wifiConfigCommand->put_u32(QCA_WLAN_VENDOR_ATTR_SAR_LIMITS_SPEC_POWER_LIMIT_INDEX, set_sar_number);
+ wifiConfigCommand->put_u32(QCA_WLAN_VENDOR_ATTR_SAR_LIMITS_SPEC_CHAIN, i);
+ wifiConfigCommand->attr_end(nlData_spec_attr);
+ }
+ wifiConfigCommand->attr_end(nlData_spec);
if (wifiConfigCommand->put_u32(
QCA_WLAN_VENDOR_ATTR_SAR_LIMITS_SAR_ENABLE,
- bdf_file)) {
+ QCA_WLAN_VENDOR_ATTR_SAR_LIMITS_SELECT_V2_0)) {
ALOGE("failed to put SAR_ENABLE");
goto cleanup;
}