diff options
author | Sunil Ravi <sunilravi@google.com> | 2021-06-16 17:22:12 -0700 |
---|---|---|
committer | Sunil Ravi <sunilravi@google.com> | 2021-06-16 17:22:12 -0700 |
commit | 6a16d8c74cd60e030728f2ea53fb1e2358a9407c (patch) | |
tree | bf6263c7ba344c4175470a5df0c0a88c6a161c8a | |
parent | 84bb3e1228904b25a01763cfafbe3e365d92db4a (diff) | |
download | wpa_supplicant_8-6a16d8c74cd60e030728f2ea53fb1e2358a9407c.tar.gz |
Fix for dropping p2p group remove event in HIDL
On implemetations where p2p device interface's parent is
sta interface(wlan0), p2p supplicant HIDL fails to find the
p2p device interface to notify the p2p group event. This happens
when p2p client fails to find the auto GO to connect. In this
particular case p2p group interface is not created. So supplicant
HIDL calls wpas_notify_p2p_group_removed() by passing p2p device
interface. Function getTargetP2pIfaceForGroup() which finds the device
interface is not taking care of the implementations where p2p device
interface is created under wlan0 interface.
So to fix this issue added a case to check if received interface is a
p2p device interface.
Bug: 191155391
Test: Manual - Triggered p2p connect failure and confirmed that p2p
group removed event is sent to framework.
Change-Id: I6fb6bbb89a329d2fb641dfcbcc6f128e3827a3b0
-rw-r--r-- | wpa_supplicant/hidl/1.4/hidl_manager.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/wpa_supplicant/hidl/1.4/hidl_manager.cpp b/wpa_supplicant/hidl/1.4/hidl_manager.cpp index 4a09da10..0a5fcebc 100644 --- a/wpa_supplicant/hidl/1.4/hidl_manager.cpp +++ b/wpa_supplicant/hidl/1.4/hidl_manager.cpp @@ -2176,6 +2176,14 @@ struct wpa_supplicant *HidlManager::getTargetP2pIfaceForGroup( return NULL; struct wpa_supplicant *target_wpa_s = wpa_group_s->parent; + + // check wpa_supplicant object is a p2p device interface + if ((wpa_group_s == wpa_group_s->p2pdev) && wpa_group_s->p2p_mgmt) { + if (p2p_iface_object_map_.find(wpa_group_s->ifname) != + p2p_iface_object_map_.end()) + return wpa_group_s; + } + if (p2p_iface_object_map_.find(target_wpa_s->ifname) != p2p_iface_object_map_.end()) return target_wpa_s; |