summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamon Kim <taekhun.kim@broadcom.com>2022-06-03 14:43:26 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-06-03 14:43:26 +0000
commit168a8dda1c702078b63820bed2fad1d0da7ffcc8 (patch)
treea3126c431b5fcc033315e6a8061907b4472cffaa
parentf58d0ab9bd3294b0948964b930f3164215ed38ca (diff)
parent863d5f9c661cfe64b6ec0e5880f12fd2049b3940 (diff)
downloadwlan-168a8dda1c702078b63820bed2fad1d0da7ffcc8.tar.gz
HAL: Fixed WifiHAL stuck during interface deletion am: 863d5f9c66
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/broadcom/wlan/+/18728846 Change-Id: If252a2a8b44d06ae2b6c218ca3ae5bb07155c510 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rwxr-xr-xbcmdhd/wifi_hal/wifi_hal.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/bcmdhd/wifi_hal/wifi_hal.cpp b/bcmdhd/wifi_hal/wifi_hal.cpp
index 36976fe..82974bd 100755
--- a/bcmdhd/wifi_hal/wifi_hal.cpp
+++ b/bcmdhd/wifi_hal/wifi_hal.cpp
@@ -655,10 +655,13 @@ void wifi_cleanup(wifi_handle handle, wifi_cleaned_up_handler handler)
if (wlan0Handle != NULL) {
ALOGE("Calling hal cleanup");
if (!get_halutil_mode()) {
+ wifi_cleanup_dynamic_ifaces(handle);
+ ALOGI("Cleaned dynamic virtual ifaces\n");
result = wifi_stop_hal(wlan0Handle);
if (result != WIFI_SUCCESS) {
ALOGE("wifi_stop_hal failed");
}
+ ALOGI("wifi_stop_hal success");
}
} else {
@@ -714,9 +717,6 @@ void wifi_cleanup(wifi_handle handle, wifi_cleaned_up_handler handler)
WifiCommand *cmd = (WifiCommand *)cbi->cb_arg;
ALOGE("Leaked command %p", cmd);
}
- if (!get_halutil_mode()) {
- wifi_cleanup_dynamic_ifaces(handle);
- }
pthread_mutex_unlock(&info->cb_lock);
info->clean_up = true;
@@ -2517,7 +2517,7 @@ public:
}
int createIface() {
- ALOGE("Creating virtual interface");
+ ALOGD("Creating virtual interface");
WifiRequest request(familyId(), ifaceId());
int result = createRequest(request, mIfname, mType, mwlan0_id);
if (result != WIFI_SUCCESS) {
@@ -2530,7 +2530,7 @@ public:
ALOGE("failed to get the virtual iface create response; result = %d\n", result);
return result;
}
- ALOGE("Created virtual interface");
+ ALOGD("Created virtual interface");
return WIFI_SUCCESS;
}
@@ -2548,6 +2548,7 @@ public:
ALOGE("failed to get response of delete virtual interface; result = %d\n", result);
return result;
}
+ ALOGD("Deleted virtual interface");
return WIFI_SUCCESS;
}
protected:
@@ -2563,8 +2564,11 @@ static std::vector<std::string> added_ifaces;
static void wifi_cleanup_dynamic_ifaces(wifi_handle handle)
{
int len = added_ifaces.size();
+ ALOGI("%s: virtual iface size %d\n", __FUNCTION__, len);
while (len--) {
wifi_virtual_interface_delete(handle, added_ifaces.front().c_str());
+ ALOGI("%s: deleted virtual iface %s\n",
+ __FUNCTION__, added_ifaces.front().c_str());
}
added_ifaces.clear();
}