summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVeerendranath Jakkam <quic_vjakkam@quicinc.com>2020-03-20 20:46:27 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-03-20 20:46:27 +0000
commitb06bd7df4968b61dbb30188adc8168e1a2c2d678 (patch)
tree136d49516653ee557b9c058bb9f87ea7476f80f6
parentabeb8d56954ae6c0cc187f63568d2ad5046f2fc4 (diff)
parent24c9cf08542055ba659517d7ea7a85e12299c219 (diff)
downloadwlan-b06bd7df4968b61dbb30188adc8168e1a2c2d678.tar.gz
WiFi-HAL: get base wlan interface index from global handle am: 24c9cf0854
Change-Id: I939e6824a342573545e78447a2a5c41c0cc8e599
-rw-r--r--qcwcn/wifi_hal/wificonfig.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/qcwcn/wifi_hal/wificonfig.cpp b/qcwcn/wifi_hal/wificonfig.cpp
index 1bf71c6..7590f62 100644
--- a/qcwcn/wifi_hal/wificonfig.cpp
+++ b/qcwcn/wifi_hal/wificonfig.cpp
@@ -554,6 +554,13 @@ wifi_error wifi_set_thermal_mitigation_mode(wifi_handle handle,
WiFiConfigCommand *wifiConfigCommand;
struct nlattr *nlData;
u32 qca_vendor_thermal_level;
+ hal_info *info = getHalInfo(handle);
+
+ if (!info || info->num_interfaces < 1) {
+ ALOGE("%s: Error wifi_handle NULL or base wlan interface not present",
+ __FUNCTION__);
+ return WIFI_ERROR_UNKNOWN;
+ }
wifiConfigCommand = new WiFiConfigCommand(
handle,
@@ -573,10 +580,9 @@ wifi_error wifi_set_thermal_mitigation_mode(wifi_handle handle,
}
/* Set the interface Id of the message. */
- ret = wifiConfigCommand->set_iface_id("wlan0");
- if (ret != WIFI_SUCCESS) {
- ALOGE("%s: failed to set iface id. Error:%d",
- __FUNCTION__, ret);
+ if (wifiConfigCommand->put_u32(NL80211_ATTR_IFINDEX,
+ info->interfaces[0]->id)) {
+ ALOGE("%s: Failed to put iface id", __FUNCTION__);
goto cleanup;
}