]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Use wdev id to obtain P2P Device scan results
authorArend van Spriel <arend@broadcom.com>
Tue, 25 Jun 2013 10:51:14 +0000 (13:51 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 25 Jun 2013 10:51:14 +0000 (13:51 +0300)
In order to get a P2P-DEVICE-FOUND event the supplicant needs to
see a peer device during SEARCH and LISTEN phase. The SEARCH
phase does a scan so obtaining the scan results for the P2P Device
interface needs to be supported, i.e., use the wdev_id.

Signed-hostap: Arend van Spriel <arend@broadcom.com>

src/drivers/driver_nl80211.c

index 612a2667c7d8f15976612cbd3fc865a9fc617da3..6047545231ba29fa4d01257f93f460f158b41776 100644 (file)
@@ -4809,7 +4809,8 @@ nl80211_get_scan_results(struct wpa_driver_nl80211_data *drv)
                goto nla_put_failure;
 
        nl80211_cmd(drv, msg, NLM_F_DUMP, NL80211_CMD_GET_SCAN);
-       NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
+       if (nl80211_set_iface_id(msg, &drv->first_bss) < 0)
+               goto nla_put_failure;
 
        arg.drv = drv;
        arg.res = res;