aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ctrl_iface.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2013-10-14 16:22:09 (GMT)
committerJouni Malinen <j@w1.fi>2013-10-14 16:22:09 (GMT)
commitbb50ae439686fb69f52288a618e6d176462ab726 (patch)
tree7484e6a3a397d1d7302ebafa4313b2984b4e0234 /wpa_supplicant/ctrl_iface.c
parentff57398fcab817374dac975aaab3eef5bf64f381 (diff)
downloadhostap-bb50ae439686fb69f52288a618e6d176462ab726.zip
hostap-bb50ae439686fb69f52288a618e6d176462ab726.tar.gz
hostap-bb50ae439686fb69f52288a618e6d176462ab726.tar.bz2
P2P: Show P2P flag in BSS entries also based on Beacon frames
It is possible that a P2P GO has been discovered through a non-P2P scan that did not return P2P IE in Probe Response frames. To cover those cases, check also Beacon frame (if received) for P2P IE. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/ctrl_iface.c')
-rw-r--r--wpa_supplicant/ctrl_iface.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 6f2fc5d..0f893f7 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -2016,6 +2016,8 @@ static int wpa_supplicant_ctrl_iface_scan_result(
const u8 *ie, *ie2, *p2p;
p2p = wpa_bss_get_vendor_ie(bss, P2P_IE_VENDOR_TYPE);
+ if (!p2p)
+ p2p = wpa_bss_get_vendor_ie_beacon(bss, P2P_IE_VENDOR_TYPE);
if (p2p && bss->ssid_len == P2P_WILDCARD_SSID_LEN &&
os_memcmp(bss->ssid, P2P_WILDCARD_SSID, P2P_WILDCARD_SSID_LEN) ==
0)
@@ -3265,7 +3267,8 @@ static int print_bss_info(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
return 0;
pos += ret;
}
- if (wpa_bss_get_vendor_ie(bss, P2P_IE_VENDOR_TYPE)) {
+ if (wpa_bss_get_vendor_ie(bss, P2P_IE_VENDOR_TYPE) ||
+ wpa_bss_get_vendor_ie_beacon(bss, P2P_IE_VENDOR_TYPE)) {
ret = os_snprintf(pos, end - pos, "[P2P]");
if (ret < 0 || ret >= end - pos)
return 0;